Notifications
Announcements
No record found.
I am trying to shrink the log file but to no avail. I am using the instructions for SQL 2000 and the sp_attach command is not working. Is there a revision to this command in SQL 2005?
*This post is locked for comments
try this:
select name from sysfiles
backup log <databasename> with truncate_only
dbcc shrinkfile(<databasename>_log,2)
alter database <databasename> set recovery simple
I am at the sp_attach command do I need to just re-attach the database first to try this?
not sure why you detached, see technet.microsoft.com/.../ms190794.aspx
Other solution I have used for database connection problems (failed installation etc.):
1. obtain mdf and ldf from failed install
2. create new sql and database with same name
3. stop sql and insert old mdf and ldf overwriting new database then restart sql
4. use SO admin to backup database to bck file
5. delete database then create again and restore from bck file
6. use shrinkfile and set recovery solution previously mentioned
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.