Select your product to confirm this information applies to you
Using Microsoft SQL Server Management Studio Express with XMap
Microsoft® SQL Server® Management Studio Express provides advanced functionality for your SQL Server. This article demonstrates how to backup, restore, detach and attach databases. Although this additional software is not included with DeLorme® XMap® desktop software, you may download it for free from Microsoft.
Note: XMap Software has been discontinued. Support is now provided through documentation in the Support Center. XMap data format has not.
Downloading the Correct Version
Downloading the Correct Version
If you installed Microsoft SQL Server 2008 Express R1 from the XMap 7 disc (the default option), install the 32-bit version of Microsoft SQL Server 2008 Management Studio Express from this link:
Microsoft SQL Server 2008 Management Studio Express R1
If you installed Microsoft SQL Server 2008 Express R2, install the version of Microsoft SQL Server 2008 Management Studio Express R2 that matches the version of Microsoft SQL Server 2008 Express R2 that you have installed (32- or 64-bit) from the following link:
Microsoft SQL Server 2008 Management Studio Express R2
If you are an XMap 6 user, download the 32-bit version of Microsoft® SQL Server 2005 Management Studio Express from this link:
Microsoft SQL Server 2005 Management Studio Express
Backing up a Database
Backing up a SQL database saves your GIS layers in a file that can be restored at a later date. It is a good idea in case you ever have computer issues and provides insurance against mistakes.
- Close XMap.
- In the Start menu, point to All Programs, click Microsoft SQL Server (version), and then click Microsoft SQL Server Management Studio.
- In the Connect to Server dialog box, click the server that contains the database you want to back up.
- Click Connect.
- Click to expand Databases.
- Right-click the database you want to back up, point to Tasks, and click Back Up.
- In the Back Up Database dialog box, verify that you selected the correct database.
- From the Backup type drop-down list, select Full.
- Under Backup component, select Database.
- In the Name box, type a name for your backup.
- Under Backup set will expire, select After 0 days. This means the backup will never expire.
- Under Back up to, select Disk.
- Take note of the directory. The default is C:\SQL Backup\.
- Click OK.
- Wait until the process finishes executing.
- You will receive notification that the backup completed successfully.
Restoring a Database
Restoring a database returns your GIS data to the state it was in when you backed it up. See above for instructions on backing up a database.
- Close XMap.
- Click on Start
All Programs
Microsoft SQL Server (version)
Microsoft SQL Server Management Studio.
- In the Connect to Server dialog box, select the server that contains the database you want to restore.
- Click Connect.
- Right-click Databases and choose Restore Database.
- Under To database, select the destination database.
- Under From database, select the back up.
- Verify that it is the correct backup.
- Click OK.
- Wait until the process is done Executing.
- You should receive notification that the process completed successfully.
Detaching a Database
WARNING: Before you detach, it’s recommended that you create a backup using the instructions listed above.
Detaching a database enables you to move it to a new location. If you have a new computer or server, this is a useful way of moving your GIS data to its new home. You can also use this feature to transfer a database to another user; just be aware if they have a database with the same name on their SQL server. To rename your database, right-click the database name and clickRename.
- Close XMap.
- Click on Start
All Programs
Microsoft SQL Server (version)
Microsoft SQL Server Management Studio.
- In the Connect to Server dialog box, select the server that contains the database you want to detach.
- Click Connect.
- Expand Databases.
- Right-click on the database you want to detach and select Tasks
Detach.
- In the Detach Database dialog box, verify that you have selected the correct database.
- Verify that the status is Ready. If the status is Not Ready, you will be notified to take additional steps before proceeding.
- Click OK.
- The database should disappear from your Databases list.
Note: The detached database can be found in your SQL server folder. The default locations are listed below, depending upon which version and operating system you have:
C:\Program Files\Microsoft SQL Server\Instance Name (for example MSSQL10_50.XMAP7)\DATA
C:\Program Files (x86)\Microsoft SQL Server\Instance Name (for example MSSQL10_50.XMAP7)\DATA
Attaching a Database
Attaching a database connects your detached database to a compatible SQL server. See above for instructions on detaching a database.
Note: To attach a database to a new server, that server must be the same version as the source. For example, if you are detaching a Microsoft SQL Server 2008 database, it can only be attached to Microsoft SQL Server 2008.
- Close XMap.
- Click on Start
All Programs
Microsoft SQL Server (version)
Microsoft SQL Server Management Studio.
- In the Connect to Server dialog box, select the destination server where you want to attach the database.
- Click Connect.
- Right-click Databases and click Attach.
- In the Attach Databases dialog box, click Add.
- In the Locate Database Files dialog box, click your detached database and click OK.
Note: Database files use the extension .mdf. The default locations are listed below, depending upon which version and operating system you have:
C:\Program Files\Microsoft SQL Server\Instance Name (for example MSSQL10_50.XMAP7)\DATA
C:\Program Files (x86)\Microsoft SQL Server\Instance Name (for example MSSQL10_50.XMAP7)\DATA
- In the Attach Databases dialog box, verify you have the correct database file selected and click OK.
- The database should appear on your Databases list.