Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to Unlock the Database Expand / Collapse
Author
Message
Posted Wednesday, April 23, 2014 8:28 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 8:59 AM
Points: 94, Visits: 247
Hi All,
How to Unlock the database in sql 2008.
is there any Query to Unlock database....

Regards
Jagadeesh...
Post #1564307
Posted Wednesday, April 23, 2014 8:29 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:05 AM
Points: 42,469, Visits: 35,540
What do you mean 'unlock a database'? What are you trying to do?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1564310
Posted Wednesday, April 23, 2014 8:42 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 8:59 AM
Points: 94, Visits: 247
Post #1564315
Posted Wednesday, April 23, 2014 8:44 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:05 AM
Points: 42,469, Visits: 35,540
Still not understanding the problem, could you explain in more detail?

If it's file permissions, then grant the needed permissions or ask your administrator to help you.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1564318
Posted Wednesday, April 23, 2014 8:49 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 8:59 AM
Points: 94, Visits: 247
am having the database in External Drive ,That was locked by that local system.
Now i want to restored that Locked Database from that Exte Drive to New System...

Note:Both Systems are not in Domain...
Post #1564321
Posted Wednesday, April 23, 2014 8:54 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 5:12 AM
Points: 139, Visits: 398
There are having two systems which are not in domain. so they re planning to restore the database from A server to B.

in A server they are using the external drive but they don't have the access to A sql server. they copied the backup file and trying restore in B server here they are getting the error like "Unable to open the physical file "p:\*****\*****.mdf". Operating system error 5: "5(error not found)"

Post #1564323
Posted Wednesday, April 23, 2014 10:42 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:05 AM
Points: 42,469, Visits: 35,540
You need to grant the SQL Server service account (the account SQL runs under) full control of all data and log files and all folders which contain data and log files.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1564379
Posted Wednesday, April 23, 2014 12:18 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 9:10 AM
Points: 15,537, Visits: 27,914
If the files are "locked" it sounds like a SQL Server instance is actively using them. You may want to look into the process for taking a database backup to assist you in migrating your database to a new server.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1564413
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse