declare @dbname varchar(40)
declare db cursor
for select name from master..sysdatabases where dbid > 1
open db
fetch db into @dbname
while @@fetch_status <> -1
Begin
exec ("backup database [" + @dbname + "] to disk = 'C:\Backups\BK_"+ @dbname +
".dmp' with init")
fetch next from db into @dbname
end
close db
deallocate db
Label List
- Architecture
- Art of SQL Server
- asynchronous mirroring
- csv
- dmv
- find outdated Statistics
- Free SQL Server tools
- index fragmentation
- Installation
- Katmai
- Learn SQL Server 2005
- Maintenance Plan
- outdated Statistics
- Reset Identity column
- Scripts
- SPID
- sql server 2008
- sys.dm_db_index_physical_stats
- sys.dm_exec_connections
- tsql
- update statistics