From: big on
Hi,
In SQLSERVER 2005 when shrinking I receive :
backup log MYDB with truncate_only;
DBCC SHRINKFILE ('MYDB_log',3000);

Could not locate file 'MYDB_log.ldf' in sysfiles.
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.

Can you help me ?
Thank you.
From: Erland Sommarskog on
big (big(a)discussions.microsoft.com) writes:
> In SQLSERVER 2005 when shrinking I receive :
> backup log MYDB with truncate_only;
> DBCC SHRINKFILE ('MYDB_log',3000);
>
> Could not locate file 'MYDB_log.ldf' in sysfiles.
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.

Use sp_helpdb. The second result set, the first column, gives you the
logical name of the log file.

--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx