Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-06-17 : 19:09:55
|
Harpreet writes "A warm hello to all, I have been working on this issue for sometime now and have tried many things but end result is always negative. The problem in details is as follows: OS: Win 2000 Advanced Server Database: Sql Server7.0 Database Size (.mdf file):- 11.7 MB Transaction Size (.ldf file):- 1.90 GB
Main problem is to reduce the log file size, I have tried alot but not able to reduce the size. I tried to delete log file, it doesnot work. Can somebody help me in doing this.
Now i want to move this database files from c drive to e drive so as to make free space on c drive which has total disk space of 4 GB. I know the stored procedure for this is "sp_detach_db databasename" and to attach back is "sp_atach_db 'databasename','new path of .mdf file','new path of .ldf file'"
When i execute this from query analyser, i get following error:
"Server: Msg 3702, Level 16, State 1, Line 0 Cannot drop the database 'db' because it is currently in use. DBCC execution completed. If DBCC printed error messages, contact your system administrator. "
I have tried following in order to run the query but always get same error:
1.Stopped sql agent and then executed the query. 2.Stopped all other backup agent services. 3.Manually tried to kill all processes running on the database. Another thing i even tried to make the database single user, but it gave error that someuser is connected to the database.Whereas there is no user connected to the database.
I even tried to drop the database and then create anew one but it doesnot even allow me to drop the database.It gives error as follows: error #15089
If somebody has faced similar kind of problem please help me out in moving the database somehow." |
|
|
|
|
|