Create Utilities Errors

This section contains error messages for Adaptive Server create operations (create table, create database, and so on).




Error 1702

Severity

16

Message text

%s failed because definition of column ’%.*s’ in table ’%.*s’ exceeds the limit of %d columns per table. 

Explanation

This error occurs when you try to create a table with more than the allowed number of columns. The maximum number of definable columns per table is 250 (12.0.x and earlier), and 1024 in 12.5 (254 for variable-width APL tables).

Note Column names must follow the rules for identifiers. They must be unique within a given table, but you can use the same column name in different tables in the same database.

Action

Reduce the number of columns in the table you are trying to create to or less than the limit. Refer to “create table” in the Reference Manual for details.

Versions in which this error is raised

All versions




Error 1732

Severity

20

Message text

Failed to reserve/initialize allocation hints space in table '%.*s'.

Explanation

Each table, index, and text chain has one or more Object Allocation Map (OAM) pages allocated to the table or index. These OAM pages store pointers to each allocation unit that contains pages for the object. The object's first OAM page stores allocation hints, indicating which OAM page has information about allocation units with free space.

Error 1732 is raised when Adaptive Server is allocating pages for a new table, but is unable to create allocation hints space for the table.

Error 1732 occurs with the following states:

State

Meaning

1

Unable to create allocation hints space for the table.

2

Unable to initialize allocation hints space for the table.

3

Unable to create allocation hints space for a text page chain.

4

Unable to initialize allocation hints space for a text page chain.

The table named in the message may be a user table, or a temporary table the server creates when executing a stored procedure or other query. Error 1732 can be due to an Adaptive Server problem.

Action

This is not a serious error. Reconnect to the server and retry the query which raised the error; it should run normally.

Contact Sybase Technical Support if the problem persists.

Additional information

Have the following information ready before calling Sybase Technical Support:

Versions in which this error is raised

All versions




Error 1803

Severity

17

Message text

CREATE DATABASE failed. Could not allocate enough disk space for a new database on the disks named in the command. Total space allocated must be at least %d Mbytes (%ld 2048-byte pages) to accommodate copy of Model Database.

Explanation

When you issue a create database command, Adaptive Server:

Error 1803 is raised when Adaptive Server is unable to allocate the space required for the model database on the specified device(s).

Action

Make sure that the available space on the database device you specified (or the available space on the default device) will accommodate the model database.

To check the size of model, use the following command:

1> sp_helpdb model 
2> go

To check the space available on the device, first use the following commands to check the space already allocated to other databases on the device:

1> use master
2> go

1> select dbid, size, phyname "physical device"
2> from sysusages, sysdevices
3> where name = 'device_name'
4> and vstart between low and high
5> compute sum(size)
6> go

For example:

1> select dbid, size, phyname "physical device"
2> from sysusages, sysdevices
3> where name = 'sd5f'
4> and vstart between low and high
5> compute sum(size)
6> go

dbid   size    physical device 
------ ------- --------------- 
15       17920 /dev/rsd5f 
16       20480 /dev/rsd5f 
17        7680 /dev/rsd5f 
18       20480 /dev/rsd5f 
21        5120 /dev/rsd5f
      sum
      =======
        71680

Subtract the sum from the total space on your physical device to determine the available space on the database device.

Additional information

Refer to “model Database” in the System Administration Guide and “create database” in the Reference Manual for more information.

Versions in which this error is raised

All versions




Error 1808

Severity

21

Message text

Crdb_disk: Getnext SCAN_NOINDEX on sysdevices.status=DEFAULT failed to find default rows

Explanation

This error occurs during execution of a create or alter database command when you do not specify a device and no disk device is defined as the default disk for an Adaptive Server.

By default, the master device is defined as a default disk. If you have used the stored procedure sp_diskdefault to turn off default for the master device:

1> sp_diskdefault master, defaultoff
2> go

and you have not used sp_diskdefault to specify another default disk device:

1> sp_diskdefault  dev_name, defaulton
2> go

(where dev_name is the new default disk device) then you will not have any devices defined as default devices and Error 1808 will occur when you run create or alter database.

Action

Select one of the following options:


Method 1

Type:

1> sp_helpdevice
2> go

If you see a line such as:

device_name  physical_name  description
----------------------------------------------------------------------
master       d_master       special,default disk,physical disk,17.00MB

where “default disk” is listed, then that device will be used by create or alter database when the on dev_name clause is omitted for allocation for the database. If no entries have “default disk” in the description field, then you do not have any disk devices defined as default.


Method 2

You can determine whether you have any disk devices defined as default by checking whether the first bit of the status column in sysdevices is turned on for any devices:

