April 4, 2011 at 7:23 am
Ops manager reported the transaction log for database Viper was full.
Using SSMS I connected to the server but found no database Viper.
I then RDP'd to the server and found Viper.MDF and Viper.LDF
Back to SSMS and ran attach database but that resulted in Error:5123
Create file encountered an operating system error 32..the process cannot access the file b/c it is being used by another process.
What's going on? I want to be able to backup the log and shrink it or truncate and do a full backup if I have to but I can't at this point.
April 4, 2011 at 7:29 am
Are you logged in the correct instance?
Are you logging as a SA? If not, do you have permissions to access that db?
April 4, 2011 at 8:05 am
Ninja's_RGR'us (4/4/2011)
Are you logged in the correct instance?Are you logging as a SA? If not, do you have permissions to access that db?
Good point..checking on that now..
April 4, 2011 at 8:06 am
I'm SA.
April 4, 2011 at 8:08 am
That's the whole extent of my experience with that issue. I won't have anything else to offer other than googling for it.
April 4, 2011 at 8:16 am
Sounds like you've got two instances on your server. Go on to the server and run SQL Server Configuration Manager. This will list all the instances that are installed.
John
April 4, 2011 at 8:20 am
Plan Z, when you are on the correct server, lookup the sql logs about that database, that should give you more info.
Plan ZZ, is it possible to revoke Sys Admin rights to SA?
April 4, 2011 at 11:17 am
John Mitchell-245523 (4/4/2011)
Sounds like you've got two instances on your server. Go on to the server and run SQL Server Configuration Manager. This will list all the instances that are installed.John
Nice John! You were right. When I connect to the server via SSMS I can see all E drive databases but the VIPER database (which its mdf is located on E:) But when I checked out C:\programfiles\... I found MSSQL$VIPER!
Now how do I connect to that?
April 4, 2011 at 10:00 pm
Vertigo44 (4/4/2011)
John Mitchell-245523 (4/4/2011)
Sounds like you've got two instances on your server. Go on to the server and run SQL Server Configuration Manager. This will list all the instances that are installed.John
Nice John! You were right. When I connect to the server via SSMS I can see all E drive databases but the VIPER database (which its mdf is located on E:) But when I checked out C:\programfiles\... I found MSSQL$VIPER!
Now how do I connect to that?
Probably as SameServerNameAsUsual\VIPER
Leo
Leo
Nothing in life is ever so complicated that with a little work it can't be made more complicated.
April 12, 2011 at 5:24 pm
I got the 5123 trying to attach the adventureworks database to SQL 2005.
Pretty simple.
A few months ago I had logged into Windows as the user name "SQL" and had downloaded the AdventureWorks.MSI and run it. This created the AdventureWorks.mdf file.
But the other day I was logged in as Windows user "MSS" when trying to attach the MDF. I would get the 5123 error message.
After about an hourof Internet research and poking around with Windows Explorer I figured out that the Window User "SQL" and SYSTEM were the only two who had full permissions to the the mdf.
So I logged out of "MSS" and then logged in as "SQL" and did the attach. It worked!! I was able to attach the AdventureWorks database and can now use it, whatever user I am logged in as.
April 13, 2011 at 7:44 am
As suggested earlier, it's probably another SQL Server instance, but if this continues to by a mystery, you can try using the Process Explorer utility to identify what process has the file open.
http://technet.microsoft.com/en-us/sysinternals/bb896653
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply