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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Can't locate db in sysfile???

Author  Topic 

loiter99
Starting Member

38 Posts

Posted - 2005-01-21 : 09:47:17
Hello,
I tried to do an emergency shrink on a trans log and got the following error:

dbcc shrinkfile ('db_log')

Could not locate file 'db_log' in sysfiles.

If I run sp_databases I can see the db, I ran dbcc checkdb on the db and everything came back fine. What gives?

thanks in advance
J

Kristen
Test

22859 Posts

Posted - 2005-01-21 : 12:44:44
SELECT name
FROM MyDatabase.dbo.sysfiles

then use the appropriate name from that in your dbcc shrinkfile('XXXX') command

Kristen
Go to Top of Page
   

- Advertisement -