Creates a removable media database. Creates three or more files (one for the system catalog tables, one the transaction log, and one or more for the data tables) and places the database on those files.
sp_create_removable [@dbname =] 'dbname',
[@syslogical =] 'syslogical',
[@sysphysical =] 'sysphysical',
[@syssize =] syssize,
[@loglogical =] 'loglogical',
[@logphysical =] 'logphysical',
[@logsize =] logsize,
[@datalogical1 =] 'datalogical1',
[@dataphysical1 =] 'dataphysical1',
[@datasize1 =] datasize1
[..., [@datalogical16 =] 'datalogical16',
[@dataphysical16 =] 'dataphysical16',
[@datasize16 =] datasize16]
There must be from 1 through 16 data files. Usually, more than one data file is created when the database is expected to be large and must be distributed on multiple disks.
0 (success) or 1 (failure)
None
If you want to make a copy of your database on a removable media (such as a compact disc) and distribute the database to other users, use this stored procedure.
Only members of the sysadmin fixed server role can execute sp_create_removable.
This example creates the database inventory as a removable database.
sp_create_removable 'inventory',
'invsys','c:\mssql7\data\invsys.mdf', 2,
'invlog', 'c:\mssql7\data\invlog.ldf',4,
'invdata','c:\mssql7\data\invdata.ndf',10
sp_attach_db | sp_detach_db |
sp_attach_single_file_db | sp_helpfile |
sp_certify_removable | sp_helpfilegroup |
sp_dboption | System Stored Procedures |
sp_dbremove |