Archive for the ‘MSSQL’ Category

The best way will be to create another account with permissions same as sa.

Run CMD from local admin (not domain account with admin rights!)

Now you may connect by MSSQL Management Studio to MS SQL Database by new account.

net stop MSSQLSERVER
net start MSSQLSERVER /m"SQLCMD"
sqlcmd
1> CREATE LOGIN <<login>> WITH PASSWORD='<<password>>'
2> GO
1> SP_ADDSRVROLEMEMBER <<login>>,'SYSADMIN'
2> GO
1> exit
net stop MSSQLSERVER && net start MSSQLSERVER

  1. Deattach database
  2. Attach database without LDF file
  3. Shrink LOG file

System Center Data Protection 2016

SC-SQL – IP: 10.45.1.200
SC-DPM – IP: 10.45.1.201

Problem:

Installing DPM and connecting it to remote SQL, I’ve got error 812

System Center DPM 2016 Install Error ID: 812

Report configuration failed. Verify that SQL Server Reporting Services is installed properly and that it is running. ID: 812 . When installing Data Protection Manager DPM  common installation error system admins encounter is ID: 812. This is caused by the SQL Server Reporting Services misreading the reporting database.

 

Cause:

Changed account which runs service: Reporting Service

 

Resolution:

Start -> Reporting Services Configuration Manager -> Encryption Keys -> Delete Encrypted Content (click: Delete) -> Change (click: Change) – generates new encryption keys :)

 

Now you may resume installation of DPM :)

  • DBCC DBCC CHECKDB (<db name>)
  • DBCC CHECKDB
  • DBCC CHECKDB (<db name>, REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD)
  • DBCC CHECKCONSTRAINTS
  • search constraints in DB by name:
    SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
    WHERE CONSTRAINT_NAME =’FK_Documents_Finance’