Wednesday 20 September 2017

Msg 5094, The operation cannot be performed on a database with database snapshots or active DBCC replicas


Error:
Msg 5094, Level 16, State 2, Line 2
The operation cannot be performed on a database with database snapshots or active DBCC replicas.

Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally, .

This error basically comes when there is Snapshot file present for same DB, solution for this is very simple, go to the data file location Eg. C:\MSSQL\DATA\ or wherever you have stored your data files. and Delete YourDatabase.SS file.

Then you can restore your database .

Database restore Command as shown below.


sp_helpdb MY_DATABASE
--to see Logical file name of Data and Log file and location


ALTER DATABASE [MY_DATABASE] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
-- Take your database on Single user for safe side.


RESTORE DATABASE [MY_DATABASE]
FROM DISK = 'D:\PROD Backup\MY_DATABASE.bak'
WITH
MOVE 'MyDatabase_Datafile' TO 'D:\MSSQL\DATA\MY_DATABASE.mdf',
MOVE 'MyDatabase_Logfile' TO 'D:\MSSQL\LOG\MY_DATABASE_log.ldf'


ALTER DATABASE [MY_DATABASE] SET MULTI_USER
-- Back to multi user 

Wednesday 3 May 2017

SSRS Double border does not work in Export or Browser,

SSRS Double border does not work in Export or Browser, It renders to Single border

SSRS has this issue, Double border doesn’t work when we render to browser, it shows single border

Resolutionmake lower border to 2,2.5 or 3 and make it double, then it works.