This section contains error messages for the alter table command.
16
Cannot create %d partitions on the table '%.*s' with clustered index because the maximum number of partitions allowed on a table with clustered index is %d.
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.
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 is distributed over multiple physical devices.
The partition clause of the alter table command allows you to partition tables with or without a clustered index. However, after partitioning a clustered table, the entire page chain is placed in the first partition.
Error 4951 occurs when you attempt to partition a table with a clustered index, and exceed the maximum allowed partitions.
Reenter your partition command using a value for number of partitions that does not exceed the specified maximum.
Refer to the Reference Manual for information about the alter table command.
All versions
16
Cannot partition table '%.*s' because it is already partitioned.
The partition clause of the alter table command allows you to partition user tables that do not have a clustered index. You cannot partition a table that is already partitioned.
Error 4953 occurs when you try to partition a table that is already partitioned.
If you want to change the number of partitions for the table, follow these steps:
Concatenate all existing page chains:
1> use database_name 2> go
1> alter table table_name unpartition 2> go
Repartition the table:
1> alter table table_name partition 2> number_of_partitions 3> go
Refer to the Reference Manual for information about the alter table command.
All versions
16
Cannot unpartition table '%.*s' because it is not partitioned.
The partition clause of the alter table command allows you to partition user tables that do not have a clustered index. The unpartition clause of the alter table command allows you to concatenate all existing page chains for these tables. You cannot unpartition a table that is not partitioned.
Error 4954 occurs when you try to unpartition a table that is not partitioned.
No action is required.
If you want to determine whether a table is partitioned, use the following commands:
1> use database_name 2> go
1> sp_help table_name 2> go
Refer to the Reference Manual for information about the alter table command.
All versions
16
Cannot alter table if level 0 scans are active.
Isolation level 0 allows transactions to read uncommitted data (“dirty reads”). You can specify isolation level 0 for your queries using the at isolation syntax or you can specify level 0 for your session as part of the transaction isolation level option of the set command. Adaptive Server's default transaction isolation level is 1.
Since alter table allows you to modify a table's schema, it would not be safe to allow the use of alter table when level 0 scans are active for that table. Error 4956 is raised if you enter an alter table command when the table in your command is currently being used for reading uncommitted data.
Try your alter table command again later, after the process that is using level 0 scans on the table is no longer active.
Refer to the Adaptive Server Enterprise Transact-SQL User's Guide for information about selecting an isolation mode for either a query or for your session.
All versions
17
Lock scheme conversion failed due to insufficient SQL Server memory. Please retry later when there is less load/users on the SQL server, or ask your System Administrator to reconfigure SQL Server with more memory.
Adaptive Server provides two data locking schemes:
Datapages locking, which locks only the data pages
Datarows locking, which locks only the data rows.
Since neither scheme locks index pages, they are referred to together as the data-only locking scheme.
An additional locking scheme, known as allpages locking, locks the data and index pages affected by queries. It is the default locking scheme.
When you use the alter table command to change a table's locking scheme from allpages locking to data-only locking, Adaptive Server creates memory structures to build a new table with the desired locking scheme and transfers data from the existing table.
Error 4964 indicates that there is not enough memory available in Adaptive Server's data cache to effect the lock scheme change. The problem can occur at various stages of table conversion:
when initializing a new Object Allocation Map (OAM) page
when initializing a new index structure
when building the new table.
Check the activity on your server and re-try the lock scheme conversion when there is less load on the system.
If the problem persists, check the memory allocation on your server. You may need to increase the memory allocated to the data cache.
Use sp_configure to view the current values of memory-related parameters on your system:
1> sp_configure "Memory Use" 2> go
Refer to "Configuring Memory" in the System Administration Guide for details on monitoring and adjusting memory allocation parameters.
All versions