1> select status, name from sysdevices
2> where status & 1 = 1
3> go

 status name
------ ------------------------------ 
     3 master                         

Additional information

Refer to the Reference Manual for information about sp_diskdefault.

Versions in which this error is raised

All versions




Error 1809

Severity

14

Message text

CREATE DATABASE must be preceded by a 'USE master' command. Check with your DBO <or a user with System Administrator (SA) role> if you do not have permission to USE master.

Explanation

This error occurs when you try to create a new database without being in the master database.

Action

Before issuing a create database command, be sure you are in master:

1> use master
2> go

If you do not have the necessary permissions to create a database, ask your Sybase System Administrator to grant you permission to use the create database command.

Versions in which this error is raised

All versions




Error 1810

Severity

16

Message text

CREATE DATABASE failed because of incorrect size parameter(s). Total number of megabytes specified must be at least %d megabytes so that the Model Database can be copied to the new database.

Explanation

When a create database command is issued, Adaptive Server makes a copy of the model database, which contains the system tables needed by each database. Error 1810 occurs when you try to create a database of a size smaller than the size of the model database. The default size of model is 2MB.

Action

Make sure the size you plan to use in your create database command is at least as large as the model database (combine the data space size and the log space size).

To check the size of model , use the following command:

1> sp_helpdb model 
2> go

Additional information

Refer to “model Database” in the System Administration Guide and “create database” in the Reference Manual for more information.

Versions in which this error is raised

All versions




Error 1813

Severity

16

Message text

Cannot open new database '%.*s'. CREATE DATABASE is aborted.

Explanation

During a create database command, Adaptive Server opens the new database at several stages, first after inserting the rows into the system catalogs and later to initialize the log segment. Error 1813 occurs when Adaptive Server is unable to open the new database or initialize the log segment for the new database during a create database command.

This error can be caused by the following:

Action

If Error 1813 occurs just after a database has been dropped, shut down and restart Adaptive Server to clear the allocation buffers and then re-enter your create database command.

If this does not clear the problem or you have not just dropped a database, call Sybase Technical Support.

Additional information

Have the following information available when you call Sybase Technical Support:

Versions in which this error is raised

All versions




Error 1820

Severity

20

Message text

This command adds %S_MSG space to disk ’%.*s’, which previously contained only %S_MSG.  You must specify WITH OVERRIDE to force this allocation.

Explanation

When a database is being extended or a new database created, Adaptive Server allocates space on the specified device (if no device is named, it uses the default device). Error 1820 is raised when allocating space for the database would convert the device from a dedicated device - one that stores only data or log - into a mixed-use device that contains both data and log on the same segment.

The error may be detected:

Error 1820 is raised with the following states:

State

Meaning

1

Cannot allocate log space on a device dedicated to data. Device was named in the create database/alter database command.

2

Cannot allocate data space on a device dedicated to the log. Device was named in the create database/alter database command.

3

Cannot allocate log space on a device dedicated to data. Device was not explicitly specified. This state is also raised during HA proxy database creation (12.0 and higher).

4

Cannot allocate data space on a device dedicated to the log. Device was not explicitly specified. This state is also raised during HA proxy database creation (12.0 and higher).

Action

You can avoid the 1820 error by using the with override clause when creating or altering a database.

WARNING! Using the with override clause to resolve the 1820 error is not advisable. It will mix data and transaction log on the same device, making it difficult to achieve up-to-the-minute recoverability for your database.

Additional information

For details about the management and recovery of the transaction log, see “Placing the Transaction Log on a Separate Device” in the System Administration Guide.

Versions in which this error is raised

11.0.3 and later




Error 1902

Severity

16

Message text

Cannot create more than one clustered index on table '%.*s'. Drop the existing clustered index '%.*s' before creating another

Explanation

Adaptive Server uses a clustered index to sort rows so that their physical order is the same as their logical (indexed) order. The bottom or leaf level of a clustered index contains the actual data pages of the table.

In a nonclustered index, the physical order of the rows is not the same as the indexed order. The leaf level of a nonclustered index contains pointers to rows on data pages.

Many nonclustered indexes are allowed on a table, but only one clustered index per table is allowed. Error 1902 occurs when you try to create a second clustered index on the table named in the error message.

NoteUsing the primary key clause in a create table statement creates a unique clustered index.

Action

  1. List the existing indexes on the table:

    1> use database_name
    2> go
    

    1> sp_helpindex object_name
    2> go
    

    where database_name is the database where the table named in the error message resides and object_name is the name of the table in the error message. The index_description column of the output shows whether the index is clustered or nonclustered.

  2. If a clustered index already exists, drop it.

  3. Create a new clustered index.

