SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 How to shrink log file in sql 2005
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ganeshkumar08
Posting Yak Master

India
187 Posts

Posted - 04/27/2009 :  01:50:29  Show Profile  Send ganeshkumar08 an AOL message  Reply with Quote
Hi,
I have a problem in shrinking a log file in sql server2005.
Below is the code i used to shrink log file.

USE Master
GO
DBCC SHRINKFILE('F:\Central Repository\Kandasamy\DB 24-09-2008\CricTestData_1.ldf', 1)
BACKUP LOG CricTestData WITH TRUNCATE_ONLY
DBCC SHRINKFILE('F:\Central Repository\Kandasamy\DB 24-09-2008\CricTestData_1.ldf', 1)
GO

after running the above code, error is displayed as below

Msg 8985, Level 16, State 1, Line 1
Could not locate file 'F:\Central Repository\Kandasamy\DB 24-09-2008\CricTestData_1.ldf' for database 'master'.
Msg 8985, Level 16, State 1, Line 3
Could not locate file 'F:\Central Repository\Kandasamy\DB 24-09-2008\CricTestData_1.ldf' for database 'master'.

Can any one please help me in shrinking log file. due to that problem i was not able to insert data in the table.

Thanks
Ganesh

Solutions are easy. Understanding the problem, now, that's the hard part

hitesh6221
Starting Member

India
28 Posts

Posted - 04/28/2009 :  04:13:08  Show Profile  Reply with Quote
Ganesh You can do while useing Master DB to perform on any UserDB so u have to use perticulerDB and then you can fire DBCC commands


Regards,
Hitesh Soni
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000