How to Move an Existing Cimplicity Installed SQL 2008 Database from the Default Location to a New Location?
In some cases, a SQL Database may need to be relocated from the default installed location to its own hard drive. This article uses the default installed CIMPLICITY installed with Microsoft SQL 2008 Express and relocates the CIMPLICITY database to a new drive called F:\. This article can be modified for any database, as long as there is familiarity with the ALTER Database commands.
Installed version of either Microsoft SQL 2008 Studio Management or Microsoft SQL 2008 Studio Management Express
An existing SQL Database
Open Microsoft SQL 2008 Studio Management or Microsoft SQL Studio Management Studio Express
Login using the sa account
Create a new query
Enter the following commands. Adjust the path to where the files will reside on the system (when required). DO NOT USE MAPPED PATHS. This must be a locally installed Hard Drive. ALTER DATABASE CIMPLICITY MODIFY FILE ( NAME = CIMPLICITY , FILENAME = 'F:\SQL_DB\CIMPLICITY.mdf' ) Go ALTER DATABASE CIMPLICITY MODIFY FILE ( NAME = CIMPLICITY_log , FILENAME = 'F:\SQL_DB\CIMPLICITY_log.ldf' ) Go
Note: Make no mistakes in these commands. It is recommended to detach the database, backup the files and then re-attach before executing this command. A wrong path entered can leave the database useless.
Click the checkbox and then click execute.
Stop the SQL Server using Windows Services
Add the Local Windows User Name SQLSERVERMSSQLUSER$[PCNAME]$CIMPLICITY ( where [PCNAME] = your computer name) to the folder where the SQL CIMPLICITY files will reside. Give this user FULL CONTROL
Move only CIMPLICITY.mdf and CIMPLICITY_log.ldf from the old location to the new location.
Verify that the 2 files took the rights added in step 7. If not, add them or recursively apply the folder settings from step 7 to all child objects. If this step is not done, there is a possibility of access denied.