472,122 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 software developers and data experts.

how to create backup in sql 6.0 using sql command

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
5 2567
802 Expert 512MB
Hello Varinder,

I believe you are talking about Micorosft SQL Server. I am moving the thread to SQL Server forum
Feb 17 '09 #2
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
thanks for reply
i am not understanding your answer please can you breif it

Feb 18 '09 #4
374 256MB
Expand|Select|Wrap|Line Numbers
  1. Backup database DBNAME to disk = 'FILEPATH'
Feb 18 '09 #5
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.

Similar topics

7 posts views Thread by Oliver Gräser | last post: by
3 posts views Thread by Cristina | last post: by
2 posts views Thread by nt | last post: by
2 posts views Thread by Yannick Turgeon | last post: by
2 posts views Thread by R. Clausen | last post: by
4 posts views Thread by uthuras | last post: by
1 post views Thread by kaming | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.