If you are using the full Microsoft SQL Server product on the new server then the best procedure to move the Apex database is here.
If you do not have access to the Enterprise Manager then moving the Apex database is a little more challenging. The easiest way to do it is to prepare the database on the old server to be moved, and then use the Apex database installation programming from the Apex CD to set up the Apex database on the new server. You will need the existing database running on the old server and the Apex installation CD.
Here is a step-by-step procedure:
Prepare the Apex database to be movedThis step is done on the old server
Open a command prompt. Run the OSQL utility, remove the ApexProg user account, and detach the database as shown below. By default the OSQL utility is in the "C:\Program Files\Microsoft SQL Server\80\Tools\binn" directory. If you do not have it in your path you will need to add it or change to this directory first. The parameters for the OSQL utility are case sensitive so be sure to type them in exactly as shown.
osql -S (local) -U sa -P apex -d Apex
1> sp_revokedbaccess 'ApexProg'
User has been dropped from current database.
1> use master
1> sp_detach_db 'Apex'
Note that this step assumes that you are using the standard "sa" password as installed by Apex. If you have changed the "sa" password then you need to put in the correct password after the "-P" parameter.
Copy the Apex Installation CD to your hard driveThis step is done on the new server
Create a directory on the new server to hold the contents of the Apex installation CD. We'll call this directory "ApexCD". Copy the contents of the Apex installation CD into this directory.
Move the Apex database to the new serverThis step requires access to both servers
Copy the Apex.mdf file from the old server to the ApexCD\Database directory on the new server, overwriting the Apex.mdf file that is already in this directory.
Set up the new serverThis step is done on the new server
Run the Setup.exe program from the ApexCD directory. Select that you want to install the Database Server. This will install MSDE if needed and attach a new Apex database. However, instead of installing a new blank database your database from the old server is installed! If you are a database administrator and want to see in detail what happens to install an Apex database see the Setup program's View Readme link for more information.
Redirect the client workstationsThis step is done at each workstation
Finally, you will need to use the BDE Administrator available in the control panel on each Apex workstation to change the ApexCS database alias to point to the new Server Name.