drop Errors

This section contains error messages for Adaptive Server drop commands.




Error 3701

Severity

11

Message text

Cannot drop the %S_MSG '%.*s', because it doesn't exist in the system catalogs.

Explanation

This error occurs when you try to drop an object that is not found in at least one system table where Adaptive Server expected to find it.

Error 3701 can occur due to the following circumstances:

Action

Make sure you entered the object name correctly in your drop command.

If you are entering the object name correctly and the drop fails with Error 3701, try to re-create the object. If your create command displays the message:

Msg 2714, Level 16, State 1:
Line 1:
There is already an object named 'object_name' in the database.

then your system tables are incorrect with regard to this object. If this occurs, run dbcc checkcatalog and dbcc checkdb. Then call Sybase Technical Support. They will probably be able to help you delete the object that is causing the error. However, because other objects may reference that object, deleting it cleanly may be difficult. If this is the case, you may need to recover from backups.

Additional information

Before calling Technical Support, have the following information available:

Versions in which this error is raised

All versions




Error 3702

Severity

16

Message text

Cannot drop the %S_MSG '%.*s', because it is currently in use.

Explanation

This error occurs when Adaptive Server tries to drop a database, user table, procedure, rule, default, trigger, or view that is currently in use.

Error 3702 can occur in the following circumstances:

Error 3702 can occur for the following reasons:

Action

Use sp_who to determine whether the database or object name in your drop command is currently in use. If it is in use, contact the user shown in the sp_who output.

If the process using the object was abnormally terminated (for example, with an operating system kill command), the object may not have been completely removed from the Adaptive Server system tables. The process would remain invisible while keeping the object open and in use. This prevents the drop command from succeeding. In this case, shutting down and restarting Adaptive Server should clear the 3702 error. After you restart Adaptive Server, run dbcc checkcatalog to determine whether corruption has occurred.

If Error 3702 persists, call Sybase Technical Support.

Additional information

Before calling Technical Support, have the following information available:

Versions in which this error is raised

All versions




Error 3703

Severity

11

Message text

Cannot drop the %S_MSG with object-id %ld in database %d, because it doesn't exist in the system catalogs.

Explanation

This error occurs when Adaptive Server fails to drop a database, user table, procedure, rule, default, trigger, or view because the object being dropped does not exist in the appropriate system table.

Error 3703 can occur during a drop command such as drop database, drop table, drop procedure, or drop rule.

Error 3703 occurs with the following states.

State

Meaning

1

During a drop trigger command, if Adaptive Server fails to find the trigger or the target table of the trigger, Error 3703 occurs with State 1.

2

During a drop index command, if Adaptive Server fails to find the object ID of the table for which the index is being dropped in sysobjects, Error 3703 occurs with State 2.

4

During any drop command, if Adaptive Server fails to find a sysobjects entry for the object being dropped, Error 3703 occurs with State 4.

5

The sysconstraints table has one row for each referential and check constraint associated with a table or column. You can drop constraints using the alter table command. If, during such an alter table command, Adaptive Server fails to find an entry for the constraint in sysconstraints, Error 3703 occurs with State 5.

6

The sysreferences table has one row for each referential integrity constraint declared on a table or column. If the object being dropped is a referential integrity constraint, Adaptive Server searches sysreferences for the referential integrity constraint ID. If the ID is not found, Error 3703 occurs with State 6.

7

When Adaptive Server fails to drop a database, user table, procedure, rule, default, trigger, or view that is not some other object's subsidiary part (for example, dropping a trigger because its associated table is being dropped), and the object ID is not found in sysobjects, Error 3703 occurs with State 7.

8

If the database being dropped has referential dependencies, Adaptive Server tries to drop the references from the other databases. If the ID of the reference from the other database is not found in sysreferences, Error 3703 occurs with State 8.

Action

Recovering from Error 3703 requires manually modifying one or more system tables. Call Sybase Technical Support for assistance in determining which tables to modify and how to do it.

Additional information

Before calling Technical Support, have the following information available:

Versions in which this error is raised

All versions




Error 3704

Severity

16

Message text

Cannot drop the %S_MSG '%.*s' because you are not the owner or a user with System Administrator (SA) role.

Explanation

Error 3704 occurs when Adaptive Server is unable to carry out a command, either implicit or explicit, to drop a database object. The error can involve temporary or permanent database objects.


Error 3704 with Permanent Database Objects

Error 3704 is raised when you attempt to drop a permanent table or other object, but you are not authorized to do so because you are not the owner of the object or a user with System Administrator (SA) role.

Error 3704 is raised in the following states:

State

Meaning

1

The object being dropped is a user table, view, stored procedure or trigger.

2

The object being dropped is an index.

3

The object being dropped is a user database.


Error 3704 with Temporary Tables

Error 3704 can be raised if Adaptive Server is unable to automatically drop temporary tables created within a stored procedure.

Error 3704 with temporary tables is due to an Adaptive Server problem.

Action

If Error 3704 is raised for operations involving permanent objects, this means you have encountered a permission problem when trying to drop the object. Check with your System Administrator.

If Error 3704 is raised for operations involving temporary tables, contact Sybase Technical Support for assistance.

Additional information

If Errors 3704 is raised repeatedly and accompanied by Error 216 (“Attempt to automatically drop temporary table failed.”), Adaptive Server may become unusable. If this happens, shut down Adaptive Server using shutdown with nowait and restart. This will clear unnecessary tables from tempdb.

If you need to call Technical Support, have the following information on hand:

Versions in which this error is raised

All versions




Error 3731

Severity

16

Message text

Cannot drop table '%.*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 being inserted 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. It can also reduce I/O contention if the table is distributed over multiple physical devices.

Error 3731 is raised when you try to drop a table that is partitioned.

Action

If you want to drop the table, use the unpartition clause of the alter table command to concatenate all partitions:

1> alter table table_name unpartition
2> go

Then drop the table.

Additional information

Refer to the Reference Manual for information about alter table.

Versions in which this error is raised

All versions