Anda di halaman 1dari 5

Moving a Romexis Database to an Existing SQL Instance

Microsoft Excerpt:

2.10 Installing SQL Server Express on a Windows Domain Controller

Security Note We (Microsoft) recommend against running SQL Server Express on a domain
controller.
It is possible to install SQL Server Express on a Windows domain controller; however, it cannot run
on a Windows Server 2003 domain controller as Local Service or Network Service. SQL Server
service accounts should run as Windows domain user accounts. It is also possible to install SQL
Server service accounts to run as Local System, but this option is not recommended.

Do not change the role of the server after you install SQL Server Express. For example, if you install
SQL Server Express on a member server, do not use the Dcpromo tool to promote the server to a
domain controller. Or, if you install SQL Server Express on a domain controller, do not use Dcpromo
to demote the server to a member server. Changing the role of a server after you install SQL Server
Express can result in loss of functionality and is not supported.

SQL Server 2005 Books Online

Step 1:
How to: Detach a Database (SQL Server Management
Studio)
This topic describes how to detach a database. Detach a database places it in exactly the same
state that it was in when it was attached.

1. Stop the Romexis Service (RomexisService.exe) with the Romexis Service Control.
Note:
You cannot detach a database with active connections.

2. In SQL Server Management Studio Object Explorer, connect to an instance of the Microsoft
SQL Server Database Engine, and then expand that instance.
3. Expand Databases, and select romexis_db.
4. Right-click romexis_db, point to Tasks, and then click Detach.
5. In the Detach Databases dialog box, check Drop.
6. By default, the detach operation retains any out-of-date optimization statistics when
detaching the database; to update the existing optimization statistics, click the Update
Statistics check box.
7. When you are ready to detach the database, click OK.

Note:
The newly detached database will remain visible in the Databases node of Object Explorer until the view is refreshed. You
can refresh the view at any time: Click in the Object Explorer pane, and from the menu bar select View and then Refresh.
Step 2:
How to: Attach a Database (SQL Server Management
Studio)
This topic describes how to attach a database. Attaching a database places it in exactly the same
state that it was in when it was detached.

Security Note:

We recommend that you do not attach or restore databases from unknown or untrusted sources. Such databases could contain
malicious code that might execute unintended Transact-SQL code or cause errors by modifying the schema or the physical
database structure. Before you use a database from an unknown or untrusted source, run DBCC CHECKDB on the database
on a nonproduction server and also examine the code, such as stored procedures or other user-defined code, in the database.
To attach a database
Copy the romexis_db.MDF and romexis_db.LDF from the original Romexis database server
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\, and past the romexis_db.mdf
and romexis_db.LDF at the new Romexis database server to C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\

1. In SQL Server Management Studio Object Explorer, connect to an instance of the Microsoft
SQL Server Database Engine, and then expand that instance.
2. Right-click Databases, point to Tasks, and then click Attach.
3. In the Attach Databases dialog box, to specify the database to be attached, click Add;
and in the Locate Database Files dialog box, select the disk drive where the database
resides and expand the directory tree to find and select the .mdf file of the database; for
example:
C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\romexis_db.MDF

Important:

Trying to select a database that is already attached generates an error.

4. When you are ready to attach the database, click OK.

Note:

A newly attached database is not displayed in the Databases node of Object Explorer until the view is refreshed. To refresh
the view at any time, click in Object Explorer, and then click Refresh on the View menu.
Step 3:
How To

How to add a SQL Server login (Management Studio)

How to add a SQL Server login (Management Studio)

New Information - SQL Server 2005 SP3.

Security Note When possible, use Windows Authentication.

To add a SQL Server login

1. Expand a server group, and then expand a server.

2. Expand Security, right-click Logins, and then click New Login.

3. In Name, enter a name (Romexis) for the Microsoft® SQL Server™ login.

4. Select SQL Server Authentication.

5. Uncheck Enforce password policy, in Password, enter a password (romexis) and


confirm the password.

6. In Default Database, select the default database (romexis_db) to which the login is
connected after logging into an instance of SQL Server.

7. In Language, select <default>.

8. Click OK.
Step 4:
How To

How to create a SQL Server database role (Management


Studio)

How to create a SQL Server database role (Management Studio)

To create a SQL Server database role

1. Expand a server group, and then expand a server.

2. Expand Databases, and then expand the database (romexis_db) in which to create a
role.

3. Right-click Security, and then click New User.

4. In the User Name box, enter the name (romexis) of the new role.

5. In Login name ckick “…” button then select Browse

6. Select [romexis] click OK, click OK again.

Only users in the selected database can be added to the role.

7. Check db_datawriter and db_datareader for Role Members

8. Click OK.

Step 5:
Copy the romexis_images and romexis_cache folders to the
new server.
1. Copy the {drive}:\romexis_images and {drive}:\romexis_cache folders from the original
server to the new server.

2. If the {drive}: letter remains the same, then the database migration is complete.

3. If the {drive}: letter is different, then browse the CDVT DVD to the
Manuals\MS_SQL\Change_Dir folder for instructions to update the romexis_images and
romexis_cache paths in the MS SQL database.

Anda mungkin juga menyukai