January 21, 2005 at 4:22 pm
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '2'.
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '
The database is "2test" and I have noticed that any database that starts with a number gets this error when clearing the transaction logs with:
"USE 2test
GO
DBCC SHRINKFILE (2test_log, 1)"
is there a work around for this?
January 22, 2005 at 2:10 pm
Yes, there is a workaround! Avoid using numbers for identifiers in the first place generally in SQL Server.
Another workaround might be
USE [2test]
GO
DBCC SHRINKFILE ([2test_log], 1)
Note the [ ]
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 23, 2005 at 9:04 pm
Great Thanks! I have inherited this, so I will have to do the best I can to get it in order. Other than clearing transation logs what other problems can this cause that I will need to be aware of?
January 24, 2005 at 12:56 pm
I would say, any place where you need to reference to the db name, there might be a potential issue. Such as BACKUP, RESTORE, maintenance... Butr it should be safe with the []
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply