By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,806 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,806 IT Pros & Developers. It's quick & easy.

how to create backup in sql 6.0 using sql command

P: 40
Hi all,
i want to create the backup of sql 6.0 database using sql command
i used this command
BACKUP DATABASE test TO DISK = 'E:\test.Bak' but
it shows the error
Msg 156, Level 15, State 1
Incorrect syntax near the keyword 'DATABASE'.

but when i used this command in sql 7.0 it works fine

please provide help me
varinder sharma
Feb 17 '09 #1
Share this Question
Share on Google+
5 Replies

Expert 100+
P: 801
Hello Varinder,

I believe you are talking about Micorosft SQL Server. I am moving the thread to SQL Server forum
Feb 17 '09 #2

P: 48
Expand|Select|Wrap|Line Numbers
  1. C:\PROGRA~1\MICROS~3\MSSQL\Binn\SQLMAINT -S "Servername" -U "DBusername" -P "passowrd"  -D "Databasename" -BkUpMedia DISK -DelBkUps 2weeks -BkUpDB "Drive:\BackupFilePath"
Naote that "C:\PROGRA~1\MICROS~3\MSSQL\Binn\SQLMAINT" would change bepending on your SQL server anf binn path.
Feb 18 '09 #3

P: 40
thanks for reply
i am not understanding your answer please can you breif it

Feb 18 '09 #4

P: 374
Expand|Select|Wrap|Line Numbers
  1. Backup database DBNAME to disk = 'FILEPATH'
Feb 18 '09 #5

P: 48
Make a batch file with ".cmd" or ".bat" file and cut paste the following into the batch file with appropriate obvious changes. SQLMAINT is a Sql Server command line utility, which you could make use for UR purpose

"C:\PROGRA~1\MICROS~3\MSSQL\Binn\SQLMAINT -S "Servername" -U "DBusername" -P "passowrd" -D "Databasename" -BkUpMedia DISK -DelBkUps 2weeks -BkUpDB "Drive:\BackupFilePath""
Feb 19 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.