Move SCCM database to another drive

Move SCCM database to another drive

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 Smile

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 FilesMicrosoft Configuration ManagerbinX640000409preinst.exe” (the last folder is dependent upon the language of the product, 00000409 is for the English version).

image

image

Next start SQL Management Studio.

image

If you select properties on the current SCCM database you will be able to find the current file location:

image

Select Files to find the current Path:

image

Now Detach the database:

image

Select Drop Connections and hit OK.

image

The database will disappear from the Databases folder.

Copy or move the SCCM database files to the new location:

image

Attach the database again:

image

Click Add:

image

Select the MDF file you copied (in the new location) and click OK:

image

Click OK again:

image

Select the database you just attached and click New Query:

image

Run the command:

ALTER DATABASE <ConfigMgr DB> SET TRUSTWORTHY ON

image

Change owner to sa:

EXEC sp_changedbowner 'sa'

image

Ensure that Isolation Level is set to read committed snapshot by running the command:

DBCC USEROPTIONS

image

If 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 ON

ALTER DATABASE <ConfigMgr DB> SET READ_COMMITTED_SNAPSHOT ON

image

Note: 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.

After moving the System Center 2012 Configuration Manager SQL Site Database to another drive, creating a new Software Update package or a new application fails

Table of Contents

Share this post
Search blog posts
Authors
Modern Workplace consultant and a Microsoft MVP in Enterprise Mobility.
Modern Workplace consultant and a Microsoft MVP in Windows and Devices for IT.

Infrastructure architect with focus on Modern Workplace and Microsoft 365 security.

Passionate IT professional with 20+ experience in IT architecture, consulting, and design. 

Cloud & security specialist with focus on Microsoft backend products and cloud technologies.

Infrastructure architect with focus on design, implementation, migration and consolidation.

Infrastructure consultant with focus on cloud solutions in Office365 and Azure.

follow us in feedly
Categories

Follow on SoMe