|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Could not locate file 'data01_log' in sysfiles
getting the above error. Any advice is greatly appreciated. sp_helpdb output: DATA01 1 e:\mssql\data\data01.mdf PRIMARY 4102976 KB Unlimited 10% data only DATA01_log 2 c:\logfiles\data01_log.ldf NULL 327296 KB 460800 KB 10% log only When I run shrinkfile I get this: dbcc shrinkfile (data01_log,320) Server: Msg 8985, Level 16, State 1, Line 1 Could not locate file 'data01_log' in sysfiles. DBCC execution completed. If DBCC printed error messages, contact your system administrator. Hi
If you do a SELECT * from sysfiles , what is the NAME returned ? Are you then using the exact - case sensitive spelling? -- Show quoteHide quoteJack Vamvas __________________________________________________________________ Receive free SQL tips - register at www.ciquery.com/sqlserver.htm SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm New article by Jack Vamvas - SQL and Markov Chains - www.ciquery.com/articles/art_04.asp "Rick Billingsley" <RickBillings***@discussions.microsoft.com> wrote in c:\logfiles\data01_log.ldfmessage news:35983A24-DD51-43EA-A644-BA857A76F29B@microsoft.com... > I need to shrink this log file, and setup some maintenance tasks, but I am > getting the above error. Any advice is greatly appreciated. > > sp_helpdb output: > > DATA01 > 1 e:\mssql\data\data01.mdf > > > > PRIMARY 4102976 KB Unlimited 10% data only > DATA01_log > 2 Show quoteHide quote > > > > NULL 327296 KB 460800 KB 10% log only > > When I run shrinkfile I get this: > > dbcc shrinkfile (data01_log,320) > Server: Msg 8985, Level 16, State 1, Line 1 > Could not locate file 'data01_log' in sysfiles. > DBCC execution completed. If DBCC printed error messages, contact your > system administrator. > the select query returns the mastlog. This is not the log I am trying to
shrink/backup. I believe the problem is that the log I want is on a different logical drive (c vs. e) than the database. I have tried running the shrinkfile with the exact case-sensitive spelling with the same results. Change your database context to Data01. The select statement
indicates that you are trying to do this from the master database. Shrinkfile applies to files in the current database so you need to be in the appropriate database. -Sue On Mon, 23 Jan 2006 08:58:03 -0800, "Rick Billingsley" <RickBillings***@discussions.microsoft.com> wrote: Show quoteHide quote >the select query returns the mastlog. This is not the log I am trying to >shrink/backup. > >I believe the problem is that the log I want is on a different logical drive >(c vs. e) than the database. > >I have tried running the shrinkfile with the exact case-sensitive spelling >with the same results.
Other interesting topics
Commit, rollback...
SQL 2005 unrestricted log file Benefits of 64bit SQL? SQL Server 2005 and VS2005 FillFactor and Intermeditory Pages Owner of a database Error inserting into iSeries DB2 table with long name via SQL Server 2000 linked Server [SQL2005] Backup Schedule TO DO List for HA DB Server Unable to grant rights to user |
|||||||||||||||||||||||