NOTE: This solution only includes instructions on manually attaching and detaching the DocuShare database files in MSDE, it does not include instructions on how to move a DocuShare Database. Please see a different solution if this is what you need to do.
NOTE: The commands listed in this solution are also valid in when using a full version of SQL; however, if you have the full version of SQL it would be simpler to use the SQL Enterprise manager to attach and detach database files.
NOTE: You must be an administrator to perform this solution.
From the DocuShare Server,
1. Stop the DocuShare service by using either the stop_docushare command line utility or stop DocuShare if you are running it as a service by using the Services Administrative Tool.
From the SQL Sever,
2. Stop the MSDE service by using the MSDE Service Manager or by using the Services Administrative Tool.
3. Start the MDSE service by using the MSDE Service Manager or by using the Services Administrative Tool. (Do not start the DocuShare Service)
NOTE: Stopping and then starting the MSDE service will free up the connections for then next step.
Detaching the SQL Database
NOTE: Using the following example from a DOS window (recommend cut and paste from this document). This example detaches the DocuShare database with skipchecks set to true.
From the Old SQL Server,
- Click on [Start] and select [Run]. The Run window will be displayed.
- In the Open: field type cmd. The cmd.exe window will be displayed.
- Type the following then press [Enter].
OSQL -S servername\instancename –Usa
NOTE: servername\instancename = the host name of the computer\the instance name if you installed SQL with one, -U = database username.
- You will be prompted for the database username’s password, type the password and press [Enter].
- If you have logged into MSDE successfully then 1> prompt will be displayed. At the 1> prompt type the following and press [Enter] after each line.
1> EXEC sp_detach_db 'Docushare', 'true'
2> Go
NOTE: This will generate a msg indicating the database was successfully detached.
- Use your standard backup procedure to back up the Docushare.mdf and the Docushare_log.LDF files.
Attaching the MSDE Database
NOTE: MSDE must be running on the new server before beginning this solution. DocuShare should not be running.
From the New MSDE Server,
- Use your standard restore procedure to restore the DocuShare.mdf and the DocuShare_log.LDF files on the new SQL Server.
- Click on [Start] and select [Run]. The Run window will be displayed.
- In the Open: field type cmd. The cmd.exe window will be displayed.
- Type the following then press [Enter].
OSQL -S servername\instancename –Usa
NOTE: servername\instancename = the host name of the computer\the instance name if you installed SQL with one, -U = database username.
- You will be prompted for the database username’s password, type the password and press [Enter].
- If you have logged into SQL successfully then 1> prompt will be displayed. At the 1> prompt type the following and press [Enter] after each line.
1> EXEC sp_attach_db @dbname = N'Docushare',
2> @filename1 = N'C:\Xerox\Docushare\MSDE\Data\Docushare.mdf',
NOTE: Specify correct path to the database file.
3> @filename2 = N'C:\Xerox\Docushare\MSDE\Data\Docushare_log.ldf'
NOTE: Specify correct path to the transaction log file.
4> go
5> exit
From the DocuShare Server,
1. Start the DocuShare service by using either the start_docushare command line utility or start DocuShare if you are running it as a service by using the Services Administrative Tool.