Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
sql_server 217
t-sql 211
tsql 116
sqlserver 96
BRH 78
#SQLServer 66
#TSQL 56
SQL Server 34
function 11
SSMS 9

Archive · View All
August 2007 17
August 2010 8
June 2012 7
June 2011 7
November 2007 7
August 2012 6
May 2012 6
November 2011 6
August 2011 6
October 2011 6

Madhivanan's TSQL Blog

Backup Database

Aug 27 2007 9:30AM by Madhivanan   

This query will backup the current database

declare @sql varchar(1000)
select 
	@sql = 'BACKUP DATABASE '+(select db_name())+' TO DISK = ''E:\'+(select db_name())+
	convert(varchar,GETDATE(),112)+'.bak'''
Exec(@sql)

If the database name is Test then executing this query will backup Test database and name of that backup file is Test20050817.bak. Current date with the format yyyymmdd will be suffixed to the DBName

If you schedule this query to run daily, then backup will be generated daily as a seperate file

Update:

The following post can be used to take backup of all databases
http://beyondrelational.com/blogs/madhivanan/archive/2010/05/10/backup-all-databases.aspx

Tags: t-sql, sql_server, backup,


Madhivanan
3 · 40% · 12899
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"Backup Database" rated 5 out of 5 by 1 readers
Backup Database , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]