Creating a Removable Media Database

A database that will later be distributed on removable media must conform to these guidelines:

To make certain that the database you create conforms to these requirements, create the database using the sp_create_removable stored procedure. This stored procedure creates three or more devices and places the database on those devices. One device holds the system catalog tables, a second holds the transaction log, and the third and subsequent devices hold data tables. You must be the SA to use sp_create_removable.

    To create a database that can later be distributed on removable media

For example:

sp_create_removable inventory,invsys,'c:\sql60\data\invsys.dat',2, 
   invlog,'c:\sql60\data\invlog.dat',4,
   invdata,'c:\sql60\data\invdata.dat',10

For more information about using sp_create_removable, see the sp_create_removable System Stored Procedure topic in the Microsoft SQL Server Transact-SQL Reference.

After the database has been created, perform database development in the normal manner but following these rules:

The device created for the transaction log is used only during database development. (When database development is complete you will run sp_certify_removable, which will truncate the transaction log, move it to the system device, and drop the log device, among other actions.)

As an alternate development method, you can create and develop a database normally, run sp_create_removable to create the new database that will be distributed on removable media, and then use SQL Transfer Manager to copy the data tables from the original database to the new database. After that, you can certify the database by using sp_certify_removable.

Optionally, you can also create one or more that can be used to add login IDs and database users and to grant permissions after the database is distributed and installed.