Lets try to move our SCCM database to another drive.
Always make sure you have a good backup and a rollback plan if something goes wrong
And make sure you have system administrator permission.
First start an administrative command prompt and stop all SCCM services.
You can use the command preinst.exe /STOPSITE from your SCCM installation.
Mine is located in the following path:
"C:\Program Files\Microsoft Configuration Manager\bin\X64\00000409\preinst.exe" (the last folder is dependent upon the language of the product, 00000409 is for the English version).
Next start SQL Management Studio.
If you select properties on the current SCCM database you will be able to find the current file location:
Select Files to find the current Path:
Now Detach the database:
Select Drop Connections and hit OK.
The database will disappear from the Databases folder.
Copy or move the SCCM database files to the new location:
Attach the database again:
Click Add:
Select the MDF file you copied (in the new location) and click OK:
Click OK again:
Select the database you just attached and click New Query:
Run the command:
ALTER DATABASE <ConfigMgr DB> SET TRUSTWORTHY ON
Change owner to sa:
EXEC
sp_changedbowner 'sa'
Ensure that Isolation Level is set to read committed snapshot by running the command:
DBCC
USEROPTIONSIf it is set to anything else than read committed snapshot then run the following commands, if isolation level is read committed snapshot then ignore next step.
ALTER
DATABASE <ConfigMgr DB> SET ALLOW_SNAPSHOT_ISOLATION ONALTER
DATABASE <ConfigMgr DB> SET READ_COMMITTED_SNAPSHOT ONNote: You might have to switch the SQL DB to Single User mode before running the two commands. Once done, change it back to Multi User mode.
Finally start SCCM Services using Service Manager or restart the server.
thanks for sharing,
ReplyDeleteJust tried this for System Center 1802 on Server 2016 with SQL 2017. It worked great! Thanks!!
ReplyDeleteThank you, very usefull
ReplyDelete