Versions in which this error is raised

All versions




Error 1903

Severity

16

Message text

%d is the maximum allowable size of an index. Composite index specified is %d bytes.

Explanation

A composite index is any index that uses from 2 to 16 columns. Error 1903 occurs when the sum of the lengths of all the columns used in a composite index exceeds the allowable limits.

Following is an example of a composite index using objects from the pubs2 sample database:

1> create index example
2> on authors (phone, state, postalcode)
3> go

phone is defined as char(12), state as char(2), and postalcode as char(10). Since each char takes 1 byte of storage, the total length of this composite index is 24 bytes.

Action

Examine the lengths of the columns in your composite index and make sure that the lengths total no more than 600 bytes. Refer to “System Datatypes” and “User-Defined Datatypes” in the Adaptive Server Enterprise Transact-SQL User's Guide for information about how to calculate the storage size for different Adaptive Server datatypes.

Additional information

Refer to “create index” in the Reference Manual for information about indexes.

Versions in which this error is raised

All versions




Error 1916

Severity

16

Message text

CREATE INDEX options %s and %s are mutually exclusive.

Explanation

This error occurs when you try to create an index with two mutually exclusive create index options. When Error 1916 occurs, no index is created.

The following options are not compatible with each other:

The following table shows which options can be used with which type of indexes:

Table 3-6: Compatibility chart for index types and index options

Type of Index

Index Option

ignore_dup_key

ignore_dup_row

allow_dup_row

Nonunique Nonclustered

Don't use

Don't use

Don't use

Nonunique Clustered

Don't use

Okay

Okay

Unique Nonclustered

Okay

Don't use

Don't use

Unique Clustered

Okay

Don't use

Don't use

Action

Additional information

Refer to “create index” in the Reference Manual for information about indexes.

Versions in which this error is raised

All versions




Error 1928

Severity

16

Message text

Cannot create clustered index on '%.*s' because it is partitioned.

Explanation

By default, Adaptive Server stores a heap table's data in one doubly linked chain of database pages. Adaptive Server inserts all new rows into the last page of the chain. A transaction holds an exclusive lock on the last page while inserting new rows, which can block other, concurrent transactions from inserting into the table.

The partition clause of the alter table command allows you to partition user tables that do not have a clustered index. Partitioning creates additional page chains on the table, each with its own last page. This reduces page contention for concurrent inserts, and can also reduce I/O contention if the table exists on user-defined segments and is distributed over multiple physical devices.

Since clustered indexes are not allowed on partitioned tables, Error 1928 occurs when you try to create a clustered index on a partitioned table.

Action

If you want to create a clustered index on the table, use the unpartition clause of the alter table command to concatenate all partitions:

1> alter table table_name unpartition
2> go

Then create your clustered index.

Additional information

Refer to the Reference Manual for information about the alter table command.

Versions in which this error is raised

All versions




Error 2110

Severity

20

Message text

The proccreate() function is trying to put too many lock requests in the lock_requests[] array.

Explanation

When you create and modify triggers (and other stored objects such as procedures, views, and rules), Adaptive Server uses the proccreate function to update the appropriate system tables. As an example, Adaptive Server uses this function to write the text of a trigger into the syscomments table. Depending on the action requested, proccreate must acquire locks on the objects being created and any objects affected by the created object.

For example, since a table can only have one trigger for each operation (create, update or delete), a new trigger on a table for the same operation overwrites any previous trigger for that operation. proccreate must be able to lock the new trigger as well as the existing trigger.

Error 2110 is raised when you attempt to create a new trigger or other stored object on a table, or when you attempt to overwrite an existing trigger, and proccreate is unable to acquire the necessary locks on the objects in question.

State

Meaning

1

Could not acquire a lock for a trigger or other object being created.

2

Could not lock an existing delete trigger on this object.

3

Could not lock an existing insert trigger on this object.

4

Could not lock an existing update trigger on this object.

5

Could not lock the table to which the trigger is being attached.

Error 2110 breaks your connection to Adaptive Server.

Action

Take the following steps to correct the problem.

  1. Retry the object creation.

  2. If the error was raised with State 5, and the target table is newly created, check your trigger creation code to be sure that the table's CREATE statement is committed before attempting trigger creation.

  3. If the above steps do not resolve the problem, Error 2110 may be due to an Adaptive Server problem. Contact Sybase Technical Support for assistance.

Additional information

When calling Technical support, have the following information available:

Versions in which this error is raised

All versions