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
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
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
I am at the sp_attach command do I need to just re-attach the database first to try this?
try this:
select name from sysfiles
backup log <databasename> with truncate_only
dbcc shrinkfile(<databasename>_log,2)
alter database <databasename> set recovery simple
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156