Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-01-20 : 08:17:23
|
| speno writes "I've got several databases that I am trying to backup and shrink.When I issue the command "backup log database_name with no_log", most work successfully. However, there are 2 that will not complete and issue the response "Server: Msg 170, Level 15, State 1, Line 1 - Line 1: Incorrect syntax near 'database_name'.I'm using the database name located in the sysfiles table for that particular database but it won't recognize that name. Where else should I look to determine what database name it is looking for? Thanks." |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-01-20 : 11:06:39
|
| The database name is the name that you used when you did the create statement. To find the name, go to sysdatabases. The sysfiles table has the name of the files and the location of these files. |
 |
|
|
speno
Starting Member
18 Posts |
Posted - 2003-01-22 : 13:22:56
|
| Using your suggestion, I looked in sysdatabases and discovered that the differences for those databases was that the compatability level was set on 65 for the 2 that weren't working. All others were on 80. After changing them to 80, the command line worked. Thanks for the direction. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-01-22 : 13:33:22
|
| Ah yes, the backup command is different in version 6.5. You would have had to use the DUMP command instead of the BACKUP command. When you upgrade from 6.5 to 2k, it doesn't change the compatibility mode for you. It is a manual step after the upgrade. You don't have to change the mode, but if everything works on 2k, then you might as well so that you don't have to remember the 6.5 syntax. |
 |
|
|
|
|
|
|
|