SQLServer Backup & Restore
SQLServer Backup & Restore 1.Full Backup BACKUP DATABASE [zsyydb] TO DISK=N'\\192.0.33.222\Backup\zsyydb.bak'WITH NOFORMAT,NOINIT,NAME=N'zsyydb-full',SKIP,NOREWIND,NOUNLOAD,STATS=5GO 2.Full Restore RESTORE DATABASE [zsyydb] FROM DISK=N'D:\backup\zsyydb.bak' WITH FILE=1,REPLACE,MOVE N'zsyydb'TO N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\zsyydb.mdf',MOVE N'HistoryData'TO N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\HistoryData.ndf...
Linux Quick Commands and Tips
Linux Quick Commands and Tips PS1 PS1="┌──\u@\h:\w\n└─\$ "┌──ubuntu@instance-20260728-0031:~└─$ Manufacturer information dmidecode -t memory Temporarily allow the required algorithms directly in your SSH command ssh -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa user@hostname Convert line break CRLF to LF sed -i 's/\r//g' a.txt Convert file encoding file input.txticonv -f UTF-16 -t UTF-8 input.txt -o output.txt Rename files find . -name "* *.md" -exec rename -f 's/ ...
echo_color
echo_color #!/usr/bin/env bashecred='\033[0;31m'ecyellow='\033[0;33m'ecgreen='\033[32m'ecend='\033[0m'echo_red() { echo -e "${ecred}$@${ecend}"}echo_yellow() { echo -e "${ecyellow}$@${ecend}"}echo_green() {echo -e "${ecgreen}$@${ecend}"} 格式解析 Colors Reference 字颜色:30—–37 echo -e “\033[30m 黑色字 \033[0m” echo -e “\033[31m 红色字 \033[0m” echo -e “\033[32m 绿色字 \033[0m” echo -e “\033[33m 黄色字 \033[0m” echo -e “\033[34m 蓝色字 \033[0m” echo -e “\033[35m 紫色字 \033[0m” echo -e “\033[36m 天蓝字 \033[...
File Archive
File Archive 归档 1 天前的文件,并将原文件删除。 #!/bin/bashfind /log -type f -name 'file_*' -atime -1 -exec mv {} /log/bak \;tar -zcf /log/bak_`date +%H%M%S`.tar.gz -P /log/bakrm -f /log/bak/*
lsb_functions
lsb_functions ## Use LSB init script functions for printing messages, if possible#lsb_functions="/lib/lsb/init-functions"if test -f $lsb_functions ; then . $lsb_functionselse # Include non-LSB Redhat init functions to make systemctl redirect work init_functions="/etc/init.d/functions" if test -f $init_functions; then . $init_functions fi log_success_msg() { echo " SUCCESS! $@" } log_failure_msg() { echo " ERROR! $@" }fi
oracle_11g_setup
oracle_11g_setup #! /usr/bin/env bash# set -e Exit immediately if a command exits with a non-zero status.set -esource /assets/colorechotrap "echo_red '******* ERROR: Something went wrong.'; exit 1" SIGTERMtrap "echo_red '******* Caught SIGINT signal. Stopping...'; exit 2" SIGINT#Install prerequisites directly without virtual packagedeps () { echo "Installing dependencies" yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 \ ksh elfutils-libelf elfutils-libelf-devel glib...
Brocade SAN Switch Configuration
Brocade SAN Switch Configuration Default IP and User IP: 10.77.77.77 User: admin/password root/fibranne Init switchname SW1tstimezone Asia/Shanghaidate "0101235922"tsclockserver "192.168.2.1"ipaddrsetipaddrshow Zoning For safety and consistent setup, always log in to the principal switch to configure the Zone. # Add alias/zoning/cfgalicreate "Esxi168_HBA0","10:00:00:00:c9:60:15:2a"zonecreate "Esxi168_HBA0_VNX5200_01_SPA01","Esxi168_HBA0;VNX5200_01_SPA01"cfgadd "HIS_CONFIG","Esxi168_HB...
Brocade SAN Switch Upgrade Firmware
Brocade SAN Switch Upgrade Firmware we use the firmwareshow command to see which firmware version is currently installed on the switch. Next, we are going to initiate a firmwaredownload command and put in all the required options. The Server name or IP Address is the IP address of your workstation that hosts the FTP server. The Username is the FTP user. The filename is the folder where the firmware is residing in and for Network Protocol, choose FTP. Lastly, put in the ...
Oracle ILOM
Oracle ILOM ・ Oracle Integrated Lights Out Manager (ILOM) 3.2 Documentation Library (简体中文) | Assigning a Static IP Address to the SP Log In to the SP (SER MGT Port) a. Configure a terminal or terminal emulator with these settings: 9600 baud, 8 bits, No parity, 1 Stop bit, No handshake. b. Default user root and password changeme. Use the password command to change the root password -> set /SP/users/root password Assign a Static IP Address to the NET MGT Port If you plan to connect to...
HACMP Add a Logical Volume
HACMP Add a Logical Volume smitty hacmp-> System Management (C-SPOC)-> Storage-> Logical Volumes-> Add a Logical Volume-> <pacsdatavg>













