How to Find a row which is locked

https://www.ibm.com/developerworks/community/blogs/SQLTips4DB2LUW/entry/lock2row?lang=en

Row Associated to a Lock in DB2

Advertisements

Database cannot be opened due to inaccessible files or insufficient memory or disk space

Database ‘db’ cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

Here is Solution/Fix/workaround of this problem.

1. check the DB status, most of the time , it will return 1

use master
select databaseproperty(‘dbname’,’isShutdown’)

2. Change the database to offline to clear the db status

use master
alter database dbname set offline

3. Now change the database to online, at this step log file and data files will be verified by sql server

use master
alter database dbname set online

 

http://sqltrends.blogspot.com/2013/03/database-cannot-be-opened-due-to.html

Registering the Mapped Network Path on SQL Server Management Studio

Registering the Mapped Network Path on SQL Server Management Studio

You, you need to register the mapped network path on the SQL Server Management Studio in order to be able to access the mapped drive from SQL Server Management Studio File Explorer. To do so, open SQL Server Management Studio and execute the query below.

EXEC sp_configure ‘show advanced options’, 1
GO
RECONFIGURE
GO
EXEC sp_configure ‘xp_cmdshell’, 1
GO
RECONFIGURE
GO

EXEC XP_CMDSHELL ‘net use N: /delete’
EXEC XP_CMDSHELL ‘net use N: \\ServerName\DB-Backup-ShareName’
EXEC XP_CMDSHELL ‘Dir N:’