Creates a new database
create database database_name [on {default | database_device} [= size] [, database_device [= size]]...] [log on database_device [= size] [, database_device [= size]]...] [with override] [with default_location = “pathname”] [for proxy_update] [for load]
Usage
This command creates a new database within Adapter Server Enterprise. The new syntax with default_location = pathname and for proxy_update have been added to allow automatic creation of proxy tables representing tables and views found in a remote location.
If the clause with default_location = pathname is used, the pathname is stored in master.dbo.sysdatabases.default_loc, and serves the same purpose as the default location added via the system stored procedure sp_defaultloc
If the clause for proxy_update is used, the with default_location = pathname clause must also be used. This clause indicates that the database is to be a proxy database, and all tables created in it will become proxy tables, referencing objects contained at the default location.
When a database is created as a proxy database, and no device or size specification is included in the syntax, the default size will be calculated based on the number of proxy tables that it will be expected to contain. The formula for calculating the number of 2k, 4k, 8k, and 16k pages for the database is as follows:
pages = #rmt_tbls * 32/* 4 extents per table */ overhead = (pages * 1.1) /* add 10% */ if overhead < 500 pages then overhead = 500 pages total_pages = pages + overhead add pages in model db
The new database is placed on the default device, if no device name is specified.
After the database is created, but before the command is complete, the presence of the for proxy_update clause will instruct CIS to create a proxy table in the new database for each remote table or view. When the create database command is finished, the newly created database will be populated with proxy tables representing all user tables and views found at the remote location.
See Also
alter database in the Adaptive Server Reference Manual.