SQL Commands: Backup Command
SQL Commands: Backup Command
Backup Command
1:- Full Backup: - take the backup of entire database which can
backuped up in case of failure.
3:- Transaction Log backup:- All the log record can be backup by which
is written to transaction log since the last full backup and log backup
was performed.
4:- File and File group Backup:-When a database is divided across many
files and filegroups, these file and file group can be backuped
individually.
5:-Backup database database name file group=’secondary’ to disk=
‘F:\test_1 backup\Full backup\databasename.bak’
19:- Restore database database name file group secondary from disk
=’ F:\test_1 backup\Full backup\database
name\pa_backup_201102251205.bak’
DMV Command
from sys.dm_db_index_physical_stats(db_id(),
object_id (‘Tablename’),
LOCK COMMAND
45:- SP_LOCK This command is use for check the lock.
83 checkpoint
85 sp_who2 ‘active’
99 select
spid,blocked,dbid,cpu,hostname,program_name,cmd,loginame from
sysprocesses
wherespid=85
reconfigure with override: after executing the uper command mandatry to run