469,125 Members | 1,676 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,125 developers. It's quick & easy.

how to create backup in sql 6.0 using sql command

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
5 2441
mwasif
801 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
progvar
40
thanks for reply
i am not understanding your answer please can you breif it

thanks
varinder
Feb 18 '09 #4
OuTCasT
374 256MB
Expand|Select|Wrap|Line Numbers
  1. Backup database DBNAME to disk = 'FILEPATH'
Feb 18 '09 #5
@progvar
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.