Troubleshooting Overview

As a starting point to troubleshooting a problem in Microsoft® SQL Server™ 2000, you may find the solution in one of the online troubleshooters from SQL Server Product Support Services (PSS). For more information, see Online Troubleshooters from PSS. In addition, review current error logs for information that may pinpoint the problem. Other current information about troubleshooting SQL Server 2000 can be found on the FAQs & Highlights for SQL Server page, available at Microsoft Web site.

Error Logs

The error log in SQL Server 2000 provides complete information about events in SQL Server. You may also want to view the Microsoft Windows® 2000 or Windows NT® 4.0 application log, which provides an overall picture of events that occur on the Windows NT 4.0 and Windows 2000 operating systems, as well as events in SQL Server and SQL Server Agent. Both logs include informational messages (such as startup data), and both record the date and time of all events automatically.

SQL Server events are logged according to the way you start SQL Server.

  • When SQL Server is started as a service under the Windows 2000 or Windows NT 4.0 operating system, events are logged to the SQL Server error log, to the Windows 2000 or Windows NT application log, or to both logs.

  • When SQL Server is started from the command prompt, events are logged to the SQL Server error log and to standard output (typically the monitor, unless output has been redirected elsewhere).

For information about how to view the logs, see Viewing Error Logs.

Backward Compatibility Issues

If you encounter a problem regarding compatibility between SQL Server 2000 and earlier versions of SQL Server, see SQL Server 2000 and SQL Server version 7.0 and SQL Server 2000 and SQL Server version 6.5. For information about a detailed list of feature changes between SQL Server 6.5 and SQL Server 2000, see SQL Server Backward Compatibility Details.

Additional Resources

For access to the Microsoft Knowledge Base and other current information, a subscription to Microsoft TechNet or MSDN® can be helpful. For more information, see:

  • The Microsoft TechNet page at Microsoft Web site.

  • The MSDN page at Microsoft Web site.
Viewing Web-Based Information

Numerous links to Microsoft Product Support Services (PSS) Web pages are provided in the Troubleshooting topics. Links to the new online troubleshooters, as well as pertinent Microsoft Knowledge Base articles and white papers, are also available. Every effort has been made to ensure the Web links are correct and will remain stable over time. However, if a link does not work, go to the MSDN Online Support Web page at Microsoft Web site, and navigate to the correct location.

See Also

Monitoring the Error Logs

Troubleshooting Planning


Troubleshooting Planning

To minimize the effects of a server failure or other troubleshooting situation:

  • Develop and test a backup and disaster recovery plan.

  • Use the Database Maintenance Plan Wizard to schedule the scripts to run during periods of low activity.

  • Verify the security permissions and roles you have planned for your databases.
Disaster Recovery Plan

The importance of disaster recovery assessment cannot be overstated. What is the business risk if you cannot get your data back? What is the cost for each hour's delay in getting your system back up and running? Do not assume that your data is quickly recoverable. Thoroughly understanding the steps for recovery ahead of time will minimize the stress and uncertainty imposed by a future disaster. Some important points to consider are:

  • Periodically assess the validity of the current disaster recovery plan.

  • Have sufficient hardware and staff to implement recovery procedures.

See Also

Data Integrity Validation

Database Maintenance Plan Wizard

Designing a Backup and Restore Strategy

Disaster Recovery Planning

Managing Permissions


Viewing Error Logs

The Microsoft® SQL Server™ 2000 error log can be viewed using SQL Server Enterprise Manager or any text editor. The most current error log is named Errorlog (with no extension) and is located in the Program Files\Microsoft SQL Server\Mssql\Log directory by default.

To view the SQL Server error log from SQL Server Enterprise Manager

  1. Expand a server group, and then expand a server.

  2. Expand Management, and then expand SQL Server Logs.

  3. Click the SQL Server Log to view it. Error log information appears in the details pane.

The Microsoft Windows® 2000 or Windows NT® 4.0 application log provides an overall picture of events that occur on the Windows 2000 or Windows NT operating system.

To view the Windows 2000 application log

  1. On the Start menu, point to Programs, point to Administrative Tools, and then click Event Viewer.

  2. In the left pane, click Application Log.

    Microsoft SQL Server events are identified by the entry MSSQLServer or MSSQL$<server named instance> in the Source column. SQL Server Agent events are identified by the entry SQLServerAgent or SQLAgent$<server named instance>. Microsoft Search service events are identified by the entry Microsoft Search.

  3. To view the log of a different computer, in the right pane, right-click Event Viewer, and then click Connect to another computer.

    Note If you are viewing the log of the local computer, skip this step.

  4. Complete the Select Computer dialog box.

  5. Optionally, to display only SQL Server events, on the View menu, select Filter, and then in the Event Source box, select MSSQLServer or MSSQL$<server named instance>.

  6. To view more information about an event, double-click the event.

To view the Windows NT 4.0 application log

  1. On the Start menu, point to Programs, point to Administrative Tools, and then click Event Viewer.

  2. If the application log is not displayed, on the Log menu, click Application.

    Microsoft SQL Server events are identified by the entry MSSQLServer or MSSQL$<server named instance> in the Source column. SQL Server Agent events are identified by the entry SQLServerAgent or SQLAgent$<server named instance>. Microsoft Search service events are identified by the entry Microsoft Search.

  3. To view the log of a different computer, on the Log menu, click Select Computer, and then complete the Select Computer dialog box.

    Note If you are viewing the log of the local computer, skip this step.

  4. Optionally, to display only SQL Server events, on the View menu, click Filter Events, and in the Source box, select MSSQLServer.

  5. To view only SQL Server Agent events, select SQLServerAgent instead.

  6. To view more information about an event, double-click the event.

See Also

Error Messages


Online Troubleshooters from PSS

Microsoft® Product Support Services (PSS) has implemented online troubleshooters, which are Web-based interactive guides for pinpointing and resolving customer problems.

To use an online troubleshooter, go to the page relating to an issue, and select one of the problems listed, for example "I can't create or administer a linked server" or "I can't establish a trusted connection." Subsequent statements and questions with interactive links help pinpoint and diagnose the trouble. Steps are then recommended to solve the problem as quickly as possible.

See Also

Viewing Online Troubleshooters and Other PSS Web-based Information


Help with Backup and Restore

The online Backup and Restore Troubleshooter is designed to help you resolve problems you may encounter when backing up or restoring databases and transaction logs in Microsoft® SQL Server™ 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English and can be found on nonlocalized Web sites.

Common starting points for troubleshooting backup and restore include:

  • Problems with backing up or restoring a database or transaction log that is password protected.

  • Problems appending or initializing a backup to an existing backup device.

  • Problems when backing up a transaction log or performing a differential file or file group backup while the database is set to the 'SIMPLE' recovery mode.

  • Poor performance when performing a backup or restore.

  • The database restore completes successfully, but the backup appears to have restored the database to a point in time earlier than expected.

  • Problems performing a point-in-time restore of a transaction log.

  • System database backups cannot be restored on a different build of SQL Server.

  • Error 927 when attempting to use a database after a successful restore.

  • Error 3201.

  • Error 3203.

  • Error 3024.

  • Error 3038.

  • Error 3101.

  • Error 3108.

  • Error 3168.

  • Error 3141.

  • Error 3159.

  • Error 4330.

  • Errors 1834 and 3156.

  • Errors 4326 and 4305.

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with Connectivity

The online Connectivity Troubleshooter is designed to help you resolve problems that may cause you to receive connectivity errors when you use Microsoft® SQL Server™ 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English and can be found on nonlocalized Web sites.

Common starting points for troubleshooting connectivity include:

  • I'm unable to register a new server in SQL Enterprise Manager.

  • I'm unable to connect - "Specified SQL Server not found," "SQL Server does not exist," or "Access denied."

  • I'm unable to connect from an ODBC application.

  • I'm unable to establish a trusted connection.

  • I'm unable to connect. The message is "Login failed."

  • I'm unable to connect through a firewall.

  • Encryption not supported on SQL Server ConnectionOpen (PreLoginHandshake()).

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with Data Transformation Services

The online Data Transformation Services Troubleshooter is designed to help you resolve problems you may encounter with Data Transformation Services (DTS) in Microsoft® SQL Server™ 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English so that this information can be found on nonlocalized Web sites.

Common starting points for troubleshooting DTS include:

  • I'm having a problem using DTS Designer or a wizard to create a DTS package.

  • I'm having a problem executing a scheduled package.

  • I'm having a problem executing a package that isn't scheduled.

  • My DTS package takes a long time to complete.

  • My DTS package takes a long time to stop running after it fails or is canceled.

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with Distributed Queries

The online Distributed Query Troubleshooter is designed to help you resolve problems you may encounter when using distributed queries in Microsoft® SQL Server™ 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English so that this information can be found on nonlocalized Web sites.

Common starting points for troubleshooting distributed queries include:

  • I have difficulty with distributed queries to an online analytical processing (OLAP) server.

  • I have difficulty with distributed queries to Oracle.

  • Distributed query performance is degraded.

  • I receive a specific error message from a distributed query, and I want more information about it.

  • I can't create, delete, or administer a linked server.

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with Full-Text Search

The online Full-Text Search Troubleshooter is designed to help you resolve problems you may encounter when using the Full-Text Search feature in Microsoft® SQL Server™ 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English and can be found on nonlocalized Web sites.

Common starting points for troubleshooting full-text search include:

  • I have a problem using CONTAINS or FREETEXT.

  • I can't enable databases for full-text search or full-text catalog creation.

  • I have a problem with full-text indexing or populating full-text catalogs.

  • Full-text indexing or searching performance is poor.

  • I have a problem with full-text indexing documents in IMAGE columns.

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with Performance

The online SQL Server Performance Troubleshooter is designed to help you resolve problems that may cause slow queries when you use Microsoft® SQL Server™ 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English and can be found on nonlocalized Web sites.

Common starting points for troubleshooting performance include:

  • My SQL Server 2000 application is slow.

  • I'm experiencing problems with blocking.

  • A stored procedure is being recompiled excessively.

  • Large batches of small queries are slower than expected.

  • An individual query is using a poor query plan.

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with SQL Profiler

The online Profiler Troubleshooter is designed to help you resolve problems you may encounter when trying to use the SQL Profiler tool in Microsoft® SQL Server 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English and can be found on nonlocalized Web sites.

Common starting points for troubleshooting SQL Profiler include:

  • I can't connect to a SQL Server I want to profile.

  • I have a problem capturing a trace.

  • I have a problem loading a previously captured Profiler trace.

  • I have a problem replaying a previously captured Profiler trace.

  • I have a problem with the tool's graphical user interface (GUI).

  • I have some other problem with the tool.

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with Replication

The online Replication Troubleshooter is designed to help you resolve replication problems you may encounter when using Microsoft® SQL Server 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English and can be found on nonlocalized Web sites.

Common starting points for troubleshooting replication include:

  • Error message for a Distribution Agent:
    "The process could not connect to Subscriber '<Server_name>'. Login failed for user '<User_name>'."
  • Error message for a Distribution Agent:
    "Timeout expired."
  • Error message for a Distribution Agent:
    "Could not find stored procedure 'sp_MSins_<table_name>'."
  • Error message for a Log Reader Agent:
    "The process could not execute 'sp_repldone/sp_replcounters' on '<Server_name>'. Another logreader is replicating the database."
  • Error message for a Log Reader Agent:
    "The process could not connect to server '<Server_name>'. Login failed for user 'sa'."
  • Error message for a Log Reader Agent:
    "The process could not execute 'sp_replcmds' on '<Server_name>'. Only members of the sysadmin or db_owner roles can perform this Operation."
  • Error message for a Snapshot Agent:
    "The process could not read file '< E:\Program Files\Microsoft SQL Server\MSSQL\REPLDATA\ >'. Access is denied."
  • Error message for a Merge Agent:
    "The subscription has been marked inactive and must be reinitialized at the Publisher. Contact the database administrator."
  • Error message for Remote agent:
    "The process could not connect to Subscriber '<Server_name>'. SQL Server does not exist or access denied."
  • Error message
    "The agent is suspect. No activity reported within the last 10 minutes."

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with Setup

The online Setup Troubleshooter is designed to help you resolve problems you may encounter when installing one of these editions of Microsoft® SQL Server™ 2000:

  • Microsoft SQL Server 2000 Personal Edition

  • Microsoft SQL Server 2000 Standard Edition

  • Microsoft SQL Server 2000 Enterprise Edition

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English and can be found on nonlocalized Web sites.

Common starting points for troubleshooting the installation of the Personal Edition include:

  • Does Setup stop responding when it tries to connect to the server?

  • Do you get an error when setup is trying to configure the server?

  • Does setup fail with an error indicating that you are running an evaluation version?

  • Does your system meet the minimum software and hardware requirements?

  • Do you get an error message that asks you to close all ODBC components?

  • Is Family Logon the primary network logon?

  • Do you get an error message indicating that setup cannot find SQL Server 2000?

  • Do you receive an error message indicating problems with character set and sort order?

  • Do you receive an error indicating that setup was unable to create a registry key?

  • Do you receive an error indicating that the file mfc42u.dll is read-only?

  • Is there a line in your sqlstp.log file indicating that "LoadLibrary failed on sqlsui.dll"?

  • Are you experiencing a system File Protection (SFP) issue around the install of MDAC?

Common starting points for troubleshooting the installation of the Standard Edition include:

  • Does your system meet the minimum software and hardware requirements?

  • Do you get an error message that asks you to close all ODBC components?

  • Does setup fail with an error indicating that you are running an evaluation version?

  • Do you get an error message indicating that setup cannot find SQL Server 2000?

  • Do you receive an error message indicating problems with character set and sort order?

  • Do you receive an error indicating that setup was unable to create a registry key?

  • Do you get an error when setup is trying to configure the server?

  • Do you receive an error indicating that the file mfc42u.dll is read-only?

  • Is there a line in your sqlstp.log file indicating that "LoadLibrary failed on sqlsui.dll"?

  • Are you experiencing a system File Protection (SFP) issue around the install of MDAC?

Common starting points for troubleshooting the installation of the Enterprise Edition include:

  • Does your system meet the minimum software and hardware requirements?

  • Are you installing SQL Server on a compatible operating system?

  • Do you get an error message that asks you to close all ODBC components?

  • Does setup fail with an error indicating that you are running an evaluation version?

  • Do you get an error message indicating that setup cannot find SQL Server 2000?

  • Do you receive an error message indicating problems with character set and sort order?

  • Do you receive an error indicating that setup was unable to create a registry key?

  • Do you get an error when setup is trying to configure the server?

  • Do you receive an error indicating that the file mfc42u.dll is read-only?

  • Is there a line in your sqlstp.log file indicating that "LoadLibrary failed on sqlsui.dll"?

  • Are you experiencing a system File Protection (SFP) issue around the install of MDAC?

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with Startup

The online Startup Troubleshooter is designed to help you resolve problems you may encounter when trying to start Microsoft® SQL Server™ 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English and can be found on nonlocalized Web sites.

Common starting points for troubleshooting startup include:

  • Error message "The service did not start due to a logon failure"

  • The SQL Server error log contains operating system errors indicating that a file couldn't be found or opened.

  • Error message "SQL Server could not find the default instance(MSSQLSERVER)."

  • Error message "Unable to Locate DLL. The dynamic link library filename could not be found in the specified path."

  • Error message "The application or DLL <Path> is not a valid Windows NT image."

  • Error message "(The system cannot find the path/file specified) occurred while performing this service operation on the MSSQLServer service"

  • SQL Server will not start, but there are no errors.

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Help with SQL Mail

The online SQL Server Mail Troubleshooter is designed to help you resolve problems you may encounter when using the SQL Mail feature in Microsoft® SQL Server™ 2000.

Note For international users of SQL Server Books Online, the text of the problems as well as the references to Knowledge Base articles appear in English so that this information can be found on nonlocalized Web sites.

Common starting points for troubleshooting SQL Mail include:

  • SQL Mail won't start with Microsoft Exchange Server.

  • SQL Mail causes exception error 35909.

  • SQL Mail won't send or receive messages.

  • SQL Mail won't start with a Microsoft Mail post office.

  • The sp_processmail system stored procedure fails, but I don't receive an error message.

To access troubleshooters online, see Viewing Online Troubleshooters and other PSS Web-Based Information.


Viewing Online Troubleshooters and Other PSS Web-Based Information

Online troubleshooters from Product Support Services (PSS) start with common problems users have, contain up-to-date information, and can help you diagnose what is happening with your installation of Microsoft® SQL Server™2000. You can connect to the online troubleshooters from a number of access points.

To access SQL Server troubleshooters directly

  • Go to the Troubleshooters page at Microsoft Web site

To view SQL Server troubleshooters

  1. Go to the following Knowledge Base article that links to the current location of the Microsoft online troubleshooters at Q193088 INF: SQL Troubleshooters Available on the Web.

  2. In this article, click the link to the SQL Server troubleshooters.

  3. On the Troubleshooters page, select SQL Server in the list of products.

    Note Depending on how you navigate to this page, the text below the list box changes. If SQL Server is not in the list, click List All Microsoft Products That Have a Troubleshooter, and then scroll down the list to find SQL Server.

  4. Click Go to open the list of SQL Server Troubleshooters.

  5. Select a SQL Server troubleshooter from the list, and then click Next to start the online diagnostic process.
Viewing Troubleshooters and White Papers Using MSDN Online

As an alternative route to the SQL Server troubleshooters, and the best way to locate the white papers about SQL Server 2000, follow these steps:

  1. Go to the MSDN® Online Support Web page at Microsoft Web site.

  2. Click Support Highlights & FAQs, specify SQL Server, and then click Go.
Viewing SQL Server Knowledge Base Articles

Links to Knowledge Base articles within a topic take you directly to the article on the Web. You can also locate articles by title or number using the Microsoft Knowledge Base Search page, accessible from any product support Web page.

See Also

Online Troubleshooters


Frequently Asked Questions

Microsoft® SQL Server Product Support Services (PSS) has compiled a list of questions commonly asked by users of Microsoft SQL Server™ 2000. This list is available on the FAQ & Highlights for SQL Server page at Microsoft Web site.

The questions and answers on this Web page have been included in the Troubleshooting topics as follows:

  • SQL Server Books Online FAQ

  • SQL Server Enterprise Manager FAQ

  • Administration Tools FAQ

  • Failover Clustering FAQ

  • Multiple Instance FAQ

  • Programming FAQ

  • Replication FAQ

  • Server FAQ

  • Setup and Installation FAQ

  • Upgrading to SQL Server 2000 FAQ
Expanding Text in the FAQs

The topics in Frequently Asked Questions contain a format that allows the answer text to be hidden and then expanded. When you click near the plus sign (+), the text appears. For example:

How does expanding text work?

Answer:

Click the +Answer to expand the text. Click again to hide the answer.


SQL Server Books Online FAQ

Why are some links in SQL Server Books Online different colors?

Answer:

The first time you install SQL Server Books Online, all of the links are one color, which means no linked topics have been visited. After you link to a topic, all the links for that topic appear as a different color. This is the standard behavior for HTML browsers.

How do I print a topic and include all of the linked subtopics?

Answer:

To print all subtopics that are linked to a topic, on the toolbar, click Print, and then select Print the selected heading and subtopics. To use CTRL+P to print, first click anywhere in the right pane, press CTRL+P, and then select the Print all linked documents check box.


SQL Server Enterprise Manager FAQ

How can I get my system databases to appear after they have been hidden from view in SQL Server Enterprise Manager?

Answer:

Right-click the server icon to change the setting that shows or hides system databases and system objects. Click Edit SQL Server Registration Properties, and then on the General tab, select Show system databases and system objects.

I'm having difficulty viewing the information in the results pane of SQL Query Analyzer. What can I do?

Answer:

If there is either too little or too much text in the results pane of SQL Query Analyzer, you can display the query results in a grid. Either press CTRL+D or click Results in Grid on the Query menu and then execute the query again.

If you are still having difficulty viewing the appropriate data in the results pane, adjust the maximum number of characters per column. On the Tools menu, click Options, and then click the Results tab. In the Maximum characters per column box, enter the number of characters to display. To view more characters, set this number to 256.

Why isn't the SQL Server Service Manager icon removed from the taskbar when the Service Manager window is closed?

Answer:

The SQL Server Service Manager icon shows the status of one of the Microsoft® SQL Server™ services. Closing the SQL Server Service Manager window only removes the dialog box from view; it does not affect the icon in the taskbar. To remove the icon from the taskbar, right-click the icon, and then click Exit.

How can I administer SQL Server through SQL Server Enterprise Manager without using the mouse?

Answer:

Press SHIFT+F10 to perform a mouse right-click. For more information about keyboard shortcut keystrokes, see Using Accessibility Shortcut Keys in SQL Server Books Online.


Administration Tools FAQ

When I attempt to register an OLAP server running on Microsoft® Windows® 2000 from an OLAP server running on Microsoft Windows NT®, I get the following error:

Errors occurred while connecting to server2000.
Cannot connect to the registry on the server computer (server2000).
Do you still want to register this server?

How do I resolve this error?

Answer:

Start the remote registry service on the computer running Windows 2000 by performing the following steps:
  1. On the Start menu, point to Programs, point to Administrative Tools, and then click Services.

  2. Right-click Remote Registry Service, and then on the shortcut menu, click Start .

Can the ON DELETE CASCADE option be set in the user interface?

Answer:

Yes. When creating the table in the Diagram user interface, click Table and Index Properties. On the Relationships tab, select the cascading referential integrity option you want to implement:
  • Cascade Update Related Fields

  • Cascade Delete Related Records

When creating a new table in SQL Server Enterprise Manager, I see a field titled Description for each column. How is this field used?

Answer:

The purpose of the Description field is to allow you to store a textual description of each column. There is also a Description field associated with the table. This description is stored as an extended property on the field. When generating a script for the table, the Include Extended Properties option appears on the formatting page. If this option is selected when the script is generated, the description property will show in the script.

Using SQL Server Enterprise Manager, how can I set a database to single user mode and dbo use only mode?

Answer:

In SQL Server 2000, a database cannot be set to both single user mode and dbo use only mode simultaneously. Instead, SQL Server Enterprise Manager allows you to set the following alternative options by right-clicking the database to change, clicking Properties on the shortcut menu, and then clicking the Options tab.

Restrict access

  • When this option is not selected, normal access to the database is allowed.

  • When this option is selected, the following settings are available:
    • Members of db_owner, dbcreator, or sysadmin

      When selected, this option restricts access to the database only to members of the db_owner, dbcreator, or sysadmin roles.

    • Single user

      When selected, this option restricts access to the database to only one user at a time.

Both of these options exist for SQL Server 6.5 and 7.0 databases. However, if you are using SQL Server 2000 tools, you can no longer set these options on the database properties tab in SQL Server Enterprise Manager. Instead, these options can be set only on SQL Server 6.5 and 7.0 databases by running the sp_dboption stored procedure.

Can I have both SQL Server 7.0 and SQL Server 2000 client management tools installed on the same computer?

Answer:

No. During an installation upgrade, the SQL Server 2000 tools replace the SQL Server 7.0 tools. Additionally, when installing SQL Server 2000 as a separate instance, if you choose to upgrade the tools, the SQL Server 7.0 program group remains and the SQL Server 2000 program group is added. However, the icons in the SQL Server 7.0 program group actually execute the SQL Server 2000 tools instead of the original SQL Server 7.0 tools.

Is it possible to define a special template that is copied automatically into the query pane for SQL Query Analyzer when you select New?

Answer:

Yes. By default, a blank document is always displayed. However, you can define and save a special template by typing the Transact-SQL statements into a window in SQL Query Analyzer, selecting Save As, and saving it in the directory you want as a Template SQL File (*.tql). You can select the template you want to open by selecting the drop down New icon on the toolbar, and then selecting Template.

Is it possible to use SQL Server 7.0 tools to connect to SQL Server 2000?

Answer:

It is recommended that you upgrade your tools to SQL Server 2000 if you plan to connect to a computer running SQL Server 2000 because most SQL Server 7.0 tools will not connect to computers running SQL Server 2000. The only SQL Server 7.0 tools that can connect to computers running SQL Server 2000 are SQL Query Analyzer and osql; however, these tools cannot be used to connect to named instances of SQL Server 2000.


Failover Clustering FAQ

Is the use of software fault-tolerant disk sets for cluster storage supported?

Answer:

No. For more information, see the following Microsoft Knowledge Base article:

http://support.microsoft.com/support/kb/articles/Q171/0/52.asp

Software FT Sets Are Not Supported in Microsoft Cluster Server.

Does SQL Server 2000 clustering provide load balancing?

Answer:

No. SQL Server 2000 clustering does not provide load balancing; it provides failover clustering. To achieve load balancing between instances of SQL Server, you will need additional software.

Does SQL Server 2000 full-text search support clustering?

Answer:

Yes.

How do I upgrade SQL Server 6.5 or SQL Server 7.0 to SQL Server 2000 when SQL Server version 6.5 or SQL Server 7.0 is part of a cluster?

Answer

If your installation of SQL Server 6.5 or SQL Server 7.0 is part of a cluster, you must perform certain steps to upgrade the server to SQL Server 2000. For information, see Upgrading to a SQL Server 2000 Failover Cluster.

For specific procedures, see the following topics:

  • How to upgrade from a SQL Server 6.5 active/passive failover cluster (SQL Server Setup)

  • How to upgrade from a SQL Server 6.5 active/active failover cluster (SQL Server Setup)

  • How to upgrade from a SQL Server 7.0 active/active failover cluster (SQL Server Setup)

  • How to upgrade from a SQL Server 7.0 active/passive failover cluster (SQL Server Setup)

  • How to upgrade from a default instance to a default clustered instance of SQL Server 2000 (SQL Server Setup)

For more information, see Failover Clustering.

What hardware is required to run SQL Server 2000 in a clustering environment?

Answer:

Check the Microsoft Windows Hardware Compatibility List for a list of clustering-compatible servers at:

Microsoft Web site

Note Search by using the word "cluster" because individual components cannot be combined to create a supported system.

In addition, refer to the Microsoft Cluster Server Administrator's Guide for a list of supported hardware configurations and hardware configuration information.

Can SQL Server 6.5 or SQL Server 7.0 be installed on one node and SQL Server 2000 be installed on the other node of a cluster?

Answer:

No. For two instances of SQL Server to participate in a failover cluster, they must be the same version of SQL Server. You can have a local SQL Server 7.0 installation and a failover cluster SQL Server 2000 instance.

Where do I place the SQL Server 2000 files to provide failover support?

Answer:

SQL Server setup installs a new instance of SQL Server binaries on the local disk of each computer in the cluster and installs the system databases on the specified shared cluster disk. The binaries are installed in the same path on each cluster node, so you must ensure that each node has a local drive letter in common with all the other nodes in the cluster.

How do I shut down SQL Server from the command line without the Cluster Service interpreting the shutdown as a failure?

Answer:

Use the Service Manager. For information, see How to stop a clustered instance of SQL Server (Service Manager). Alternatively, use the Cluster.exe application that comes with Microsoft® Windows NT® Enterprise Edition, Windows 2000 Advanced Server, or Microsoft Windows 2000 Data Center. Cluster.exe is installed as part of the typical Cluster setup, which can also be run on a Microsoft Windows NT Workstation, Microsoft Windows 2000 Professional, or Microsoft Windows 2000 Server member server computer to install just the Cluster Administrator and the other administrative applications. The basic syntax for this command is:

cluster [cluster name] RESOURCE [resource name] /option

In the preceding command syntax, the /option switch controls this functionality.

The specific options to be used are /online and /offline. These options are equivalent to the commands net start mssqlserver (to start SQL Server from the command line) and net stop mssqlserver (to shut down SQL Server from the command line) for a nonvirtualized server, respectively. You can perform this procedure on the SQL Server Fulltext, the SQL Server Agent, and the SQL Server resources.

Following are some examples of how to use this command syntax:

  • To take the SQL Server 2000 resource offline if the Cluster Name is "SQLCluster" and the resource is named "SQL Server" (where "SQL Server" is the name of the SQL Server 2000 resource:

cluster "SQLCluster" resource "SQL Server" /offline

  • To bring the SQL Server 2000 resource back online:

cluster "SQLCluster" resource "SQL Server" /online


Multiple Instance FAQ

How do I install multiple instances of Analysis Services?

Answer:

Unlike SQL Server, Analysis Services does not support multiple instances on a single server. It is not possible to run both OLAP Services 7.0 and Analysis Services 2000 on the same computer.

When I install multiple instances of SQL Server, where are the tools installed for each instance?

Answer:

SQL Server 2000 always installs the tools on a system drive such as the common directory in Windows NT, so you will have only one set of tools, which will be common to all instances. This set of tools works with SQL Server 7.0 servers as well as SQL Server 2000 servers, and replaces the SQL Server 7.0 tools that may already be installed on the computer.

Does the port number for an instance have to be configured during setup?

Answer:

No. During setup, you have the option of either entering the port number or allowing the server to choose the port number.

When running both SQL Server 7.0 and SQL Server 2000 on the same computer, is there any way to get the two instances to share the same user databases?

Answer:

No. The same database files cannot be used for both SQL Server 7.0 and SQL Server 2000. SQL Server 7.0 databases can be upgraded to SQL Server 2000 databases, but after the database files are upgraded, they cannot be used by the SQL Server 7.0 instance. This database upgrade is done automatically when a SQL Server 7.0 database is attached or restored to a SQL Server 2000 server. There is no way to downgrade the database files from SQL Server 2000 to SQL Server 7.0 files.


Programming FAQ

Does SQL Server 2000 come with a new version of DB-Library?

Answer:

No. DB-Library has not been enhanced for SQL Server 2000. SQL Server 2000 includes the same features contained in the SQL Server 6.5 and 7.0 DB-Library.

Can ODBC 6.5 drivers be used to connect to SQL Server 2000?

Answer:

SQL Server 2000 is designed to be backward compatible with earlier versions of ODBC applications. The following can be accomplished:
  • An application written to connect to SQL Server 6.5 that uses ODBC 6.5 drivers can connect to SQL Server 2000.

  • The SQL Server 2000 ODBC drivers can connect to SQL Server 6.5.

  • A legacy application that must connect to SQL Server 2000 can be flagged as a 6.5-compatible ODBC application using the odbccmpt utility. For more information, see odbccmpt Utility Utility.

For information about exceptions, see Level 1: Handling Discontinued Functionality.

Where can I find the MDAC redist file with SQL Server 2000?

Answer:

A copy of Mdac_typ.exe is included on the SQL Server 2000 compact disc in the \MSEQ\x86\odbc folder.

Is it possible to attach properties/variables to the SQL-NS statement?

Answer:

No. SQL-NS only provides access to the dialog boxes. You cannot preset values for the dialog boxes.


Replication FAQ

How do you view the commands for transactions marked for replication in the transaction log of the publishing database in a readable format?

Answer:

Use the stored procedure sp_replshowcmds. to view transactions that currently are not distributed (those transactions remaining in the transaction log that have not been sent to the Distributor). sp_replshowcmds can be run only when client connections (including the current connection) are not reading replicated transactions from the log. Hence, the Log Reader Agent needs to be stopped for this procedure to be run. This stored procedure is executed at the Publisher on the publication database.

Note sp_replshowcmds should be run only to troubleshoot problems with replication.

When is the MSreplication_subscriptions table created on the Subscriber?

Answer:

The Distribution Agent creates the MSreplication_subscriptions table at startup if the table does not already exist. Alternately, the sp_addpullsubscription stored procedure creates the MSreplication_subscriptions table if the table does not already exist on the Subscriber.

What .exe or .dll file is called for each agent?

Answer:

This table shows the agent names and associated files.

Agent name | File name
Log Reader Agent | Logread.exe
Snapshot Agent | Snapshot.exe
Distribution Agent | Distrib.exe
Queue Reader Agent | Qrdrsvc.exe
Merge Agent | Replmerg.exe

Note The Snapshot Agent, the Distribution Agent, and the Merge Agent can also be invoked through the Sqlinitx.dll, Sqldistx.dll and Sqlmergx.dll Microsoft® ActiveX® interfaces respectively.

When do I need multiple distribution databases?

Answer:

In most cases, you need only one. This feature is for users who are centralizing replication operations and administration and want one distribution server to host many Publishers. You can support many Publishers to one distribution database. However, there may be cases in which you want to separate logical replication applications into separate databases for administration purposes. In this case, use multiple distribution databases. Multiple distribution databases may also provide a performance benefit by reducing contention (both writing to and reading from the distribution database).

Can all servers in a merge setup have the same priority?

Answer:

The Publisher and the Subscriber can never have the same priority. Microsoft SQL Server™ 2000 enforces this while adding subscriptions. However, if there are two subscriptions (for example, S1 and S2) that have the same priority, the first subscription that propagates changes to the Publisher wins. For example, if S1 and S2 make changes simultaneously, the first one to merge changes with the Publisher wins. The same rule applies to local subscriptions, which essentially have a priority of 0 (the first one to the hub wins).

Synchronizing on Internet publications fails with the error "Couldn't deliver schema information." Why?

Answer:

It is possible that the file copy operations failed. By default, agents used with pull subscriptions use the Universal Naming Convention (UNC) path set for the Distributor and Publisher to open the files. If the computer is not on the Local Area Network (LAN), UNC will not work. You can set up a File Transfer Protocol (FTP) server at the Distributor and set the Merge Agent command line to include an FTP address. Publications enabled for the Internet will have the initial snapshot downloaded to the client computer by the Merge Agent through FTP before it is applied to the Subscriber.

I used the Disable Publishing And Distribution Wizard, and the physical files for the distribution database persisted on my hard disk. Is this by design? When I reinstall replication, what will happen?

Answer:

When you remove distribution, SQL Server attempts to remove the physical files. However, if other clients are using the distribution database or if there is a sharing violation when the file is being deleted, the file will not actually be removed from the hard disk. If the physical file is not removed and you try to install distribution again, a new name will be used for the distribution database.

If I create a publication with one table as an article, and then change the schema of the published table (for example, by adding a column to the table), will the new schema ever be applied at the Subscribers?

Answer:

Yes. The new schema will be applied at the Subscribers, provided schema changes to the published table were made through the replication publication properties dialog box in SQL Server Enterprise Manager or through replication stored procedures. Do not make schema changes to published tables using the SQL ALTER TABLE statements in a tool such as SQL Query Analyzer or by using SQL Server Enterprise Manager visual database tools. Changes made to the schema of a published table using these tools will not be propagated to Subscribers.

For more information, see Schema Changes on Publication Databases.

What is a good way to see the commands in MSrepl_commands?

Answer:

Execute the stored procedure sp_browsereplcmds at the Distributor on the distribution database.

What if the Snapshot Agent has not completed when the Distribution Agent starts?

Answer:

This is not a problem if the Distribution Agent runs at the same time as the Snapshot Agent. However, if the Distribution Agent runs and there is no snapshot available, it will shut down with a message stating that a snapshot is not yet available, unless it has been configured to run continuously. In that case, the Distribution Agent waits for the Snapshot Agent to finish.

On Windows 2000 Server, transactional replication is unavailable. Why?

Answer:

Microsoft SQL Server 2000 Personal Edition and Microsoft SQL Server 2000 Desktop Engine can be used only as a transactional replication Subscriber. These editions can be installed on any platform.

Using immediate updating subscriptions, the published table is altered. Why?

Answer:

In SQL Server 2000, tables used in publications that allow immediate updating are required to have a SQL Server uniqueidentifier column. If one does not exist, SQL Server 2000 adds one automatically when you create the publication. If you stop publishing a table, you can drop the uniqueidentifier column. Applications will work unchanged against tables with the uniqueidentifier column because you do not have to include this column in qualified INSERT, UPDATE, or DELETE statements.

See Also

Help with Replication


Server FAQ

What is the difference between DBCC INDEXDEFRAG and DBCC REINDEX?

Answer:

Unlike DBCC DBREINDEX or any general index build, DBCC INDEXDEFRAG is an online operation, so it does not hold long-term locks that can block running queries or updates. Depending on the amount of fragmentation, DBCC INDEXDEFRAG can be considerably faster than running DBCC DBREINDEX because a relatively unfragmented index can be defragmented much faster than a new index can be built. Another advantage is that with DBCC INDEXDEFRAG, the index is always available, unlike DBREINDEX. A large amount of fragmentation can cause DBCC INDEXDEFRAG to run considerably longer than DBCC DBREINDEX, which may or may not outweigh the benefit of the command's online capabilities. DBCC INDEXDEFRAG will not help if two indexes are interleaved on the disk because INDEXDEFRAG shuffles the pages in place. To improve the clustering of pages, rebuild the index.

When I create a table, I get the following 2714 error message:

Total rowsize for table exceeds the maximum number of bytes per row (8060). Rows that exceed the maximum number of bytes will not be added.

However, the table creation succeeds and data can be inserted without problems. What did this error message mean?

Answer:

This error message indicates that you have variable length columns in your table (such as nvarchar or varbinary) and that the total maximum length of all the columns adds up to more than 8,060 bytes. You can still insert rows into the table if the total length of the data in each row does not exceed 8,060 bytes. However, if the data does exceed 8,060 bytes, the insertion fails with the following error message:

Server: Msg 511, Level 16, State 1, Line 5
Cannot create a row of size <rowlength> which is greater than the allowable maximum of 8060.
The statement has been terminated.

A user-defined function returns a table that is schemabound to two tables in my database. According to the documentation, the referenced tables cannot be altered until the schemabound option is removed. However, I am able to add or delete columns from these referenced tables. Shouldn't this give me an error?

Answer:

You will not receive an error if you alter columns that are not referenced by the function. You cannot drop or alter the columns of a table that are involved in the schemabinding, but you can alter other columns that are not involved in the schemabinding. For example, suppose a schemabound table, table1, is defined with 5 columns: c1, c2, c3, c4, and c5. If the function only references c1 and c3, only columns c1 and c3 cannot be altered. Columns c2, c4, and c5 can be altered as needed.

How can I set the database to single user mode and restrict the access to dbo use only?

Answer:

In SQL Server 2000, a database cannot be in single-user mode with dbo use only. Instead, the following alternative options are available by using the ALTER DATABASE command:
  • ALTER DATABASE database SET SINGLE_USER.

    This command restricts access to the database to only one user at a time.

  • ALTER DATABASE database SET RESTRICTED_USER.

    This command restricts access to the database to only members of the db_owner, dbcreator, or sysadmin roles.

  • ALTER DATABASE database SET MULTI_USER.

    This command returns access to the database to its normal operating state.

Can I run multiple instances of SQL Server 2000 at the same time on one computer?

Answer:

Yes. For information, see Multiple Instances of SQL Server.

Are DB-Library applications supported in SQL Server 2000?

Answer:

Yes. However, DB-Library has not been enhanced for SQL Server 2000. DB-Library includes the same features that the Microsoft® SQL Server™ 7.0 DB-Library contains. This means that a DB-Library application can only connect to a default instance of SQL Server 2000; it cannot connect to a named instance. It will not recognize any of the new features available in SQL Server 2000.

Do I need to use the multi-protocol network library to enable encryption?

Answer:

No. SQL Server 2000 can use the Secure Sockets Layer (SSL) to encrypt all data transmitted between an application computer and a SQL Server instance on a database computer. The SSL encryption is performed within the Super Socket Net-Library (Dbnetlib.dll and Ssnetlib.dll) and applies to all inter-computer protocols supported by SQL Server 2000. For more information, see Net-Library Encryption.

Why does my SQL statement work correctly outside of a user-defined function, but incorrectly inside it?

Answer:

You may have included a statement in the BEGIN-END block that has side effects, which is not allowed in user-defined functions. Function side effects are any permanent changes to the state of a resource that has a scope outside the function. Changes can be made only to local objects such as local cursors or variables. Examples of actions that cannot be performed in a function include modifications to database tables, operations on cursors that are not local to the function, sending e-mail, attempting a catalog modification, and generating a result set that is returned to the user.

How can I qualify a named instance in a linked server query?

Answer:

You must use square brackets around the multi-instance linked server name in the four part query. For example:

SELECT * FROM [myServer\sql80].northwind.dbo.customers


Setup and Installation FAQ

What operating systems support SQL Server 2000?

Answer:

Operating system and other software requirements vary, depending upon the edition of SQL Server 2000 and the components that you choose to install. For more information, see Hardware and Software Requirements for Installing SQL Server 2000.

What are the minimum hardware requirements for installing SQL Server 2000?

Answer:

Hardware requirements vary, depending upon the edition of SQL Server 2000 and the components that you choose to install. For more information, see Hardware and Software Requirements for Installing SQL Server 2000.

Can I install SQL Server 2000 on a server that already has SQL Server 7.0 installed?

Answer:

Yes. You can install SQL Server 2000 as a named instance and run both SQL Server 7.0 and SQL Server 2000 at the same time.

How can I install only SQL Server Books Online?

Answer:

You can select the SQL Server Books Online option during a custom installation of SQL Server.

How do I install only the client and SQL Profiler?

Answer:

During a custom installation, under components, select Client Connectivity and Management Tools. With Management Tools selected, select Profiler under Sub-Components.

When I run SQL Server Setup, why do I get a message asking me to close all ODBC components?

Answer:

SQL Server 2000 Setup installs Microsoft Data Access Components (MDAC) 2.6, which installs newer ODBC components. Therefore, all applications that use ODBC must be shut down so that the MDAC installation can be successful. Applications that use ODBC include Microsoft Internet Information Services (IIS), Microsoft Systems Management Server, Microsoft Access, and Oracle database applications.

When installing SQL Server 2000 on a computer running Windows 98, Windows NT 4.0, or Windows 2000, do I need to install the Windows 95 Winsock2 update?

Answer:

No, you only need to install the Windows 95 Winsock2 update if you are planning to install SQL Server 2000 client connectivity components on a computer running Windows 95. Regardless of the platform on which you are installing SQL Server 2000, the Winsock2 update for Windows 95 will be listed when you select Install SQL Server 2000 Prerequisites during setup. However, this prerequisite applies only to computers running Windows 95, not to computers running Windows 98, Windows NT 4.0, or Windows 2000.

Can I install the MDAC 2.6 that comes with SQL Server 2000 without actually installing SQL Server 2000?

Answer:

Yes. MDAC 2.6 has a separate installation and can be installed without installing SQL Server 2000. Run the program Mdac_typ.exe located in the MSEQ\x86\ODBC directory on the SQL Server 2000 compact disc.

Is it possible to have SQL Server start automatically on computers running Windows 98?

Answer:

Yes. In the SQL Server Service Manager, there is an option called AutoStart Service When OS Starts that you can use to start SQL Server.

Can I perform a remote installation?

Answer:

Yes. The Computer Name screen of SQL Server Setup gives you the option of selecting the local computer, a remote computer, or, when installing clustering, a virtual server. All prerequisites must first be installed on the remote computer before beginning the installation.

Do I need Microsoft Internet Explorer 5.0 to install only the client connectivity tools on my clients?

Answer:

No. If you want to install only the client connectivity tools, you do not need Internet Explorer 5.0, but you do need Internet Explorer 4.01 with Service Pack 2. Note that if you intend to install the management tools or the SQL Server 2000 Books Online, you do need Internet Explorer 5.0.

What do I need to do if I have an unsuccessful installation?

Answer:

If you have an unsuccessful installation of SQL Server 2000, you can examine two files to help determine what the failure was. The first file is the Sqlstp.log file in the Windows directory. The Sqlstp.log file gives detailed information on what setup is doing and contains all errors encountered during setup. Reviewing this file will give you a better understanding as to where Setup is failing and why.

During the configuration portion of setup, SQL Server Setup runs an application named Cnfgsvr.exe to configure the SQL Server. This application starts SQL Server, connects to it, and runs the initial installation scripts. Any error encountered during this process is written to the Sqlstp.log file. In addition, you should review the SQL Server error log, named Errorlog with no file name extension, located by default in the Program Files\Microsoft SQL Server\Mssql\Log directory. This error log will contain errors that SQL Server encounters when setup attempts to start SQL Server.

If you are unable to determine the cause of the Setup failure, save the files mentioned earlier, and call Microsoft Product Support Services (PSS) to contact a SQL Server Support Professional who will help you to resolve your problem. If the Setup application fails, it rolls back all changes to the file system, including removing any copied files, and removes any changes that were made to the registry.

How do I rebuild the registry?

Answer:

To rebuild the SQL Server registry entries, run setup, select Advanced Options, and then select Rebuild Registry. Alternately, you can also use the Regrebld.exe utility, located in the Program Files\Microsoft SQL Server\Mssql\Binn directory by default.

After SQL Server Setup is finished, the registry is rebuilt automatically using Regrebld.exe. This utility creates an image of all the SQL Server registry entries with file names of Mssql*.rbk.

Running Regrebld.exe with the -Restore option places the registry key images into the registry. If the keys exist, they are replaced. If changes are made to the SQL Server installation after the initial setup, the backup copy of the registry keys is not updated automatically. If changes are made after installation, run Regrebld.exe manually to update the registry key information. If Regrebld.exe is run without any parameters, as is the case when performing a registry rebuild from the Setup menu, SQL Server program icons will also be rebuilt.

Why won't SQL Server 2000 install on a computer that has a Cyrix chip installed?

Answer:

Earlier versions of Cyrix chips do not support the complete Pentium instruction set. SQL Server 2000 makes use of some of these instructions, so the Setup program detects and refuses to install SQL Server on a computer with earlier versions of Cyrix chips.

Can I install SQL Server 2000 on a server running Windows NT 4.0, Terminal Server Edition?

Answer:

No. Currently, SQL Server 2000 is not supported on Windows NT 4.0 Terminal Server; however, it is supported on Windows 2000 Terminal Server.


Upgrading to SQL Server 2000 FAQ

Can you detach a SQL Server 7.0 database and attach it to a SQL Server 2000 server?

Answer:

Yes. SQL Server 7.0 databases are compatible with SQL Server 2000. However, exceptions do exist. For information about these exceptions, see Upgrading Databases from SQL Server 7.0 (Copy Database Wizard).

Attaching a SQL Server 7.0 database to SQL Server 2000 automatically upgrades the SQL Server 7.0 database to a SQL Server 2000 database and the database is no longer usable by the SQL Server 7.0 installation.

Can you detach a SQL Server 2000 database and attach it to a SQL Server 7.0 server?

Answer:

No. The only way to move a SQL Server 2000 database to a SQL Server 7.0 server is by using Data Transformation Services (DTS).

Can you restore a SQL Server 7.0 database backup to a SQL Server 2000 server?

Answer:

Yes. Other than the master, model, msdb, and distribution databases, SQL Server 7.0 databases are compatible with SQL Server 2000.

Can you restore a SQL Server 2000 database backup to a SQL Server 7.0 server?

Answer:

No. The only way to move a SQL Server 2000 database to a SQL Server 7.0 server is by transferring the data using a method such as DTS, bcp, or use of a query between linked servers.

Can you restore or attach a SQL Server 6.5 database to SQL Server 2000?

Answer:

No. The only way to move a SQL Server 6.5 database to SQL Server 2000 is to run the SQL Server Upgrade Wizard.

Is a SQL Server 7.0 service pack required to upgrade?

Answer:

No service packs are required to perform the upgrade from SQL Server 7.0 to SQL Server 2000, although Microsoft Product Support Services (PSS) recommends that you be on the latest service pack.

Which SQL Server 6.5 service pack is required to upgrade to SQL Server 2000?

Answer:

When you upgrade SQL Server 6.5 to an instance of SQL Server 2000 on the same computer, you must first apply the SQL Server version 6.5 Service Pack 5a or later. When you upgrade SQL Server 6.5 to an instance of SQL Server 2000 on a different computer, you must first apply the SQL Server version 6.5 Service Pack 3 or later.

How long will the upgrade process take to upgrade my SQL Server 6.5 databases?

Answer:

Many factors affect the amount of time needed to upgrade SQL Server 6.5 databases to SQL Server 2000. Each object in the SQL Server 6.5 database must be rebuilt in the SQL Server 2000 database, and every row must be transferred. Depending on the complexity of each database, the length of time needed to convert two 10 GB databases that have differing numbers of rows and objects varies widely. In addition, the hardware platform, number of processors, disk subsystem, and amount of RAM play a significant part in the amount of time required for the upgrade. Selecting data validation during the setup increases the amount of time needed to perform the upgrade by a factor of two. This table shows some typical times for the upgrade process.

Size of Database | Estimated Time Required to Upgrade
400 MB | Less than 20 minutes
1 GB | Less than 1 hour
10 GB | Less than 4 hours
50 GB | Less than 12 hours
100 GB | Less than 24 hours

Can users be connected to the SQL Server 7.0 server while the installation upgrade process runs?

Answer:

No. When you perform an installation upgrade, the SQL Server 7.0 server is stopped and started; users are not able to stay connected. To perform an upgrade while users stay connected, you must install a separate instance of SQL Server 2000 and then use the Copy Database Wizard to copy each database from SQL Server 7.0 to that instance of SQL Server 2000. The Copy Database Wizard allows you to upgrade your SQL Server 7.0 databases without having to shut down any servers in the process.

Can users be connected to the SQL Server 6.5 server while the upgrade process runs?

Answer:

No. During the upgrade process, the SQL Server 6.5 server is stopped and started while objects are scripted and data is extracted. When the data transfer starts, only SQL Server 2000 is running, and it is not possible to access SQL Server 6.5.

How should I configure my SQL Server 6.5 server before performing the upgrade?

Answer:

If you are upgrading your existing SQL Server 6.5 server to a different computer that is running SQL Server 2000, both computers should be configured to use a domain user name and password for the MSSQLServer service. The domain user account should also belong to the Administrators group on both computers. A local system account is sufficient for a one-computer upgrade. If you are upgrading across different domains, you must have a trust relationship set up between the domains before you start the upgrade.

Can I consolidate databases from two or more SQL Server 6.5 servers onto one SQL Server 2000 server?

Answer:

No. The upgrade process keeps track of the server being upgraded and only allows databases from one SQL Server 6.5 server to be upgraded. Consolidating databases from different servers may cause problems in user login IDs, user accounts, and object permissions. If you want to consolidate several databases from different SQL Server 6.5 servers, move all the databases that you want to consolidate to a single SQL Server server and verify that your applications work correctly before upgrading to SQL Server 2000.

Can I upgrade only one or a few of my databases to SQL Server 2000?

Answer:

An upgrade of an existing SQL Server 7.0 instance to SQL Server 2000 always upgrades all databases because it replaces SQL Server 7.0 with SQL Server 2000. If you want to upgrade only some of your SQL Server 7.0 databases, install SQL Server 2000 as a separate instance and use the Copy Database Wizard to upgrade the databases. For more information, see Upgrading Databases from SQL Server 7.0 (Copy Database Wizard).

When you upgrade SQL Server 6.5, you can upgrade one, some, or all of your SQL Server databases to SQL Server 2000. You can even convert individual databases as a test or as practice before you upgrade all of the databases on the server. Microsoft recommends that you convert all production databases on a server at the same time to minimize potential problems. Even if you only want to convert a subset of your existing SQL Server databases, you should still convert them all at the same time.

If you are not upgrading all of the SQL Server 6.5 databases at the same time, any objects that rely on the contents of other databases, including views, stored procedures, and triggers, fail to be created if the object or the dependent database does not exist.

If the SQL Server 6.5 model database has been modified to include additional objects, it should be converted either at the same time as all of the other SQL Server 6.5 databases, or after all of the other SQL Server 6.5 databases. Any objects that were created in SQL Server 6.5 databases because of non-default objects being added into the SQL Server 6.5 model database will be scripted during the upgrade process.

When other SQL Server 6.5 databases are upgraded after the model database has been converted, they contain nondefault objects based on the SQL Server 6.5 model database. Because the objects are added to the new SQL Server 2000 databases when they are initially created by the SQL Server 2000 model database, the creation script fails to create any objects that already exist in the database. Therefore, by converting the model database last, any changes in the database structure are applied only to new SQL Server 2000 databases. All of the nondefault objects in the SQL Server 6.5 converted databases will have been created by scripts during the conversion process of those databases.

Can I run SQL Server 2000 at the same time as SQL Server 7.0 or SQL Server 6.5 on the same computer?

Answer:

SQL Server 6.5 and SQL Server 7.0 install as the default instance on a server, and you can run only one of these versions on a particular computer at a time. SQL Server 2000 does support multiple instances of the SQL Server database engine running concurrently on the same computer. If you install SQL Server 2000 as a named instance, you can run it alongside the SQL Server 6.5 or SQL Server 7.0 default instance that was previously installed on the computer. If you install SQL Server 2000 as the default instance, it upgrades the SQL Server 6.5 or SQL Server 7.0 default instance that is already present on the computer. When this occurs on a computer that was running SQL Server 6.5, you can use the vswitch utility to switch between the SQL Server 2000 default instance and the SQL Server 6.5 default instance following the upgrade. In the case in which the SQL Server 7.0 default instance is upgraded, only the SQL Server 2000 default instance is accessible following the upgrade.

Important Each instance of the SQL Server database engine has its own set of system and user databases that are not shared between instances.

For more information, see Working with Instances and Versions of SQL Server.

Why am I getting the following error during a SQL Server 6.5 conversion?

@@servername not valid

Answer:

This error message may occur if the SQL Server 6.5 server you are upgrading has not been named. To resolve these problems, perform the following steps on the SQL Server 6.5 server:
  1. In isql or isql/w, run the following query to make sure that the server has a name:

SELECT @@servername

  2. If the server does not have a name, run the following stored procedure to add a name:

sp_addserver <server_name>, local

When you upgrade a SQL Server 6.5 server, what causes the following error messages?

Cannot open default database

Error querying @@servername

Answer:

If the default database for the system administrator has not recovered yet, or if it is marked as suspect, the upgrade wizard produces one of these error messages. Resolve the problem with the default database and run the upgrade wizard again.

When you upgrade a server running SQL Server 6.5, the upgrade wizard seems to stop responding and fails. Why?

Answer:

If applications or services have open ODBC connections to the SQL Server 6.5 server during the conversion process, they may not allow the server to shut down completely. The conversion process will not proceed to the next step if it does not receive verification that the server running SQL Server 6.5 has been completely stopped. The conversion process appears to stop responding and eventually fails. To resolve the situation, close all applications and services that may have ODBC connections or that may be using SQL Server before you perform the upgrade. If either SQL Profiler or SQL Trace is connected to the server running SQL Server 6.5, you will see a similar problem. Although the server will not actually stop responding, tasks that once processed quickly are now exponentially slower.

Where can I look to see a record of any errors that I may have encountered during the upgrade process?

Answer:

During the upgrade process, detailed logs are generated and stored in your SQL directory. If any errors occur during the upgrade process, you will see a dialog box at the end of the process. This dialog box will display the contents of the error files. This output file is located in the Program Files\Microsoft SQL Server\MSSQL\Upgrade\<servername>_<date>_<time> directory. Each database has its own subdirectory with output and error files that were generated during the upgrade process.


Best Practices

This section describes recommendations and best practices for Microsoft® SQL Server™ 2000.

  • DBCC CHECKDB Recommendations

  • Distributed Partitioned View Recommendations

  • Full-Text Search Recommendations

  • Multiple Instance Recommendations

  • Parallel Query Recommendations

  • User-Defined Function Recommendations


DBCC CHECKDB Recommendations

In Microsoft® SQL Server™ 2000, you can run DBCC CHECKDB while users are using the database because of a change in the type of locks that DBCC CHECKDB holds on the database tables as it checks each one.

In SQL Server 7.0 and earlier, DBCC CHECKDB (which in turn runs DBCC CHECKTABLE and CHECKALLOC on each table in the database) used to hold shared locks (S) on the tables, thus blocking all data modification language (DML) statements.

In SQL Server 2000, DBCC CHECKDB holds a schema lock on the table to prevent meta data changes while the table is being checked, thus allowing DML statements but not any data definition language (DDL) statements on the tables being checked. This change provides greater flexibility as to when you can run DBCC CHECKDB because DBCC CHECKDB does not deny system usage completely to the users.

DBCC CHECKDB is a CPU- and disk-intensive operation. Each data page that requires checking must first be read from disk into memory. In addition, DBCC CHECKDB uses tempdb to do sorting.

If actively performing transactions while DBCC CHECKDB is running, the transaction log continues to grow because the DBCC command blocks log truncation until it has finished reading the log.

It is recommended that DBCC CHECKDB be run during hours when the load is light on the server. If DBCC CHECKDB is run during heavy peak usage time, expect a performance hit on the transaction throughput as well as DBCC CHECKDB completion time.

Recommendations for Good DBCC Performance
  • Run CHECKDB when the system usage is low.

  • Be sure that you are not performing other disk I/O operations, such as disk backups.

  • Place tempdb on a separate disk system or a fast disk subsystem.

  • Allow enough room for tempdb to expand on the drive. Use DBCC with ESTIMATE ONLY to estimate how much space will be needed for tempdb.

  • Avoid running CPU-intensive queries or batch jobs.

  • Reduce active transactions while a DBCC command is running.

  • Use the NO_INFOMSGS option to reduce processing and tempdb usage significantly.

Consider using DBCC CHECKDB with the PHYSICAL_ONLY option to check the physical structure of the page and record headers. This operation performs a quick check if hardware-induced errors are suspect.


Distributed Partitioned View Recommendations

With the implementation of distributed partitioned views, Microsoft SQL Server 2000 Enterprise Edition allows for high-end users to scale their servers to meet the requirements of large Web sites and enterprise environments. Before choosing to create a federated server implementation, and consequently partition your tables, you need to decide whether distributed partitioned views are best for your overall environment. The implementation of distributed partitioned views can bring about a lot of complexity to the management and operation of the overall environment. Currently, the percentage of companies that may need to implement this scale-out behavior to improve their environment is very small.

Distributed partitioned views add a scale-out capability to the database backend by transparently partitioning the data across a group of servers. This implementation is designed for high-end OLTP and Web sites with individual SQL statements retrieving minimal data as compared to the decision support, Analysis Services (formerly OLAP Services). The following topics include high-level considerations for any environment that may use distributed partitioned views as part of the database implementation.

Scaling to the Limits of a Single Database Server

Have you already scaled to the limits of a single database server? Scaling refers to the process of adding resources to a tier so that it can handle increased workloads. Scaling can be done in one of these ways:

  • Scale up. Increases the processing power of a server by using a more powerful computer.

  • Scale out. Increases the processing power of a system designed in a modular fashion, such as becoming a cluster of computers, by adding one or more additional computers (also called nodes) to the system.

While a federation of servers implementing distributed partitioned views allow for a scale-out environment model, scaling up on a single server should be considered first. Distributed partitioned views should be considered a solution only for database systems which have already fully scaled up and at this point are looking to scale out their data services tier. Many perceived problems might well be resolved more efficiently through implementing a scale-up philosophy and adding additional resources for the single database server to use. By scaling up instead of scaling out, the change to the environment should be less intrusive, minimizing such things as application code changes and database design issues, while allowing for efficient memory usage on the single server.

Database and Table Design for a Distributed Environment

Does your database and table design lend itself to a distributed environment?

Consider the current database and table design of your environment. To partition a table successfully, the design must lend itself to this type of an implementation. The goal is to design partitions so that most of the queries are run locally, not remotely. Considerations such as which tables to partition are crucial to the overall performance of the system.

For example, an environment may have Orders, Customers, and Items tables, with Orders and Customers consistently changing and the Items table remaining fairly constant. As a practice, if the Items table, for example, has very few INSERT, UPDATE, or DELETE statements executed against it, you may want to clone this data across all partitions to keep the clusters of tables and data retrieved together.

The partitioning for an updatable view is done on a unique primary key constraint (horizontal partitioning). Therefore, consider not only how the table might be divided, but also the layout of your data today and in the future. Consider your partitioning column and the type of queries that will be run against this column.

In designing a partitioning scheme, it must be clear what data belongs to each partition. The partitioning column cannot be updated and identities, and default and timestamp columns cannot be implemented as the key. You may want to use a hashed value for your key to get a relatively even distribution of each one of your partitions when new keys are inserted or deleted. If, in the future, tables need to be re-partitioned, an overhead will be incurred in modifying the view and underlying table schema, and possibly in changing the data-routing rules of the business tier.

Consider why you may need to implement a federated database design. If you have an extremely high-hit database, it may not be that database or table that you want to distribute. Rather, if you could minimize the load associated with other table queries on that server by distributing them, this could be an efficient implementation as well. It is recommended that most of the SQL statements be routed directly to the member server with a large percent of the necessary data, therefore minimizing the distributed nature of the design. For more information, see Designing Partitions.

Overall Query Performance

Have you considered overall query performance? Performance should be a large consideration in any database design and implementation. When distributing data across multiple servers, there is a performance hit for querying a remote server. Analysis should be done on the type of queries implemented in the OLTP environment to get a baseline on what data is being touched by specific queries. Because there is a certain degree of overhead in running distributed queries, this overhead may in some cases outweigh the benefits of distributing your tables. It is important to analyze queries and their generated plans to gather information as to how you want to distribute your data, whether you need to distribute your data, and to modify long-running queries. Removing redundant trips to a remote server and being able to cache compiled plans and execution plans can increase overall performance; however, the more remote trips (some are inherent in a distributed environment), the more performance will decrease.

Application and Business-Tier Design

What about your application and business-tier design? Consider that you can gain considerable performance in your federated database tier throughout the environment by connecting to the correct server (the server with the data you need or a server that can most efficiently process the query) the majority of the time. Within a business-tier logic that can route queries to the appropriate servers, the system-wide efficiency can be increased significantly. This routing logic can be implemented in the business tier or even within a table at the data tier, with the advent of data-routing rules. Data-routing rules are a set of rules that can be used to send a query to the server that contains the appropriate data. Implementing data-routing rules can require the initial overhead of making changes to your application or other tiers within your environment. For more information, see Designing Applications to Use Federated Database Servers.

Backup And Recovery Planning for Multiple Servers

How will you maintain your backup and recovery plan across multiple servers? Overall, manageability of your environment can become more challenging when more servers are added to the enterprise. The backup and restore features that are included with SQL Server 2000 become more complex when working with a distributed environment. Consider the need to backup and restore databases across partitions at the same logical point in time. SQL Server 2000 has made these restores easier with the implementation of marked transactions. For more information, see Backing Up and Restoring Federated Database Servers and Recovering to a Named Transaction.

See Also

Federated SQL Server 2000 Servers

Designing Partitions

Creating a Partitioned View

Designing Applications to Use Federated Database Servers

Partitioning Data

Backing Up and Restoring Federated Database Servers

Recovering to a Named Transaction


Full-Text Search Recommendations

Full-text search allows word- or phrase-based indexing of character data in Microsoft® SQL Server™ 2000 tables. Full-text search consists of these basic components:

  • Full-text indexing enables the creation and population of the full-text catalogs, which are maintained outside of SQL Server and managed by the Microsoft Search service.

  • Full-text search uses the new Transact-SQL predicates (CONTAINS, CONTAINSTABLE, FREETEXT, and FREETEXTTABLE) to query these populated full-text catalogs.
Full-Text Indexing

If you are full-text indexing tables that have less than a million rows, very little performance tuning is required. If you full-text index large SQL Server tables that contain millions of rows that create large full-text catalogs, this will sustain heavy read and write activity, so you must configure SQL Server and the full-text catalogs to maximize disk I/O performance by load balancing across multiple hard disk drives. You will also need to consider hardware configurations, Microsoft Windows® 2000 or Windows NT® 4.0 system configurations, and SQL Server 2000 configurations, as well the actual location of the full-text catalogs and database files.

Hardware Considerations

  • Multiple CPUs: One to four 500 MHz Xeon III processors.

  • Memory: 1 to 4 GB of physical RAM.

  • Multiple disk controllers with several channels or a single disk controller with multiple channels.

  • Disk I/O sub-systems: RAID0 (disk striping with no fault-tolerance protection), RAID0+1 and RAID5.

Windows 2000 or Windows NT 4.0 System Configuration Considerations

  • If you are installing SQL Server on Windows NT Server 4.0, the pagefile.sys file needs to be sized at 1.5 to 2 times the amount of available physical RAM. This consideration can be avoided by installing SQL Server on Windows 2000 Server with larger amounts of RAM.

  • Pagefile.sys files need to be placed on their own drives (RAID0 or RAID0+1), preferably on a separate controller or least a separate channel off a shared controller.

SQL Server Configuration Considerations

  • After a full population of a large table (greater than 1 million rows), consider using the new feature Change Tracking along with Update Index in Background and Update Index versus Incremental Population. For more information about when to use Change Tracking versus Timestamp-based incremental populations, see Maintaining Full-Text Indexes.

Full-Text Indexing and Catalog Considerations

  • Full-text indexing or populating the full-text catalogs should be done during periods of low system activity, typically during database maintenance windows.

  • Place the full-text catalog files on either its own disk controller or off a separate channel on a single disk controller with multiple channels.

  • Place the database files on a separate disk controller from the full-text catalog files or off a separate channel on a single disk controller with multiple channels.

  • The full-text indexing of SQL tables with 4 million to 20 millions rows can take many hours or days to complete. Consider options offered in Knowledge Base Article Q240867, "INF: How to Move, Copy and Backup SQL 7.0 Full-Text Catalog Folders and Files."
Full-Text Search
  • If you are full-text searching tables that have less than a million rows, there is little performance tuning required. (A million rows is just a general break point.) If you are going to be full-text searching tables that have more than a million rows, consider the appropriate full-text search predicate, CONTAINS versus CONTAINSTABLE or FREETEXT versus FREETEXTTABLE, as well as the average number of rows and query timeout considerations.

  • Use CONTAINSTABLE or FREETEXTTABLE with the new top_n_by_rank parameter to restrict the number of rows returned. Top_n_by_rank specifies that only the n-highest ranked matches, in descending order, be returned. Applies only when an integer value, n, is specified. In addition, you should consider using the TOP clause to limit the number of rows returned in the result set with CONTAINTSTABLE or FREETEXTTABLE. Review the Knowledge Base Article Q240833, "FIX: Full-Text Search Performance Improved via Support for TOP" for more details.

    If you are attempting to limit the results from a full-text query with additional WHERE clauses, the WHERE clauses are applied after the JOIN with the SQL table results, not before. Otherwise, the result set would be incorrect because qualifying rows would be omitted from the result set without any notification to the client. To limit the results from a full-text search query, use the Top_N_Rank parameter from the CONTAINSTABLE or FREETEXTTABLE predicates.

  • If you are using SQL Server full-text search by means of a Web or Microsoft Internet Information Services (IIS) interface and searching against large tables (greater than 1 million rows), consider increasing the IIS query timeout default of 20 seconds to 30 seconds if you are using the CONTAINS or FREETEXT predicates.

  • If you are using multiple CONTAINS or FREETEXT predicates in your SQL query and are experiencing poor full-text search query performance, reduce the number of CONTAINS or FREETEXT predicates or using "*" to use all full-text indexed columns in your query.

    You also may encounter Error 7619, "The query contained only ignored words" when using any of the full-text predicates in a full-text query, such as CONTAINS(pr_info, 'between AND king'). The word "between" is an ignored or noise word and the full-text query parser considers this an error, even with an OR clause. Consider rewriting this query to a phrase-based query, removing the noise word, or options offered in Knowledge Base article Q246800, "INF: Correctly Parsing Quotation Marks in FTS Queries". Also, consider using Windows 2000 Server: there have been some enhancements to the word-breaker files for Indexing Services.

  • What is RANK and how is it determined when used with CONTAINSTABLE and FREETEXTTABLE predicates? Full-text RANK values are based on the frequency of rows that contain the unique word. A factor that plays a part in determining the RANK value of the returned row is the frequency of the unique word in the full-text indexed column for that row. Another factor is the total number of unique word occurrences in the table (this serves to normalize the probabilities). The RANK values returned in the result set are relative to each other. Therefore, it is not possible to interpret the RANK value as a percentage or group the RANK values into high/medium/low ranges. Think of RANK as a method to order the results for a specific query and result set.

There are also full-text indexing and searching considerations when determining whether to include multiple SQL tables in one full-text catalog versus one SQL table per full-text catalog. There is a trade-off between performance and maintenance when considering this design question with large SQL tables and you may want to test both options for your environment. If you choose to have multiple SQL tables in one full-text catalog, you incur the overhead of longer-running full-text search queries as well because incremental populations will force the full-text indexing of all other SQL tables in that full-text catalog. If you choose to have a single SQL table per full-text catalog and have multiple SQL tables full-text indexed, you have the overhead of maintaining separate full-text catalogs with a total limit of 256 full-text catalogs per server.


Multiple Instance Recommendations

Before installing multiple instances of Microsoft® SQL Server™ 2000 on the computer, you should be aware of the resources each instance will be using. Each instance acts like an individual server and yields resources only to the operating system and not to other instances. For example, if instance1 needs more memory to run a query, it will not ask instance2 to yield but will request a memory grant from the operating system.

If you have multiple instances installed on a single-CPU computer, with both instances actively processing queries, expect a slowdown in the queries because both instances will compete for CPU resources. In that environment, a query that is resource intensive, such as one containing JOIN with GROUP BY or ORDER BY clauses, may take twice as much time to run as the same query on a single instance installed on a single-CPU computer. This information is based on comparing the query execution on a single-CPU computer with one instance to two instances on the same computer, with both instances running the same CPU intensive operation simultaneously.

Installing multiple instances on a computer with low RAM leads to slower query execution. For example, installing three instances on a server with 64MB of RAM will slow your queries significantly. You can expect that about 15 percent more time will be required to run the same query.

Running Multiple Instances

Consider switching to a "Fixed memory size" configuration for server memory. This configuration will prevent one instance from taking all available memory. For example, you might want to assign 80 percent of the RAM to the production server, and 10 percent to the development instance.

Consider assigning CPUs to a specific instance using the affinity mask option on an SMP computer. For more information, see Allocating Threads to a CPU.

Some Sample Test Results (Averages)

The following figures are from ad-hoc testing. Your results might be different.

Computer/instance | Query type | Execution time (ms)
Single CPU single instance | Select into | 420
Single CPU single instance | Select with Group by and Order by | 16683
Single CPU single instance | Union query | 13590
Single CPU single instance | Join with Group by | 4406
Single CPU two instances | Select into | 1153
Single CPU two instances | Select with Group by and Order by | 24246
Single CPU two instances | Union query | 16623
Single CPU two instances | Join with Group by | 5076
Two CPU single instance | Select into | 314
Two CPU single instance | Select with Group by and Order by | 9342
Two CPU single instance | Union query | 9972
Two CPU single instance | Join with Group by | 1289
Two CPU two instances | Select into | 852
Two CPU two instances | Select with Group by and Order by | 18120
Two CPU two instances | Union query | 12091
Two CPU two instance | Join with Group by | 3121


Parallel Query Recommendations

Microsoft® SQL Server™ can execute queries in parallel automatically. This optimizes the query execution in multi-processor computers. Rather than using one OS thread to execute one query, work is broken down into multiple threads (subject to the availability of threads and memory), and complex queries are completed faster and more efficiently.

The optimizer generates the plan for the query and decides when a query will be executed in parallel. It considers the following when making the decision:

  • Does the computer have multiple processors?

  • Is there enough memory available to execute the query in parallel?

  • What is the CPU load on the server?

  • What type of query is being run?

When allowing SQL Server to run parallel operations like DBCC and index creation in parallel, the server resources become stressed, and you might see warning messages when heavy parallel operations are occurring. If warning messages about insufficient resources appear frequently in the server error log, consider using Performance Monitor to investigate what resources are available, such as memory, CPU usage, and I/O usage.

Do not run heavy queries that are executed in parallel when there are active users on the server.

Try executing maintenance jobs such as DBCC and INDEX creation during offload times. These jobs can be executed in parallel.

Monitor the disk I/O performance. Observe the disk queue length in Performance Monitor to make decisions about upgrading your hard disks or redistributing your databases onto different disks.

Upgrade or add more processors if the CPU usage is very high.

Configuration Settings that Influence Parallel Queries

The following server configurations can affect parallel execution of the queries:

  • Cost threshold for parallelism

  • Maximum degree of parallelism

  • Maximum worker threads

  • Query governor cost limit

See Also

Degree of Parallelism

Advanced Query Concepts

cost threshold for parallelism Option

Parallel Query Processing

Query Tuning Recommendations

Query Tuning

Query Tuning (How To)

Parallel Query Example

Execution Plan Caching and Reuse


User-Defined Function Recommendations

This section contains recommendations and tips for working with user-defined functions, including information about scalar and table-valued functions, the effects that changes to the schema can have on functions, and the use of nested functions to simplify complex functions.

Where Scalar Functions Are Useful

Scalar functions are useful in places where you need to do the same mathematical calculations at multiple places in code. For example, if calculating interest based on percent rate, principal, and years is done throughout your application, it can be coded as a callable function, as follows.

create function calc_interest ( @principal int , @rate numeric(10,5) , @years int )
returns int
as
begin
    declare @interest int
    set @interest = @principal * @rate * @years / 100
    RETURN(@interest)
end
Using System Functions as Building Blocks

System functions can be used as building blocks for a user-defined function. For example, if you need to calculate the quadrupled value of a number, use the SQUARE system function to arrive at the value instead of writing the entire function from scratch.

Nesting Functions to Divide and Simplify a Complex Function

Nesting of functions is allowed; therefore, it might be better to break down a complex function into simpler functions and use the simpler functions together to produce the result. The advantage of breaking complex functions into smaller functions is that this code can be reused in more places in the application.

For example, suppose you need to calculate the area of a plot of land and the input can be in either meters or feet, but the area must always be displayed in square feet. Instead of writing one function that does all the work, you can break up the task into two functions:

  • cnvt_meters_feet does the conversion from meters to feet

  • calc_Area_ft calculates the area in feet

This way, you can use the cnvt_meters_feet function at other places in the code.

USE pubs
GO
CREATE FUNCTION cnvt_meters_feet ( @value numeric(10,3) )
RETURNS numeric(10,3)
AS
BEGIN
    DECLARE @ret_feet numeric(10,3)
    SET @ret_feet = @value * 3.281 ---1 Meter=3.281 Feet
    RETURN(@ret_feet)
END
GO
CREATE FUNCTION calc_area_ft ( @length numeric(10,3), @width numeric(10,3), @Unit char(2) )
RETURNS numeric(10,3)
AS
BEGIN
    DECLARE @area numeric(10,3)
    ---Check for unit, if meters(MT), convert it to feet(FT)
    IF @Unit = 'MT'
    BEGIN
        SET @length = pubs.dbo.cnvt_meters_feet( @length )
        SET @width = pubs.dbo.cnvt_meters_feet (@width )
    END
    ---Calculate Area
    SET @area = @length * @width
    RETURN ( @area )
END
GO
SELECT pubs.dbo.calc_area_ft ( 100.0, 50.0, 'MT') AS 'Area in Feet'
SELECT pubs.dbo.calc_area_ft ( 100.0, 50.0, 'FT') AS 'Area in Feet'
go
Avoiding the Default of Returning All Rows

When using the input parameter of the function as a condition in a WHERE clause, the number of rows returned should be considered for all possible values.

For example, if you are using the condition "WHERE name like '@value%' " as the only condition and you are relying on the user to specify the starting value, but the user does not specify any value, the WHERE condition transforms to "WHERE name like '%' ", which will return ALL the rows in the table. This will be detrimental on a multi-million-row table. To avoid this excessive result set, you can implement a default checking mechanism so that when no input is specified, only a portion of the rows is returned.

Consider Effects of Changes to the Schema

If "SELECT * FROM <table>" is being used in a function, effects of changes to the schema after creation of the function should be considered. If the function is not created with the SCHEMA_BINDING option, changes to the schema are not reflected in the result.

For example, if a new column is added to the table after the function was created and the function is not SCHEMA bound, the new column will not show up in the result set. If a column is removed after creation of the function and the function is NOT SCHEMA bound, a NULL value will show up in the result set for the deleted column.

Using Subsets to Consolidate Stored Procedures and User-Defined Functions

Table-valued functions can be defined to return a wide result set. Different users can then use the subsets of the result to retrieve the data accordingly. This can be used to consolidate multiple stored procedures or user-defined functions.

For example, you can create the functions as follows:

  • FunctionA returns Col1, Col2, Col3, ... Col10 from TableA

  • FunctionB returns Col1, Col3 from FunctionA.

  • FunctionC returns Col2, Col4 from FunctionA.

Now different users can retrieve smaller subsets by using FunctionB or FunctionC. They can also select the subset of the columns returned by FunctionA by using a simple SELECT statement. Example: Select Col10 from FunctionA.

Eliminating Temporary Table Usage

Multi-statement table-valued functions can be used to eliminate temporary table usage for intermediate result processing.

When to Convert Stored Procedures into Table-Valued Functions

Evaluate the reasons for conversion; do not convert stored procedures into table-valued functions just for uniformity. Even though some improvements are expected, test the conversion thoroughly to confirm the expectations and check for any unwanted side effects.


Reporting Errors to Your Primary Support Provider

If you are unable to resolve a problem, contact your primary support provider for assistance. Anytime you receive a server internal error (for example, assertion or access violation (AV)), contact your primary support provider. If you experience an operating system or I/O error, it is most likely a hardware problem. Correct the hardware problem and restore your database. When reporting an error to your primary support provider, be sure to provide the Blackbox.trc and Sqldiag.txt files.

For more information about resolving a 9002 or 1105 space-related error, see Troubleshooting Recovery, Error 9002, and Error 1105.

Use sp_trace_create with the TRACE_PRODUCE_BLACKBOX option to define a trace that appends trace information to a blackbox.trc file in the \Data directory. Once the trace is started, trace information is recorded in the blackbox.trc file until the size of the file reaches 5 megabytes (MB). The trace then creates another trace file, blackbox_01.trc, and trace information is written to the new file. When the size of blackbox_01.trc reaches 5 MB, the trace reverts to blackbox.trc. Thus, up to 5 MB of trace information is always available.

Use the sqldiag utility to collect information about server version and configuration, .dll file version, error logs, extended stored procedures, operating system, computer version, configuration data, and additional data, all of which is put into Sqldiag.txt (by default located in \Mssql\Log). Also when sqldiag is executed, the two trace files blackbox.trc and blackbox_01.trc (if it exists) containing trace information including any server exceptions, are copied to the same output directory as sqldiag.txt (by default \mssql\log).

For example, the environment in which the error occurred includes this information:

  • Microsoft® SQL Server™ version number (as reported to the error log or returned by SELECT @@VERSION). The first message written to the error log provides the SQL Server version number.

  • DB-Library API version number (as reported by the SQL Server Client Network Utility), ODBC driver version (as reported by ODBC Driver Setup), or OLE DB provider information.

  • Application version number (for example, SQL Server Enterprise Manager or osql.exe).

  • Operating-system version number.

  • Hardware platform.

  • Production or development environment.

This additional information is also helpful in troubleshooting a problem:

  • The message number, message state, and complete error message text.

  • Any variables (numbers, database object types, or database object names) included in the error message.

  • The context in which the message was generated (what statement was running at the time).

  • The number of users who were logged in to SQL Server when the error occurred.

  • The frequency with which the error occurs.

  • If you are using SQL Query Analyzer and you do not see more than 255 characters in the results pane, click Tools, and then click Options. Click the Results tab, and then increase the value for Maximum Characters Per Column.

In addition, review the error logs and, if running Microsoft Windows® 2000 or Microsoft Windows NT® 4.0, review the Windows application log and the Sqlstp.log file, located in the \WINNT directory. You may also want to use SQL Profiler to monitor events.

To help resolve your problem quickly, you may be asked to send your Sqldiag.txt and error log in e-mail to your primary support provider.

When providing this information, provide the entire error log, including all messages displayed from startup to the very end of the log. Be sure to send all information beginning with the time of startup and ending with the error message in question.

Although most startup messages are identical each time you start SQL Server, additional messages sometimes appear during startup, which can provide clues for solving problems that occur during or after startup. If additional messages appear during startup, write down these error messages to assist your support provider in diagnosing and resolving the problem.

See Also

Monitoring with SQL Profiler


Reproducing Problems

In general, the time it takes for your primary support provider to resolve a problem is reduced if you generate a reproducible test case demonstrating the error. These test cases can range from a single query that is not acting as expected to a relatively complex code fragment that encounters a serious problem. A quick resolution is more likely when the test case is simple.

Important Providing a test case improves the chances of a quick resolution to the problem. If a problem cannot be reproduced, it is usually impossible to solve.

Whenever possible, create the test case using the pubs or Northwind sample databases. In many cases, creating a test case can save you from having to send large amounts of data to your primary support provider.

To reproduce and diagnose problems, SQL Profiler may be used. SQL Profiler captures information about events and, if necessary, replays these events. Capturing and replaying events can be instrumental in reproducing and diagnosing problems.

See Also

Monitoring with SQL Profiler

Northwind Sample Database

pubs Sample Database


Isolating Connection Problems

Note For immediate help in diagnosing your connection problems, see the new online setup troubleshooter on the Product Support Web site. For more information, see Help with Connectivity.

When an application or tool has problems connecting to Microsoft® SQL Server™ 2000, there might be a problem with SQL Server, with the network, or with both. Regardless of the network you are running on, there are several items that you can check to isolate the problem. Check that:

  • For servers running Microsoft Windows NT® 4.0, the local connection to SQL Server over Named Pipes is available. You can test a local Named Pipes connection by using osql with no servername argument. If you cannot make a local connection using Named Pipes, either you are using an invalid login or there is a problem with SQL Server.

    For servers running Microsoft Windows® 95 or Microsoft Windows 98, the local connection to SQL Server uses the Shared Memory Net-Library.

  • The network components match the requirements specified in Network Protocols.

  • The default client Net-Library is appropriate for your network. You can determine and, if necessary, change the default client Net-Library by using SQL Server Client Network Utility in the Microsoft SQL Server program group.

  • The network connection information on the server is appropriate for your network (if you are running SQL Server and listening on other interprocess communication (IPC) mechanisms in addition to Named Pipes). You can determine and, if necessary, change the network SQL Server is listening on using SQL Server Server Network Utility in the Microsoft SQL Server program group.

  • The network connection between the client workstation and the server is established. If you test the network connection and determine that it is not open, check that:
    • The hardware connection is not disabled due to loose connectors or plugs.

    • The network software is installed and running on both the client workstation and the server.

See Also

Client Network Utility

Net-Libraries and Network Protocols

Server Network Utility


Orphaned Sessions

A client may have its connection abruptly severed from the server such that the client process is unable to tell the network to close the connection properly. This may occur for many reasons, including power failures on the client. Microsoft® SQL Server™ 2000 does not proactively probe the status of a client connection. Instead, it relies on Microsoft Windows NT® to notify it when a connection needs to be terminated or closed. Windows NT monitors connections and continues to report them as active to SQL Server for the duration of the KeepAliveTime for TCP/IP or SessionKeepAlive for NetBios, which affects Named Pipes clients. SQL Server continues to keep locks owned by the client active until they are killed, or until the connection is terminated or closed by Windows NT.

What is an orphaned session?

An orphaned session is a session that remains open on the server side after the client has disconnected.

Do not confuse orphaned sessions with orphaned users. Orphaned users are created when a database is backed up and restored to another system that does not have a corresponding user account configured. For more information about orphaned users, see Troubleshooting Orphaned Users.

When do orphaned sessions occur?

Orphaned sessions occur when the client is unable to free network connections it is holding when it terminates.

If the client terminates cleanly, Windows NT closes the connection and notifies SQL Server. If SQL Server is processing a client command, it will detect the closed connection when it ends the session. Client applications that crash or have their processes terminated (for example, from Task Manager) are cleaned up immediately by Windows NT, rarely resulting in an orphaned session.

One common cause of orphaned sessions arises when a client computer loses power unexpectedly, or is powered off without performing a proper shutdown. Orphaned sessions can also occur due to a hung application that never completely terminates, resulting in a dead connection. Windows NT does not know that the connection is dead and continues to report the action as active to SQL Server. SQL Server, in turn, keeps the session open and continues to wait for a command from the client.

What problems can orphaned sessions cause?

Open sessions take up one of the SQL Server network connections. The maximum number of connections is limited by the number of server Client Access Licenses (CALs), therefore, orphaned sessions may prevent other clients from connecting.

Typically, a more important issue is that open sessions use server resources, and may have open cursors, temporary tables, or locks. These locks may block other connections from performing useful work, and can sometimes be the result of a major "pile up" of locks. In severe cases, it can appear that SQL Server has stopped working.

How can I tell if an orphaned session exists and what problems it might be causing?

The sysprocesses table (or stored procedures, such as sp_who) reports information on existing server sessions. Possible orphaned sessions can be identified if the status of a process is awaiting command and the interval of time found by subtracting last_batch from GETDATE() is longer than usual for the process. If the session host name is known to be down, it is orphaned.

How do I resolve orphaned sessions?

Windows NT periodically checks inactive sessions to ensure they are active. If a session does not respond, it is closed and SQL Server is notified. The frequency of the checking depends on the network protocol and registry settings. However, by default, Windows NT only performs a check every one or two hours, depending on the protocol used. These configuration settings can be changed in the registry.

To close an orphaned SQL Server session, use the KILL statement. All resources held by the session are then released.

If orphaned sessions become a problem, registry settings can be changed on Windows NT to increase the frequency with which clients are checked to verify they are active. Changing these settings affects other application connections. The following points should be considered before making any changes.

Warning Do not change these settings on computers running Microsoft Windows® 95 or Microsoft Windows 98.

Consider the effect changing these settings may have on other applications on your system, in particular, applications with Internet connectivity, such as Microsoft Internet Information Services (IIS) or Microsoft Internet Explorer. In addition, consider the affects of using connections that are charged on a per-packet basis.

Caution Editing the registry is not recommended; inappropriate or incorrect changes can cause serious configuration problems for your system. Only experienced users should use the Registry Editor. For more information, see your Windows NT documentation.

The registry entries can be altered from HKEY_LOCAL_MACHINE by double-clicking SYSTEM, expanding CurrentControlSet, and then clicking Services.

KeepAliveTime for TCP/IP
Key: | Tcpip\Parameters
Value Type: | REG_DWORD - Time in milliseconds
Valid Range: | 1 - 0xFFFFFFFF
Default: | 7,200,000 (two hours)
Description: | The parameter controls how often TCP attempts to verify that an idle connection is still intact by sending a keep alive packet. If the remote system is still reachable and functioning, it will acknowledge the keep alive transmission. Keep alive packets are not sent by default; this feature may be enabled on a connection by an application.

SessionKeepAlive for Named Pipes
Key: | Netbt\Parameters
Value Type: | REG_DWORD - Time in milliseconds
Valid Range: | 60,000 - 0xFFFFFFFF
Default: | 3,600,000 (1 hour)
Description: | This value determines the time interval between keep alive transmissions on a session. Setting the value to 0xFFFFFFF disables keep alives.

Do not increase the ping frequency to less than 1 minute, as network I/O and CPU usage for pings may become excessive.


Named Pipes Client Connections

The following procedure describes how to test a network connection when using Named Pipes as the IPC mechanism.

To test a Named Pipes connection

  • At the operating-system command prompt on the client workstation, type:

    net view \\servername

When using net view, servername is the name of the server to which you want to connect.

For example, to check the connection between a Named Pipes client and a server named \\SEATTLE1, type the following on the client:

net view \\SEATTLE1

If the connection is open, the output looks something like this:

Shared resources at \\SEATTLE1

SQL Server

Sharename      Type            Used as  Comment

----------------------------------------------------

PUBLIC         Disk                     Public Files

The command completed successfully.

To verify connection to a server's named pipe

  • From a command prompt, type:

    net use \\servername\IPC$

When using net use, servername is the server to which you want to connect.

For example:

net use \\SEATTLE1\IPC$

The command completed successfully

If the connection between the client workstation and the server is open but you still cannot connect to Microsoft® SQL Server™ 2000, test the network and local named pipes using the makepipe and readpipe utilities. These utilities are included with SQL Server to help test the integrity of network named pipes.

The makepipe and readpipe utilities are installed during installation of both the client and server components. There are different versions of these utilities for the different operating systems on which they run: makepipe runs on Microsoft Windows NT®; readpipe runs on Windows NT, Microsoft Windows®, and MS-DOS®. Be sure to use the correct version for the operating system that you are testing. (The version that runs on Windows is named readpipe. If the SQL Server tools are installed, readpipe is located in the \Msqql\Binn directory; no icon is created for it.)

To test the integrity of the network named pipe services

  1. At the operating system command prompt on the server, type:

    makepipe

    The makepipe utility returns the following information:

    Making PIPE:\pipe\abc
read to write delay (seconds):0
Waiting for Client to Connect...

    SQL Server is waiting for a client to connect.

  2. At the operating system command prompt on the client workstation, type:

    readpipe /S server_name /D string

    When using readpipe, server_name is the network server name of the SQL Server on which makepipe was started and string is a test character string. If the string contains spaces, it must be enclosed in double quotation marks. There are no spaces between /S and the server name, and no spaces between /D and the string.

    For example, to connect to a SQL Server installation named myserver, type one of the following:

    readpipe /Smyserver /Dhello

    readpipe /Smyserver /D"hello there"

    readpipe /Smyserver /D'hello there'

    The strings specified in the first two readpipe statements are treated identically.

    If a network named pipe connection can be established, the client workstation returns the following information to each of the previous commands, respectively:

    SvrName:\\myserver
PIPE   :\\myserver\pipe\abc
DATA   :hello
Data Sent: 1 : hello
Data Read: 1 : hello

SvrName:\\myserver
PIPE   :\\myserver\pipe\abc
DATA   :hello there
Data Sent: 1 :hello there
Data Read: 1 :hello there

SvrName:\\myserver
PIPE   :\\myserver\pipe\abc
DATA   :hello
Data Sent: 1 : 'hello
Data Read: 1 : 'hello

    If a network named pipe connection can be established, the makepipe utility returns information similar to this:

    Waiting for Client to Connect...
Waiting for client to send...  1

Data Read:
hello

Waiting for client to send...  2

Pipe closed

Waiting for Client to Connect...
Waiting for client to send...  1

Data Read:
hello there

Waiting for client to send...  2

Pipe closed

Waiting for Client to Connect...
Waiting for client to send...  1

Data Read:
'hello

Waiting for client to send...  2
Pipe closed

Waiting for Client to Connect...

    At this point, SQL Server is waiting for a client to connect. The readpipe utility can be run from other workstations.

  3. When testing is complete, go to the server on which the makepipe utility is running and press either CTRL+BREAK or CTRL+C.

If the results are different from those in Step 2, network named pipe services are not available. If you are using Named Pipes as the IPC mechanism, clients cannot connect to SQL Server until a named pipe is available. These utilities attempt to open and use a named pipe; they do not stress the named pipe connection.

See Also

Configuring Client Network Connections

makepipe Utility

readpipe Utility


TCP/IP Sockets Client Connections

The following procedure describes how to test a network connection when using TCP/IP Sockets as the IPC mechanism.

To test a TCP/IP Sockets connection

  • At the operating system command prompt on the client workstation, type:

    ping {ip_address | server_name}

When using ping, ip_address is the TCP/IP address of the server to which you want to connect, and server_name is the name of the server to which you want to connect.

For example, to check the connection between a TCP/IP Sockets client workstation and a server at the TCP/IP address 11.1.4.70, type the following on the client workstation:

ping 11.1.4.70

If the connection is open, the output looks something like this:

[1] echo received from 11.1.4.70 with roundtrip < 50 sec

This example checks the connection between a TCP/IP Sockets client and a server named SEATTLE1:

ping SEATTLE1

If the connection is open, the output looks something like this:

[1] echo received from SEATTLE1 with roundtrip < 50 sec

See Also

Configuring Client Network Connections


Troubleshooting SQL Server Setup

For immediate help in diagnosing your setup problems, see the new online setup troubleshooter on the Product Support Web site. For more information, see Help with Setup.

SQL Server Setup is designed to be as problem-free as possible; however, there may be situations that will interfere with the installation of Microsoft SQL Server 2000. The most common errors are simple to diagnose and resolve. The resolution may involve freeing up disk space, shutting down other applications, or restarting the computer to unlock shared files.

To avoid problems, be sure to review Preparing to Install SQL Server 2000. If you intend to install a SQL Server 2000 failover cluster, review Before Installing Failover Clustering before you run Setup.

If the installation fails, the Setup program might remove all installed components.

Before running the Setup program or installing additional SQL Server components, be sure to:

  • Shut down all services.

    Use Services in Control Panel to shut down the MSSQLServer and SQLServerAgent services. Shut down the MSSearch service if you installed Full-text Search. Shut down the MSDTC service if you installed MS DTC.

  • Be sure the SQL Server Service Manager icon in the taskbar is closed.

    Any attempt to run SQL Server Setup with the SQL Server Service Manager icon present (or any services still running) may cause Setup to fail.

  • Remove the read-only attribute for all ODBC* files. On computers running Microsoft Windows NT® these files are located in the \System32 directory. On computers running Microsoft Windows® 95 or Microsoft Windows 98, these files are located in the system directory.

    If you cannot remove the read-only attribute on the ODBC* files, SQL Server provides a dialog box that allows you to retry the updating of the ODBC* files.

  • Understand that servers running Windows NT require Named Pipes. Cleaning named pipes during SQL Server installation does not prevent installation of named pipes. Because servers running Windows NT require named pipes, there is no way to uninstall Named Pipes on a server running Windows NT.

See Also

Help with Setup

Setup and Installation FAQ

Setup Troubleshooting: Checklist


Setup Troubleshooting: Checklist

  1. Read the error message. SQL Server Setup translates most error codes received from the operating system.

  2. With the error dialog box showing, open Sqlstp.log in the \Windows or \WINNT directory. Check the last few events in the log to see if any problems occurred before the error message was generated.

  3. If this is a custom installation and the component that failed to install properly is the Full-text Search (MSSearch) service, check the Mssearch.log in the \Temp directory to see if any problems occurred.

  4. Continue past the error message dialog box. Some error messages are just warnings. The Setup program may still finish successfully.

  5. If the Setup program fails, and you cannot diagnose and fix the problem yourself, make a copy of Sqlstp.log and Setup.log from the \Windows or \WinNT directory and, if you installed Full-text Search, make a copy of the Mssearch.log from the \Temp directory.

Note SQL Server Setup may encounter problems installing MS DTC on computers with multiple network cards or SPX installed. If SQL Server Setup stops responding, check the Sqlstp.log in the \Windows or \WinNT directory to see if MS DTC is being installed. If this is the problem, uninstall one of the network cards or SPX, and then retry SQL Server Setup.

If you try to install Microsoft® Transaction Server (MTS) from the Microsoft Windows NT® 4.0 Option Pack after installing Microsoft SQL Server™ 2000, you might encounter an error message indicating that MTS could not be installed; however, MTS was installed. You can ignore this error message.

See Also

Help with Setup

Setup and Installation FAQ


Testing an Installation of SQL Server 2000

Before a server installation is complete, SQL Server Setup starts and connects to the server. When the installation is complete, you can test the installation yourself and connect to it locally by running the osql utility from the server.

To test an installation of SQL Server 2000 (Command Prompt)

  1. Start Microsoft® SQL Server™ by entering from a command prompt:
    net start mssqlserver
  2. Connect to SQL Server by entering:
    osql /Usa /P<administrator password>

    If osql connects, this osql prompt appears:

    1>

    If osql cannot connect, an ODBC error is returned.

  3. Enter a simple query, for example
    SELECT @@SERVERNAME
GO

    The osql utility returns the server name, as shown in this example:

    1> SELECT @@SERVERNAME
2> GO
-------------------------------
WOLFHOUND
(1 row affected)
1>
  4. Verify that you have checked a SQL Server 2000 server by entering:
    SELECT @@VERSION
GO

    The osql utility returns the version information.

  5. Quit the osql utility by entering:
    exit


Informational Files Created by SQL Server Setup

These informational files are generated to locate any problems during setup.

Sqlstp.log

The Sqlstp.log file, located in your \Windows or \WinNT directory. For example, C:\WinNT\Sqlstp.log.Any errors encountered during the configuration portion of setup are written to this file.

Setup.log

The Setup.log file, located in your \Windows or \WinNT directory. For example, C:\WinNT\Setup.log.

Errorlog

The most recent error log, located in the \Log directory of the target installation directory. For example, the default location for the error log is C:\Program Files\Microsoft SQL Server\Mssql\Log\Errorlog. For a named instance, the error log would be in \Microsoft SQL Server\Mssql$<instancename>\Log\Errorlog.


Error Codes for an Unattended Installation

When you run an unattended installation of Microsoft® SQL Server™ 2000 Enterprise Edition, SQL Server 2000 Standard Edition, SQL Server 2000 Developer Edition, or SQL Server 2000 Personal Edition, these error codes may be returned.

Error code number | Error code description
0 | Success.
-1 | General error.
-2 | Invalid mode.
-3 | Required data not found in the Setup.iss file.
-4 | Not enough memory available.
-5 | File does not exist.
-6 | Cannot write to the response file.
-7 | Cannot write to the log file.
-8 | Invalid path to the InstallShield Silent response file.
-9 | Not a valid list type (string or number).
-10 | Data type is invalid.
-11 | Unknown error during setup.
-12 | Dialog boxes are out of order. This is a common error, caused when a dialog box appears out of order in the setup initialization file (Setup.iss). This can occur due to a system problem during the creation of Setup.iss.
-51 | Cannot create the specified folder.
-52 | Cannot access the specified file or folder.
-53 | Invalid option selected.


Troubleshooting the SQL Server Upgrade Wizard

The SQL Server Upgrade Wizard is designed to be as problem-free as possible; however, there are situations that may interfere with upgrading Microsoft® SQL Server™ version 6.5 databases to SQL Server 2000. The most common upgrade error is the failure to create an object in SQL Server 2000. In many cases, the problem is simple, such as running out of disk space. In any case, the SQL Server Upgrade Wizard creates detailed logs specifying the problem.

See Also

Upgrading to SQL Server 2000


Completing the SQL Server Upgrade Wizard

The SQL Server Upgrade Wizard performs a server and data version upgrade using the options you specified. The Microsoft® SQL Server™ version 6.5 are left intact throughout the version upgrade process.

During the SQL Server Upgrade Wizard process:

  • User stored procedures are verified against the contents of syscomments for inconsistencies.

  • All logins, users, and permissions are validated.

If the SQL Server Upgrade Wizard detects any problems, a dialog box appears with this text:

One or more warnings have been logged. Please read the next screen carefully before you begin your upgrade.

For more information about specific errors, see the \Mssql\Upgrade\<servername>_<date>_<time> directory for *.err files.

The Summary of Warnings dialog box displays inconsistencies found in the user objects of accounts. Users should not continue until these are resolved. This output file is located in the \Mssql\Upgrade\<SQLServer_date_time> directory. The file name is associated with the database name and ID, "check65-<dbid><dbname>_err.out" (for example, "check65-007mypubs_err.out"). If the user continues without fixing the listed errors, check the relevant files for objects, logins, and invalid permissions.

If stored procedures have been renamed using sp_rename, the source stored in syscomments must be changed. Drop and re-create the procedure using the new name in the CREATE PROCEDURE syntax.

See Also

Upgrading to SQL Server 2000

Upgrading to SQL Server 2000 FAQ


Upgrade Log Files

Each time you run the SQL Server Upgrade Wizard, a subdirectory is created in the \Mssql\Upgrade directory (default location C:\Program Files\Microsoft SQL Server\MSSQL\Upgrade). The subdirectory name consists of the server name and the current date and time to distinguish multiple runs of the SQL Server Upgrade Wizard (for example, SQLCONV1_092198_151900).

Inside this subdirectory are a number of descriptively named log files describing each of the upgrade steps. Also inside is another subdirectory for each upgraded database, including the master database. Inside each database folder are log files indicating the success of the creation of different types of objects in that database. Files that end in .ok indicate that all instances of that type of object were created successfully. Files that end in .err indicate that at least one instance of that type of object was not created successfully. The error files list each failed object creation statement and the reason the object was not created successfully.

Any log files that indicate a problem are listed at the end of the SQL Server Upgrade Wizard for easy access.

The \WinNT directory contains these files.

File | Description
Sqlupgrade.ini | List of .err files to be displayed by the Script Interpreter
Upgrade.ini | Template .ini file used to set defaults and run pre-task and post-task applications

The \Mssql\Upgrade directory contains these files and directories.

File | Description
Status.log | Live status of the current set of tasks being executed by the script interpreter (useful for remote checking the upgrade status)
Check65.ini | Additional command prompt arguments sent to Check65.exe when the finish page is checking SQL Server 6.5 databases
Upgrade.tmp | Upgrade.ini before the Finish button is clicked in SQL Server Upgrade Wizard
Upgrade.ini | Script file for the upgrade
<6.5 server>_<date>_<time> directories | Object directory for each run of the SQL Server Upgrade Wizard

Object directories contain these files and directories. The SQL Server Upgrade Wizard names some files with either an .out or an .err extension, depending on the success of the task.

File | Description
Layout.ini | Used for communication between the SQL Server Upgrade Wizard and the layout utility, a subcomponent of the wizard
~backup.ini | Used to back up, delete, and restore SQL Server 6.5 data files manually during a tape upgrade
<dbid><db>.ini | Files used by Layout.exe to cache the user settings for the current upgrade session
Changedbo.sql.out / .err | List of each statement that passed after the Change DBO task has been run
Check65 - <dbid><db>.out / .err | Output from Check65.exe created while checking the SQL Server 6.5 databases for inconsistencies in the finish page of the SQL Server Upgrade Wizard
Check65 - <dbid><db>_err.out / .err | Errors from Check65.exe created while checking the SQL Server 6.5 databases for inconsistencies in the finish page of the SQL Server Upgrade Wizard
Cleantempdb.bat | Used to delete the SQL Server 2000 tempdb files after a successful upgrade
Cleantempdb.sql.out / .err | Output from deleting the SQL Server 2000 tempdb files after a successful upgrade
Convload1.sql.out / .err | Sets configuration options
Convload2.sql.out / .err | Adds logins, remote logins, local groups, and other objects
Createdb.sql.out / .err | Creates the SQL Server 2000 tempdb and user databases
Creating Databases.out / .err | Output from creating the SQL Server 2000 tempdb and user databases
Dboptions.sql.out / .err | Status of database options that were set and passed
Dropping temporary tempdb files.out / .err | Success of dropping temporary tempdb files
Export and Import via Named Pipe - <dbid><db>.out / .err | Success of exporting data from SQL Server 6.5 and importing into SQL Server 2000 during a named pipe backup
Export Data - <dbid><db>.out / .err | Success of exporting data from SQL Server 6.5 in a tape backup
Import Data - <dbid><db>.out / .err | Success of importing data into SQL Server 2000 from a tape backup
Export Database Objects - <dbid><db>.out / .err | Success of exporting objects from SQL Server 6.5
Export Database Owners.out / .err | Success of exporting database owners from SQL Server 6.5
Export Logins - <#>.out / .err | Success of exporting logins from SQL Server 6.5
Export Server Settings from Master.out / .err | Success of exporting server settings from SQL Server6.5
Export SQL Executive Settings.out / .err | Success of exporting SQL Executive settings
Import Database Objects - <dbid><db>.out / .err | Success of importing objects into SQL Server 2000
Import Logins - <#>.out / .err | Success of importing logins into SQL Server 2000
Import Server Settings from Master.out / .err | Success of importing server settings into SQL Server 2000
Import SQL Executive Settings - <#>.out / .err | Success of importing SQL Executive settings into SQL Server Agent in SQL Server 2000
Logininfo.sid | Integrated login mapping
Loginmap.txt | Integrated login mapping
Marking database upgrade status - <dbid><db>.out / .err | Success of marking which databases have been upgraded
Marking database upgrade status - <dbid><db>.sql.out / .err | Marks database upgrade status
Modifying scripts.out / .err | Success of removing stored procedures that are not to be created in SQL Server 2000
Msdb6in.sql | msdb integrated logins run against SQL Server 2000
Pre60to7.sql | Upgrades msdb from SQL Server 6.5 to SQL Server 2000
Pre65to7.sql | Upgrades msdb from SQL Server 6.5 to SQL Server 2000
Preparing MSDB for Upgrade - <#>.out / .err | Success of preparing msdb for upgrade
Preparing SQL-DMO for upgrade.out / .err | Success of preparing SQL-DMO for upgrade
Replupd.out / .errreplupd_erro.out / .err | Success of updating replication settings
Setting Database Options.out / .err | Success of setting database options in SQL Server 2000
Upgrade Complete.ini | Lists upgrade options and success codes for each upgrade task and object type
Upgrade.log | Lists success code, start time, and stop time for each task in the Script Interpreter, created when the Script Interpreter exits or restarts after a failed task
Upgrade.reg | Registry entries for the upgrade DSN used by many of the ODBC applications in the upgrade process
<dbid><db> directories | Database-specific directories for each upgraded database, including master

Database-specific directories contain these files.

File | Description
<6.5 server>.master.bak (only in the master database directory) | Backup of stored procedure script before the Modify Scripts task is run
<6.5 server>.<db>.bnd.out / .err | Table column bindings
<6.5 server>.<db>.def.out / .err | Defaults
<6.5 server>.<db>.dr1.out / .err | DRI to be created before data transfer (clustered keys)
<6.5 server>.<db>.dr2.out / .err | DRI to be created after data transfer (nonclustered keys)
<6.5 server>.<db>.fky.out / .err | FOREIGN KEY constraints
<6.5 server>.<db>.gr1.out / .err | Groups
<6.5 server>.<db>.id1.out / .err | Indexes to be created before data transfer (clustered indexes)
<6.5 server>.<db>.id2.out / .err | Indexes to be created after data transfer (nonclustered indexes)
<6.5 server>.<db>.LGN | Creates logins
<6.5 server>.<db>.prc.out / .err | Stored procedures
<6.5 server>.<db>.prv.out / .err | Permissions
<6.5 server>.<db>.rul.out / .err | Rules
<6.5 server>.<db>.tab.out / .err | Tables
<6.5 server>.<db>.trg.out / .err | Triggers
<6.5 server>.<db>.udt.out / .err | User-defined data types
<6.5 server>.<db>.usr.out / .err | Users
<6.5 server>.<db>.viw.out / .err | Views

See Also

Upgrading to SQL Server 2000


Server and Database Troubleshooting

Servers running Microsoft® SQL Server™ 2000 databases may have errors specific to the following areas:

  • Databases marked as suspect

  • Alerts

  • Backup and restore

  • Locks

  • Jobs

  • Microsoft Windows NT® services related to SQL Server

  • Interaction with the operating system

  • Recovery


Resetting the Suspect Status

Microsoft® SQL Server™ 2000 returns error 1105 and sets the status column of sysdatabases to suspect if SQL Server is unable to complete recovery on a database because the disk drive no longer has any free space. Follow these steps to resolve the problem:

  1. Execute sp_resetstatus.

  2. Use ALTER DATABASE to add a data file or log file to the database.

  3. Stop and restart SQL Server.

    With the extra space provided by the new data file or log file, SQL Server should be able to complete recovery of the database.

  4. Free disk space and rerun recovery.

sp_resetstatus turns off the suspect flag on a database, but leaves all other database options intact.

Caution Use sp_resetstatus only when directed by your primary support provider or as recommended in Troubleshooting. Otherwise, you might damage your database.

Because this procedure modifies the system tables, the system administrator must enable updates to the system tables before creating this procedure. To enable updates, use this procedure:

USE master
GO
sp_configure 'allow updates', 1
GO
RECONFIGURE WITH OVERRIDE
GO

After the procedure is created, immediately disable updates to the system tables:

sp_configure 'allow updates', 0
GO
RECONFIGURE WITH OVERRIDE
GO

sp_resetstatus can be executed only by the system administrator. Always shut down SQL Server immediately after executing this procedure.

The syntax is:

sp_resetstatus database_name

This example turns off the suspect flag on the PRODUCTION database.

sp_resetstatus PRODUCTION

Here is the result set:

Database 'PRODUCTION' status reset!
WARNING: You must reboot SQL Server prior to accessing this database!
sp_resetstatus Stored Procedure Code

Here is the code of the sp_resetstatus stored procedure:

IF EXISTS ( SELECT * from sysobjects where name = 'sp_resetstatus' )
   DROP PROCEDURE sp_resetstatus
GO

CREATE PROC sp_resetstatus @dbname varchar(30) AS
DECLARE @msg varchar(80)
IF @@trancount > 0
      BEGIN
         PRINT 'Can''t run sp_resetstatus from within a transaction.'
         RETURN (1)
      END
IF suser_id() != 1
      BEGIN
         SELECT @msg =  'You must be the System Administrator (SA)'
         SELECT @msg = @msg + ' to execute this procedure.'
         RETURN (1)
      END
IF (SELECT COUNT(*) FROM master..sysdatabases
         WHERE name = @dbname) != 1
      BEGIN
         SELECT @msg = 'Database ' + @dbname + ' does not exist!'
         PRINT @msg
         RETURN (1)
      END
IF (SELECT COUNT(*) FROM master..sysdatabases
         WHERE name = @dbname AND status & 256 = 256) != 1
      BEGIN
         PRINT 'sp_resetstatus can only be run on suspect databases.'
         RETURN (1)
      END
BEGIN TRAN
      UPDATE master..sysdatabases SET status = status ^ 256
         WHERE name = @dbname
      IF @@error != 0 OR @@rowcount != 1
         ROLLBACK TRAN
      ELSE
         BEGIN
            COMMIT TRAN
            SELECT @msg = 'Database ' + @dbname + ' status reset!'
            PRINT @msg
            PRINT ''
            PRINT 'WARNING: You must reboot SQL Server prior to  '
            PRINT '         accessing this database!'
            PRINT ''
         END
GO

See Also

ALTER DATABASE

BEGIN TRANSACTION

COMMIT TRANSACTION

ROLLBACK TRANSACTION

Starting, Pausing, and Stopping SQL Server

sysdatabases

Transactions

Transactions Architecture

UPDATE


Troubleshooting Alerts

If you are experiencing problems with alerts, read the solutions detailed here.

An alert is not firing.
  • Ensure that the SQLServerAgent and EventLog services are running.

  • Ensure that the event appears in the Microsoft Windows NT® application log.

    Start the Windows NT Event Viewer. If the event is not in the log, check the log settings. On the Log menu, click Log Settings, and then in the Change Settings for Log box, select Application. If needed, set these options to the specified values.

    Setting | Value
    Maximum Log Size | Minimum of 2,048 KB (2 MB)
    Event Log Wrapping | Overwrite Events as Needed

    Note Also check the SQL Server error log; events written to the Windows 2000 or Windows NT application log are also written to the SQL Server error log. To focus the search on the cause of the problem, compare the dates and times for events between the SQL Server error log, the SQL Server Agent error log, and the Windows 2000 or Windows NT application log.

  • Ensure that the alert is enabled.

  • Ensure that the history values of the alert (for example, the occurrence count and last occurred values) are changing.

  • Ensure that the counter value is at, above, or below the defined threshold value for a minimum of 20 seconds.

    SQL Server Agent polls the performance counters at 20-second intervals.

    Important Using a frequency higher than 20 seconds increases the processing overhead for SQL Server.

    If a counter spikes for only a few seconds, which satisfies the performance condition, there is a high likelihood that SQL Server Agent will fail to see the spike; the alert will not fire.

An alert is firing, but the responsible operator is not receiving notification.
  • Check the operator and notification information to ensure that you have entered the correct e-mail, pager, and net send addresses.

  • Test the e-mail, pager, and net send addresses.

  • Check the operator's on-duty schedule.

  • Check the SQL Server Agent error log for any e-mail problems.
An alert is firing, but the notification is not timely.

The probable causes for this include:

  • The Delay between responses setting for the alert is too high.

  • The alert response is complex, requiring many operator notifications.

    Note Send notifications to as few operators as possible. For example, send notifications to one group e-mail address rather than notifying several individual operators.

This error appears in the SQLServerAgent error log on Windows 95 or Windows 98 servers: "The common event system is being restarted after function ProduceEventsFromSS returned error 44, 'Unable To Connect'"

This may indicate incorrect registered server information. Ensure that the registered server information for the local server is correct and that the registered login name is a member of the sysadmin fixed server role.

The Windows 2000 or Windows NT application log fills rapidly with the same error.
The CPU usage is high.
The number of alert responses is high.

Because SQL Server Agent both depends on and monitors SQL Server, SQL Server Agent can become caught in an endless loop of firing the same alert. This generally occurs when SQL Server runs out of an essential global resource and an alert has been defined on this event.

When the number of alerts raised exceeds the SQL Server Agent alert processing rate, a backlog is created.

To eliminate an alert processing backlog

  1. Increase the amount of time in the Delay between responses setting.

  2. Correct the global resource problem to prevent recurring alerts from using all your resources.

  3. Configure an error so that it does not generate an alert.

    Important Configuring an error to not generate an alert can be performed only within the registry. This solution should be used only as a last resort.

  4. Clear the Windows NT application log if: the backlog is not clearing, you do not want to wait for SQL Server Agent to clear the backlog, or you want an empty, unpopulated Windows NT application log.

    Caution Clearing the Windows NT application log using the Clear All Events option on the Log menu deletes all events from the error log, including events unrelated to SQL Server.

To configure an error to not generate an alert

  1. Start the Registry Editor.

  2. Locate the following registry key:
    HKEY_LOCAL_MACHINE
\SOFTWARE
\Microsoft
\MSSQLServer
\SQLServerAgent
\NonAlertableErrors
  3. Type the error number.

    The list of nonalertable errors can be a maximum of 1,024 characters, should not contain spaces, and items must be separated by commas (,). Any error number in the list that appears after the number 0 will generate an alert. For example, assume that the list consists of

    1204,0,100

    In this example, only error number 1204 does not generate an alert. Because error number 100 follows error number 0 in the list, it will generate an alert.

Important Never remove the default nonalert-generating error, error 1204. Error 1204 defines those conditions known to lead to recursive alert generation. Removing this error will hamper attempts to resolve recursive alert generation.

See Also

Defining Alerts

Error 1204

Modifying and Viewing Alerts


Troubleshooting Backing Up and Restoring

Here are some problems you may encounter when backing up and restoring databases and transaction logs:

  • A syntax error occurred when using the BACKUP or RESTORE statements, which indicates that the database is in Microsoft® SQL Server™ version 6.5 compatibility mode. The BACKUP and RESTORE keywords are valid only with SQL Server 7.0 or SQL Server 2000 databases.

    Set the SQL Server compatibility level to 80 before using BACKUP or RESTORE statements. For more information, see Error 156.

  • The BACKUP statement cannot be performed at the same time as creating or deleting database files.

    Reissue the backup operation after the conflicting operation has finished. For more information, see Error 3023.

  • A standby database cannot be backed up if it has not yet been recovered.

    Use backups from your primary server until operations have switched to the standby. For more information, see Error 3036.

  • The backup being restored is a valid Microsoft Tape Format, but is not a SQL Server backup.

    To determine the backup contents, use RESTORE HEADERONLY. For more information, see Error 3143.

  • The backup set is a backup of a database with the same name as the database to which you are restoring. However, the database being restored to was created by a different CREATE DATABASE statement than the database in the backup set.

    Either overwrite the existing database or restore the backup set to a different database name. For more information, see Error 3154.

  • An attempt was made to use a logical device that is not a defined backup device.

    Either create the device or use the TAPE = or DISK = syntax of the BACKUP statement. For more information, see Error 3206 or Error 3209.

  • The media family spans multiple volumes. The restore operation has already processed the data on the specified volume.

    Replace the current volume with a volume not yet processed. For more information, see Error 3227.

  • The backup device does not contain data in Microsoft Tape Format. For more information, see Error 3242.

  • The media family spans multiple volumes. The restore operation expected to process the volume number specified in the error message, but found a different volume number instead.

    To continue the restore operation, replace the current volume with the volume number specified in the error message. For more information, see Error 3247.

  • The media family spans multiple volumes. The backup set to be processed by the restore operation starts on an earlier volume than the one inserted into the named device.

    Replace the current volume with a volume containing the start of the target backup set. For more information, see Error 3249.

  • The restore operation has completely processed the media family on the named device, and is now ready to reuse the device to restore one of the remaining media families.

    Replace the current volume with the first volume of a media family that has not yet been processed. For more information, see Error 3251.

  • The backup operation that created the backup set did not finish successfully.

    Either restore a different database backup, if restoring a database backup, and apply transaction logs; or apply the next transaction log backup, if restoring a transaction log backup. For more information, see Error 3256.

  • The volume on the named device does not belong to the same media set as the other volumes being processed.

    Either remove the offending volume and insert the next volume of the media family, for tape media sets; or, for disks, reissue the command, naming only those backup devices part of the same media set. For more information, see Error 3258.

  • The tape inserted into the named device is part of the current media set and may not be used as continuation media.

    Replace the current volume with a fresh tape that can be overwritten. For more information, see Error 3263.

  • The server is too busy to perform the backup or restore operation.

    Retry the operation after reducing the server load. For more information, see Error 3267 or Error 3627.

  • Some statements are not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.For more information, see Error 4208.

  • To restore the database after failure, you must begin either with a full database backup or with a complete set of file backups. A log backup was created before the first database or file backup.

    Perform a full database backup before backing up the transaction log. For more information, see Error 4214.

  • The restore operation found a gap between the last restore and the transaction log that you attempted to apply.

    Apply the transaction log backups in the order they were created originally. For more information, see Error 4305.

  • No further restore operations may be performed after a database has been recovered.

    Restart the restore sequence and use the NORECOVERY option on all but the final RESTORE statement. For more information, see Error 4306.

  • Could not recover the database to the state that it was in at the time the current log backup was made. At least one file has been modified since this time. Therefore, recovery is not possible because the database would be left in an inconsistent state.

    Recover the database either to its most recent state or to a specific point in time. For more information, see Error 4318.

  • A backup file could not be used because it was originally formatted with one sector size and is now on a device with a different sector size.

    SQL Server uses nonbuffered I/O, which requires sectors to be aligned. You must restore the backup set from a disk with the same sector size, or over a network, which uses buffered I/O. Alternatively, you can specify a WITH BLOCKSIZE clause when you back up the database.

See Also

Backing Up and Restoring Databases

BACKUP

Insufficient Disk Space

Recovery Performance

Reserved Keywords

Server and Database Troubleshooting

Setting Database Options

sp_addumpdevice

sp_dbcmptlevel

Troubleshooting Recovery


Troubleshooting Orphaned Users

When restoring a database backup to another server, you may experience a problem with orphaned users. This scenario displays and resolves the problem:

  1. Alias the login janetl to dbo by executing sp_addlogin.
    sp_addlogin 'janetl', 'dbo'
  2. Back up a database. In this example, back up Northwind.
    BACKUP DATABASE Northwind
TO DISK = 'c:\mssql\backup\northwnd'
  3. Drop the database that was just backed up.
    DROP DATABASE Northwind
  4. Drop the login.
    sp_droplogin 'janetl'
  5. Restore the backed up database.
    RESTORE DATABASE Northwind
FROM DISK = 'c:\mssql\backup\northwnd'

    The janetl login cannot access the Northwind database unless the guest login is allowed. Even though the janetl login has been deleted, it still shows up (as an orphaned row) in the sysusers table:

    USE Northwind
SELECT *
FROM sysusers
WHERE name = 'janetl'

To resolve orphaned users

  1. Add a temporary login using sp_addlogin. Specify the security identifier (SID) (from sysusers) for the orphaned user.
    sp_addlogin @loginame = 'nancyd',
    @sid = 0x32C864A70427D211B4DD00104B9E8A00
  2. Drop the temporary alias that belongs to the aliased SID using sp_dropalias.
    sp_dropalias 'nancyd'
  3. Drop the original user (now orphaned) using sp_dropuser.
    sp_dropuser 'janetl'
  4. Drop the original login using sp_droplogin.
    sp_droplogin 'nancyd'

See Also

Backing Up and Restoring Databases

BACKUP

RESTORE

sp_addlogin

sp_dropalias

sp_droplogin

sp_dropuser


Troubleshooting Data Transformation Services

Note For immediate help in diagnosing your Data Transformation Services (DTS) problems, see the new online troubleshooter on the Product Support Web site. For more information, see Help with Data Transformation Services.

Following is information about errors that might be generated while using DTS Designer:

  • If a connection is created for a database user who does not have permission to access the model database, when opening the transformation properties, the user will receive the message "Unspecified error. Server user '<user name>' is not a valid user in database 'model'". This message occurs because the user cannot see the provider type information. However, the error is informational and does not prevent the user from creating the transformations.

If you receive the message "Cannot find the specified file," when attempting to access a DTS package saved to a COM-structured storage file, verify that:

  • The directory path is specified correctly.

  • Permissions are set correctly.

Note It is possible that the file is corrupt and that the COM structure cannot be detected.


Troubleshooting Locking

Two locking problems that an application may encounter are deadlocking and blocking.

Deadlocking

Deadlocking is a condition that can occur on any system with multiple users, not only on a relational database management system (RDBMS). A deadlock occurs when two users (or sessions) have locks on separate objects and each user wants a lock on the other's object. Each user waits for the other to release their lock. Microsoft® SQL Server™ detects when two connections have gotten into a deadlock. One of the connections is chosen as a deadlock victim. The connection's transaction is rolled back and the application receives an error.

If deadlocks become a common occurrence and their rollbacks are causing excessive performance degradation, you may need to perform more in-depth investigation. Use trace flag 1204. For example, this command starts SQL Server from the command prompt and enables trace flag 1204:

c:\mssql\binn\sqlservr -T1204

All messages will now appear in the console screen where SQL Server was started and in the error log.

Deadlocking can also occur when using distributed transactions. For more information about resolving deadlocks with distributed transactions, see Transactions Architecture.

Blocking

An unavoidable characteristic of any lock-based concurrent system is that blocking may occur under some conditions. Blocking happens when one connection holds a lock and a second connection wants a conflicting lock type. This forces the second connection to either wait or block on the first.

In this topic, the term connection refers to a single logged-on session of the database. Each connection appears as a system process ID (SPID). Each of these SPIDs is often referred to as a process, although it is not a separate process context in the usual sense. Rather, each SPID consists of the server resources and data structures necessary to service the requests of a single connection from a given client. A single client application may have one or more connections. From the perspective of SQL Server, there is no difference between multiple connections from a single client application on a single client computer and multiple connections from multiple client applications or multiple client computers. One connection can block another connection, regardless of whether they emanate from the same application or separate applications on two different client computers.

To eliminate deadlocking or blocking problems, contact your system administrator. The system administrator should check the waittype, waittime, lastwaittype, and the waitresource columns of sysprocesses to see what activities each SPID is performing.

See Also

Deadlocking

Distributed Transactions

Locking

SET DEADLOCK_PRIORITY

sp_who

SQL Server: Locks Object

sqlservr Application

syslockinfo

sysprocesses

Trace Flags

Understanding and Avoiding Blocking


Troubleshooting Deadlocks

In a deadlock, various threads cannot proceed because they are waiting on a set of resources held by each other or held by other threads. The deadlock is a cyclic dependency that is best addressed by first identifying the participants in the dependency chain and the resources involved, and then choosing the thread that breaks the deadlock on the resources for the various other threads.

When a deadlock occurs, the user receives the following error.

Transaction (Process ID xxx) was deadlocked on (xxx) resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

The error identifies the resource or resources on which the transaction is deadlocked. The resources can be locks, parallelism (or communication buffer), waiting threads, or a combination of them.

To resolve the deadlock, one of the participants in the cycle must be terminated. In picking the deadlock victim, Microsoft® SQL Server™ 2000 looks at all participating threads and how much work each one has done. Generally, SQL Server chooses the participating thread that has done the least amount of work as the deadlock victim.

With SQL Server 2000, you can determine the resources involved in a deadlock and troubleshoot locking by using SQL Profiler or Trace Flag 1204. SQL Profiler is a graphical tool available in SQL Server Enterprise Manager. SQL Profiler provides information for basic deadlock detection. For more information, see Monitoring with SQL Profiler.

This troubleshooting section focuses on the use of Trace Flag 1204, which provides a report that allows for a detailed analysis of deadlock situations.

Using Trace Flag 1204

In a deadlock situation, Trace Flag 1204 graphs the cycle of dependency among waiting threads, the resources on which the threads are waiting, and which threads hold these resources.

Terms in a Trace Flag 1204 Report

Although Trace Flag 1204 returns different information depending on the resources involved, the report typically includes the following terms.

Node:x

Represents the entry number (x) in the deadlock chain.

Lists

The lock owner can be part of these lists: Grant, Convert, and Wait.

Grant List
Enumerates the current owners of the resource.
Convert List
Enumerates the current owners that are trying to convert their locks to a higher level.
Wait List
Enumerates current new lock requests for the resource.

SPID: x ECID: x

Identifies the system process ID thread in cases of parallel processes. The entry SPID x ECID 0 represents the main thread, and SPID x ECID > 0 represents the sub-threads for the same SPID.

Statement Type

Is the SELECT, INSERT, UPDATE, or DELETE statement on which the threads have permissions.

Line #

Lists the line in the current batch of statements that was being executed when the deadlock occurred.

Input Buf

Lists all the statements in the current batch.

Mode

Specifies the type of lock for a particular resource that is requested, granted, or waited on by a thread. Mode can be IS (Intent shared), S (Shared), U (Update), IX (Intent exclusive), SIX (Shared with intent exclusive), and X (Exclusive). For more information, see Understanding Locking in SQL Server.

RID

Identifies the single row within a table on which a lock is held or requested.

RID is represented in Trace Flag 1204 as RID: db_id:file_id:page_no:row_no; for example, RID: 1:1:1253:0.

TAB

Identifies the table on which a lock is held or requested.

TAB is represented in Trace Flag 1204 as TAB: db_id:object_id; for example, TAB: 2:2009058193.

KEY

Identifies the key range within an index on which a lock is held or requested.

KEY is represented in Trace Flag 1204 as KEY: db_id:object_id:index_id; for example, KEY: 2:1977058079:1.

PAG

Identifies the page resource on which a lock is held or requested.

PAG is represented in Trace Flag 1204 as PAG: db_id:file_id:page_no; for example, PAG: 7:1:168.

EXT

Identifies the extent structure.

EXT is represented in Trace Flag 1204 as EXT: db_id:file_id:extent_no; for example, EXT: 7:1:9.

DB

Identifies the database lock.

DB is represented in Trace Flag 1204 in one of the following ways:

  • DB: db_id

  • DB:db_id[BULK-OP-DB], which identifies the database lock taken by the backup database.

  • DB:db_id[BULK-OP-LOG], which identifies the lock taken by the backup log for that particular database.

IND

Identifies the lock taken by the index created on index resources.

IND is represented in Trace Flag 1204 in one of the following ways:

  • IND: db_id:object_id:index_id

  • IND: db_id:object_id:index_id[INDEX_ID], which indicates that the lock is on the index ID.

  • IND: db_id:object_id:index_id[INDEX_NAME], which indicates that the lock is on the index name.

APP

Identifies the lock taken by an application resource.

APP is represented in Trace Flag 1204 as APP: lock_resource; for example, APP: Formf370f478.

When SQL Server chooses an application resource as the deadlock victim, the application resource owner will not get the error message described earlier. Instead, the application owner will get a "-3" return code when the sp_getapplock stored procedure is executed on that application resource. For information, see sp_getapplock.

Victim Resource Owner

Specifies the participating thread that SQL Server chooses as the victim to break the deadlock cycle. The chosen thread (identified by SPID x ECID 0 ) and all existing sub-threads (identified by SPID x ECID > 0) will be terminated .

Next Branch

Represents the two or more sub-threads from the same SPID that are involved in the deadlock cycle.

When the deadlock involves parallelism, the various sub-threads could be blocked on communication buffers, and one thread ends up waiting for the other sub-threads. It is a deadlock situation only if all the other threads also are involved in a deadlock. The next branch represents the deadlock chain tracing alternative paths.

For more information about Trace Flag 1204 deadlock reports involving specific resources, see Deadlocks involving locks, Deadlocks involving parallelism, and Deadlocks involving threads

See Also

Deadlocking

KILL

Locks Event Category

Monitoring with SQL Profiler

sp_lock

sp_who

Trace Flags


Deadlocks Involving Locks

When a deadlock involves locks, Trace Flag 1204 reports the resource on which the deadlock is waiting, the lock mode in effect and being requested, and the threads participating in the cycle of dependency.

Examples
A Complete 1204 Report on Deadlock Involving Locks

In this example, SPID 51 is blocked from its request for an exclusive (X) lock on Table 2:2009058193 because SPID 52 already has an exclusive lock on it. In Node 2, SPID 52 is blocked from its request for an exclusive lock on Table 2:1993058136 because SPID 51 has an exclusive lock on it.

SQL Server chose SPID 52 as the deadlock victim to break the deadlock, as indicated by the Victim Resource Owner entry.

Deadlock encountered .... Printing deadlock information

Wait-for graph

Node:1
 TAB: 2:2009058193 []           CleanCnt:1 Mode: X Flags: 0x0
 Grant List::
   Owner:0x1c3b5260 Mode: X        Flg:0x0 Ref:1 Life:02000000 SPID:52 ECID:0
   SPID: 52 ECID: 0 Statement Type: SELECT Line #: 1
   Input Buf: Language Event: select * from a (tablockx)

 Requested By:
   ResType:LockOwner Stype:'OR' Mode: X SPID:51 ECID:0 Ec:(0x1c657890) Value:0x1c3b51c0 Cost:(0/0)

Node:2
 TAB: 2:1993058136 []           CleanCnt:1 Mode: X Flags: 0x0
 Grant List::
   Owner:0x1c3b52e0 Mode: X        Flg:0x0 Ref:1 Life:02000000 SPID:51 ECID:0
   SPID: 51 ECID: 0 Statement Type: SELECT Line #: 1
   Input Buf: Language Event: select * from b (tablockx)

 Requested By:
   ResType:LockOwner Stype:'OR' Mode: X SPID:52 ECID:0 Ec:(0x1c593890) Value:0x1c3b5380 Cost:(0/0)
Victim Resource Owner:
 ResType:LockOwner Stype:'OR' Mode: X SPID:52 ECID:0 Ec:(0x1c593890) Value:0x1c3b5380 Cost:(0/0)


Deadlocks Involving Parallelism

Deadlocks involving parallelism always involve thread or lock resources. Parallelism alone cannot cause a deadlock. The information reported by Trace Flag 1204 allows users to trace the separate parallel workers and find the other resource contention issues that are causing the deadlock. Treat all parallel threads (for example, threads with the same SPID) as a single unit when tracing the deadlock.

Trace Flag 1204 reports on these sets of participants in the cycle: Coordinator, Consumer, and Producer. The Coordinator is the creator and destroyer of the sub-threads. The Producers produce information on which the consumers wait.

To resolve the deadlock involving one nonparallel SPID AA and a parallel SPID BB, follow the same procedure as you would to resolve a deadlock between two nonparallel SPIDs.

Examples
A. Deadlock Involving Parallelism

The following example shows how the Coordinator, Consumer, and Producer are presented in a Trace Flag 1204 report.

Node:2
Port: 0x2b968100  Xid Slot: -1, EC: 0x2bba53b0, SPID:59 ECID: 0 (Coordinator), Exchange
Wait Type :e_etypeClose
Coordinator: EC = 0x2bba53b0, SPID:59 ECID: 0, Not Blocking
Consumer List::
Consumer: Xid Slot: 0, EC = 0x2bbda090, SPID:59 ECID: 2, Blocking
Consumer: Xid Slot: 1, EC = 0x2bbce090, SPID:59 ECID: 4, Blocking
Consumer: Xid Slot: 4, EC = 0x2bb60090, SPID:59 ECID: 1, Blocking
Consumer: Xid Slot: 5, EC = 0x2bbd4090, SPID:59 ECID: 3, Blocking
Producer List::
Producer: Xid Slot: 2, EC = 0x2bb64090, SPID:59 ECID: 6, Blocking
Producer: Xid Slot: 3, EC = 0x2bbbe090, SPID:59 ECID: 8, Blocking
Producer: Xid Slot: 6, EC = 0x2bbca090, SPID:59 ECID: 5, Blocking
Producer: Xid Slot: 7, EC = 0x2bbc6090, SPID:59 ECID: 7, Blocking
B. Deadlocks with Branches

Trace Flag 1204 reports deadlock cycles that have branches. For example, the following excerpt shows one branch, Node 6, in which a thread has an exclusive (X) lock on RID 1:1:1253:0, while SPID 55 is waiting for an update (U) lock on it and SPID 60 has just requested another update (U) lock on it.

-- next branch --
Node:6
 RID: 1:1:1253:0                CleanCnt:5 Mode: X Flags: 0x2
 Wait List:
   Owner:0x98b9d7c Mode: U        Flg:0x0 Ref:1  Life:02000000 SPID:55 ECID:0
 Requested By:
   ResType:LockOwner Stype:'OR' Mode: U SPID:60

-- next branch --

Node:9
 RID: 1:1:1253:0                CleanCnt:5 Mode: X Flags: 0x2
 Wait List:
   Owner:0x98b9d7c Mode: U        Flg:0x0 Ref:1 Life:02000000 SPID:55 ECID:0
 Requested By:
   ResType:LockOwner Stype:'OR' Mode: U SPID:59 ECID:0 Ec:(0x9b09494) Value:0x98b9c5c Cost:(0/0)
-- next branch --

In deadlocks involving parallelism and threads, a thread can wait on multiple threads. Consequently, each instance of "Next Branch" in the Trace Flag 1204 report represents the next wait for a particular thread.


Deadlocks Involving Threads

In deadlocks that involve threads, Trace Flag 1204 provides information on the threads that have been granted statement permissions and threads that are waiting on permissions.

In the following example, several threads (SPID 64, 60, 59, 57, and 55) have UPDATE statement permissions, while SPID 51 is on the Wait list.

Node:1
 Granted thread list:
   SPID: 64 ECID: 0 Statement Type: UPDATE
   SPID: 60 ECID: 0 Statement Type: UPDATE
   SPID: 59 ECID: 0 Statement Type: UPDATE
   SPID: 57 ECID: 0 Statement Type: UPDATE
   SPID: 55 ECID: 0 Statement Type: UPDATE
 Wait thread list:
   SPID: 51 ECID: 0 Statement Type: UNKNOWN TOKEN

UNKNOWN TOKEN means the thread currently is not executing a batch.


Troubleshooting MS DTC Transactions

A distributed transaction is in-doubt when the outcome of the transaction cannot be determined. This occurs when the transaction in Microsoft® SQL Server™ was prepared by Microsoft Distributed Transaction Coordinator (MS DTC), but one or more of the MS DTC processes involved in the transaction is not reachable from SQL Server.

A SQL Server user can detect this situation when the following message appears in the error log:

<SQL Server detected a DTC in-doubt transaction for UOW <xxx>. Please resolve it following the guideline for Troubleshooting DTC Transactions.>

To correct this problem, identify the MS DTC processes involved in the transaction and either start or restore the connection to the processes. Under typical circumstances, this procedure should fix the situation and the transaction should resolve itself. If this step does not resolve the issue, consult the MS DTC user manual for specific information on dealing with in-doubt transactions.

SQL Server can resolve in-doubt transactions; however, this option should be used only in extreme cases – when the MS DTC process required for in-doubt transaction cannot solve the problem.

With the in-doubt transaction's Unit of Work ID (UOW) accessible, users can resolve the transaction in SQL Server by using a specific KILL command syntax, and then performing the steps to recover the database. For information, see Backing Up and Restoring Databases.

Syntax

KILL UOW WITH { COMMIT | ROLLBACK }

Arguments

UOW

Identifies the Unit of Work ID representing the in-doubt MS DTC transaction. UOW is a character string and can be obtained from the SQL Server error log. For more information about monitoring distributed transactions, see the MS DTC user manual.

WITH { COMMIT | ROLLBACK }

Specifies that the Unit of Work ID identified should be either committed or stopped. An MS DTC transaction can be forced to commit or stop only if the transaction is in the prepared state, and thus not resolved, and MS DTC is in recovery. MS DTC is said to be in recovery when it is not accessible or when SQL Server is recovering from a failure.

This KILL syntax can be used only to resolve in-doubt transactions that are in the prepared state. For information about terminating other distributed transactions, see KILL.

Important Use the KILL command with the UOW WITH COMMIT or ABORT option only in extreme cases when the MS DTC utilities are not accessible.

See Also

Distributed Transactions

KILL


Troubleshooting MSSQLServer or SQLServerAgent Services User Accounts

If you have difficulty starting either the MSSQLServer or SQLServerAgent service under a particular user account, you can:

  • Use Windows NT User Manager to verify that the account has Log on as a service rights on the computer. (Both of these must be assigned within the security context of the local computer, not the domain.)

    If services are started by someone who is not a member of the Windows NT local administrators group, the service account must have these permissions:

    • Full control of the main Microsoft® SQL Server™ directory (by default, \Mssql).

    • Full control of the SQL Server database files, regardless of storage location.

    • The Log on as a service right. Ensure that all logon hours are allowed in the Logon Hours dialog box.

    • Full control of registry keys at and below HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer.

    • Selection of the Password Never Expires box.

    • Full control of registry keys at and below HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer.

    • Full control of registry keys at and below HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib.

    If the service does not have the appropriate permissions, certain functionality cannot be accomplished. For example, to write to a mail slot, the service must have a Windows NT domain user account, not just local system, with network write privileges. The service must be a Windows NT account with local administrator privileges to:

    • Create SQL Server Agent CmdExec and Microsoft ActiveX® Script jobs not belonging to members of the sysadmin fixed server role.

    • Use the automatic server restart feature of SQL Server Agent.

    • Create SQL Server Agent jobs to be run when the server is idle.
  • For the MSSQLServer service, right-click the server, click Properties, and then click the Security tab. Under Startup service account, enter the appropriate account and password. If the password is incorrect or has changed, the service cannot be started until the correct password is entered.

    Caution For the MSDTC service only, use Services in Control Panel to reenter the user account password. If the password is incorrect or has changed, the service cannot be started until the correct password is entered. If necessary, change the account's password using User Manager, and then enter that password for the service using Services in Control Panel.

  • For the SQLServerAgent service, expand the server, and then expand Management. Right-click SQLServerAgent, and then click Properties. On the General tab (the default) in the Service startup account section, enter the account and password.

  • Assign the account experiencing the problem to another service. If you still have difficulty starting the MSSQLServer or SQLServerAgent service under a particular user account, assign that account to another service (for example, the Spooler service) and verify that the service can be started successfully. If not, the account is either not configured properly or cannot be validated by the domain controller (for example, if no domain controller is available).


Troubleshooting Full-Text Search

For immediate help in diagnosing Full-Text Search issues, see the online troubleshooter on the Product Support Web site. For more information, see Help with Full-Text Search

Full-Text Catalog Administration

The error "Cannot general SSPI context" may occur during an operation such as rebuilding or populating a Full-Text Catalog. This error occurs when an invalid Service Principal Name (SPN) prevents MSSearch from making an OLE DB connection to SQL Server.

Resolve this error by finding and deleting the invalid SPN using the SetSPN utility from the Windows 2000 Resource Kit. Alternatively, stop and then start the SQL Server service on the local server.

To list the current registered SPNs, type the following from a command prompt:

Setspn -l SQLServerName

To delete the invalid SPN, type the following from a command prompt:

Setspn -d SPN

Note The value for the SQLServerName parameter can be either the server name if it is running under LocalSystem, or the service account name without a domain qualifier.

For more information about the SetSPN utility, see the Windows 2000 Resource Kit documentation.


Troubleshooting the Operating System

When installing Microsoft® SQL Server™ 2000 on a Microsoft Windows® NTFS partition, make sure that the NTFS file permissions allow read/write access. Otherwise, this error message may appear in the Microsoft Windows NT® application log (for each installation attempt):

Msg 17050: initerrlog: Could not open error log file 'C:\MSSQL\log\ERRORLOG'. Operating system error =5(Access is denied.).

Ensure that all system requirements are met, including service packs. For more information about system requirements, see Hardware and Software Requirements for Installing SQL Server 2000.

See Also

Error 17050

-


Appearance of Internet Connection Dialog Box at Startup of Windows 95 or Windows 98

If remote connections are enabled in Microsoft® Windows® 95 or Microsoft Windows 98, the system may initiate an Internet connection at Windows startup or at the start of many applications. This behavior is sometimes called autodial or autoconnect, and can be disabled by setting the registry key EnableRemoteConnect to N.

To do this, create a text file named DisbleAutoConnect.reg with the following three lines:

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLE]
"EnableRemoteConnect"="N"

Changing this setting to disable remote connections should not prevent any of your usual Internet activities. This setting is the default for most systems. However, enabling remote connections is necessary for some features of DCOM For more information, see the Knowledge Base article, HOWTO: Troubleshoot Run-Time Error '429' in DCOM Applicationshttp://support.microsoft.com/support/kb/articles/Q177/3/94.asp.

If there are instances when you need to have remote connections enabled, create a second REG file, named EnableRemoteConnect.reg, with the following lines:

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLE]
"EnableRemoteConnect"="Y"

Run EnableAutoConnect.reg to make the setting, and then run DisbleAutoConnect.reg to disable it when autoconnect is no longer needed.


Thread Pooling

The Microsoft® SQL Server™ error log may display the message:

The working thread limit of 255 has been reached

This message is an informational message and does not indicate any problem with the system.

SQL Server maintains a pool of operating-system threads for executing batches of SQL statements as they arrive from clients. On Microsoft Windows NT®, if the server lightweight pooling configuration option is set to 1, SQL Server maintains a pool of fibers instead of threads; fibers use fewer resources than threads. Using a pool of threads or fibers allows SQL Server to optimize the allocation of processing time when executing multiple SQL statements at the same time. The threads or fibers in this pool are known collectively as the worker threads. For more information, see Thread and Task Architecture.

The number of worker threads is controlled by the max worker threads server configuration option. The default is 255 and rarely needs to be changed.

When a batch of Transact-SQL statements is received from a client, if an existing worker thread is free, it is allocated to execute the batch. If no existing worker threads are free and the number of worker threads is less than max worker threads, a new worker thread is allocated. If no worker threads are free and max worker threads is reached, the new batch waits until an existing worker thread completes its current batch and becomes free. When the number of worker threads reaches max worker threads, SQL Server displays this message:

The working thread limit of 255 has been reached

Having all worker threads allocated does not mean that the performance of SQL Server will degrade. Typically, a new batch has only a short wait for a free thread. Allocating more threads may degrade performance because of the increased work required to coordinate resources among the threads. Many SQL Server systems running in production reach this state and run with very high performance levels.

See Also

max worker threads Option

Setting Configuration Options

sp_configure


Insufficient Virtual Memory on the Server

When the applications running on a server request more memory than is available on the server, Microsoft® Windows® opens the Server Process - Out of Virtual Memory dialog box with the following text:

Your system is running low on virtual memory. Please close some applications. You can then start the System option in the Control Panel and choose the Virtual Memory button to create an additional paging file or increase the size of your current paging file.

Use Virtual Memory in Control Panel to make sure that the amount of virtual memory at least 1.5 times the amount of physical memory available on the server. Microsoft SQL Server™ dynamically requests or frees memory as needed on Microsoft Windows NT® systems. SQL Server should not cause this error on Windows NT when running with the default configuration options. For more information, see Configuring Virtual Memory.

If the virtual memory setting seems appropriate, consider the following actions:

  • Check that the SQL Server max server memory and min server memory configuration options are not set high enough to use most of the virtual memory. For more information, see Configuration Options (Level 1).

    •

  • Check that other applications on the server are not using the available virtual memory.

    •

  • Use the max server memory and min server memory configuration options to control the amount of memory requested by SQL Server.
    •


Insufficient Resource Space

If a Microsoft® SQL Server™ configuration option is set too high for the amount of available resources, SQL Server fails to start. For example, if the max server memory setting is too high, other applications may take some time to start.

Reset configuration options to their default values or start SQL Server with minimal configuration by using the -f startup option of the sqlservr application. For more information about setting default values, see the Setting Configuration Options or sp_configure (T-SQL).

See Also

Setting Configuration Options

sp_configure

sqlservr Application


Determining When SQL Server Causes a Windows NT Blue Screen

Infrequently, Microsoft Windows NT® may either halt with a STOP screen or hard hang, during which the console is completely frozen and unresponsive. This is commonly called a blue screen. This may sometimes happen on a computer on which Microsoft® SQL Server™ is running, or may coincide with a particular SQL Server operation such as the bcp utility, a long-running query, and so on.

Most of the time, this indicates an operating system, device-driver, or hardware problem and should be pursued as such. The Windows NT user or kernel mode process isolation ensures that a user mode application problem does not cause the operating system to stop responding. This section presents exceptions to this and ways to determine whether to troubleshoot the problem at the system or application layer.

Sometimes the cause of a computer hard hang or blue screen may be a nonmaskable interrupt (NMI) error. This is sometimes visible as an error code stating NMI, parity check, or I/O parity check. NMI errors are almost always hardware. Usually they are caused by a memory failure; however, they can originate in other hardware subsystems such as video boards. Even if the NMI error happens only during certain SQL Server operations, and if the system passes initial hardware diagnostics, it should still be considered a hardware problem and pursued as such. It may be necessary to use a dedicated memory SIMM testing device, which can often find a transient memory error that eludes software-based diagnostics.

Processes exist on Windows NT in either user mode or kernel mode (sometimes called supervisor or privileged mode). In the Intel® x86 architecture, user mode maps to ring 3 and kernel mode to ring 0 of the 4-ring protection system. The x86 architecture has been carried forward with little change in all Intel and compatible processors to date, including the Pentium Pro and Pentium II. Processors such as the Alpha AXP typically have unprivileged and privileged modes as well.

Kernel mode is a privileged processor mode in which a thread has access to system-wide memory (including that of all user-mode processes) and to hardware. By contrast, user mode is a nonprivileged processor mode in which a thread can only access system resources by calling system services.

A user mode process cannot access kernel mode memory, or access memory of another user mode process. This is enforced by processor hardware, in conjunction with kernel mode data structures such as Page Tables.

As a result of this protection system, a user mode application generally cannot stop responding, cause a blue screen, or otherwise cause a failure in the Windows NT operating system. Such problems should be pursued primarily at the system layer as an operating system, device-driver, or hardware issue.

While an application error cannot cause a failure in the operating system, an operating system error can cause an application to stop responding. This is because of the general rule: applications must call inward (to kernel mode), but the operating system can reference outward to user mode freely at any time. A microkernel-influenced architecture such as Windows NT may in turn dispatch certain work to a user-mode system process rather than perform the work in kernel mode. However, the overall principle remains the same: Processor hardware enforces process context isolation, which prevents one process from causing a failure in another, whether one or both are in user mode.

If a user mode application passes an invalid parameter in a Win32® API call, it is the responsibility of the operating system to validate this parameter. In very rare cases, passing an invalid parameter may cause a Windows NT blue screen error. However, this is an operating system issue, and should be debugged and pursued as such.

See Also

bcp Utility


Troubleshooting Recovery

Every time Microsoft® SQL Server™ starts, recovery is performed on all system and user databases. The topics in this section focus on resolving performance and insufficient disk space problems related to recovery.


Recovery Performance

Recovery time is determined by how much work has been done since the last checkpoint, and by how much work has been done by all active transactions at the time of the data loss. Microsoft® SQL Server™ uses a configuration option named recovery interval to set the maximum number of minutes per database that SQL Server needs to recover databases. This recovery interval setting controls checkpoint frequency. For an online transaction processing (OLTP) system (using short transactions), recovery interval is the primary factor determining recovery time.

After installation, SQL Server sets this recovery interval setting to a default value of zero (0). As long as the recovery interval setting is at the default setting and long-running transactions are not present, recovery for each database should take approximately 1 minute or less. If long-running transactions were active at the time of the data loss, recovery time is controlled by the time it takes to rollback the effects of these transactions.

If recovery routinely takes significantly longer than 1 minute for a database, the recovery interval setting has a value of zero (0), and there are no long-running transactions to rollback, consider contacting your primary support provider to resolve the recovery performance problem.

Recovery reports progress (based on the virtual log files for a database). Recovery analyzes and scans the log at the beginning of recovery, since the last checkpoint. Based on the analysis phase, recovery estimates how much log will be read during recovery. The amount of log read is used to report recovery progress.

If the recovery interval setting is changed from the default value, database recovery takes that many times longer to complete. For example, if recovery interval is changed to 10, recovery would take approximately 10 times longer to complete than if recovery interval remained at the default setting of zero (0).

When growing the log, use larger chunks rather than small chunks to ensure a shorter startup time for SQL Server. The smaller the log chunks you have, the longer it takes SQL Server to initialize them.

If a long-running transaction is terminated, let the server finish the rollback process. If you are concerned about the length of the rollback process, ask your system administrator to confirm that activity is taking place on the server. Terminating the server process during the rollback of a long-running transaction results in long recovery time.

If you have a long-running transaction and a crash occurs during this transaction, SQL Server begins the recovery process. This may take some time. If you are concerned that this recovery process is taking too long and you believe it is halted, contact your system administrator.

See Also

recovery interval Option

Setting Configuration Options

sp_configure


Insufficient Disk Space

During recovery, it is a rare but possible occurrence for the server to require additional log or data space. If additional space is unavailable and either the log or data files cannot grow, the server:

  • Reports error message 9002 or 1105 in the Microsoft® SQL Server™ error log.

  • Marks the database as suspect.

  • Takes the database offline.

To resolve the 9002 error message and bring the database online

  1. Free disk space on any disk drive containing the log file for the related database. Freeing disk space allows the recovery system to grow the log file automatically.

  2. Reset the suspect status by executing sp_resetstatus.

  3. Run recovery by executing DBCC DBRECOVER (database).

    -or-

  4. Free disk space on a different disk drive.

  5. Move the transaction log files with an insufficient amount of free disk space to the disk drive in Step 1.

  6. Detach the database by executing sp_detach_db.

  7. Attach the database by executing sp_attach_db, pointing to the moved files.

    -or-

  • Add a log file to the suspect database and run recovery on the database by executing sp_add_log_file_recover_suspect_db.

To resolve the 1105 error message and bring the database online

  1. Free disk space on any disk containing a file in the filegroup mentioned in the 1105 error message. Freeing disk space allows the files in the filegroup to grow.

  2. Reset the suspect status by executing sp_resetstatus.

  3. Run recovery by executing DBCC DBRECOVER (database).

    -or-

  4. Free disk space on a different disk drive.

  5. Move the data files in the filegroup with an insufficient amount of free disk space to the disk drive in Step 1.

  6. Detach the database by executing sp_detach_db.

  7. Attach the database by executing sp_attach_db, pointing to the moved files.

    -or-

  • Add a data file to the suspect database and run recovery on the database by executing sp_add_data_file_recover_suspect_db.

See Also

ALTER DATABASE

CREATE DATABASE

DROP DATABASE

Error 1105

Error 9002

recovery interval Option

Resetting the Suspect Status

Server and Database Troubleshooting

Setting Configuration Options

sp_add_log_file_recover_suspect_db

sp_attach_db

sp_attach_single_file_db

sp_configure


SQL Server Tools Troubleshooting

This section contains information about troubleshooting problems you may encounter when using these tools with Microsoft® SQL Server™ 2000.

  • Index Tuning Wizard

  • SQL Mail with Exchange Server

  • SQL Profiler

  • SQL Query Analyzer

  • Web Assistant Wizard

  • Transact-SQL Debugger


Troubleshooting the Index Tuning Wizard

Microsoft® SQL Server™ 2000 uses indexes to optimize searching. Indexes that worked on SQL Server 6.5 or SQL Server 7.0 may not be the best choice for use with SQL Server 2000. Use the Index Tuning Wizard to find the most efficient indexes for the SQL Server 2000 optimizer.

The wizard requires a workload or a table to build a recommendation of the optimal set of indexes that should be in place. For more information about optimal sets of indexes, see Tuning Indexes.

Here are some general problems that you might encounter.

  • Communication error

    The connection to the server is broken or the server is offline. See Connect to SQL Server Dialog Box.

  • Empty workload

    The trace file or script contains no SQL batch or RPC events.

  • Canceling index analysis

    When processing a large workload, canceling index analysis can take several minutes or more to complete processing.

  • Accepting index configuration

    After accepting the recommended index configuration for a large workload or database, final processing can take several minutes or more to complete.

  • Nonexisting objects

    Queries referencing temporary or other nonexisting objects cannot be tuned.

  • File error

    The Index Tuning Wizard was unable to open a file. Check to see if another user or process locked the workload file, or if the workload file was moved or deleted.

  • I/O error

    The Index Tuning Wizard encountered a problem writing to a work file. Increase the available space on the disk drive on which the system temp directory is located.

  • Insufficient memory error

    There was insufficient memory to run the Index Tuning Wizard. Run the Index Tuning Wizard on a computer other than the server, or increase the size of the operating-system paging file.

  • "Missing index" error

    Multiple users concurrently tuning a database may result in "missing index" errors. It is recommended that only one user tune a database at a time.

  • Add Indexed Views option is grayed out

    Indexed views are available only on Microsoft SQL Server 2000 Enterprise Edition. For more information, see Using Indexes on Views and Creating an Indexed View.

Here are some workload problems that you might encounter.

  • Cannot choose a SQL Server trace table
    • Does not connect

      If you receive a connection error, the connection to the server is broken or the server is offline.

    • Does not list my tables

      You must first create a SQL Profiler trace of server activity and save this to either a file or a table. The trace must be created in advance. For more information, see Monitoring with SQL Profiler.

  • "My workload file" problems

    You must first create a SQL Profiler trace of server activity and save this to either a file or a table.

  • Workload cannot be parsed

    The trace file contains SQL batch or RPC events, but none that reference objects in the selected database.


Troubleshooting SQL Mail with Exchange Server

Typically, errors that occur when starting a SQL Mail session or sending mail from SQL Mail with Microsoft® Exchange Server fall into these categories: permissions problems and Exchange client setup problems. For more information, see SQL Mail.

To troubleshoot problems with SQL Mail, complete these steps:

  1. Log on to Microsoft Windows NT® 4.0 or Windows® 2000 with the user account that will be used for the MSSQLServer service. This user account must be an administrator of the local computer and a domain account.

  2. Confirm that the Exchange Server client, Exchnge32.exe, or the Microsoft Outlook™ client, Outlook.exe, can connect to Exchange Server and that e-mail can be sent. If using Outlook, ensure that Outlook has been installed with the Corporate or Workgroup option.

  3. Confirm that the Exchange Server profile used does not have a Personal Message Store (.pst). The Exchange Server profile name should not be longer than 32 characters.

  4. On the Services tab, confirm that the only services available are Microsoft Exchange Server and Personal Address Book, and then click the Delivery tab. Confirm that the selection in the Deliver To box is the mailbox on Exchange Server, which should have a name similar to "Mailbox - <Friendly User Name>" (where <Friendly User Name> is the name of the user who logged on to Windows NT 4.0 or Windows 2000in Step 1).

  5. To run SQL Mail with Exchange Server, the MSSQLServer service must be run under the same user account that logged on in Step 1. In Control Panel, double-click Services, select MSSQLServer service, and then click Startup.

  6. Confirm that the SQL Mail profile is correct. In SQL Server Enterprise Manager, expand the server, expand the Support Services folder, select SQL Mail, and then right-click. Click Properties, and then on the General tab, ensure that the profile name specified in the Profile name box is correct. (The profile name must match the profile name used in Step 3.) Click Test to verify that the profile was set up correctly.

  7. If SQL Mail fails to start (for example, gives you an error indicating that the profile was incorrect), check to make sure that Outlook Express is not set as the default e-mail client. In Control Panel, double-click Internet Options. On the Programs tab, verify that Outlook Express is not in the e-mail combo box. If you have to change the default e-mail client to a client other than Outlook Express, you may need to stop and restart the MSSQLServer service before verifying that SQL Mail can start with the mail profile.

In some cases, a mail profile may get corrupted and SQL Mail will not be able to use it. To correct the problem, copy the profile to a different name, or re-create the profile.

If the account used to start Microsoft SQL Server™ does not have access to the Exchange server, you cannot use SQL Mail. Test SQL Server access permissions to Exchange Server by executing xp_cmdshell, which executes with the same permissions as SQL Mail. Use the following command to test connectivity to the server, assuming Exchange Server is located on a computer named "MyServer".

xp_cmdshell "NET USE \\MyServer\IPC$"

If this command fails, Step 3 was not completed correctly.


Troubleshooting SQL Profiler

Here are some problems you may encounter when using SQL Profiler:

  • When setting filters, a blank include filter includes all items in the SQL Profiler output. A filter on a data column is not applied to event classes that do not populate that data column.

  • Because the SQL Profiler stored procedures save trace queue definitions on the server rather than on the client, SQL Profiler is unable to edit or start a trace created originally with the stored procedures.

  • For security reasons, batches containing stored procedures with password arguments are not traced. Instead, an event is produced, which replaces the batch text with a comment.

  • In Microsoft® Windows® 95 and Windows 98, SQL Profiler does not accept client configuration changes until the SQL Profiler is closed and restarted.

  • SQL Profiler can incur problems accessing files on a remote computer if those files become unavailable.

Here are some common problems you may encounter when replaying a SQL Profiler trace:

  • Replay errors may occur when logins and users captured in the trace do not exist in the target database. If the logins and users exist in the database, they must have the same permissions as they did in the source (traced) database.

  • Replay errors may occur when the database ID (DBID) of the target database is different from the DBID captured in the trace. To correct this problem, restore a backup of the master database of the source (traced) server onto the target server. Then, restore the user database or databases. As an alternative, the DBID data column can be removed from the trace and the default database set to the target database for each user captured in the trace.

  • Replay errors may occur when attempting to replay a trace against a database if it is in a different state than from the source (traced) database. Updates may fail if data is missing or changed.

  • System performance may degrade if replaying a trace that contains more concurrent connections than the replay computer can manage. In this case, the trace may be filtered by Application Name, SQL User Name, or another filter if one or more of these data columns were captured in the trace.

  • Replaying captured events containing the KILL statement may cause unexpected replay results; the SPID that is terminated may not exist or, if it does exist, the SPID may be assigned to a different user or connection than the one traced originally.

  • When replaying a trace file as fast as possible, SPIDs may become blocked, halting the progress of the replay. To free the blocked SPID and allow the trace to continue, kill the blocking SPID.


Troubleshooting SQL Query Analyzer

Here is a problem that you may encounter when using SQL Query Analyzer to execute a script:

  • Showplan does not return a plan for Transact-SQL statements referencing objects created within the SHOWPLAN statement. If SHOWPLAN is set to ON, the query will not execute and the object will not be created. Any references to the object will fail with an error indicating that the object does not exist. You can trace the TSQL:SQL:BatchStarting and Performance:Execution Plan events in SQL Profiler while executing the Transact-SQL statements to see the plan.

Here is a problem that you may encounter when using SQL Query Analyzer to tune a database for a query:

  • Unable to recommend indexes because the query did not reference any tunable tables. This problem was caused by at least one of the following scenarios.
    • The query did not reference any tunable tables.

    • The query has a syntax error or is invalid.

    • You are working in the wrong database.

    • You are referencing a temporary table.

For more information, see Index Tuning Wizard.


Troubleshooting the Web Assistant Wizard

This topic describes how the Web Assistant Wizard handles HTML page generation using the When the SQL Server data changes scheduling option.

With the Web Assistant Wizard, you can generate an HTML file whenever the data changes for one or more tables by using the Schedule the Web Assistant Job dialog box and selecting When the SQL Server data changes. The Web Assistant Wizard will accomplish this by either building new INSERT, UPDATE, and DELETE triggers for each of the tables selected by the user or updating existing ones. Any existing triggers are detected automatically by the Web Assistant Wizard and retained. Additional Transact-SQL statements are appended to the existing trigger code.

The trigger object built by the Web Assistant Wizard will have a name generated according to the following:

Web Page Name_1 -> INSERT trigger
Web Page Name_2 -> UPDATE trigger
Web Page Name_4 -> DELETE trigger

For example, if the page you create is named "Web Page 1", the three triggers generated by the Web Assistant Wizard will be: Web Page 1_1, Web Page 1_2, and Web Page 1_3 for the INSERT, UPDATE, and DELETE triggers respectively.

sp_depends does not enlist any of the Web Assistant Wizard generated triggers for a given table. You can use sp_helptrigger to return trigger information for the specified table for the current database.

Use the following steps to drop any of the triggers generated by the Web Assistant Wizard:

  1. Identify the object name of all triggers to be dropped by executing the sp_helptrigger system stored procedure.
    sp_helptrigger TableName
GO
  2. Execute the DROP TRIGGER statement for each of the triggers you want to drop:
    DROP TRIGGER WebTriggerName


Troubleshooting the Transact-SQL Debugger

The goal of this topic is to address any problems you may encounter while trying to start and use the Transact-SQL debugger. Potential sources of error include:

  • Incorrect DCOM permission settings

  • DCOM on Windows 98

  • Missing or unregistered DLLs

  • Lack of (or limited) debugger support

This topic describes how to identify and remedy various problems. Before attempting to troubleshoot your debugger configuration, verify the following:

  1. Make sure you have permission to execute the SP_SDIDEBUG extended procedure.

  2. Start the SQL Server Service using an account that has Administrator privileges on that computer.

  3. Check the Event Viewer's Application and System logs for any error messages.
Incorrect DCOM Permission Settings

SQL debugging uses Distributed COM (DCOM) to communicate between your client computer and the database server. You must configure DCOM to allow remote users to attach the debugger to a process on the database server.

By default, the correct DCOM settings are in place when SQL Server is installed. However, because of security considerations for the computer running SQL Server, you may want to restrict debugging access. Use the following as a general procedure for setting up DCOM on the SQL Server computer.

Important If you plan on running the debugger as any user other than the one running SQL Server, DCOM will need to be correctly configured first. Follow these steps to insure you have execution permission.

On the server:

  1. Run DCOMCNFG.EXE.

  2. In the Distributed COM Configuration Properties window, select the Default Security tab. Under Default Access Permissions, click Edit Default.

  3. If group Everyone does not already have permissions, you may add it by clicking Add. Select the local machine name from the List Name From list. Select Everyone and make sure that Type of Access is set to Allow Access. Then click OK.

    OR

    If you prefer to limit debugging to specific users, you can add individual domain user accounts (e.g. domain\account) with administrator privileges. If you choose to add only domain accounts instead of Everyone, make sure to add the SYSTEM account as well.

  4. Switch to the Applications tab of the Distributed COM Configuration Properties dialog.

  5. Scroll through the Applications list and select SQLDBREG. Then click Properties.

  6. Select the Identity tab and make sure that The interactive user is selected as the user to run this application.

  7. Click OK to close the dialog box.

  8. Restart the SQL Server service.

After applying those steps, your server's DCOM settings should look like this:

   DCOMCNFG
   |
   |__ Application Tab
   |   |
   |   |_____ SQLDBREG
   |      |
   |      |______ Identity Tab
   |         |
   |         |_______ The interactive user
   |
   |__ Default Security Tab
      |
      |_____ Default Access Permissions
         |
         |______ Edit Default Button
            |
            |_______ Everyone (or domain\account and System)
DCOM on Windows 98

DCOM95 on Windows 98 is not as robust as DCOM on Windows NT. In addition, RPCSS.EXE on Windows 98 can cause problems if it is not started either at shell load time or at boot time. To ensure that RPCSS.EXE is started early enough, modify either of the following registry entries:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices

Using any name, follow these steps to add a new String Value to the registry at either of those locations, and set its value to 'C:\WINDOWS\SYSTEM\RPCSS':

  1. Run REGEDIT.EXE.

  2. Expand HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\ CurrentVersion\Run.

  3. Right-click and select New -> String Value.

  4. Type in any name (e.g. RPC).

  5. Double-click on the newly created string.

  6. Type in the value (e.g. C:\WINDOWS\SYSTEM\RPCSS.EXE).

  7. Reboot the computer.

Also, make sure that the following registry keys are set to 'y':

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole\EnableDCOM
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole\EnableRemoteConnect

You must reboot your computer after making any of these changes.

Missing or unregistered DLLs

If the debugger fails to start, and you encounter any of these error messages, then you may need to manually setup the debugging environment:

  • Error in output window (indicates mssdi98.dll is missing under ..\mssql\binn folder)

ODBC: Msg 0, Level 16, State 1

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot load the DLL mssdi98.dll, or one of the DLLs it references.

Reason: 126 (The specified module could not be found.).

  • Error in Event Viewer/Application log (indicates sqldbg.dll is not registered or sqldbreg is not registered)

Unable to connect to debugger on <Server Name>

(Error = 0x80004002 No such interface supported ).

Ensure that client side components such as SQLDBREG.EXE are installed and registered on <Server Name>. Debugging disabled for connection 54.

  • Error Message Dialog Box (indicates sqldbg.dll is not registered or sqldbreg is not registered).

Missing or unregistered sdiclnt.dll

Initialization of the debugger failed!

Possible cause:

'sdiclnt.dll' was not installed or registered properly.

Follow these steps to manually install and register missing debugger components when the server and client (i.e. Query Analyzer) are running on the same machine:

  1. Copy file sdiclnt.dll from the \x86\binn folder of your SQL Server 2000 CD-ROM to c:\program files\microsoft sql server\mssql\80\tools\binn, and then register it by executing the following command:
    regsvr32 sdiclnt.dll

    Note On Windows 9x, the regsvr32 utility is located under the \windows\system folder.

  2. Create folder c:\program files\common files\microsoft shared\SQL Debugging.

  3. Copy the following files from \x86\other\sdi to c:\program files\common files\microsoft shared\SQL Debugging:
    sqldbg.dll
sqldbreg.exe

    then, register the files:

    regsvr32 sqldbg.dll
sqldbreg /RegServer
  4. Copy file mssdi98.dll from \x86\other\sdi to where sqlservr.exe resides (e.g. c:\program files\microsoft sql server\mssql\binn).

  5. Restart the SQL Server service.

Follow these steps to manually install and register missing debugger components when the server and client are running on different machines:

On the client:

  1. Copy file sdiclnt.dll from the \x86\binn folder of your SQL Server 2000 CD-ROM to c:\program files\microsoft sql server\mssql\80\tools\binn, then register it:
    regsvr32 sdiclnt.dll

    Note On Windows 9x, the regsvr32 utility is located under the \windows\system folder.

  2. Create folder c:\program files\common files\microsoft shared\SQL Debugging.

  3. Copy the following files from \x86\other\sdi to c:\program files\common files\microsoft shared\SQL Debugging:
    sqldbg.dll
sqldbreg.exe

    then, register the files:

    regsvr32 sqldbg.dll
sqldbreg /RegServer

On the server:

  1. Create folder c:\program files\common files\microsoft shared\SQL Debugging.

  2. Copy the following file from \x86\other\sdi to c:\program files\common files\microsoft shared\SQL Debugging:
    sqldbg.dll

    then, register the file:

    regsvr32 sqldbg.dll
  3. Copy file mssdi98.dll from \x86\other\sdi to where sqlservr.exe resides (e.g. c:\program files\microsoft sql server\mssql\binn)

  4. Restart the SQL Server service
Lack of (or limited) debugger support
  • Limited support is provided for these data types:
    • table

      Variables of this type are not displayed in the local variables window.

    • sql_variant, text, ntext, image, and cursor

      Variables of these types are displayed within the local variables window, but cannot be modified.

  • Procedures of greater than 64K in size are not supported.

  • Nesting of greater than 32 stored procedure calls is not supported.

  • Passing of more than 1023 arguments to a stored procedure is not supported.


Analysis Services Troubleshooting

These topics provide information about troubleshooting and resolving the most common errors that you may encounter when using Microsoft® SQL Server™ 2000 Analysis Services.

  • Troubleshooting Development

  • Troubleshooting Processing

  • Troubleshooting Querying and Browsing

  • Troubleshooting Security

  • Troubleshooting Server


Troubleshooting Development (Analysis Server)

What problem are you having?

Database on server cannot be deleted.

A database on a server (in ADOMD.Catalogs) does not appear in the DSO.Server.MDStores collection and cannot be deleted.

Cause: The repository is corrupted or changed, or the server failed during a transaction.

Solution: To remove the database and free the used disk space, use Decision Support Objects (DSO) to create a database with the same name, and then use the Remove method of the clsServer object to immediately delete it.

Received the following error message: "License information for this component not found".

Received the "License information for this component not found" message for Microsoft® Visual Basic® controls.

Cause: Microsoft SQL Server™ 2000 Analysis Services installs controls with a license for run-time use. Visual Basic was installed after Analysis Services and failed to install these components correctly for use in the design environment.

Solution: On the Internet, go to the Microsoft Product Support Services Web site, http://search.support.microsoft.com/kb/c.asp.

On the search screen:

  1. Under My search is about, select Visual Basic.

  2. Under I want to search by, select Specific article ID number.

  3. Under My question is, type Q181854.

  4. Click Find, and then follow the instructions in the article.

Received the following error message: "The cube schema is already optimized".

After selecting the Optimize Schema menu command in Cube Editor, received the "The cube schema is already optimized" message. Subsequent saving of the cube results in the following message: "A loop was detected in the schema. Please remove the extra joins".

Cause: Optimizing the schema through the Optimize Schema command may not have deleted a join that is not valid between a fact table and a dimension table or between two dimension tables for a snowflake-schema dimension.

Solution: In the schema view of Cube Editor, identify joins that are not valid, and then remove them with the Remove Join command. For more information about optimizing cube schemas, see Optimizing Cube Schemas.

Tables are missing from the list when setting drillthrough options.

Cause: A cube with an optimized schema may not display all available tables for use when you specify drillthrough options. For more information, see Optimizing Cube Schemas.

Solution: You can join a table to the schema for drillthrough when you specify drillthrough options. Add the table and define a SQL WHERE clause to establish the join.

Applications behave unexpectedly when referring to Decision Support Objects (DSO) object properties or methods.

After an application obtains a lock with the LockObject method on a DSO object, other applications sharing the DSO object behave unexpectedly when referring to certain properties or methods of the object.

Cause: The originating application may have destroyed the original DSO object. If so, all other applications will have references that are not valid to that object, because DSO automatically refreshes updated objects after a lock is obtained.

Solution: Use the Parent property of the DSO object to check the validity of the object reference. An object reference that is not valid will have its Parent property set to Nothing.


Troubleshooting Processing (Analysis Server)

What problem are you having?

After you change the data source provider for a cube, an error occurs while processing the cube.

Changing a data source provider (for example, moving from an ODBC provider to a Microsoft® SQL Server™ provider) for an existing cube causes an error the next time the cube is processed.

Cause: Different providers sometimes use incompatible SQL dialects, and a statement that was valid for one provider is not valid for another.

Solution: The error message should identify the syntax that is not valid. Use Decision Support Objects (DSO) or Cube Editor to correct the problem. To avoid such problems, do not change the data source provider for an existing cube.

Received the following error message while processing a dimension: "Maximum number of child members exceeded."

Cause: One or more members of a dimension contains more than the maximum number of children allowed per parent.

Solution: Create member groups to provide intermediate levels that organize the dimension such that no member has more than the maximum allowable children. For more information, see Creating Member Groups.

While processing a cube, the member key was found in the fact table but not in a dimension level, the set of leaf members, or in the dimension.

While processing a cube, you received one of the following error messages:

  • If the dimension is not parent child dimension: "A member with key key was found in the fact table but was not found in the level level of the dimension dimension."

  • If the dimension is a parent child dimension and the MembersWithData property of the dimension is set to dataforLeafMembersOnly, the message is: "A member with key key was found in the fact table but was not found in the set of leaf members of dimension dimension."

  • If the dimension is a parent child dimension and the MembersWithData property of the dimension is not set to dataforLeafMembersOnly, the message is: "A member with key key was found in the fact table but was not found in the dimension dimension."

Cause: The dimension table does not contain a member related to a fact in the fact table, or the dimension was not processed after changing the dimension table.

Solution: Verify referential integrity between dimension tables and fact tables. Process a dimension after changing the dimension table and before processing cubes that use the dimension. For more information, see Optimizing Cube Schemas.

To manage a large number of these key errors, you can log the missing members to a file and use Data Transformation Services (DTS) to import the log into a relational database. You can then either remove the records with the keys from the fact table or add them to the dimension table. You select to log dimension key errors to a file in the Cube Processing Settings Dialog Box.

Some fact table rows are not read when a cube or partition is processed or incrementally updated.

Cause: The source data lacks referential integrity. For example, the cube's fact table contains foreign key values that are not present in a joined dimension table's primary key column.

Solution: Correct the referential integrity of the source data so that inner joins between the fact and dimension tables include all rows in the fact table.

User sees old version of a cube or virtual cube.

There are two possible causes.

Cause: The cube or virtual cube was changed but not processed.

Solution: First the administrator must process cube or virtual cube. After the cube is processed, the user must reconnect to the server computer.

Cause: The cube or virtual cube was processed while the user was browsing the cube.

Solution: The user might need to reconnect to the server computer. Reconnection is required for a full update but not for an incremental update.

Analysis Services is processing more records than exist in the fact table.

Cause: There is a many-to-many instead of a one-to-many relationship between the dimension table and the fact table.

Solution: Remove redundant members from the dimension tables.


Troubleshooting Querying and Browsing (Analysis Server)

What problem are you having?

Cannot see data when browsing a cube.

Data is not visible when you attempt to browse a cube with the aggregations stored in one method such as hybrid OLAP (HOLAP), but data is visible when you attempt to browse the cube with the aggregations stored in another mode such as relational OLAP (ROLAP).

Cause: The source data lacks referential integrity. For example, the fact table of the cube contains foreign key values that are not present in the primary key column of a joined dimension table.

Solution: Correct the referential integrity of the source data so that inner joins between the fact and dimension tables include all rows in the fact table.

Query of a calculated member returns text such as "1.#INF or 1.#J" instead of the number.

Cause: The formula in the calculated member attempted to divide by zero.

Solution: Change your formulas to check for possible division by zero errors before they occur.

Cubes are missing from the list of cubes in a database.

Cause: Cubes that use features introduced in Microsoft® SQL™ Server 2000 Analysis Services are not available to SQL Server 7.0 OLAP Services client applications, and their presence is hidden from these clients.

Solution: Upgrade the client application to a version that is fully compatible with SQL Server 2000 Analysis Services.


Troubleshooting Security (Analysis Server)

What problem are you having?

A change made to a user's permissions or group membership list does not take effect.

Cause: The user was logged on to Microsoft® Windows NT® 4.0 when the change was made and has not logged off.

Solution: The user must log off Windows NT 4.0 and then log on again.

Cannot connect to server computer that stores a cube or virtual cube.

Cause: User lacks permissions to the data source containing cube's source data.

Solution: Ensure the user logon provides access to the data source.

See also: Windows NT Server or Windows 2000 Server online documentation (click Help on the Start menu).

Insufficient disk space for temporary files.

During cube processing or aggregation design, Analysis Manager displayed a message indicating insufficient disk space for temporary files.

Cause: The temporary file folder used by Microsoft SQL Server™ 2000 Analysis Services is on a disk that has no more space.

Solution: Create additional space on the disk or specify a temporary file folder on another disk with more space.

See also: Properties Dialog Box - General Tab

Attempting to register an Analysis server generates an error message.

When you attempt to register an Analysis server, Analysis Manager displays an error message such as the following: "Connection to server failed. Your permissions on the server computer do not allow you to administer this Analysis server".

Cause: You are not logged on using an account that is a member of the OLAP Administrators group on the server to be registered.

Solution: On the server to be registered, add your account to the OLAP Administrators group. You may have to log off and then log on again before the group membership becomes effective.


Troubleshooting Server (Analysis Server)

What problem are you having?

Received the following error message: "Cannot open connection to Analysis server servername. Network error servername".

When you try to register an Analysis server in Analysis Manager, Analysis Manager displays the following error message: "Cannot open connection to Analysis server servername. Network error servername".

Cause: MSSQLServerOLAPService is not started on the specified server.

Solution: Start MSSQLServerOLAPService on the server. To do this, use the Services application, which is in Control Panel in Microsoft® Windows NT® 4.0 or the Administrative Tools folder in Control Panel in Windows 2000.

If the service is already started, you may not have permissions on the server computer to administer Microsoft SQL Server™ 2000 Analysis Services (see Troubleshooting Security (Analysis Server)).

The Analysis Services service, MSSQLServerOLAPService, fails to start.

Cause: The computer name has been changed, the network card has been replaced, or other changes have been made to the computer.

Solution: Reinstall Analysis Services.

Cause: The password has been changed for the logon account used by Analysis Services.

Solution: Change the logon account password for Analysis Services. To do this, use the Services application, which is in Control Panel in Windows NT 4.0 or the Administrative Tools folder in Control Panel in Windows 2000.

Cause: The first word in the name of the root folder for Analysis Services is duplicated among root folder names on the same disk. For example, Analysis Services is installed in the Program Files root folder and another root folder named Program exists.

Solution: Rename the root folder that does not contain Analysis Services.

Characters display incorrectly in some non-English versions of Analysis Services.

Cause: The current display font does not support the full character set for the language in use, specifically characters in the extended ASCII character set. Analysis Services uses the system's Icon font setting for the majority of its user interface display.

Solution: Change the display font to one that supports the extended character set for the language in use:

  1. Run the Display application in Control Panel, and then click the Appearance tab.

  2. Select Icon in the Item list and then, under Font, select a font that supports the extended ASCII character set, such as Times New Roman or Tahoma.

Received the following error message: "Cannot obtain server's start directory from registry".

MSSQLServerOLAPService failed to start, and the system displayed the following error message: "Cannot obtain server's start directory from registry".

Cause: If the path of the data directory contains more than 102 characters, Analysis Services cannot start.

Solution: During installation, make sure that the size of the path of the Data directory is limited to 102 characters. You can change the path after installation by using the Data folder box in the Properties dialog box for the server.


Error Messages

When Microsoft® SQL Server™ 2000 encounters a problem, it either writes a message from the sysmessages system table to the SQL Server error log and the Microsoft Windows® 2000 or Microsoft Windows NT® 4.0 application log, or sends a message to the client, depending on the severity level.

Error messages can be either returned by SQL Server when encountering a problem or produced manually using the RAISERROR statement.

The RAISERROR statement provides centralized error message management. RAISERROR can retrieve an existing entry from sysmessages, or it can use a hard-coded (user-defined) message. When RAISERROR returns a user-defined error message, it also sets a system variable to record that an error has occurred. The message can include C PRINTF-style format strings that are filled with arguments specified by RAISERROR at run time. After it is defined, the message is sent back to the client as a server error message.

Whether returned by SQL Server or through the RAISERROR statement, each message contains:

  • A message number that uniquely identifies the error message.

  • A severity level that provides an indication of the type of problem.

  • An error state number that identifies the source from which the error was issued (if the error can be issued from more than one place).

  • A message that states the problem and sometimes a possible solution.

For example, if you access a table that does not exist:

SELECT *

FROM bogus

The error message sent to the client looks similar to this:

Server: Msg 208, Level 16, State 1

Invalid object name 'bogus'.

You can view the list of SQL Server error messages by querying the sysmessages table in the master database. For more information about sysmessages, see System Error Messages.

See Also

RAISERROR

Using RAISERROR


Error Message Formats

All of the Microsoft® SQL Server™ 2000 components can issue informational, warning, or error messages to applications. Most SQL Server messages returned to applications contain these parts:

  • Error number

    A one-to-five-digit number that identifies the message. Error numbers for user-defined messages can contain more digits.

  • Description

    A Unicode string that contains information about the condition that generated the message.

  • Severity level

    A one- or two-digit number that indicates the severity of the error condition.

  • State

    A one- to three-digit number with a maximum value of 127 that indicates to Microsoft support engineers and developers the location in the SQL Server code that generated the message:

  • Line number

    A number within the batch or stored procedure that contains the statement that generated the message. Line number can also be within the text of the stored procedure that is being executed.

The error numbers, descriptions, and severity levels for most SQL Server messages are stored in master.dbo.sysmessages. The state and line numbers are generated dynamically by the code issuing the message.

Messages raised in the client Net-Libraries, the Microsoft OLE DB Provider for SQL Server, or the SQL Server ODBC driver do not have some of these message parts.

To see an example of an error message, execute this statement:

SELECT * FROM ThisObjectDoesNotExist

This statement raises an error with these parts:

Error number: 208

Severity level: 16

State: 1

Line: 1

Description: Invalid object name 'ThisObjectDoesNotExist'.

All of the data APIs used by applications to access SQL Server return the error number and description. Not all of the APIs return the severity level, state, or line number. The Microsoft OLE DB Provider for SQL Server and the SQL Server ODBC driver return these parts only if an OLE DB or ODBC application has been written to use SQL Server-specific diagnostic features that are exposed by the provider and driver.


Error Message Numbers and Descriptions

A message number uniquely identifies each error message and the error message text describes the problem. The error message text often includes placeholders for information (such as object names) to be inserted in the error message when it is displayed.

In the description column of the sysmessages table, a percent sign (%) followed by a character serves as a placeholder; the specific data is supplied when the error message is generated. The notation %d is a placeholder for a number; %ls (or %.*ls) is a placeholder for a string. For example, the actual error message displayed for error 105 might be:

Unclosed quote before the character string %.*ls.

When you report an error to your primary support provider, it is important to include error numbers, error states, object types, and object names. Otherwise, it can be difficult and time-consuming for the support provider to render assistance in resolving the error message.

See Also

Reporting Errors to Your Primary Support Provider

sysmessages


Error Message Severity Levels

The severity level of an error message provides an indication of the type of problem that Microsoft® SQL Server™ 2000 has encountered.

Severity level 10 messages are informational and indicate problems caused by mistakes in the information you have entered. Severity levels from 11 through 16 are generated by the user, and can be corrected by the user.

Severity levels from 17 through 25 indicate software or hardware errors. You should inform the system administrator whenever problems that generate errors with severity levels 17 and higher occur. The system administrator must resolve these errors and track their frequency. When a level 17, 18, or 19 error occurs, you can continue working, although you might not be able to execute a particular statement.

The system administrator should monitor all problems that generate severity levels from 17 through 25 and print the error log that contains information to backtrack from the error.

If the problem affects an entire database, you can use DBCC CHECKDB (database ) to determine the extent of the damage. DBCC may identify some objects that must be removed and will optionally repair the damage. If damage is extensive, the database might have to be restored.

When specifying user-defined error messages with RAISERROR, use error message numbers greater than 50,000 and severity levels from 0 through 18. Only system administrators can issue RAISERROR with a severity level from 19 through 25.

Severity Levels 0 through 19

Error messages with a severity level of 10 are informational. Error messages with severity levels from 11 through 16 are generated by the user and can be corrected by the user. Severity levels from 17 and 18 are generated by resource or system errors; the user's session is not interrupted.

Using sp_addmessage, user-defined messages with severities from 1 through 25 can be added to sysmessages. Only the system administrator can add messages with severities from 19 through 25.

Error messages with severity levels 17 and higher should be reported to the system administrator.

Severity Level 10: Status Information

This is an informational message that indicates a problem caused by mistakes in the information the user has entered. Severity level 0 is not visible in SQL Server.

Severity Levels 11 through 16

These messages indicate errors that can be corrected by the user.

Severity Level 17: Insufficient Resources

These messages indicate that the statement caused SQL Server to run out of resources (such as locks or disk space for the database) or to exceed some limit set by the system administrator.

Severity Level 18: Nonfatal Internal Error Detected

These messages indicate that there is some type of internal software problem, but the statement finishes, and the connection to SQL Server is maintained. For example, a severity level 18 message occurs when the SQL Server query processor detects an internal error during query optimization. The system administrator should be informed every time a severity level 18 message occurs.

Severity Level 19: SQL Server Error in Resource

These messages indicate that some nonconfigurable internal limit has been exceeded and the current batch process is terminated. Severity level 19 errors occur rarely; however, they must be corrected by the system administrator or your primary support provider. The administrator should be informed every time a severity level 19 message occurs.

Severity Levels 20 through 25

Severity levels from 20 through 25 indicate system problems. These are fatal errors, which means that the process (the program code that accomplishes the task specified in your statement) is no longer running. The process freezes before it stops, records information about what occurred, and then terminates. The client connection to SQL Server closes, and depending on the problem, the client might not be able to reconnect.

Error messages with a severity level of 19 or higher stop the current batch. Errors messages with a severity level of 20 or higher are considered fatal errors and terminate the client connection. Errors messages in this range may affect all of the processes in the database, and may indicate that a database or object is damaged. Error messages with a severity level from 19 through 25 are written to the error log.

Severity Level 20: SQL Server Fatal Error in Current Process

These messages indicate that a statement has encountered a problem. Because the problem has affected only the current process, it is unlikely that the database itself has been damaged.

Severity Level 21: SQL Server Fatal Error in Database (dbid) Processes

These messages indicate that you have encountered a problem that affects all processes in the current database; however, it is unlikely that the database itself has been damaged.

Severity Level 22: SQL Server Fatal Error Table Integrity Suspect

These messages indicate that the table or index specified in the message has been damaged by a software or hardware problem.

Severity level 22 errors occur rarely; however, if you should encounter one, run DBCC CHECKDB to determine if other objects in the database are also damaged. It is possible that the problem is in the cache only and not on the disk itself. If so, restarting SQL Server corrects the problem. To continue working, you must reconnect to SQL Server. Otherwise, use DBCC to repair the problem. In some cases, it may be necessary to restore the database.

If restarting does not help, the problem is on the disk. Sometimes destroying the object specified in the error message can solve the problem. For example, if the message tells you that SQL Server has found a row with a length of 0 in a nonclustered index, delete the index and rebuild it.

Severity Level 23: SQL Server Fatal Error: Database Integrity Suspect

These messages indicate that the integrity of the entire database is in question because of a hardware or software problem.

Severity level 23 errors occur rarely; however, if you should encounter one, run DBCC CHECKDB to determine the extent of the damage. It is possible that the problem is in the cache only and not on the disk itself. If so, restarting SQL Server corrects the problem. To continue working, you must reconnect to SQL Server. Otherwise, use DBCC to repair the problem. In some cases, it may be necessary to restore the database.

Severity Level 24: Hardware Error

These messages indicate some type of media failure. The system administrator might have to reload the database. It might also be necessary to call your hardware vendor.

See Also

Backing Up and Restoring Databases

DBCC

DBCC CHECKDB

Setting Configuration Options

sp_configure


ADO Error Message Format

The ADO specification defines Error objects in an Errors collection. Each Error object holds a message from the underlying provider. ADO does not provide for provider-specific diagnostic information. ADO and the Microsoft OLE DB Provider for SQL Server map the parts of Microsoft® SQL Server™ messages into these ADO Error object properties:

  • Description

    Contains the SQL Server message description, usually from the description column in master.dbo.sysmessages.

  • SQLState

    Contains the five-character SQLSTATE code generated by the Microsoft OLE DB Provider for SQL Server.

  • NativeError

    Contains the SQL Server error number. For example, if a statement raises a SQL Server error 170 (syntax error), 170 is returned in NativeError.


OLE DB Error Message Format

OLE DB applications receive Microsoft® SQL Server™ messages in these ways:

  • Call the OLE DB ISQLErrorInfo::GetSQLInfo function.

  • Call the provider-specific ISQLServerErrorInfo::GetErrorInfo function.

ISQLErrorInfo::GetSQLInfo returns the SQL Server error numbers from master.dbo.sysmessages as the plNativeError parameter and the SQLSTATE value as the pbstrSQLState parameter. These SQLSTATE codes are not related to any of the parts of a SQL Server message. The Microsoft OLE DB Provider for SQL Server generates the appropriate SQLSTATE code anytime it returns a message to an application. The SQLSTATE codes generated by the OLE DB Provider for SQL Server are same as the five-character SQLSTATE codes defined in the ODBC specification. For ISQLErrorInfo::GetSQLInfo, pbstrSQLState may be NULL when the error is not produced by SQL Server.

Both the Microsoft OLE DB Provider for SQL Server and the Microsoft OLE DB Provider for ODBC support the ISQLErrorInfo interface.

The provider-specific ISQLServerErrorInfo interface returns more detail about a SQL Server error. The ISQLServerErrorInfo interface exposes one member function, GetErrorInfo. The function returns a pointer to a SSERRORINFO structure and a pointer to a string buffer. The pointer to SSERRORINFO structure is NULL when SQL Server does not produce the error.

The SQL Server message parts map to members of the SSERRORINFO structure:

pwszMessage

Contains the SQL Server error description.

lNative

Contains the SQL Server error number.

bState

Contains the SQL Server error state.

bClass

Contains the severity of the SQL Server error condition.

wLineNumber

Contains the line number of the stored procedure on which the error occurred.

See Also

Information in OLE DB Error Interfaces


ODBC Error Message Format

ODBC drivers return messages to applications as diagnostic records. An application can call the SQLGetDiagRec and SQLGetDiagField functions to retrieve these diagnostic records. The Microsoft® SQL Server™ ODBC driver maps SQL Server message parts into these standard ODBC diagnostic record fields:

SQLSTATE

The ODBC specification defines a set of five-character codes called SQLSTATE codes that identify the conditions generating the message. These SQLSTATE codes are not related to any of the parts of a SQL Server message. The SQL Server ODBC driver generates the appropriate SQLSTATE code anytime it returns a message to an application.

pfNative

The SQL Server ODBC driver returns the SQL Server error number as the ODBC pfNative field. For example, if a statement raises a SQL Server error 170 (syntax error), the ODBC driver returns 170 in pfNative.

MessageText

The SQL Server ODBC driver returns the SQL Server error description as the MessageText field in an ODBC diagnostic record. The ODBC specification defines a series of headers for the MessageText field that indicates the component that issued the message:

  • [Microsoft][ODBC Driver Manager]

    These messages are issued by the ODBC Driver Manager.

  • [Microsoft][ODBC Cursor Library]

    These messages are issued by the ODBC client cursor library.

  • [Microsoft][ODBC SQL Server Driver]

    These messages are issued by the SQL Server ODBC driver. If there are no other nodes with the name of either a Net-Library or a SQL Server installation, the message was issued by the driver.

  • [Microsoft][ODBC SQL Server Driver][Net-Libraryname]

    These messages are issued by the SQL Server Net-Library, where Net-Libraryname is the display name of a SQL Server client Net-Library (for example, Named Pipes, Shared Memory, Multiprotocol, TCP/IP Sockets, NWLink IPX/SPX, or Banyan VINES).

  • [Microsoft][ODBC SQL Server Driver][SQL Server]

    These messages are issued by SQL Server. The remainder of the error message is the description from SQL Server, usually from master.dbo.sysmessages.

The ODBC specification allows ODBC drivers to define driver-specific fields in ODBC diagnostic records. The SQL Server ODBC driver maps SQL Server message parts into these SQL Server ODBC driver-specific diagnostic fields:

SQL_DIAG_SS_SEVERITY.

Contains the SQL Server severity level.

SQL_DIAG_SS_MSGSTATE.

Contains the SQL Server state. It is not related to the ODBC SQLSTATE code.

SQL_DIAG_SS_LINE.

Contains the number of the line containing the SQL statement generating the message.

SQL_DIAG_SS_PROCNAME.

Contains the name of the stored procedure generating the message, if appropriate.

SQL_DIAG_SS_SRVNAME.

Contains the name of the server from which the message came.

See Also

Handling Errors and Messages


Embedded SQL for C Error Message Format

The errors and messages are returned to the application in an SQLCA data structure. The Microsoft® SQL Server™ message parts map to fields in the SQLCA data structure:

sqlerrmc

Contains text of the error message.

sqlerrd[1]

Contains the SQL Server error number.

sqlerrd[2]

Contains the SQL Server severity level.

Sqlstate

Contains the SQLSTATE run-time error codes as defined in Embedded SQL for C. These SQLSTATE codes are not related to any of the parts of a SQL Server message.


DB-Library Error Message Format

DB-Library returns Microsoft® SQL Server™ errors and messages to call-back functions written by the application programmer.

The application programmer uses the dberrorhandle function to give DB-Library the address of the call-back function that handles the errors. When DB-Library determines that an error has occurred, it calls the call-back function identified by dberrorhandle. DB-Library passes the SQL Server error information into the parameters of the call-back function:

severity

Contains the severity of the error.

dberr

Contains the SQL Server error number.

dberrstr

Contains the description of the SQL Server error.

The application programmer uses the dbmsghandle function to give DB-Library the address of the call-back function that handles the messages. When DB-Library receives an informational message from SQL Server, it calls the call-back function identified by dbmsghandle.

DB-Library passes the SQL Server message information into the parameters of the call-back function:

msgno

Contains the error number identifying the message.

msgstate

Contains the SQL Server message state.

severity

Contains the severity of the error condition.

msgtext

Contains the description of the SQL Server message.

srvname

Contains the server name that generated the message.

procname

Contains the stored procedure name that generated the message.

line

Contains the line number in the stored procedure or the command batch that generated the message.

DB-Library calls the application error handler and message handler functions asynchronously as packets containing messages and errors are received from the server. This means DB-Library applications may receive errors and messages in a slightly different sequence from applications using either the Microsoft OLE DB Provider for SQL Server or the SQL Server ODBC Driver.


Messages Returned by SQL Server Utilities

All of the Microsoft® SQL Server™ 2000 utilities use ODBC except for the isql command prompt utility. This has effects on the way error messages are displayed by the ODBC-based utilities:

  • The error messages may have leading ODBC headers built into the description. These headers identify the component raising the error. The osql command prompt utility returns the ODBC headers. SQL Query Analyzer defaults to removing the ODBC headers, but users can set a connection option so that these are returned.

    For example, isql returns the error 208 description as:

Invalid object name 'ThisObjectDoesNotExist'.

osql includes the ODBC headers in the description:

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'ThisObjectDoesNotExist'.

The presence of the ODBC headers in the message does not necessarily indicate that the problem is in the ODBC components. The SQL Server ODBC driver includes these headers in messages from all components. For more information about how to determine the component raising the error, see ODBC Error Message Format.

  • Errors raised within the SQL Server ODBC driver have only a description. They have no error number, state, severity level, or line number. For example, if the following statement is executed in SQL Query Analyzer, the SQL Server ODBC driver itself raises a syntax error:
    { CLL sp_who }

    Because the driver generates the error, the only message part displayed by SQL Query Analyzer is the description:

[Microsoft][SQL Server ODBC Driver]Syntax error or access violation

See Also

isql Utility

osql Utility

sysmessages


Error Message Descriptions

The following topics contain error message information for Microsoft® SQL Server™ 2000 system error messages. In addition, details on other types of error messages are listed in this section, including:

  • DB-Library Error Messages

  • Distributed Queries Error Messages

  • Embedded SQL for C Error Messages

  • SQL Server Enterprise Manager Error Messages

  • ODBC Error Messages

  • XML Error Messages

See Also

Resolving System Error Messages

Error Message Formats


System Error Messages

Topics in this section contain the text of Microsoft® SQL Server™ 2000 system error messages, arranged in order by error number. The tables in the topics include the error message number, the severity level, and the description, which is the text of the error message from the master.sysmessages table.

Additional topics are available for some of the system error messages, with an explanation of the issue and suggested actions for resolving the error.

The master.sysmessages table contains one row for each system error or warning that can be returned by SQL Server. The following table shows the column names in the sysmessages table.

Column name | Data type | Description
error | int | Unique error number.
severity | smallint | Severity level of the error.
dlevel | smallint | Reserved. For internal use only.
description | nvarchar(255) | Text of the error message with placeholders for parameters and variables to be inserted each time the error message appears in a specific context.
mslangid | smallint | System message group ID.

These symbols may appear in the error message text along with the system error message descriptions. The symbols are placeholders that will be replaced by specific values when the error text is generated in a particular context.

Symbol | Meaning
%d, %ld, or %D | Decimal integer
%x | Hexadecimal number
%ls or %.*ls | Character string
%S_type | SQL Server -defined structure
%c | Single character
%lf | Double floating-point number


Errors 1 - 999

Error | Severity | Description (Message Text)
1 | 10 | Version date of last upgrade: 10/11/90.
21 | 10 | Warning: Fatal error %d occurred at %S_DATE. Note the error and time, and contact your system administrator.
102 | 15 | Incorrect syntax near '%.*ls'.
103 | 15 | The %S_MSG that starts with '%.*ls' is too long. Maximum length is %d.
104 | 15 | ORDER BY items must appear in the select list if the statement contains a UNION operator.
105 | 15 | Unclosed quotation mark before the character string '%.*ls'.
106 | 16 | Too many table names in the query. The maximum allowable is %d.
107 | 15 | The column prefix '%.*ls' does not match with a table name or alias name used in the query.
108 | 15 | The ORDER BY position number %ld is out of range of the number of items in the select list.
109 | 15 | There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
110 | 15 | There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
111 | 15 | '%ls' must be the first statement in a query batch.
112 | 15 | Variables are not allowed in the %ls statement.
113 | 15 | Missing end comment mark '*/'.
114 | 15 | Browse mode is invalid for a statement that assigns values to a variable.
116 | 15 | Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
117 | 15 | The %S_MSG name '%.*ls' contains more than the maximum number of prefixes. The maximum is %d.
118 | 15 | Only members of the sysadmin role can specify the %ls option for the %ls statement.
119 | 15 | Must pass parameter number %d and subsequent parameters as '@name = value'. After the form '@name = value' has been used, all subsequent parameters must be passed in the form '@name = value'.
120 | 15 | The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.
121 | 15 | The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.
122 | 15 | The %ls option is allowed only with %ls syntax.
123 | 15 | Batch/procedure exceeds maximum length of %d characters.
124 | 15 | CREATE PROCEDURE contains no statements.
125 | 15 | Case expressions may only be nested to level %d.
128 | 15 | The name '%.*ls' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
129 | 15 | Fillfactor %d is not a valid percentage; fillfactor must be between 1 and 100.
130 | 16 | Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
131 | 15 | The size (%d) given to the %S_MSG '%.*ls' exceeds the maximum allowed for any data type (%d).
132 | 15 | The label '%.*ls' has already been declared. Label names must be unique within a query batch or stored procedure.
133 | 15 | A GOTO statement references the label '%.*ls' but the label has not been declared.
134 | 15 | The variable name '%.*ls' has already been declared. Variable names must be unique within a query batch or stored procedure.
135 | 15 | Cannot use a BREAK statement outside the scope of a WHILE statement.
136 | 15 | Cannot use a CONTINUE statement outside the scope of a WHILE statement.
137 | 15 | Must declare the variable '%.*ls'.
138 | 15 | Correlation clause in a subquery not permitted.
139 | 15 | Cannot assign a default value to a local variable.
140 | 15 | Can only use IF UPDATE within a CREATE TRIGGER statement.
141 | 15 | A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
142 | 15 | Incorrect syntax for definition of the '%ls' constraint.
143 | 15 | A COMPUTE BY item was not found in the order by list. All expressions in the compute by list must also be present in the order by list.
144 | 15 | Cannot use an aggregate or a subquery in an expression used for the group by list of a GROUP BY clause.
145 | 15 | ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
146 | 15 | Could not allocate ancillary table for a subquery. Maximum number of tables in a query (%d) exceeded.
147 | 15 | An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.
148 | 15 | Incorrect time syntax in time string '%.*ls' used with WAITFOR.
149 | 15 | Time value '%.*ls' used with WAITFOR is not a valid value. Check date/time syntax.
150 | 15 | Both terms of an outer join must contain columns.
151 | 15 | '%.*ls' is an invalid money value.
153 | 15 | Invalid usage of the option %.*ls in the %ls statement.
154 | 15 | %S_MSG is not allowed in %S_MSG.
155 | 15 | '%.*ls' is not a recognized %ls option.
156 | 15 | Incorrect syntax near the keyword '%.*ls'.
157 | 15 | An aggregate may not appear in the set list of an UPDATE statement.
159 | 15 | For DROP INDEX, you must give both the table and the index name, in the form tablename.indexname.
160 | 15 | Rule does not contain a variable.
161 | 15 | Rule contains more than one variable.
163 | 15 | The compute by list does not match the order by list.
164 | 15 | GROUP BY expressions must refer to column names that appear in the select list.
165 | 16 | Privilege %ls may not be granted or revoked.
166 | 15 | '%ls' does not allow specifying the database name as a prefix to the object name.
167 | 16 | Cannot create a trigger on a temporary object.
168 | 15 | The %S_MSG '%.*ls' is out of the range of computer representation (%d bytes).
169 | 15 | A column has been specified more than once in the order by list. Columns in the order by list must be unique.
170 | 15 | Line %d: Incorrect syntax near '%.*ls'.
171 | 15 | Cannot use SELECT INTO in browse mode.
172 | 15 | Cannot use HOLDLOCK in browse mode.
173 | 15 | The definition for column '%.*ls' must include a data type.
174 | 15 | The %ls function requires %d arguments.
177 | 15 | The IDENTITY function can only be used when the SELECT statement has an INTO clause.
178 | 15 | A RETURN statement with a return value cannot be used in this context.
179 | 15 | Cannot use the OUTPUT option when passing a constant to a stored procedure.
180 | 15 | There are too many parameters in this %ls statement. The maximum number is %d.
181 | 15 | Cannot use the OUTPUT option in a DECLARE statement.
182 | 15 | Table and column names must be supplied for the READTEXT or WRITETEXT utility.
183 | 15 | The scale (%d) for column '%.*ls' must be within the range %d to %d.
185 | 15 | Data stream is invalid for WRITETEXT statement in bulk form.
186 | 15 | Data stream missing from WRITETEXT statement.
188 | 15 | Cannot specify a log device in a CREATE DATABASE statement without also specifying at least one non-log device.
189 | 15 | The %ls function requires %d to %d arguments.
191 | 15 | Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries.
192 | 16 | The scale must be less than or equal to the precision.
193 | 15 | The object or column name starting with '%.*ls' is too long. The maximum length is %d characters.
194 | 15 | A SELECT INTO statement cannot contain a SELECT statement that assigns values to a variable.
195 | 15 | '%.*ls' is not a recognized %S_MSG.
196 | 15 | SELECT INTO must be the first query in an SQL statement containing a UNION operator.
197 | 15 | EXECUTE cannot be used as a source when inserting into a table variable.
198 | 15 | Browse mode is invalid for statements containing a UNION operator.
199 | 15 | An INSERT statement cannot contain a SELECT statement that assigns values to a variable.
201 | 16 | Procedure '%.*ls' expects parameter '%.*ls', which was not supplied.
202 | 16 | Invalid type '%s' for WAITFOR. Supported data types are CHAR/VARCHAR, NCHAR/NVARCHAR, and DATETIME. WAITFOR DELAY supports the INT and SMALLINT data types.
203 | 16 | The name '%.*ls' is not a valid identifier.
204 | 20 | Normalization error in node %ls.
205 | 16 | All queries in an SQL statement containing a UNION operator must have an equal number of expressions in their target lists.
206 | 16 | Operand type clash: %ls is incompatible with %ls
207 | 16 | Invalid column name '%.*ls'.
208 | 16 | Invalid object name '%.*ls'.
209 | 16 | Ambiguous column name '%.*ls'.
210 | 16 | Syntax error converting datetime from binary/varbinary string.
212 | 16 | Expression result length exceeds the maximum. %d max, %d found.
213 | 16 | Insert Error: Column name or number of supplied values does not match table definition.
214 | 16 | Procedure expects parameter '%ls' of type '%ls'.
217 | 16 | Maximum stored procedure, function, trigger, or view nesting level exceeded (limit %d).
220 | 16 | Arithmetic overflow error for data type %ls, value = %ld.
221 | 10 | FIPS Warning: Implicit conversion from %ls to %ls.
223 | 11 | Object ID %ld specified as a default for table ID %ld, column ID %d is missing or not of type default.
224 | 11 | Object ID %ld specified as a rule for table ID %ld, column ID %d is missing or not of type default.
226 | 16 | %ls statement not allowed within multi-statement transaction.
229 | 14 | %ls permission denied on object '%.*ls', database '%.*ls', owner '%.*ls'.
230 | 14 | %ls permission denied on column '%.*ls' of object '%.*ls', database '%.*ls', owner '%.*ls'.
231 | 11 | No such default. ID = %ld, database ID = %d.
232 | 16 | Arithmetic overflow error for type %ls, value = %f.
233 | 16 | The column '%.*ls' in table '%.*ls' cannot be null.
234 | 16 | There is insufficient result space to convert a money value to %ls.
235 | 16 | Cannot convert a char value to money. The char value has incorrect syntax.
236 | 16 | The conversion from char data type to money resulted in a money overflow error.
237 | 16 | There is insufficient result space to convert a money value to %ls.
238 | 16 | There is insufficient result space to convert the %ls value (= %d) to the money data type.
241 | 16 | Syntax error converting datetime from character string.
242 | 16 | The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
243 | 16 | Type %.*ls is not a defined system type.
244 | 16 | The conversion of the %ls value '%.*ls' overflowed an %hs column. Use a larger integer column.
245 | 16 | Syntax error converting the %ls value '%.*ls' to a column of data type %ls.
248 | 16 | The conversion of the %ls value '%.*ls' overflowed an int column. Maximum integer value exceeded.
251 | 16 | Could not allocate ancillary table for query optimization. Maximum number of tables in a query (%d) exceeded.
256 | 16 | The data type %ls is invalid for the %ls function. Allowed types are: char/varchar, nchar/nvarchar, and binary/varbinary.
257 | 16 | Implicit conversion from data type %ls to %ls is not allowed. Use the CONVERT function to run this query.
259 | 16 | Ad hoc updates to system catalogs are not enabled. The system administrator must reconfigure SQL Server to allow this.
260 | 16 | Disallowed implicit conversion from data type %ls to data type %ls, table '%.*ls', column '%.*ls'. Use the CONVERT function to run this query.
261 | 16 | '%.*ls' is not a recognized function.
262 | 16 | %ls permission denied in database '%.*ls'.
263 | 16 | Must specify table to select from.
264 | 16 | Column name '%.*ls' appears more than once in the result column list.
266 | 16 | Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = %ld, current count = %ld.
267 | 16 | Object '%.*ls' cannot be found.
268 | 16 | Cannot run SELECT INTO in this database. The database owner must run sp_dboption to enable this option.
270 | 16 | Object '%.*ls' cannot be modified.
271 | 16 | Column '%.*ls' cannot be modified because it is a computed column.
272 | 16 | Cannot update a timestamp column.
273 | 16 | Cannot insert a non-null value into a timestamp column. Use INSERT with a column list or with a default of NULL for the timestamp column.
278 | 16 | The text, ntext, and image data types cannot be used in a GROUP BY clause.
279 | 16 | The text, ntext, and image data types are invalid in this subquery or aggregate expression.
280 | 16 | Only text, ntext, and image columns are valid with the TEXTPTR function.
281 | 16 | %d is not a valid style number when converting from %ls to a character string.
282 | 10 | The '%.*ls' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
283 | 16 | READTEXT cannot be used on inserted or deleted tables within an INSTEAD OF trigger.
284 | 16 | Rules cannot be bound to text, ntext, or image data types.
285 | 16 | The READTEXT, WRITETEXT, and UPDATETEXT statements cannot be used with views or functions.
286 | 16 | The logical tables INSERTED and DELETED cannot be updated.
287 | 16 | The %ls statement is not allowed within a trigger.
288 | 16 | The PATINDEX function operates on char, nchar, varchar, nvarchar, text, and ntext data types only.
291 | 16 | CAST or CONVERT: invalid attributes specified for type '%.*ls'
292 | 16 | There is insufficient result space to convert a smallmoney value to %ls.
293 | 16 | Cannot convert char value to smallmoney. The char value has incorrect syntax.
294 | 16 | The conversion from char data type to smallmoney data type resulted in a smallmoney overflow error.
295 | 16 | Syntax error converting character string to smalldatetime data type.
296 | 16 | The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
298 | 16 | The conversion from datetime data type to smalldatetime data type resulted in a smalldatetime overflow error.
299 | 16 | The DATEADD function was called with bad type %ls.
301 | 16 | Query contains an outer-join request that is not permitted.
303 | 16 | The table '%.*ls' is an inner member of an outer-join clause. This is not allowed if the table also participates in a regular join clause.
306 | 16 | The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
307 | 16 | Index ID %d on table '%.*ls' (specified in the FROM clause) does not exist.
308 | 16 | Index '%.*ls' on table '%.*ls' (specified in the FROM clause) does not exist.
311 | 16 | Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables.
312 | 16 | Cannot reference text, ntext, or image columns in a filter stored procedure.
313 | 16 | An insufficient number of arguments were supplied for the procedure or function %.*ls.
401 | 16 | Unimplemented statement or expression %ls.
403 | 16 | Invalid operator for data type. Operator equals %ls, type equals %ls.
409 | 16 | The %ls operation cannot take a %ls data type as an argument.
410 | 20 | COMPUTE clause #%d 'BY' expression #%d is not in the order by list.
411 | 20 | COMPUTE clause #%d, aggregate expression #%d is not in the select list.
420 | 16 | The text, ntext, and image data types cannot be used in an ORDER BY clause.
425 | 16 | Data type %ls of receiving variable is not equal to the data type %ls of column '%.*ls'.
426 | 16 | The length %d of the receiving variable is less than the length %d of the column '%.*ls'.
427 | 20 | Could not load sysprocedures entries for constraint ID %d in database ID %d.
428 | 20 | Could not find row in sysconstraints for constraint ID %d in database ID %d.
429 | 20 | Could not find new constraint ID %d in sysconstraints, database ID %d, at compile time.
430 | 20 | Could not resolve table name for object ID %d, database ID %d, when compiling foreign key.
431 | 19 | Could not bind foreign key constraint. Too many tables involved in the query.
433 | 20 | Could not find CHECK constraint for '%.*ls', although the table is flagged as having one.
436 | 20 | Could not open referenced table ID %d in database ID %d.
437 | 20 | Could not resolve the referenced column name in table ID %d.
438 | 20 | Could not resolve the referencing column name in table ID %d.
439 | 20 | Could not find FOREIGN KEY constraints for table '%.*ls' in database ID %d although the table is flagged as having them.
441 | 16 | Cannot use the '%ls' function on a remote data source.
443 | 16 | Invalid use of '%s' within a function.
444 | 16 | Select statements included within a function cannot return data to a client.
445 | 16 | COLLATE clause cannot be used on expressions containing a COLLATE clause.
446 | 16 | Cannot resolve collation conflict for %ls operation.
447 | 16 | Expression type %ls is invalid for COLLATE clause.
448 | 16 | Invalid collation '%.*ls'.
449 | 16 | Collation conflict caused by collate clauses with different collation '%.*ls' and '%.*ls'.
450 | 16 | Code page translations are not supported for the text data type. From: %d To: %d.
451 | 16 | Cannot resolve collation conflict for column %d in %ls statement.
452 | 16 | COLLATE clause cannot be used on user-defined data types.
453 | 16 | Collation '%.*ls' is supported on Unicode data types only and cannot be set at the database or server level.
455 | 16 | The last statement included within a function must be a return statement.
456 | 16 | Implicit conversion of %ls value to %ls cannot be performed because the resulting collation is unresolved due to collation conflict.
457 | 16 | Implicit conversion of %ls value to %ls cannot be performed because the collation of the value is unresolved due to a collation conflict.
502 | 16 | The SQL Debugging Interface (SDI) requires that SQL Server, when started as a service, must not log on as System Account. Reset to log on as user account using Control Panel.
503 | 16 | Unable to send symbol information to debugger on %ls for connection %d. Debugging disabled.
504 | 16 | Unable to connect to debugger on %ls (Error = 0x%08x). Ensure that client-side components, such as SQLDBREG.EXE, are installed and registered on %.*ls. Debugging disabled for connection %d.
505 | 16 | Current user account was invoked with SETUSER. Changing databases is not allowed.
506 | 16 | Invalid escape character '%.*ls' was specified in a LIKE predicate.
507 | 16 | Invalid argument for SET ROWCOUNT. Must be a non-null non-negative integer.
508 | 16 | Unable to connect to debugger on %ls (Error = 0x%08x). Ensure that client-side components, such as SQLLE.DLL, are installed and registered on %.*ls. Debugging disabled for connection %d.
509 | 11 | User name '%.*ls' not found.
510 | 16 | Cannot create a worktable row larger than allowable maximum. Resubmit your query with the ROBUST PLAN hint.
511 | 16 | Cannot create a row of size %d which is greater than the allowable maximum of %d.
512 | 16 | Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
513 | 16 | A column insert or update conflicts with a rule imposed by a previous CREATE RULE statement. The statement was terminated. The conflict occurred in database '%.*ls', table '%.*ls', column '%.*ls'.
514 | 16 | Unable to communicate with debugger on %ls (Error = 0x%08x). Debugging disabled for connection %d.
515 | 16 | Cannot insert the value NULL into column '%.*ls', table '%.*ls'; column does not allow nulls. %ls fails.
516 | 16 | Attempt to initialize OLE library failed. Check for correct versions of OLE DLLs on this machine.
517 | 16 | Adding a value to a '%ls' column caused overflow.
518 | 16 | Cannot convert data type %ls to %ls.
520 | 16 | SQL Server no longer supports version %d of the SQL Debugging Interface (SDI).
528 | 20 | System error detected during attempt to use the 'upsleep' system function.
529 | 16 | Explicit conversion from data type %ls to %ls is not allowed.
532 | 16 | The timestamp (changed to %S_TS) shows that the row has been updated by another user.
535 | 16 | Difference of two datetime columns caused overflow at runtime.
536 | 16 | Invalid length parameter passed to the substring function.
538 | 16 | Cannot find '%.*ls'. This language may have been dropped. Contact your system administrator.
542 | 16 | An invalid datetime value was encountered. Value exceeds the year 9999.
544 | 16 | Cannot insert explicit value for identity column in table '%.*ls' when IDENTITY_INSERT is set to OFF.
545 | 16 | Explicit value must be specified for identity column in table '%.*ls' when IDENTITY_INSERT is set to ON.
547 | 16 | %ls statement conflicted with %ls %ls constraint '%.*ls'. The conflict occurred in database '%.*ls', table '%.*ls'%ls%.*ls%ls.
548 | 16 | The identity range managed by replication is full and must be updated by a replication agent. The %ls conflict occurred in database '%.*ls', table '%.*ls'%ls%.*ls%ls. Sp_adjustpublisheridentityrange can be called to get a new identity range.
550 | 16 | The attempted insert or update failed because the target view either specifies WITH CHECK OPTION or spans a view that specifies WITH CHECK OPTION and one or more rows resulting from the operation did not qualify under the CHECK OPTION constraint.
551 | 16 | The checksum has changed to %d. This shows that the row has been updated by another user.
552 | 15 | CryptoAPI function "%ls" failed. Error 0x%x: %ls
555 | 16 | User-defined functions are not yet enabled.
556 | 16 | INSERT EXEC failed because the stored procedure altered the schema of the target table.
557 | 16 | Only functions and extended stored procedures can be executed from within a function.
558 | 16 | Remote function calls are not allowed within a function.
561 | 16 | Failed to access file '%.*ls'
562 | 16 | Failed to access file '%.*ls'. Files can be accessed only through shares
563 | 14 | The transaction for the INSERT EXEC statement has been rolled back. The INSERT EXEC operation will be terminated.
564 | 16 | Attempted to create a record with a fixed length of '%d'. Maximum allowable fixed length is '%d'.
565 | 18 | The server encountered a stack overflow during compile time.
566 | 21 | Error writing audit trace. SQL Server is shutting down.
567 | 16 | File '%.*ls' either does not exist or is not a recognizable trace file. Or there was an error opening the file.
568 | 16 | Server encountered an error '%.*ls'.
601 | 12 | Could not continue scan with NOLOCK due to data movement.
602 | 21 | Could not find row in sysindexes for database ID %d, object ID %ld, index ID %d. Run DBCC CHECKTABLE on sysindexes.
604 | 21 | Could not find row in sysobjects for object ID %ld in database '%.*ls'. Run DBCC CHECKTABLE on sysobjects.
605 | 21 | Attempt to fetch logical page %S_PGID in database '%.*ls' belongs to object '%.*ls', not to object '%.*ls'.
607 | 21 | Insufficient room was allocated for search arguments in the session descriptor for object '%.*ls'. Only %d search arguments were anticipated.
615 | 21 | Could not find database table ID %d, name '%.*ls'.
617 | 20 | Descriptor for object ID %ld in database ID %d not found in the hash table during attempt to unhash it.
618 | 21 | A varno of %d was passed to the opentable system function. The largest valid value is %d.
622 | 16 | Filegroup '%.*ls' has no files assigned to it. Tables, indexes, and text, ntext, and image columns cannot be populated on this filegroup until a file is added.
623 | 21 | Could not retrieve row from page by RID because logical page %S_PGID is not a data page. %S_RID. %S_PAGE.
624 | 21 | Could not retrieve row from page by RID because the requested RID has a higher number than the last RID on the page. %S_RID.%S_PAGE, DBID %d.
625 | 21 | Cannot retrieve row from page %S_PGID by RID because the slotid (%d) is not valid.
626 | 16 | Cannot use ROLLBACK with a savepoint within a distributed transaction.
627 | 16 | Cannot use SAVE TRANSACTION within a distributed transaction.
628 | 13 | Cannot issue SAVE TRANSACTION when there is no active transaction.
635 | 20 | Process %d tried to remove DES resource lock %S_DES, which it does not hold.
637 | 20 | Index shrink program returned invalid status of 0.
639 | 21 | Could not fetch logical page %S_PGID, database ID %d. The page is not currently allocated.
644 | 21 | Could not find the index entry for RID '%.*hs' in index page %S_PGID, index ID %d, database '%.*ls'.
649 | 21 | Could not find the clustered index entry for page %S_PGID, object ID %ld, status 0x%x. Index page %S_PGID, in database '%.*ls', was searched for this entry.
650 | 16 | You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels.
651 | 16 | Cannot use %hs granularity hint on table '%.*ls' because locking at the specified granularity is inhibited.
652 | 16 | Index ID %d for table '%.*ls' resides on a read-only filegroup which cannot be modified.
653 | 20 | Two buffers are conflicting for the same keep slot in table '%.*ls'.
654 | 20 | No slots are free to keep buffers for table '%.*ls'.
655 | 20 | Expected to find buffer in keep slot for table '%.*ls'.
666 | 16 | Maximum system-generated unique value for a duplicate group exceeded for table ID %d, index ID %d. Dropping and re-creating the index may fix the problem; otherwise use another clustering key.
667 | 16 | Index %d for table '%.*ls' resides on offline filegroup that cannot be accessed.
701 | 19 | There is insufficient system memory to run this query.
708 | 10 | Warning: Due to low virtual memory, special reserved memory used %d times since startup. Increase virtual memory on server.
802 | 17 | No more buffers can be stolen.
804 | 20 | Could not find buffer 0x%lx holding logical page %S_PGID in the SDES 0x%lx kept buffer pool for object '%.*ls'.
809 | 20 | Buffer 0x%lx, allocation page %S_PGID, in database '%.*ls' is not in allocation buffer pool in PSS (process status structure). Contact Technical Support.
813 | 20 | Logical page %S_PGID in database ID %d is already hashed.
816 | 20 | Process ID %d tried to remove a buffer resource lock %S_BUF that it does not hold in SDES %S_SDES. Contact Technical Support.
818 | 19 | There is no room to hold the buffer resource lock %S_BUF in SDES %S_SDES. Contact Technical Support.
821 | 20 | Could not unhash buffer at 0x%lx with a buffer page number of %S_PGID and database ID %d with HASHED status set. The buffer was not found. %S_PAGE.
822 | 21 | Could not start I/O for request %S_BLKIOPTR.
823 | 24 | I/O error %ls detected during %S_MSG at offset %#016I64x in file '%ls'.
834 | 21 | The bufclean system function was called on dirty buffer (page %S_PGID, stat %#x/%#x, objid %#x, sstat%#x).
840 | 17 | Device '%.*ls' (physical name '%.*ls', virtual device number %d) is not available. Contact the system administrator for assistance.
844 | 10 | Time out occurred while waiting for buffer latch type %d, bp %#x, page %S_PGID, stat %#x, object ID %d:%d:%d, waittime %d. Continuing to wait.
845 | 17 | Time-out occurred while waiting for buffer latch type %d for page %S_PGID, database ID %d.
901 | 21 | Could not find descriptor for database ID %d, object ID %ld in hash table after hashing it.
902 | 16 | To change the %ls, the database must be in state in which a checkpoint can be executed.
903 | 22 | Could not find row in sysindexes for clustered index on system catalog %ld in database ID %d. This index should exist in all databases. Run DBCC CHECKTABLE on sysindexes in the database.
906 | 22 | Could not locate row in sysobjects for system catalog '%.*ls' in database '%.*ls'. This system catalog should exist in all databases. Run DBCC CHECKTABLE on sysobjects in this database.
911 | 16 | Could not locate entry in sysdatabases for database '%.*ls'. No entry found with that name. Make sure that the name is entered correctly.
913 | 22 | Could not find database ID %d. Database may not be activated yet or may be in transition.
916 | 14 | Server user '%.*ls' is not a valid user in database '%.*ls'.
921 | 14 | Database '%.*ls' has not been recovered yet. Wait and try again.
922 | 14 | Database '%.*ls' is being recovered. Waiting until recovery is finished.
923 | 14 | Database '%.*ls' is in restricted mode. Only the database owner and members of the dbcreator and sysadmin roles can access it.
924 | 14 | Database '%.*ls' is already open and can only have one user at a time.
925 | 19 | Maximum number of databases used for each query has been exceeded. The maximum allowed is %d.
926 | 14 | Database '%.*ls' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.
927 | 14 | Database '%.*ls' cannot be opened. It is in the middle of a restore.
929 | 20 | Attempting to close a database that is not already open. Contact Technical Support.
941 | 14 | Cannot open database '%.*ls'. It has not been upgraded to the latest format.
942 | 14 | Database '%.*ls' cannot be opened because it is offline.
943 | 14 | Database '%.*ls' cannot be opened because its version (%d) is later than the current server version (%d).
944 | 10 | Converting database '%.*ls' from version %d to the current version %d.
945 | 16 | Database '%.*ls' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
946 | 14 | Cannot open database '%.*ls' version %d. Upgrade the database to the latest version.
947 | 16 | Error while closing database '%.*ls' cleanly.
948 | 14 | Database '%.*ls' cannot be upgraded. Database is version %d and this server supports version %d.
949 | 16 | tempdb is skipped. You cannot run a query that requires tempdb
950 | 14 | Database '%.*ls' cannot be upgraded - database has a version (%d) earlier than SQL Server 7.0(%d).
951 | 10 | Database '%.*ls' running the upgrade step from version %d to version %d.
952 | 16 | Database '%.*ls' is in transition. Try the statement later.
953 | 16 | Warning: Index '%ls' on '%ls' in database '%ls' may be corrupt because of expression evaluation changes in this release. Drop and re-create the index.


Errors 1000 - 1999

Error | Severity | Description (Message Text)
1001 | 16 | Line %d: Length or precision specification %d is invalid.
1002 | 16 | Line %d: Specified scale %d is invalid.
1003 | 15 | Line %d: %ls clause allowed only for %ls.
1004 | 16 | Invalid column prefix '%.*ls': No table name specified
1005 | 15 | Line %d: Invalid procedure number (%d). Must be between 1 and 32767.
1006 | 15 | CREATE TRIGGER contains no statements.
1007 | 15 | The %S_MSG '%.*ls' is out of the range for numeric representation (maximum precision 38).
1008 | 15 | The SELECT item identified by the ORDER BY number %d contains a variable as part of the expression identifying a column position. Variables are only allowed when ordering by an expression referencing a column name.
1010 | 15 | Invalid escape character '%.*ls'.
1011 | 15 | The correlation name '%.*ls' is specified multiple times in a FROM clause.
1012 | 15 | The correlation name '%.*ls' has the same exposed name as table '%.*ls'.
1013 | 15 | Tables or functions '%.*ls' and '%.*ls' have the same exposed names. Use correlation names to distinguish them.
1014 | 15 | TOP clause contains an invalid value.
1015 | 15 | An aggregate cannot appear in an ON clause unless it is in a subquery contained in a HAVING clause or select list, and the column being aggregated is an outer reference.
1016 | 15 | Outer join operators cannot be specified in a query containing joined tables.
1019 | 15 | Invalid column list after object name in GRANT/REVOKE statement.
1020 | 15 | Column list cannot be specified for object-level permissions.
1021 | 10 | FIPS Warning: Line %d has the non-ANSI statement '%ls'.
1022 | 10 | FIPS Warning: Line %d has the non-ANSI clause '%ls'.
1023 | 15 | Invalid parameter %d specified for %ls.
1024 | 10 | FIPS Warning: Line %d has the non-ANSI function '%ls'.
1025 | 10 | FIPS Warning: The length of identifier '%.*ls' exceeds 18.
1027 | 15 | Too many expressions are specified in the GROUP BY clause. The maximum number is %d when either CUBE or ROLLUP is specified.
1028 | 15 | The CUBE and ROLLUP options are not allowed in a GROUP BY ALL clause.
1029 | 15 | Browse mode is invalid for subqueries and derived tables.
1031 | 15 | Percent values must be between 0 and 100.
1032 | 16 | Cannot use the column prefix '%.*ls'. This must match the object in the UPDATE clause '%.*ls'.
1033 | 16 | The ORDER BY clause is invalid in views, inline functions, derived tables, and subqueries, unless TOP is also specified.
1035 | 15 | Incorrect syntax near '%.*ls', expected '%.*ls'.
1036 | 15 | File option %hs is required in this CREATE/ALTER DATABASE statement.
1037 | 15 | The CASCADE, WITH GRANT or AS options cannot be specified with statement permissions.
1038 | 15 | Cannot use empty object or column names. Use a single space if necessary.
1039 | 16 | Option '%.*ls' is specified more than once.
1040 | 15 | Mixing old and new syntax in CREATE/ALTER DATABASE statement is not allowed.
1041 | 15 | Option %.*ls is not allowed for a LOG file.
1042 | 15 | Conflicting %ls optimizer hints specified.
1043 | 15 | '%hs' is not yet implemented.
1044 | 15 | Cannot use an existing function name to specify a stored procedure name.
1045 | 15 | Aggregates are not allowed in this context. Only scalar expressions are allowed.
1046 | 15 | Subqueries are not allowed in this context. Only scalar expressions are allowed.
1047 | 15 | Conflicting locking hints specified.
1048 | 15 | Conflicting cursor options %ls and %ls.
1049 | 15 | Mixing old and new syntax to specify cursor options is not allowed.
1050 | 15 | This syntax is only allowed within the stored procedure sp_executesql.
1051 | 15 | Cursor parameters in a stored procedure must be declared with OUTPUT and VARYING options, and they must be specified in the order CURSOR VARYING OUTPUT.
1052 | 15 | Conflicting %ls options %ls and %ls.
1053 | 15 | For DROP STATISTICS, you must give both the table and the column name in the form 'tablename.column'.
1054 | 15 | Syntax '%ls' is not allowed in schema-bound objects.
1055 | 15 | '%.*ls' is an invalid name because it contains a NULL character.
1056 | 15 | The maximum number of elements in the select list is %d and you have supplied %d.
1057 | 15 | The IDENTITY function cannot be used with a SELECT INTO statement containing a UNION operator.
1058 | 15 | Cannot specify both READ_ONLY and FOR READ ONLY on a cursor declaration.
1059 | 15 | Cannot set or reset the %ls option within a procedure.
1060 | 15 | The number of rows in the TOP clause must be an integer.
1061 | 16 | The text/ntext/image constants are not yet implemented.
1062 | 16 | The TOP N WITH TIES clause is not allowed without a corresponding ORDER BY clause.
1063 | 16 | A filegroup cannot be added using ALTER DATABASE ADD FILE. Use ALTER DATABASE ADD FILEGROUP.
1064 | 16 | A filegroup cannot be used with log files.
1065 | 15 | The NOLOCK, READUNCOMMITTED, and READPAST lock hints are only allowed in a SELECT statement.
1066 | 10 | Warning. Line %d: The option '%ls' is obsolete and has no effect.
1067 | 15 | The SET SHOWPLAN statements must be the only statements in the batch.
1068 | 16 | Only one list of index hints per table is allowed.
1069 | 16 | Index hints are only allowed in a FROM clause.
1070 | 15 | CREATE INDEX option '%.*ls' is no longer supported.
1071 | 16 | Cannot specify a JOIN algorithm with a remote JOIN.
1072 | 16 | A REMOTE hint can only be specified with an INNER JOIN clause.
1073 | 15 | '%.*ls' is not a recognized cursor option for cursor %.*ls.
1074 | 15 | Creation of temporary functions is not allowed.
1075 | 15 | RETURN statements in scalar valued functions must include an argument.
1076 | 15 | Function '%s' requires at least %d argument(s).
1077 | 15 | INSERT into an identity column not allowed on table variables.
1078 | 15 | '%.*ls %.*ls' is not a recognized option.
1079 | 15 | A variable cannot be used to specify a search condition in a fulltext predicate when accessed through a cursor.
1101 | 17 | Could not allocate new page for database '%.*ls'. There are no more pages available in filegroup %.*ls. Space can be created by dropping objects, adding additional files, or allowing file growth.
1102 | 22 | IAM page %S_PGID for object ID %ld is incorrect. The %S_MSG ID on page is %ld; should be %ld. The entry in sysindexes may be incorrect or the IAM page may contain an error.
1103 | 21 | Allocation page %S_PGID in database '%.*ls' has different segment ID than that of the object which is being allocated to. Run DBCC CHECKALLOC.
1105 | 17 | Could not allocate space for object '%.*ls' in database '%.*ls' because the '%.*ls' filegroup is full.
1109 | 21 | Could not read allocation page %S_PGID because either the object ID (%ld) is not correct, or the page ID (%S_PGID) is not correct.
1201 | 20 | The page_lock system function was called with a mode %d that is not permitted.
1203 | 20 | Process ID %d attempting to unlock unowned resource %.*ls.
1204 | 19 | The SQL Server cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users or ask the system administrator to check the SQL Server lock and memory configuration.
1205 | 13 | Transaction (Process ID %d) was deadlocked on {%Z} resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
1206 | 18 | Transaction manager has canceled the distributed transaction.
1211 | 13 | Process ID %d was chosen as the deadlock victim with P_BACKOUT bit set.
1220 | 17 | No more lock classes available from transaction.
1221 | 20 | Invalid lock class for release call.
1222 | 13 | Lock request time out period exceeded.
1223 | 16 | Attempting to release application lock '%.*ls' that is not currently held.
1501 | 20 | Sort failure.
1505 | 14 | CREATE UNIQUE INDEX terminated because a duplicate key was found for index ID %d. Most significant primary key is '%S_KEY'.
1507 | 10 | Warning: Deleted duplicate row. Primary key is '%S_KEY'.
1508 | 14 | CREATE INDEX terminated because a duplicate row was found. Primary key is '%S_KEY'.
1509 | 20 | Row compare failure.
1510 | 17 | Sort failed. Out of space or locks in database '%.*ls'.
1511 | 20 | Sort cannot be reconciled with transaction log.
1522 | 20 | Sort failure. Prevented overwriting of allocation page in database '%.*ls' by terminating sort.
1523 | 20 | Sort failure. Prevented incorrect extent deallocation by aborting sort.
1528 | 21 | Character data comparison failure. An unrecognized Sort-Map-Element type (%d) was found in the server-wide default sort table at SMEL entry [%d].
1529 | 21 | Character data comparison failure. A list of Sort-Map-Elements from the server-wide default sort table does not end properly. This list begins at SMEL entry [%d].
1530 | 16 | CREATE INDEX with DROP_EXISTING was aborted because a row was out of order. Most significant offending primary key is '%S_KEY'. Explicitly drop and create the index instead.
1531 | 16 | The SORTED_DATA_REORG option cannot be used for a nonclustered index if the keys are not unique within the table. CREATE INDEX was aborted because of duplicate keys. Primary key is '%S_KEY'.
1532 | 20 | New sort run starting on page %S_PGID found extent not marked as shared.
1533 | 20 | Cannot share extent %S_PGID among more than eight sort runs.
1534 | 20 | Extent %S_PGID not found in shared extent directory.
1535 | 20 | Cannot share extent %S_PGID with shared extent directory full.
1536 | 20 | Cannot build a nonclustered index on a memory-only work table.
1537 | 20 | Cannot suspend a sort not in row input phase.
1538 | 20 | Cannot insert into a sort not in row input phase.
1540 | 16 | Cannot sort a row of size %d, which is greater than the allowable maximum of %d.
1619 | 21 | Could not open tempdb. Cannot continue.
1620 | 21 | Cannot start C2 audit trace. SQL Server is shutting down.
1621 | 10 | Server started with '-f'. Auditing will not be started.
1701 | 16 | Creation of table '%.*ls' failed because the row size would be %d, including internal overhead. This exceeds the maximum allowable table row size, %d.
Error 1702 | 16 | CREATE TABLE failed because column '%.*ls' in table '%.*ls' exceeds the maximum of %d columns.
1703 | 17 | Could not allocate disk space for a work table in database '%.*ls'. You may be able to free up space by using BACKUP LOG, or you may want to extend the size of the database by using ALTER DATABASE.
1704 | 16 | Only members of the sysadmin role can create the system table '%.*ls'.
1705 | 16 | You must create system table '%.*ls' in the master database.
1706 | 16 | System table '%.*ls' was not created, because ad hoc updates to system catalogs are not enabled.
1708 | 10 | Warning: The table '%.*ls' has been created but its maximum row size (%d) exceeds the maximum number of bytes per row (%d). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds %d bytes.
1709 | 16 | Cannot use TEXTIMAGE_ON when a table has no text, ntext, or image columns.
1750 | 10 | Could not create constraint. See previous errors.
1752 | 16 | Could not create DEFAULT for column '%.*ls' as it is not a valid column in the table '%.*ls'.
1753 | 16 | Column '%.*ls.%.*ls' is not the same length as referencing column '%.*ls.%.*ls' in foreign key '%.*ls'.
1754 | 16 | Defaults cannot be created on columns with an IDENTITY attribute. Table '%.*ls', column '%.*ls'.
1755 | 16 | Defaults cannot be created on columns of data type timestamp. Table '%.*ls', column '%.*ls'.
1756 | 10 | Skipping FOREIGN KEY constraint '%.*ls' definition for temporary table.
1757 | 16 | Column '%.*ls.%.*ls' is not of same collation as referencing column '%.*ls.%.*ls' in foreign key '%.*ls'.
1759 | 16 | Invalid column '%.*ls' is specified in a constraint or computed-column definition.
1760 | 16 | Constraints of type %ls cannot be created on columns of type %ls.
1763 | 16 | Cross-database foreign key references are not supported. Foreign key '%.*ls'.
1766 | 16 | Foreign key references to temporary tables are not supported. Foreign key '%.*ls'.
1767 | 16 | Foreign key '%.*ls' references invalid table '%.*ls'.
1768 | 16 | Foreign key '%.*ls' references object '%.*ls' which is not a user table.
1769 | 16 | Foreign key '%.*ls' references invalid column '%.*ls' in referencing table '%.*ls'.
1770 | 16 | Foreign key '%.*ls' references invalid column '%.*ls' in referenced table '%.*ls'.
1772 | 16 | Foreign key '%.*ls' defines an invalid relationship between a user table and system table.
1773 | 16 | Foreign key '%.*ls' has implicit reference to object '%.*ls' which does not have a primary key defined on it.
1774 | 16 | The number of columns in the referencing column list for foreign key '%.*ls' does not match those of the primary key in the referenced table '%.*ls'.
1776 | 16 | There are no primary or candidate keys in the referenced table '%.*ls' that match the referencing column list in the foreign key '%.*ls'.
1777 | 14 | User does not have correct permissions on referenced table '%.*ls' to create foreign key '%.*ls'.
1778 | 16 | Column '%.*ls.%.*ls' is not the same data type as referencing column '%.*ls.%.*ls' in foreign key '%.*ls'.
1779 | 16 | Table '%.*ls' already has a primary key defined on it.
1780 | 20 | Could not find column ID %d in syscolumns for object ID %d in database ID %d.
1781 | 16 | Column already has a DEFAULT bound to it.
1784 | 16 | Cannot create the foreign key '%.*ls' because the referenced column '%.*ls.%.*ls' is a computed column.
1785 | 16 | Introducing FOREIGN KEY constraint '%.*ls' on table '%.*ls' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
1786 | 16 | Either column '%.*ls.%.*ls' or referencing column '%.*ls.%.*ls' in foreign key '%.*ls' is a timestamp column. This data type cannot be used with cascading referential integrity constraints.
1787 | 16 | Cannot define foreign key constraint '%.*ls' with cascaded DELETE or UPDATE on table '%.*ls' because the table has an INSTEAD OF DELETE or UPDATE TRIGGER defined on it.
1788 | 16 | Cascading foreign key '%.*ls' cannot be created where the referencing column '%.*ls.%.*ls' is an identity column.
1801 | 16 | Database '%.*ls' already exists.
1802 | 11 | CREATE DATABASE failed. Some file names listed could not be created. Check previous errors.
1803 | 17 | CREATE DATABASE failed. Could not allocate enough disk space for a new database on the named disks. Total space allocated must be at least %d MB to accommodate a copy of the model database.
1804 | 10 | There is no disk named '%.*ls'. Checking other disk names.
1805 | 10 | The CREATE DATABASE process is allocating %.2f MB on disk '%.*ls'.
1806 | 16 | CREATE DATABASE failed. The default collation of database '%.*ls' cannot be set to '%.*ls'.
1807 | 17 | Could not obtain exclusive lock on database '%.*ls'. Retry the operation later.
1808 | 21 | Default devices are not supported.
1809 | 10 | To achieve optimal performance, update all statistics on the '%.*ls' database by running sp_updatestats.
1811 | 16 | '%.*ls' is the wrong type of device for CREATE DATABASE or ALTER DATABASE. Check sysdevices. The statement is aborted.
1812 | 16 | CREATE DATABASE failed. COLLATE clause cannot be used with the FOR ATTACH option.
1813 | 16 | Could not open new database '%.*ls'. CREATE DATABASE is aborted.
1814 | 10 | Could not create tempdb. If space is low, extend the amount of space and restart.
1901 | 16 | Column '%.*ls'. Cannot create index on a column of bit data type.
1902 | 16 | Cannot create more than one clustered index on table '%.*ls'. Drop the existing clustered index '%.*ls' before creating another.
1903 | 16 | Index keys are too large. The %d bytes needed to represent the keys for index %d exceeds the size limit of %d bytes.
1904 | 16 | Cannot specify more than %d column names for statistics or index key list. %d specified.
1905 | 21 | Could not find 'zero' row for index '%.*ls' the table in sysindexes.
1906 | 11 | Cannot create an index on '%.*ls', because this table does not exist in database '%.*ls'.
1907 | 16 | Cannot re-create index '%.*ls'. The new index definition does not match the constraint being enforced by the existing index.
1909 | 16 | Cannot use duplicate column names in index key list. Column name '%.*ls' listed more than once.
1910 | 16 | Cannot create more than %d nonclustered indices or column statistics on one table.
1911 | 16 | Column name '%.*ls' does not exist in the target table.
1913 | 16 | There is already an index on table '%.*ls' named '%.*ls'.
1914 | 16 | Index cannot be created on object '%.*ls' because the object is not a user table or view.
1916 | 16 | CREATE INDEX options %ls and %ls are mutually exclusive.
1918 | 10 | Index (ID = %d) is being rebuilt.
1919 | 16 | Column '%.*ls'. Cannot create index on a column of text, ntext, or image data type.
1920 | 10 | Skipping rebuild of index ID %d, which is on a read-only filegroup.
1921 | 16 | Invalid filegroup '%.*ls' specified.
1922 | 16 | Filegroup '%.*ls' has no files assigned to it. Tables, indexes, and text, ntext, and image columns cannot be created on this filegroup.
1923 | 10 | The clustered index has been dropped.
1938 | 16 | Index cannot be created on %S_MSG '%.*ls' because the underlying object '%.*ls' has a different owner.
1939 | 16 | Index %S_MSG cannot be created on view '%.*ls' because the view is not schema bound.
1940 | 16 | Cannot create %S_MSG on view '%.*ls'. It does not have a unique clustered index.
1941 | 16 | Nonunique clustered index cannot be created on view '%.*ls' because only unique clustered indexes are allowed.
1942 | 16 | Index cannot be created on view '%.*ls' because the view contains text, ntext or image columns.
1943 | 16 | Index cannot be created on view '%.*ls' because the view has one or more nondeterministic expressions.
1944 | 16 | Index '%.*ls' was not created. This index has a key length of at least %d bytes. The maximum permissible key length is %d bytes.
1945 | 16 | Warning! The maximum key length is %d bytes. The index '%.*ls' has maximum length of %d bytes. For some combination of large values, the insert/update operation will fail.
1946 | 16 | Operation failed. The index entry of length %d bytes for the index '%.*ls' exceeds the maximum length of %d bytes.
1947 | 16 | Index cannot be created on view '%.*ls' because the view contains a self-join on '%.*ls'.
1948 | 16 | Duplicate index names '%.*ls' and '%.*ls' detected on table '%.*ls'.
1949 | 16 | Index on view '%.*ls' cannot be created because function '%s' yields nondeterministic results.
1950 | 16 | Index on view '%.*ls' cannot be created because the view contains an imprecise expression in a GROUP BY clause
1951 | 16 | Index on view '%.*ls' cannot be created because the view contains an imprecise expression in the WHERE clause.
1952 | 16 | Index on view '%.*ls' cannot be created because the view contains an imprecise expression in a join.
1953 | 16 | Index on view '%.*ls' cannot be created because some arguments are missing in a built-in function.
1954 | 16 | Index on view '%.*ls' cannot be created because the view uses a column bound to a rule.
1955 | 16 | Index on view '%.*ls' cannot be created because the view contains a nondeterministic computed column.
1956 | 16 | Index on view '%.*ls' cannot be created because the view uses a nondeterministic user-defined function.
1957 | 16 | Index on view '%.*ls' cannot be created because the view requires a conversion involving dates or variants.
1958 | 16 | This edition of SQL Server does not support indexed views.
1959 | 16 | Cannot create index on view or computed column because this database is not SQL Server compatible.


Errors 2000 - 2999

Error | Severity | Description (Message Text)
2001 | 10 | Cannot use duplicate parameter names. Parameter name '%.*ls' listed more than once.
2004 | 16 | Procedure '%.*ls' has already been created with group number %d. Create procedure with an unused group number.
2007 | 11 | Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object '%.*ls'. The stored procedure will still be created.
2008 | 16 | The object '%.*ls' is not a procedure so you cannot create another procedure under that group name.
2009 | 10 | Procedure '%.*ls' was created despite delayed name resolution warnings (if any).
2010 | 16 | Cannot perform alter on %.*ls because it is an incompatible object type.
2011 | 16 | Index hints cannot be specified within a schema-bound object.
2012 | 16 | User-defined variables cannot be declared within a schema-bound object.
2106 | 11 | Cannot create a trigger on table '%.*ls', because this table does not exist in database '%.*ls'.
2108 | 16 | Cannot create a trigger on table '%.*ls' because you can only create a trigger on a table in the current database.
2110 | 16 | Cannot alter trigger '%.*ls' for table '%.*ls' because this trigger does not belong to this table.
2111 | 16 | Cannot %s trigger '%.*ls' for %S_MSG '%.*ls' because an INSTEAD OF %s trigger already exists.
2112 | 16 | Cannot %s trigger '%.*ls' for view '%.*ls' because it is defined with the CHECK OPTION.
2113 | 16 | Cannot %s INSTEAD OF DELETE or UPDATE TRIGGER '%.*ls' on table '%.*ls' because the table has a FOREIGN KEY with cascaded DELETE or UPDATE.
2114 | 16 | Column '%.*ls' cannot be used in an IF UPDATE clause because it is a computed column.
2501 | 16 | Could not find a table or object named '%.*ls'. Check sysobjects.
2502 | 16 | Could not start transaction.
2503 | 10 | Successfully deleted the physical file '%ls'.
2504 | 16 | Could not delete the physical file '%ls'. The DeleteFile system function returned error %ls.
2505 | 16 | The device '%.*ls' does not exist. Use sp_helpdevice to show available devices.
2506 | 16 | Could not find a table or object name '%.*ls' in database '%.*ls'.
2511 | 16 | Table error: Object ID %d, Index ID %d. Keys out of order on page %S_PGID, slots %d and %d.
2512 | 16 | Table error: Object ID %d, Index ID %d. Duplicate keys on page %S_PGID slot %d and page %S_PGID slot %d.
2513 | 16 | Table error: Object ID %ld (object '%.*ls') does not match between '%.*ls' and '%.*ls'.
2514 | 16 | Table error: Data type %ld (type '%.*ls') does not match between '%.*ls' and '%.*ls'.
2515 | 16 | Page %S_PGID, object ID %d, index ID %d has been modified but is not marked modified in the differential backup bitmap.
2516 | 16 | The differential bitmap was invalidated for database %.*ls. A full database backup is required before a differential backup can be performed.
2517 | 16 | The minimally logged operation status has been turned on for database %.*ls. Rerun backup log operations to ensure that all data has been secured.
2519 | 16 | Unable to process table %.*ls because filegroup %.*ls is invalid.
2520 | 16 | Could not find database '%.*ls'. Check sysdatabases.
2521 | 16 | Could not find database ID %d. Check sysdatabases.
2522 | 16 | Unable to process index %.*ls of table %.*ls because filegroup %.*ls is invalid.
2523 | 16 | Filegroup %.*ls is invalid.
2524 | 16 | Unable to process table %.*ls because filegroup %.*ls is offline.
2525 | 16 | Database file %.*ls is offline.
2526 | 16 | Incorrect DBCC statement. Check the documentation for the correct DBCC syntax and options.
2527 | 16 | Unable to process index %.*ls of table %.*ls because filegroup %.*ls is offline.
2528 | 10 | DBCC execution completed. If DBCC printed error messages, contact your system administrator.
2529 | 16 | Filegroup %.*ls is offline.
2530 | 16 | Secondary index entries were missing or did not match the data in the table. Use the WITH TABLOCK option and run the command again to display the failing records.
2531 | 16 | Table error: Object ID %d, index ID %d B-tree level mismatch, page %S_PGID. Level %d does not match level %d from previous %S_PGID.
2532 | 16 | DBCC SHRINKFILE could not shrink file %ls. Log files are not supported.
2533 | 16 | Table error: Page %S_PGID allocated to object ID %d, index ID %d was not seen. Page may be invalid or have incorrect object ID information in its header.
2534 | 16 | Table error: Page %S_PGID with object ID %d, index ID %d in its header is allocated by another object.
Error 2535 | 16 | Table error: Page %S_PGID is allocated to object ID %d, index ID %d, not to object ID %d, index ID %d found in page header.
2536 | 10 | DBCC results for '%.*ls'.
2537 | 16 | Table error: Object ID %d, index ID %d, page %S_PGID, row %d. Record check (%hs) failed. Values are %ld and %ld.
2538 | 10 | File %d. Number of extents = %ld, used pages = %ld, reserved pages = %ld.
2539 | 10 | Total number of extents = %ld, used pages = %ld, reserved pages = %ld in this database.
2540 | 10 | The system cannot self repair this error.
2541 | 10 | DBCC UPDATEUSAGE: sysindexes row updated for table '%.*ls' (index ID %ld):
2542 | 10 | DATA pages: Changed from (%ld) to (%ld) pages.
2543 | 10 | USED pages: Changed from (%ld) to (%ld) pages.
2544 | 10 | RSVD pages: Changed from (%ld) to (%ld) pages.
2545 | 10 | ROWS count: Changed from (%I64d) to (%I64d) rows.
2546 | 10 | Index '%.*ls' on table '%.*ls' is marked offline. Rebuild the index to bring it online.
2547 | 10 | Performing second pass of index checks.
2548 | 10 | DBCC: Compaction phase of index '%.*ls' is %d%% complete.
2549 | 10 | DBCC: Defrag phase of index '%.*ls' is %d%% complete.
2557 | 14 | User '%.*ls' does not have permission to run DBCC %ls for object '%.*ls'.
2559 | 16 | The '%ls' and '%ls' options are not allowed on the same statement.
2560 | 16 | Parameter %d is incorrect for this DBCC statement.
2562 | 16 | '%ls' cannot access object '%.*ls' because it is not a table.
2566 | 14 | DBCC DBREINDEX cannot be used on system tables.
2567 | 14 | DBCC INDEXDEFRAG cannot be used on system table indexes
2568 | 16 | Page %S_PGID is out of range for this database or is in a log file.
2570 | 16 | Warning: Page %S_PGID, slot %d in Object %d Index %d Column %.*ls value %.*ls is out of range for data type "%.*ls". Update column to a legal value.
2571 | 14 | User '%.*ls' does not have permission to run DBCC %.*ls.
2572 | 16 | DBCC cannot free DLL '%.*ls'. The DLL is in use.
2573 | 16 | Database '%.*ls' is not marked suspect. You cannot drop it with DBCC.
2574 | 10 | Object ID %d, index ID %d: Page %S_PGID is empty. This is not permitted at level %d of the B-tree.
2575 | 16 | IAM page %S_PGID is pointed to by the next pointer of IAM page %S_PGID object ID %d index ID %d but was not detected in the scan.
2576 | 16 | IAM page %S_PGID is pointed to by the previous pointer of IAM page %S_PGID object ID %d index ID %d but was not detected in the scan.
2577 | 16 | Chain sequence numbers are out of order in IAM chain for object ID %d, index ID %d. Page %S_PGID sequence number %d points to page %S_PGID sequence number %d.
2578 | 16 | Minimally logged extents were found in GAM interval starting at page %S_PGID but the minimally logged flag is not set in the database table.
2579 | 16 | Table error: Extent %S_PGID object ID %d, index ID %d is beyond the range of this database.
2580 | 16 | Table '%.*ls' is either a system or temporary table. DBCC CLEANTABLE cannot be applied to a system or temporary table.
2583 | 16 | An incorrect number of parameters was given to the DBCC statement.
2588 | 16 | Page %S_PGID was expected to be the first page of a text, ntext, or image value.
2590 | 10 | User '%.*ls' is modifying bytes %d to %d of page %S_PGID in database '%.*ls'.
2591 | 16 | Could not find row in sysindexes with index ID %d for table '%.*ls'.
2592 | 10 | %ls index successfully restored for object '%.*ls' in database '%.*ls'.
2593 | 10 | There are %I64d rows in %ld pages for object '%.*ls'.
2594 | 16 | Invalid index ID (%d) specified.
2595 | 16 | Database '%.*ls' must be set to single user mode before executing this statement.
2597 | 16 | The database is not open. Execute a 'USE %.*ls' statement and rerun the DBCC statement.
2598 | 16 | Clustered indexes on sysobjects and sysindexes cannot be re-created.
2601 | 14 | Cannot insert duplicate key row in object '%.*ls' with unique index '%.*ls'.
2603 | 21 | No space left on logical page %S_PGID of index ID %d for object '%.*ls' when inserting row on an index page. This situation should have been handled while traversing the index.
2617 | 20 | Buffer holding logical page %S_PGID not found in keep pool in SDES for object '%.*ls'. Contact Technical Support.
2624 | 21 | Could not insert into table %S_DES because row length %d is less than the minimum length %d.
2627 | 14 | Violation of %ls constraint '%.*ls'. Cannot insert duplicate key in object '%.*ls'.
2701 | 10 | Database name '%.*ls' ignored, referencing object in tempdb.
2702 | 16 | Database '%.*ls' does not exist.
2705 | 16 | Column names in each table must be unique. Column name '%.*ls' in table '%.*ls' is specified more than once.
2706 | 11 | Table '%.*ls' does not exist.
2710 | 16 | You are not the owner specified for the object '%.*ls' in this statement (CREATE, ALTER, TRUNCATE, UPDATE STATISTICS or BULK INSERT).
2714 | 16 | There is already an object named '%.*ls' in the database.
2715 | 16 | Column or parameter #%d: Cannot find data type %.*ls.
2716 | 16 | Column or parameter #%d: Cannot specify a column width on data type %.*ls.
2717 | 15 | The size (%d) given to the %S_MSG '%.*ls' exceeds the maximum allowed (%d).
2718 | 16 | Column or parameter #%d: Cannot specify null values on a column of data type bit.
2721 | 11 | Could not find a default segment to create the table on. Ask your system administrator to specify a default segment in syssegments.
2724 | 10 | Parameter '%.*ls' has an invalid data type.
2727 | 11 | Cannot find index '%.*ls'.
2730 | 11 | Cannot create procedure '%.*ls' with a group number of %d because a procedure with the same name and a group number of 1 does not currently exist in the database. Must execute CREATE PROCEDURE '%.*ls';1 first.
Error 2731 | 16 | Column '%.*ls' has invalid width: %d.
2732 | 16 | Error number %ld is invalid. The number must be from %ld through %ld
2734 | 16 | The user name '%.*ls' does not exist in sysusers.
2736 | 16 | Owner name specified is a group name. Objects cannot be owned by groups.
2737 | 16 | Message passed to %hs must be of type char, varchar, nchar, or nvarchar.
2738 | 16 | A table can only have one timestamp column. Because table '%.*ls' already has one, the column '%.*ls' cannot be added.
2739 | 16 | The text, ntext, and image data types are invalid for local variables.
2740 | 16 | SET LANGUAGE failed because '%.*ls' is not an official language name or a language alias on this SQL Server.
2741 | 16 | SET DATEFORMAT date order '%.*ls' is invalid.
2742 | 16 | SET DATEFIRST %d is out of range.
2743 | 16 | %ls statement requires %S_MSG parameter.
2744 | 16 | Multiple identity columns specified for table '%.*ls'. Only one identity column per table is allowed.
2745 | 10 | Process ID %d has raised user error %d, severity %d. SQL Server is terminating this process.
2746 | 16 | Cannot specify user error format string with a length exceeding %d bytes.
2747 | 16 | Too many substitution parameters for RAISERROR. Cannot exceed %d substitution parameters.
2748 | 16 | Cannot specify %ls data type (RAISERROR parameter %d) as a substitution parameter for RAISERRROR.
2749 | 16 | Identity column '%.*ls' must be of data type int, bigint, smallint, tinyint, or decimal or numeric with a scale of 0, and constrained to be nonnullable.
2750 | 16 | Column or parameter #%d: Specified column precision %d is greater than the maximum precision of %d.
2751 | 16 | Column or parameter #%d: Specified column scale %d is greater than the specified precision of %d.
2752 | 16 | Identity column '%.*ls' contains invalid SEED.
2753 | 16 | Identity column '%.*ls' contains invalid INCREMENT.
2754 | 16 | Error severity levels greater than %d can only be specified by members of the sysadmin role, using the WITH LOG option.
2755 | 16 | SET DEADLOCK_PRIORITY option '%.*ls' is invalid.
2756 | 16 | Invalid value %d for state. Valid range is from %d to %d.
2757 | 16 | RAISERROR failed due to invalid parameter substitution(s) for error %d, severity %d, state %d.
2758 | 16 | %hs could not locate entry for error %d in sysmessages.
2759 | 0 | CREATE SCHEMA failed due to previous errors.
2760 | 16 | Specified owner name '%.*ls' either does not exist or you do not have permission to use it.
2761 | 16 | The ROWGUIDCOL property can only be specified on the uniqueidentifier data type.
2762 | 16 | sp_setapprole was not invoked correctly. Refer to the documentation for more information.
2763 | 16 | Could not find application role '%.*ls'.
2764 | 16 | Incorrect password supplied for application role '%.*ls'.
2765 | 15 | Could not locate statistics for column '%.*ls' in the system catalogs.
2766 | 16 | The definition for user-defined data type '%.*ls' has changed.
2767 | 15 | Could not locate statistics '%.*ls' in the system catalogs.
2768 | 15 | Statistics for %ls '%.*ls'.
2769 | 15 | Column '%.*ls'. Cannot create statistics on a column of data type %ls.
2770 | 16 | The SELECT INTO statement cannot have same source and destination tables.
2771 | 16 | Cannot create statistics on table '%.*ls'. This table is a virtual system table.
2772 | 16 | Cannot access temporary tables from within a function.
2773 | 16 | Sort order ID %d is invalid.
2774 | 16 | Collation ID %d is invalid.
2775 | 16 | Code page %d is not supported by the operating system.
2777 | 17 | Database '%.*ls' contains columns or parameters with the following code page(s) not supported by the operating system: %ls.
2801 | 16 | The definition of object '%.*ls' has changed since it was compiled.
2809 | 18 | The request for %S_MSG '%.*ls' failed because '%.*ls' is a %S_MSG object.
2812 | 16 | Could not find stored procedure '%.*ls'.


Errors 3000 - 3999

Error | Severity | Description (Message Text)
3009 | 16 | Could not insert a backup or restore history/detail record in the msdb database. This may indicate a problem with the msdb database. The backup/restore operation was still successful.
3011 | 16 | All backup devices must be of the same general class (for example, DISK and TAPE).
3013 | 16 | %hs is terminating abnormally.
3014 | 10 | %hs successfully processed %d pages in %d.%03d seconds (%d.%03d MB/sec).
3015 | 10 | %hs is not yet implemented.
3016 | 16 | File '%ls' of database '%ls' has been removed or shrunk since this backup or restore operation was interrupted. The operation cannot be restarted.
3017 | 16 | Could not resume interrupted backup or restore operation. See the SQL Server error log for more information.
3018 | 16 | There is no interrupted backup or restore operation to restart. Reissue the statement without the RESTART clause.
3019 | 16 | The checkpoint file was for a different backup or restore operation. Reissue the statement without the RESTART clause.
3020 | 16 | The backup operation cannot be restarted as the log has been truncated. Reissue the statement without the RESTART clause.
3021 | 16 | Cannot perform a backup or restore operation within a transaction.
3023 | 16 | Backup and file manipulation operations (such as ALTER DATABASE ADD FILE) on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed.
3024 | 16 | You can only perform a full backup of the master database. Use BACKUP DATABASE to back up the entire master database.
3025 | 16 | Missing database name. Reissue the statement specifying a valid database name.
3026 | 16 | Could not find filegroup ID %d in sysfilegroups for database '%ls'.
3027 | 16 | Could not find filegroup '%.*ls' in sysfilegroups for database '%.*ls'.
3028 | 16 | Operation checkpoint file is invalid. Could not restart operation. Reissue the statement without the RESTART option.
3031 | 16 | Option '%ls' conflicts with option(s) '%ls'. Remove the conflicting option and reissue the statement.
3032 | 16 | One or more of the options (%ls) are not supported for this statement. Review the documentation for supported options.
3033 | 16 | BACKUP DATABASE cannot be used on a database opened in emergency mode.
3034 | 16 | No files were selected to be processed. You may have selected one or more filegroups that have no members.
3035 | 16 | Cannot perform a differential backup for database '%ls', because a current database backup does not exist. Perform a full database backup by reissuing BACKUP DATABASE, omitting the WITH DIFFERENTIAL option.
3036 | 16 | Database '%ls' is in warm-standby state (set by executing RESTORE WITH STANDBY) and cannot be backed up until the entire load sequence is completed.
3037 | 16 | Minimally logged operations have occurred prior to this WITH RESTART command. Reissue the BACKUP statement without WITH RESTART.
3038 | 16 | The filename '%ls' is invalid as a backup device name. Reissue the BACKUP statement with a valid filename.
3039 | 16 | Cannot perform a differential backup for file '%ls' because a current file backup does not exist. Reissue BACKUP DATABASE omitting the WITH DIFFERENTIAL option.
3040 | 10 | An error occurred while informing replication of the backup. The backup will continue, but the replication environment should be inspected.
3041 | 16 | BACKUP failed to complete the command %.*ls
3101 | 16 | Exclusive access could not be obtained because the database is in use.
3108 | 16 | RESTORE DATABASE must be used in single user mode when trying to restore the master database.
3110 | 14 | User does not have permission to RESTORE database '%.*ls'.
3112 | 16 | Cannot restore any database other than master when the server is in single user mode.
3113 | 21 | The database owner (DBO) does not have an entry in sysusers in database '%.*ls'.
3114 | 21 | Database '%.*ls' does not have an entry in sysdatabases.
3123 | 16 | Invalid database name '%.*ls' specified for backup or restore operation.
3127 | 16 | Temporary Message: The backup set does not contain pages for file '%ls'.
3128 | 16 | File '%ls' has an unsupported page size (%d).
3129 | 16 | Temporary Message: File '%ls' has changed size from %d to %d bytes.
3132 | 16 | The media set for database '%ls' has %d family members but only %d are provided. All members must be provided.
3133 | 16 | The volume on device '%ls' is not a member of the media family.
3135 | 16 | The backup set in file '%ls' was created by %hs and cannot be used for this restore operation.
3136 | 16 | Cannot apply the backup on device '%ls' to database '%ls'.
3138 | 16 | One or more files in the backup set are no longer part of database '%ls'.
3140 | 16 | Could not adjust the space allocation for file '%ls'.
3141 | 16 | The database to be restored was named '%ls'. Reissue the statement using the WITH REPLACE option to overwrite the '%ls' database.
3142 | 16 | File '%ls' cannot be restored over the existing '%ls'. Reissue the RESTORE statement using WITH REPLACE to overwrite pre-existing files.
3143 | 16 | The data set on device '%ls' is not a SQL Server backup set.
3144 | 16 | File '%.*ls' was not backed up in file %d on device '%ls'. The file cannot be restored from this backup set.
3145 | 16 | The STOPAT option is not supported for RESTORE DATABASE. You can use the STOPAT option with RESTORE LOG.
3146 | 16 | None of the newly-restored files had been modified after the backup was taken, so no further recovery actions are required. The database is now available for use.
3147 | 16 | Backup and restore operations are not allowed on database tempdb.
3148 | 16 | Media recovery for ALTER DATABASE is not yet implemented. The database cannot be rolled forward.
3150 | 10 | The master database has been successfully restored. Shutting down SQL Server.
3151 | 21 | The master database failed to restore. Use the rebuildm utility to rebuild the master database. Shutting down SQL Server.
3234 | 15 | Logical file '%.*ls' is not part of database '%ls'. Use RESTORE FILELISTONLY to list the logical file names.
3241 | 16 | The media family on device '%ls' is incorrectly formed. SQL Server cannot process this media family.
3242 | 16 | The file on device '%ls' is not a valid Microsoft Tape Format backup set.
3243 | 16 | The media family on device '%ls' was created using Microsoft Tape Format version %d.%d. SQL Server supports version %d.%d.
3244 | 16 | Descriptor block size exceeds %d bytes. Use a shorter name and/or description string and retry the operation.
3245 | 16 | Could not convert a string to or from Unicode, %ls.
3246 | 16 | The media family on device '%ls' is marked as nonappendable. Reissue the statement using the INIT option to overwrite the media.
3247 | 16 | The volume on device '%ls' has the wrong media sequence number (%d). Remove it and insert volume %d.
3248 | 25 | >>> VOLUME SWITCH <<< (not for output!)
3249 | 16 | The volume on device '%ls' is a continuation volume for the backup set. Remove it and insert the volume holding the start of the backup set.
3250 | 16 | The value '%d' is not within range for the %ls parameter.
3251 | 10 | The media family on device '%ls' is complete. The device is now being reused for one of the remaining families.
3253 | 16 | The block size parameter must supply a value that is a power of 2.
3254 | 16 | The volume on device '%ls' is empty.
3255 | 16 | The data set on device '%ls' is a SQL Server backup set not compatible with this version of SQL Server.
3256 | 16 | The backup set on device '%ls' was terminated while it was being created and is incomplete. RESTORE sequence is terminated abnormally.
3257 | 16 | There is insufficient free space on disk volume '%ls' to create the database. The database requires %I64u additional free bytes, while only %I64u bytes are available.
3258 | 16 | The volume on device '%ls' belongs to a different media set.
3259 | 16 | The volume on device '%ls' is not part of a multiple family media set. BACKUP WITH FORMAT can be used to form a new media set.
3260 | 16 | An internal buffer has become full.
3261 | 16 | SQL Server cannot use the virtual device configuration.
3262 | 10 | The backup set is valid.
3263 | 16 | Cannot use the volume on device '%ls' as a continuation volume. It is sequence number %d of family %d for the current media set. Insert a new volume, or sequence number %d of family %d for the current set.
3264 | 16 | The operation did not proceed far enough to allow RESTART. Reissue the statement without the RESTART qualifier.
3265 | 16 | The login has insufficient authority. Membership of the sysadmin role is required to use VIRTUAL_DEVICE with BACKUP or RESTORE.
3266 | 10 | The backup data in '%ls' is incorrectly formatted. Backups cannot be appended, but existing backup sets may still be usable.
3267 | 16 | Insufficient resources to create UMS scheduler.
3268 | 16 | Cannot use the backup file '%ls' because it was originally formatted with sector size %d and is now on a device with sector size %d.
3269 | 16 | Cannot restore the file '%ls' because it was originally written with sector size %d; '%ls' is now on a device with sector size %d.
3270 | 16 | An internal consistency error occurred. Contact Technical Support for assistance.
3271 | 16 | Nonrecoverable I/O error occurred on file '%ls'.
3272 | 16 | The '%ls' device has a hardware sector size of %d, but the block size parameter specifies an incompatible override value of %d. Reissue the statement using a compatible block size.
3273 | 16 | The BUFFERCOUNT parameter must supply a value that allows at least one buffer per backup device.
3274 | 16 | Incorrect checksum computed for the backup set on device %ls. The backup set cannot be restored.
3275 | 16 | I/O request 0x%08x failed I/O verification. See the error log for a description.
3276 | 16 | WITH SNAPSHOT can be used only if the backup set was created WITH SNAPSHOT.
3277 | 16 | WITH SNAPSHOT must be used with only one virtual device.
3278 | 16 | Failed to encrypt string %ls
3279 | 16 | Access is denied due to a password failure
3280 | 16 | Backups on raw devices are not supported. '%ls' is a raw device.
3281 | 16 | Released and initiated rewind on '%ls'.
3301 | 21 | Invalid log record found in the transaction log (logop %d).
3313 | 21 | Error while redoing logged operation in database '%.*ls'. Error at log record ID %S_LSN.
3314 | 21 | Error while undoing logged operation in database '%.*ls'. Error at log record ID %S_LSN.
3315 | 10 | During rollback, process %d was expected to hold mode %d lock at level %d for row %S_RID in database '%.*ls' under transaction %S_XID.
3405 | 10 | Recovering database '%.*ls'.
3406 | 10 | %d transactions rolled forward in database '%.*ls' (%d).
3407 | 10 | %d transactions rolled back in database '%.*ls' (%d).
3408 | 10 | Recovery complete.
3413 | 21 | Database ID %d. Could not mark database as suspect. Getnext NC scan on sysdatabases.dbid failed.
3414 | 10 | Database '%.*ls' (database ID %d) could not recover. Contact Technical Support.
3415 | 16 | Database '%.*ls' is read-only or has read-only files and must be made writable before it can be upgraded.
3417 | 21 | Cannot recover the master database. Exiting.
3429 | 10 | Warning: The outcome of transaction %S_XID, named '%.*ls' in database '%.*ls' (database ID %d), could not be determined because the coordinating database (database ID %d) could not be opened. The transaction was assumed to be committed.
3430 | 10 | Warning: Could not determine the outcome of transaction %S_XID, named '%.*ls' in database '%.*ls' (with ID %d) because the coordinating database (ID %d) did not contain the outcome. The transaction was assumed to be committed.
3431 | 21 | Could not recover database '%.*ls' (database ID %d) due to unresolved transaction outcomes.
3432 | 16 | Warning: syslanguages is missing.
3433 | 16 | Name is truncated to '%.*ls'. The maximum name length is %d.
3434 | 20 | Cannot change sort order or locale. Server shutting down. Restart SQL Server to continue with sort order unchanged.
3435 | 20 | Sort order or locale cannot be changed because user objects or user databases exist.
3436 | 16 | Cannot rebuild index for the '%.*ls' table in the '%.*ls' database.
3437 | 21 | Error recovering database '%.*ls'. Could not connect to MSDTC to check the completion status of transaction %S_XID.
3438 | 10 | Database '%.*ls' (database ID %d) failed to recover because transaction first LSN is not equal to LSN in checkpoint. Contact Technical Support.
3439 | 10 | Database '%.*ls' (database ID %d). The DBCC RECOVERDB statement failed due to previous errors.
3440 | 21 | Database '%.*ls' (database ID %d). The DBCC RECOVERDB statement can only be run after a RESTORE statement that used the WITH NORECOVERY option.
3441 | 21 | Database '%.*ls' (database ID %d). The RESTORE statement could not access file '%ls'. Error was '%ls'.
3442 | 21 | Database '%.*ls' (database ID %d). The size of the undo file is insufficient.
3443 | 21 | Database '%.*ls' (database ID %d) was marked for standby or read-only use, but has been modified. The RESTORE LOG statement cannot be performed.
3445 | 21 | File '%ls' is not a valid undo file for database '%.*ls', database ID %d.
3450 | 10 | Recovery of database '%.*ls' (%d) is %d%% complete (approximately %d more seconds) (Phase %d of 3).
3604 | 10 | Duplicate key was ignored.
3605 | 10 | Duplicate row was ignored.
3606 | 10 | Arithmetic overflow occurred.
3607 | 10 | Division by zero occurred.
3608 | 16 | Cannot allocate a GUID for the token.
3612 | 10 | %hsSQL Server Execution Times:%hs CPU time = %lu ms, elapsed time = %lu ms.
3613 | 10 | SQL Server parse and compile time: %hs CPU time = %lu ms, elapsed time = %lu ms.
3615 | 10 | Table '%.*ls'. Scan count %d, logical reads %d, physical reads %d, read-ahead reads %d.
3618 | 10 | The transaction has been terminated.
3619 | 10 | Could not write a CHECKPOINT record in database ID %d because the log is out of space.
3620 | 10 | Automatic checkpointing is disabled in database '%.*ls' because the log is out of space. It will continue when the database owner successfully checkpoints the database. Free up some space or extend the database and then run the CHECKPOINT statement.
3621 | 10 | The statement has been terminated.
3622 | 10 | A domain error occurred.
3625 | 20 | '%hs' is not yet implemented.
3627 | 16 | Could not create worker thread.
3628 | 24 | A floating point exception occurred in the user process. Current transaction is canceled.
3629 | 10 | This SQL Server has been optimized for %d concurrent queries. This limit has been exceeded by %d queries and performance may be adversely affected.
3630 | 10 | Concurrency violations since %ls%s 1 2 3 4 5 6 7 8 9 10-100 >100%s%6u%6u%6u%6u%6u%6u%6u%6u%6u%8u%6u
3631 | 10 | Concurrency violations will be written to the SQL Server error log.
3632 | 10 | Concurrency violations will not be written to the SQL Server error log.
3701 | 11 | Cannot %S_MSG the %S_MSG '%.*ls', because it does not exist in the system catalog.
3702 | 16 | Cannot drop the %S_MSG '%.*ls' because it is currently in use.
3703 | 16 | Cannot detach the %S_MSG '%.*ls' because it is currently in use.
3704 | 16 | User does not have permission to perform this operation on %S_MSG '%.*ls'.
3705 | 16 | Cannot use DROP %ls with '%.*ls' because '%.*ls' is a %S_MSG. Use DROP %ls.
3708 | 16 | Cannot %S_MSG the %S_MSG '%.*ls' because it is a system %S_MSG.
3716 | 16 | The %S_MSG '%.*ls' cannot be dropped because it is bound to one or more %S_MSG.
3718 | 11 | Could not drop index '%.*ls' because the table or clustered index entry cannot be found in the sysindexes system table.
3723 | 16 | An explicit DROP INDEX is not allowed on index '%.*ls'. It is being used for %ls constraint enforcement.
3724 | 16 | Cannot %S_MSG the %S_MSG '%.*ls' because it is being used for replication.
3725 | 16 | The constraint '%.*ls' is being referenced by table '%.*ls', foreign key constraint '%.*ls'.
3726 | 16 | Could not drop object '%.*ls' because it is referenced by a FOREIGN KEY constraint.
3727 | 10 | Could not drop constraint. See previous errors.
3728 | 16 | '%.*ls' is not a constraint.
3729 | 16 | Cannot %ls '%.*ls' because it is being referenced by object '%.*ls'.
3733 | 16 | Constraint '%.*ls' does not belong to table '%.*ls'.
3736 | 16 | Cannot drop the %S_MSG '%.*ls' because it is being used for distribution.
3737 | 16 | Could not delete file '%ls'. See the SQL Server error log for more information.
3738 | 16 | Deleting database file '%ls'.
3739 | 15 | Cannot %ls the index '%.*ls' because it is not a statistics collection.
3902 | 13 | The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.
3903 | 13 | The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
3904 | 21 | Cannot unsplit logical page %S_PGID in object '%.*ls', in database '%.*ls'. Both pages together contain more data than will fit on one page.
3906 | 16 | Could not run BEGIN TRANSACTION in database '%.*ls' because the database is read-only.
3908 | 16 | Could not run BEGIN TRANSACTION in database '%.*ls' because the database is in bypass recovery mode.
3909 | 16 | Session binding token is invalid.
3910 | 16 | Transaction context in use by another session.
3912 | 16 | Cannot bind using an XP token while the server is not in an XP call.
3914 | 16 | The data type '%s' is invalid for transaction names or savepoint names. Allowed data types are char, varchar, nchar, or nvarchar.
3915 | 16 | Cannot use the ROLLBACK statement within an INSERT-EXEC statement.
3916 | 16 | Cannot use the COMMIT statement within an INSERT-EXEC statement unless BEGIN TRANSACTION is used first.
3917 | 16 | Session is bound to a transaction context that is in use. Other statements in the batch were ignored.
3918 | 16 | Statement must be executed in the context of a user transaction.
3919 | 16 | Cannot enlist in the transaction because the transaction has already been committed or rolled back.
3920 | 10 | The WITH MARK option only applies to the first BEGIN TRAN WITH MARK statement. The option is ignored.
3921 | 16 | Cannot get a transaction token if there is no transaction active. Reissue the statement after a transaction has been started
3922 | 16 | Cannot enlist in the transaction because the transaction does not exist.
3923 | 10 | Cannot use transaction marks on database '%.*ls' with bulk-logged operations that have not been backed up. The mark is ignored.
3924 | 10 | The session was enlisted in an active user transaction while trying to bind to a new transaction. The session has defected from the previous user transaction.
3925 | 16 | Invalid transaction mark name. The 'LSN:' prefix is reserved.
3926 | 10 | The transaction active in this session has been committed or aborted by another session.
3927 | 10 | The session had an active transaction when it tried to enlist in a Distributed Transaction Coordinator transaction.
3928 | 16 | The marked transaction '%.*ls' failed. A Deadlock was encountered while attempting to place the mark in the log.


Errors 4000 - 4999

Error | Severity | Description (Message Text)
4003 | 21 | ODS error. Server is terminating this connection.
4004 | 16 | Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier.
4015 | 16 | Language requested in login '%.*ls' is not an official name on this SQL Server. Using server-wide default %.*ls instead.
4016 | 16 | Language requested in 'login %.*ls' is not an official name on this SQL Server. Using user default %.*ls instead.
4017 | 16 | Neither the language requested in 'login %.*ls' nor user default language %.*ls is an official language name on this SQL Server. Using server-wide default %.*ls instead.
4018 | 16 | User default language %.*ls is not an official language name on this SQL Server. Using server-wide default %.*ls instead.
4019 | 16 | Language requested in login '%.*ls' is not an official language name on this SQL Server. Login fails.
4020 | 16 | Default date order '%.*ls' for language %.*ls is invalid. Using mdy instead.
4027 | 16 | Mount tape for %hs of database '%ls'.
4028 | 16 | End of tape has been reached. Remove tape '%ls' and mount next tape for %hs of database '%ls'.
4030 | 10 | The medium on device '%ls' expires on %hs and cannot be overwritten.
4035 | 10 | Processed %d pages for database '%ls', file '%ls' on file %d.
4037 | 16 | User-specified volume ID '%ls' does not match the volume ID '%ls' of the device '%ls'.
4038 | 16 | Cannot find file ID %d on device '%ls'.
4060 | 11 | Cannot open database requested in login '%.*ls'. Login fails.
4061 | 11 | Cannot open either database requested in login (%.*ls) or user default database. Using master database instead.
4062 | 11 | Cannot open user default database. Using master database instead.
4063 | 11 | Cannot open database requested in login (%.*ls). Using user default '%.*ls' instead.
4064 | 11 | Cannot open user default database. Login failed.
4208 | 16 | The statement %hs is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
4212 | 16 | Cannot back up the log of the master database. Use BACKUP DATABASE instead.
4214 | 10 | There is no current database backup. This log backup cannot be used to roll forward a preceding database backup.
4215 | 10 | The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed.
4216 | 16 | Minimally logged operations cannot be backed up when the database is unavailable.
4217 | 10 | BACKUP LOG cannot modify the database because database is read-only. The backup will continue,although subsequent backups will duplicate the work of this backup.
4301 | 16 | Database in use. The system administrator must have exclusive use of the database to restore the log.
4304 | 16 | A USER ATTENTION signal raised during RESTORE LOG is being ignored until the current restore completes.
4305 | 16 | The log in this backup set begins at LSN %.*ls, which is too late to apply to the database. An earlier log backup that includes LSN %.*ls can be restored.
4306 | 16 | The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step.
4316 | 16 | Can only RESTORE LOG in the master database if SQL Server is in single user mode.
4318 | 16 | File '%ls' has been rolled forward to LSN %.*ls. This log terminates at LSN %.*ls, which is too early to apply the WITH RECOVERY option. Reissue the RESTORE LOG statement WITH NORECOVERY.
4320 | 16 | File '%ls' was only partially restored by a database or file restore. The entire file must be successfully restored before applying the log.
4322 | 10 | This log file contains records logged before the designated point-in-time. The database is being left in load state so you can apply another log file.
4323 | 16 | The database is marked suspect. Transaction logs cannot be restored. Use RESTORE DATABASE to recover the database.
4324 | 10 | Backup history older than %ls has been deleted.
4325 | 16 | Could not delete entries for backup set ID '%ls'.
4326 | 16 | The log in this backup set terminates at LSN %.*ls, which is too early to apply to the database. A more recent log backup that includes LSN %.*ls can be restored.
4327 | 16 | The log in this backup set contains minimally logged changes. Point-in-time recovery is inhibited. RESTORE will roll forward to end of logs without recovering the database.
4328 | 16 | File '%ls' is missing. Rollforward stops at log sequence number %.*ls. File is created at LSN %.*ls, dropped at LSN %.*ls. Restore transaction log beyond point in time when file was dropped or restore data to be consistent with rest of database.
4329 | 10 | This log file contains records logged before the designated mark. The database is being left in load state so you can apply another log file.
4330 | 16 | The log in this backup set cannot be applied because it is on a recovery path inconsistent with the database.
4331 | 16 | The database cannot be recovered because the files have been restored to inconsistent points in time.
4332 | 16 | RESTORE LOG has been halted. To use the database in its current state, run RESTORE DATABASE %ls WITH RECOVERY.
4333 | 16 | The database cannot be recovered because the log was not restored.
4334 | 16 | The named mark does not identify a valid LSN.
4403 | 16 | View or function '%.*ls' is not updatable because it contains aggregates.
4404 | 16 | View or function '%.*ls' is not updatable because the definition contains the DISTINCT clause.
4405 | 16 | View or function '%.*ls' is not updatable because the modification affects multiple base tables.
4406 | 16 | Update or insert of view or function '%.*ls' failed because it contains a derived or constant field.
4408 | 19 | The query and the views or functions in it exceed the limit of %d tables.
4413 | 16 | Could not use view or function '%.*ls' because of binding errors.
4414 | 16 | Could not allocate ancillary table for view or function resolution. The maximum number of tables in a query (%d) was exceeded.
4415 | 16 | View '%.*ls' is not updatable because either it was created WITH CHECK OPTION or it spans a view created WITH CHECK OPTION and the target table is referenced multiple times in the resulting query.
4416 | 16 | UNION ALL view '%.*ls' is not updatable because the definition contains a disallowed construct.
4417 | 16 | Derived table '%.*ls' is not updatable because the definition contains a UNION operator.
4418 | 16 | Derived table '%.*ls' is not updatable because it contains aggregates.
4419 | 16 | Derived table '%.*ls' is not updatable because the definition contains the DISTINCT clause.
4420 | 16 | Derived table '%.*ls' is not updatable because the modification affects multiple base tables.
4421 | 16 | Derived table '%.*ls' is not updatable because a column of the derived table is derived or constant.
4422 | 16 | View '%.*ls' has an INSTEAD OF UPDATE trigger and cannot be a target of an UPDATE FROM statement.
4423 | 16 | View '%.*ls' has an INSTEAD OF DELETE trigger and cannot be a target of a DELETE FROM statement.
4424 | 16 | Joined tables cannot be specified in a query containing outer join operators. View or function '%.*ls' contains joined tables.
4425 | 16 | Cannot specify outer join operators in a query containing joined tables. View or function '%.*ls' contains outer join operators.
4427 | 16 | The view or function '%.*ls' is not updatable because the definition contains the TOP clause.
4428 | 16 | The derived table '%.*ls' is not updatable because the definition contains the TOP clause.
4429 | 16 | View or function '%.*ls' contains a self-reference. Views or functions cannot reference themselves directly or indirectly.
4430 | 10 | Warning: Index hints supplied for view '%.*ls' will be ignored.
4431 | 16 | Partitioned view '%.*ls' is not updatable because table '%.*ls' has a timestamp column.
4432 | 16 | Partitioned view '%.*ls' is not updatable because table '%.*ls' has a DEFAULT constraint.
4433 | 16 | Cannot INSERT into partitioned view ''%.*ls'' because table ''%.*ls'' has an IDENTITY constraint.
4434 | 16 | Partitioned view '%.*ls' is not updatable because table '%.*ls' has an INSTEAD OF trigger.
4435 | 16 | Partitioned view '%.*ls' is not updatable because a value was not specified for partitioning column '%.*ls'.
4436 | 16 | UNION ALL view '%.*ls' is not updatable because a partitioning column was not found.
4437 | 16 | Partitioned view '%.*ls' is not updatable as the target of a bulk operation.
4438 | 16 | Partitioned view '%.*ls' is not updatable because it does not deliver all columns from its member tables.
4439 | 16 | Partitioned view '%.*ls' is not updatable because the source query contains references to partition table '%.*ls'.
4440 | 16 | UNION ALL view '%.*ls' is not updatable because a primary key was not found on table '%.*ls'.
4441 | 16 | Partitioned view '%.*ls' is not updatable because the table '%.*ls' has an index on a computed column.
4442 | 16 | UNION ALL view '%.*ls' is not updatable because base table '%.*ls' is used multiple times.
4443 | 16 | UNION ALL view '%.*ls' is not updatable because column '%.*ls' of base table '%.*ls' is used multiple times.
4444 | 16 | UNION ALL view '%.*ls' is not updatable because the primary key of table '%.*ls' is not included in the union result.
4445 | 16 | UNION ALL view '%.*ls' is not updatable because the primary key of table '%.*ls' is not unioned with primary keys of preceding tables.
4446 | 16 | UNION ALL view '%.*ls' is not updatable because the definiton of column '%.*ls' of view '%.*ls' is used by another view column.
4447 | 16 | View '%.*ls' is not updatable because the definition contains a set operator.
4448 | 16 | Cannot INSERT into partitioned view '%.*ls' because values were not supplied for all columns.
4449 | 16 | Using defaults is not allowed in views that contain a set operator.
4450 | 16 | Cannot update partitioned view '%.*ls' because the definition of the view column '%.*ls' in table '%.*ls' has a IDENTITY constraint.
4451 | 16 | Views referencing tables on multiple servers are not updatable on this SKU of SQL Server.
4501 | 16 | View or function ''%.*ls'' has more columns defined than column names given.
4502 | 16 | View or function ''%.*ls'' has more column names specified than columns defined.
4505 | 16 | CREATE VIEW failed because column '%.*ls' in view '%.*ls' exceeds the maximum of %d columns.
4506 | 10 | Column names in each view or function must be unique. Column name '%.*ls' in view or function '%.*ls' is specified more than once.
4508 | 16 | Views or functions are not allowed on temporary tables. Table names that begin with '#' denote temporary tables.
4509 | 16 | Could not perform CREATE VIEW because WITH %ls was specified and the view contains set operators.
4510 | 16 | Could not perform CREATE VIEW because WITH %ls was specified and the view is not updatable.
4511 | 16 | Create View or Function failed because no column name was specified for column %d.
4512 | 16 | Cannot schema bind %S_MSG '%.*ls' because name '%.*ls' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.
4513 | 16 | Cannot schema bind %S_MSG '%.*ls'. '%.*ls' is not schema bound.
4514 | 16 | CREATE FUNCTION failed because a column name is not specified for column %d.
4515 | 16 | CREATE FUNCTION failed because column '%.*ls' in function '%.*ls' exceeds the maximum of %d columns.
4516 | 16 | Cannot schema bind function '%.*ls' because it contains an EXECUTE statement.
4602 | 14 | Only members of the sysadmin role can grant or revoke the CREATE DATABASE permission.
4604 | 16 | There is no such user or group '%.*ls'.
4606 | 16 | Granted or revoked privilege %ls is not compatible with object.
4610 | 16 | You can only grant or revoke permissions on objects in the current database.
4611 | 16 | To revoke grantable privileges, specify the CASCADE option with REVOKE.
4613 | 16 | Grantor does not have GRANT permission.
4615 | 16 | Invalid column name '%.*ls'.
4617 | 16 | Cannot grant, deny or revoke permissions to or from special roles.
4618 | 16 | You do not have permission to use %.*ls in the AS clause.
4619 | 16 | CREATE DATABASE permission can only be granted in the master database.
4701 | 11 | Could not truncate table '%.*ls' because this table does not exist in database '%.*ls'.
4706 | 17 | Could not truncate table '%.*ls' because there is not enough room in the log to record the deallocation of all the index and data pages.
4707 | 16 | Could not truncate object '%.*ls' because it or one of its indexes resides on a READONLY filegroup.
4708 | 16 | Could not truncate object '%.*ls' because it is not a table.
4709 | 16 | You are not allowed to truncate the system table '%.*ls'.
4711 | 16 | Cannot truncate table '%.*ls' because it is published for replication.
4712 | 16 | Cannot truncate table '%.*ls' because it is being referenced by a FOREIGN KEY constraint.
4803 | 21 | Received invalid row length %d from bcp client. Maximum row size is %d.
4804 | 21 | Premature end-of-message while reading current row from host. Host program may have terminated.
4805 | 17 | The front-end tool you are using does not support the feature of bulk insert from host. Use the proper tools for this command.
4807 | 21 | Received invalid row length %d from bcp client. Minimum row size is %d.
4808 | 16 | Bulk copy operations cannot trigger BULK INSERT statements.
4810 | 16 | Expected the TEXT token in data stream for bulk copy of text or image data.
4811 | 16 | Expected the column offset in data stream for bulk copy of text or image data.
4812 | 16 | Expected the row offset in data stream for bulk copy of text or image data.
4813 | 16 | Expected the text length in data stream for bulk copy of text, ntext, or image data.
4815 | 21 | Received invalid column length from bcp client.
4817 | 16 | Could not bulk insert. Invalid sorted column '%.*ls'. Assuming data stream is not sorted.
4818 | 16 | Could not bulk insert. Sorted column '%.*ls' was specified more than once. Assuming data stream is not sorted.
4819 | 16 | Could not bulk insert. Bulk data stream was incorrectly specified as sorted.
4820 | 16 | Could not bulk insert. Unknown version of format file '%s'.
4821 | 16 | Could not bulk insert. Error reading the number of columns from format file '%s'.
4822 | 16 | Could not bulk insert. Invalid number of columns in format file '%s'.
4823 | 16 | Could not bulk insert. Invalid column number in format file '%s'.
4824 | 16 | Could not bulk insert. Invalid data type for column number %d in format file '%s'.
4825 | 16 | Could not bulk insert. Invalid prefix for column number %d in format file '%s'.
4826 | 16 | Could not bulk insert. Invalid column length for column number %d in format file '%s'.
4827 | 16 | Could not bulk insert. Invalid column terminator for column number %d in format file '%s'.
4828 | 16 | Could not bulk insert. Invalid destination table column number for source column %d in format file '%s'.
4829 | 16 | Could not bulk insert. Error reading destination table column name for source column %d in format file '%s'.
4830 | 10 | Bulk Insert: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature.
4831 | 10 | Bulk Insert: DataFileType was incorrectly specified as widechar. DataFileType will be assumed to be char because the data file does not have a Unicode signature.
4832 | 16 | Bulk Insert: Unexpected end-of-file (EOF) encountered in data file.
4833 | 16 | Bulk Insert: Version mismatch between the provider dynamic link library and the server executable.
4834 | 16 | You do not have permission to use the BULK INSERT statement.
4835 | 16 | Bulk copying into a table with computed columns is not supported for downlevel clients.
4837 | 16 | Error: Cannot bulk copy into a table '%s' enabled for immediate-updating subscriptions
4838 | 16 | The bulk data source does not support the SQLNUMERIC or SQLDECIMAL data types.
4839 | 16 | Cannot perform bulk insert. Invalid collation name for source column %d in format file '%s'.
4840 | 16 | The bulk data source provider string has an invalid %ls property value %ls.
4841 | 16 | The data source name is not a simple object name.
4842 | 16 | The required FormatFile property is missing from the provider string of the server.
4843 | 16 | The bulk data source provider string has a syntax error ('%lc') near character position %d.
4844 | 16 | The bulk data source provider string has an unsupported property name (%ls).
4845 | 16 | The bulk data source provider string has a syntax error near character position %d. Expected '%lc', but found '%lc'.
4846 | 16 | The bulk data provider failed to allocate memory.
4847 | 16 | Bulk copying into a table with bigint columns is not supported for versions earlier than SQL Server 2000.
4848 | 16 | Bulk copying into a table with sql_variant columns is not supported for versions earlier than SQL Server 2000.
4849 | 16 | Could not import table '%ls'. Error %d.
4850 | 10 | Data import: Table '%ls' is already locked by another user.
4851 | 10 | Data import: Table '%ls' already has data. Skipping to next table.
4852 | 10 | Data import: Table '%ls' does not exist or it is not a user table.
4853 | 10 | %hs
4854 | 21 | %hs
4860 | 16 | Could not bulk insert. File '%ls' does not exist.
4861 | 16 | Could not bulk insert because file '%ls' could not be opened. Operating system error code %ls.
4862 | 16 | Could not bulk insert because file '%ls' could not be read. Operating system error code %ls.
4863 | 16 | Bulk insert data conversion error (truncation) for row %d, column %d (%ls).
4864 | 16 | Bulk insert data conversion error (type mismatch) for row %d, column %d (%ls).
4865 | 16 | Could not bulk insert because the maximum number of errors (%d) was exceeded.
4866 | 16 | Bulk Insert fails. Column is too long in the data file for row %d, column %d. Make sure the field terminator and row terminator are specified correctly.
4867 | 16 | Bulk insert data conversion error (overflow) for row %d, column %d (%ls).
4868 | 16 | Bulk Insert fails. Codepage '%d' is not installed. Install the codepage and run the command again.
4869 | 16 | Bulk Insert failed. Unexpected NULL value in data file row %d, column %d. Destination column (%ls) is defined NOT NULL.
4880 | 16 | Could not bulk insert. When using the FIRSTROW and LASTROW parameters, the value for FIRSTROW cannot be greater than the value for LASTROW.
4881 | 10 | Note: Bulk Insert through a view may result in base table default values being ignored for NULL columns in the data file.
4882 | 16 | Could not bulk insert. Prefix length, field length, or terminator required for source column %d in format file '%s'.
4901 | 16 | ALTER TABLE only allows columns to be added that can contain nulls or have a DEFAULT definition specified. Column '%.*ls' cannot be added to table '%.*ls' because it does not allow nulls and does not specify a DEFAULT definition.
4902 | 11 | Cannot alter table '%.*ls' because this table does not exist in database '%.*ls'.
4909 | 16 | Cannot alter '%.*ls' because it is not a table.
4910 | 16 | Only the owner or members of the sysadmin role can alter table '%.*ls'.
4916 | 16 | Could not enable or disable the constraint. See previous errors.
4917 | 16 | Constraint '%.*ls' does not exist.
4920 | 16 | ALTER TABLE failed because trigger '%.*ls' on table '%.*ls' does not exist.
4921 | 16 | ALTER TABLE failed because trigger '%.*ls' does not belong to table '%.*ls'.
4922 | 16 | %ls %.*ls failed because one or more objects access this column.
4923 | 16 | ALTER TABLE DROP COLUMN failed because '%.*ls' is the only data column in table '%.*ls'. A table must have at least one data column.
4924 | 16 | %ls failed because column '%.*ls' does not exist in table '%.*ls'.
4925 | 16 | ALTER TABLE ALTER COLUMN ADD ROWGUIDCOL failed because a column already exists in table '%.*ls' with ROWGUIDCOL property.
4926 | 16 | ALTER TABLE ALTER COLUMN DROP ROWGUIDCOL failed because a column does not exist in table '%.*ls' with ROWGUIDCOL property.
4927 | 16 | Cannot alter column '%.*ls' to be data type %.*ls.
4928 | 16 | Cannot alter column '%.*ls' because it is '%ls'.
4929 | 16 | Cannot alter the %S_MSG '%.*ls' because it is being published for replication.
4930 | 10 | Warning: Columns added to the replicated table %S_MSG '%.*ls' will be ignored by existing articles.
4931 | 16 | Cannot add columns to %S_MSG '%.*ls' because it is being published for merge replication.
4932 | 16 | ALTER TABLE DROP COLUMN failed because '%.*ls' is currently replicated.


Errors 5000 - 5999

Error | Severity | Description (Message Text)
5001 | 16 | User must be in the master database.
5002 | 16 | Database '%.*ls' does not exist. Check sysdatabases.
5004 | 16 | To use ALTER DATABASE, the database must be in a writable state in which a checkpoint can be executed.
5005 | 10 | Extending database by %.2f MB on disk '%.*ls'.
5006 | 16 | Could not get exclusive use of %S_MSG '%.*ls' to perform the requested operation.
5008 | 16 | This ALTER DATABASE statement is not supported.
5009 | 16 | ALTER DATABASE failed. Some disk names listed in the statement were not found. Check that the names exist and are spelled correctly before rerunning the statement.
5010 | 16 | Log file name cannot be generated from a raw device. The log file name and path must be specified.
5011 | 14 | User does not have permission to alter database '%.*ls'.
5012 | 16 | The name of the primary filegroup cannot be changed.
5013 | 16 | The master and model databases cannot have files added to them. ALTER DATABASE was aborted.
5014 | 16 | The %S_MSG '%.*ls' does not exist in database '%.*ls'.
5015 | 16 | ALTER DATABASE failed. The total size specified must be 1 MB or greater.
5016 | 16 | System databases master, model, and tempdb cannot have their names changed.
5017 | 16 | ALTER DATABASE failed. Database '%.*ls' was not created with 'FOR LOAD' option.
5018 | 0 | File '%.*ls' modified in sysaltfiles. Delete old file after restarting SQL Server.
5019 | 10 | Cannot find entry in sysaltfiles for file '%.*ls'.
5020 | 16 | The primary data or log file cannot be removed from a database.
5021 | 10 | The %S_MSG name '%.*ls' has been set.
5022 | 16 | Log file '%ls' for this database is already active.
5023 | 16 | Database must be put in bypass recovery mode to rebuild the log.
5024 | 16 | No entry found for the primary log file in sysfiles1. Could not rebuild the log.
5025 | 16 | The file '%ls' already exists. It should be renamed or deleted so that a new log file can be created.
5026 | 16 | Could not create a new log file with file '%.*ls'. See previous errors.
5027 | 16 | System databases master, model, and tempdb cannot have their logs rebuilt.
5028 | 16 | The system could not activate enough of the database to rebuild the log.
5029 | 10 | Warning: The log for database '%.*ls' has been rebuilt. Transactional consistency has been lost. DBCC CHECKDB should be run to validate physical consistency. Database options will have to be reset, and extra log files may need to be deleted.
5030 | 16 | The database could not be exclusively locked to perform the operation.
5031 | 16 | Cannot remove the file '%.*ls' because it is the only file in the DEFAULT filegroup.
5032 | 10 | The file cannot be shrunk below page %ud until the log is backed up because it contains bulk logged pages.
5035 | 16 | Filegroup '%.*ls' already exists in this database.
5036 | 16 | MODIFY FILE failed. Specify logical name.
5037 | 16 | MODIFY FILE failed. Do not specify physical name.
5038 | 16 | MODIFY FILE failed for file "%.*ls". At least one property per file must be specified.
5039 | 16 | MODIFY FILE failed. Specified size is less than current size.
5040 | 16 | MODIFY FILE failed. Size is greater than MAXSIZE.
5041 | 16 | MODIFY FILE failed. File '%.*ls' does not exist.
5042 | 16 | The %S_MSG '%.*ls' cannot be removed because it is not empty.
5043 | 16 | The %S_MSG '%.*ls' cannot be found in %ls.
5044 | 10 | The %S_MSG '%.*ls' has been removed.
5045 | 16 | The %S_MSG already has the '%ls' property set.
5046 | 10 | The %S_MSG property '%ls' has been set.
5047 | 16 | Cannot change the READONLY property of the PRIMARY filegroup.
5048 | 16 | Cannot add, remove, or modify files in filegroup '%.*ls'. The filegroup is read-only.
5049 | 16 | Cannot extend file '%ls' using this syntax as it was not created with DISK INIT. Use ALTER DATABASE MODIFY FILE.
5050 | 16 | Cannot change the properties of empty filegroup '%.*ls'. The filegroup must contain at least one file.
5051 | 16 | Cannot have a filegroup with the name 'DEFAULT'.
5053 | 16 | The maximum of %ld filegroups per database has been exceeded.
5054 | 16 | Could not cleanup worktable IAM chains to allow shrink or remove file operation. Please try again when tempdb is idle.
5055 | 16 | Cannot add, remove, or modify file '%.*ls'. The file is read-only.
5056 | 16 | Cannot add, remove, or modify a file in filegroup '%.*ls' because the filegroup is offline.
5057 | 16 | Cannot add, remove, or modify file '%.*ls' because it is offline.
5058 | 16 | Option '%.*ls' cannot be set in database '%.*ls'.
5059 | 16 | Database '%.*ls' is in transition. Try the ALTER DATABASE statement later.
5060 | 10 | Nonqualified transactions are being rolled back. Estimated rollback completion: %d%%.
5061 | 16 | ALTER DATABASE failed because a lock could not be placed on database '%.*ls'. Try again later.
5062 | 16 | Option '%.*ls' cannot be set at the same time as another option setting.
5063 | 16 | Database '%.*ls' is in warm standby. A warm-standby database is read-only.
5064 | 16 | Changes to the state or options of database '%.*ls' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.
5065 | 16 | Database '%.*ls' cannot be opened.
5066 | 16 | Database options single user and dbo use only cannot be set at the same time.
5068 | 10 | Failed to restart the current database. The current database is switched to master.
5069 | 16 | ALTER DATABASE statement failed.
5070 | 16 | Database state cannot be changed while other users are using the database '%.*ls'
5072 | 16 | ALTER DATABASE failed. The default collation of database '%.*ls' cannot be set to %.*ls.
5073 | 16 | Cannot alter collation for database '%ls' because it is READONLY, OFFLINE, or marked SUSPECT.
5074 | 16 | The %S_MSG '%.*ls' is dependent on %S_MSG '%.*ls'.
5075 | 16 | The %S_MSG '%.*ls' is dependent on %S_MSG.
5076 | 10 | Warning: Changing default collation for database '%.*ls', which is used in replication. It is recommend that all replication database have the same default collation.
5101 | 15 | You must supply parameters for the DISK %hs statement. Usage: %hs.
5102 | 15 | No such statement DISK %.*ls.
5103 | 16 | MAXSIZE cannot be less than SIZE for file '%ls'.
5104 | 16 | File '%.*ls' already used.
5105 | 16 | Device activation error. The physical file name '%.*ls' may be incorrect.
5106 | 15 | Parameter '%hs' requires value of data type '%hs'.
5107 | 15 | Value is wrong data type for parameter '%hs' (requires data type '%hs').
5108 | 10 | Log file '%.*ls' does not match the primary file. It may be from a different database or the log may have been rebuilt previously.
5109 | 16 | No such parameter '%.*ls'.
5110 | 16 | File '%.*ls' is on a network device not supported for database files.
5116 | 14 | You do not have permission to run DISK statements.
5117 | 16 | Could not run DISK statement. You must be in the master database to run this statement.
5122 | 10 | Each disk file size must be greater than or equal to 1 MB.
5123 | 16 | CREATE FILE encountered operating system error %ls while attempting to open or create the physical file '%.*ls'.
5126 | 16 | The logical device '%.*ls' does not exist in sysdevices.
5146 | 16 | The %hs of %d is out of range. It must be between %d and %d.
5148 | 16 | Could not set the file size to the desired amount. The operating system file size limit may have been reached.
5149 | 16 | MODIFY FILE encountered operating system error %ls while attempting to expand the physical file.
5150 | 16 | The size of a single log file must not be greater than 2 TB.
5151 | 16 | The %hs statement is obsolete and no longer supported.
5157 | 16 | I/O error encountered in the writelog system function during backout.
5158 | 10 | Warning: Media in device '%.*ls' may have been changed.
5159 | 16 | Operating system error %.*ls on device '%.*ls' during %ls.
5160 | 16 | Cannot take '%.*ls' offline because the database is in use.
5162 | 16 | Cannot find '%.*ls' in sysdatabases.
5163 | 16 | Cannot open '%.*ls' to take offline.
5164 | 16 | Usage: DBCC DBCONTROL(dbname,ONLINE|OFFLINE)
5165 | 16 | Cannot explicitly open or close master database.
5167 | 16 | Database '%.*ls' is already offline.
5168 | 16 | File '%.*ls' is on a network drive, which is not allowed.
5169 | 16 | FILEGROWTH cannot be greater than MAXSIZE for file '%.*ls'.
5170 | 16 | Cannot create file '%ls' because it already exists.
5171 | 16 | %.*ls is not a primary database file.
5172 | 16 | The header for file '%ls' is not a valid database file header. The %ls property is incorrect.
5173 | 16 | Cannot associate files with different databases.
5174 | 10 | Each file size must be greater than or equal to 512 KB.
5175 | 10 | The file '%.*ls' has been expanded to prevent recovery from failing. Contact the system administrator for further assistance.
5176 | 10 | The file '%.*ls' has been expanded beyond its maximum size to prevent recovery from failing. Contact the system administrator for further assistance.
5177 | 16 | Encountered an unexpected error while checking the sector size for file '%.*ls'. Check the SQL Server error log for more information.
5178 | 16 | Cannot use file '%.*ls' because it was originally formatted with sector size %d and is now on a device with sector size %d.
5179 | 16 | Cannot use file '%.*ls', which is on a device with sector size %d. SQL Server supports a maximum sector size of 4096 bytes.
5180 | 22 | Could not open FCB for invalid file ID %d in database '%.*ls'.
5181 | 16 | Could not restart database '%.*ls'. Reverting back to old status.
5182 | 16 | New log file '%.*ls' was created.
5183 | 16 | File '%ls' cannot be created. Use WITH MOVE to specify a usable physical file name.
5184 | 16 | Cannot use file '%.*ls' for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used.
5701 | 10 | Changed database context to '%.*ls'.
5702 | 10 | SQL Server is terminating this process.
5703 | 10 | Changed language setting to %.*ls.
5803 | 10 | Unknown config number (%d) in sysconfigures.
5804 | 16 | Character set, sort order, or collation cannot be changed because at least one database is not writable.
5805 | 16 | Too few locks specified. Minimum %d.
5807 | 16 | Recovery intervals above %d minutes not recommended. Use the RECONFIGURE WITH OVERRIDE statement to force this configuration.
5808 | 16 | Ad hoc updates to system catalogs not recommended. Use the RECONFIGURE WITH OVERRIDE statement to force this configuration.
5809 | 16 | Average time slices above %d milliseconds not recommended. Use the RECONFIGURE WITH OVERRIDE statement to force this configuration.
5810 | 16 | Valid values for the fill factor are 0 to 100.
5812 | 14 | You do not have permission to run the RECONFIGURE statement.
5823 | 16 | Cannot reconfigure SQL Server to use sort order ID %d, because the row for that sort order does not exist in syscharsets.
5828 | 16 | User connections are limited to %d.
5829 | 16 | The specified user options value is invalid.
5830 | 10 | The default collation for SQL Server has been reconfigured. Restart SQL Server to rebuild the table indexes on columns of character data types.
5831 | 16 | Minimum server memory value (%d) must be less than or equal to the maximum value (%d).
5904 | 17 | Background checkpoint process suspended until locks are available.


Errors 6000 - 6999

Error | Severity | Description (Message Text)
6001 | 10 | SHUTDOWN is waiting for %d process(es) to complete.
6002 | 10 | SHUTDOWN is in progress. Log off.
6004 | 10 | User does not have permission to perform this action.
6005 | 10 | SHUTDOWN is in progress.
6006 | 10 | Server shut down by request.
6007 | 10 | The SHUTDOWN statement cannot be executed within a transaction or by a stored procedure.
6101 | 16 | Process ID %d is not a valid process ID. Choose a number between 1 and %d.
6102 | 14 | User does not have permission to use the KILL statement.
6103 | 17 | Could not do cleanup for the killed process. Received message %d.
6104 | 16 | Cannot use KILL to kill your own process.
6106 | 16 | Process ID %d is not an active process ID.
6107 | 14 | Only user processes can be killed.
6108 | 16 | KILL SPID WITH COMMIT/ABORT is not supported by Microsoft SQL Server 2000. Use Microsoft Distributed Transaction Coordinator to resolve distributed transactions.
6109 | 10 | SPID %d: transaction rollback in progress. Estimated rollback completion: %d%%. Estimated time remaining: %d seconds.
6110 | 16 | The distributed transaction with UOW %s does not exist.
6111 | 16 | Another user has decided a different outcome for the distributed transaction associated with UOW %s.
6112 | 16 | Distributed transaction with UOW %s is in prepared state. Only Microsoft Distributed Transaction Coordinator can resolve this transaction. KILL command failed.
6113 | 16 | The distributed transaction associated with UOW %s is in PREPARE state. Use KILL UOW WITH COMMIT/ABORT syntax to kill the transaction instead.
6114 | 16 | Distributed transaction with UOW %s is being used by another user. KILL command failed.
6115 | 16 | KILL command cannot be used inside user transactions.
6116 | 16 | KILL command failed.
6117 | 16 | There is a connection associated with the distributed transaction with UOW %s. First, kill the connection using KILL SPID syntax.
6118 | 16 | The distributed transaction associated with UOW %s is not in PREPARED state. Use KILL UOW to kill the transaction instead.
6119 | 10 | Distributed transaction with UOW %s is rolling back: estimated rollback completion: %d%%, estimated time left %d seconds.
6120 | 16 | Status report cannot be obtained. Rollback operation for Process ID %d is not in progress.
6121 | 16 | Status report cannot be obtained. Rollback operation for UOW %s is not in progress.
6401 | 16 | Cannot roll back %.*ls. No transaction or savepoint of that name was found.
6600 | 16 | XML error: %.*ls
6601 | 10 | XML parser returned the error code %d from line number %d, source '%.*ls'.
6602 | 16 | The error description is '%.*ls'.
6603 | 16 | XML parsing error: %.*ls
6604 | 25 | XML stored procedures are not supported in fibers mode.
6605 | 16 | %.*ls: Failed to obtain an IPersistStream interface on the XML text.
6606 | 17 | %.*ls: Failed to save the XML text stream. The server resources may be too low.
6607 | 16 | %.*ls: The value supplied for parameter number %d is invalid.
6608 | 16 | Failed to instantiate class '%ls'. Make sure Msxml2.dll exists in the SQL Server installation.
6609 | 16 | Column '%ls' contains an invalid data type. Valid data types are char, varchar, nchar, nvarchar, text, and ntext.
6610 | 17 | Failed to load Msxml2.dll.
6612 | 16 | Invalid data type for the column indicated by the parameter '%ls'. Valid data types are int, bigint, smallint, and tinyint.
6613 | 16 | Specified value '%ls' already exists.
6614 | 16 | Value specified for column '%ls' is the same for column '%ls'. An element cannot be its own parent.
6615 | 16 | Invalid data type is specified for column '%ls'. Valid data types are int, bigint, smallint, and tinyint.
6616 | 16 | Parameter '%ls' is required when the parent of the element to be added is missing and must be inserted.
6617 | 16 | The specified edge table has an invalid format. Column '%ls' is missing or has an invalid data type.
6618 | 16 | Column '%ls' in the specified edge table has an invalid or null value.
6619 | 16 | XML node of type %d named '%ls' cannot be created .
6620 | 16 | XML attribute or element cannot be created for column '%ls'.
6621 | 16 | XML encoding or decoding error occurred with object name '%.*ls'.
6622 | 16 | Invalid data type for column '%ls'. Data type cannot be text, ntext, image, or binary.
6623 | 16 | Column '%ls' contains an invalid data type. Valid data types are char, varchar, nchar, and nvarchar.
6624 | 16 | XML document could not be created because server memory is low. Use sp_xml_removedocument to release XML documents.
6800 | 16 | FOR XML AUTO requires at least one table for generating XML tags. Use FOR XML RAW or add a FROM clause with a table name.
6801 | 16 | FOR XML EXPLICIT requires at least three columns, including the tag column, the parent column, and at least one data column.
6802 | 16 | FOR XML EXPLICIT query contains the invalid column name '%.*ls'. Use the TAGNAME!TAGID!ATTRIBUTENAME[!..] format where TAGID is a positive integer.
6803 | 16 | FOR XML EXPLICIT requires the first column to hold positive integers that represent XML tag IDs.
6804 | 16 | FOR XML EXPLICIT requires the second column to hold NULL or nonnegative integers that represent XML parent tag IDs.
6805 | 16 | FOR XML EXPLICIT stack overflow occurred. Circular parent tag relationships are not allowed.
6806 | 16 | Undeclared tag ID %d is used in a FOR XML EXPLICIT query.
6807 | 16 | Undeclared parent tag ID %d is used in a FOR XML EXPLICIT query.
6808 | 16 | XML tag ID %d could not be added. The server memory resources may be low.
6809 | 16 | Unnamed column or table names cannot be used as XML identifiers. Name unnamed columns using AS in the SELECT statement.
6810 | 16 | Column name '%.*ls' is repeated. The same attribute cannot be generated more than once on the same XML tag.
6811 | 16 | FOR XML is incompatible with COMPUTE expressions. Remove the COMPUTE expression.
6812 | 16 | XML tag ID %d that was originally declared as '%.*ls' is being redeclared as '%.*ls'.
6813 | 16 | FOR XML EXPLICIT cannot combine multiple occurrences of ID, IDREF, IDREFS, NMTOKEN, and/or NMTOKENS in column name '%.*ls'.
6814 | 16 | In the FOR XML EXPLICIT clause, ID, IDREF, IDREFS, NMTOKEN, and NMTOKENS require attribute names in '%.*ls'.
6815 | 16 | In the FOR XML EXPLICIT clause, ID, IDREF, IDREFS, NMTOKEN, and NMTOKENS attributes cannot be hidden in '%.*ls'.
6816 | 16 | In the FOR XML EXPLICIT clause, ID, IDREF, IDREFS, NMTOKEN, and NMTOKENS attributes cannot be generated as CDATA, XML, or XMLTEXT in '%.*ls'.
6817 | 16 | FOR XML EXPLICIT cannot combine multiple occurrences of ELEMENT, XML, XMLTEXT, and CDATA in column name '%.*ls'.
6818 | 16 | In the FOR XML EXPLICIT clause, CDATA attributes must be unnamed in '%.*ls'.
6819 | 16 | The FOR XML clause is not allowed in a %ls statement.
6820 | 16 | FOR XML EXPLICIT requires column %d to be named '%ls' instead of '%.*ls'.
6821 | 16 | GROUP BY and aggregate functions are currently not supported with FOR XML AUTO.
6824 | 16 | In the FOR XML EXPLICIT clause, mode '%.*ls' in a column name is invalid.
6825 | 16 | ELEMENTS mode requires FOR XML AUTO.
6826 | 16 | Every IDREFS or NMTOKENS column in a FOR XML EXPLICIT query must appear in a separate SELECT clause, and the instances must be ordered directly after the element to which they belong.
6827 | 16 | FOR XML EXPLICIT queries allow only one XMLTEXT column per tag. Column '%.*ls' declares another XMLTEXT column that is not permitted.
6828 | 16 | XMLTEXT column '%.*ls' must be of a string data type.
6829 | 16 | FOR XML EXPLICIT and RAW modes currently do not support addressing binary data as URLs in column '%.*ls'. Remove the column, or use the BINARY BASE64 mode, or create the URL directly using the 'dbobject/TABLE[@PK1="V1"]/@COLUMN' syntax.
6830 | 16 | FOR XML AUTO could not find the table owning the following column '%.*ls' to create a URL address for it. Remove the column, or use the BINARY BASE64 mode, or create the URL directly using the 'dbobject/TABLE[@PK1="V1"]/@COLUMN' syntax.
6831 | 16 | FOR XML AUTO requires primary keys to create references for '%.*ls'. Select primary keys, or use BINARY BASE64 to obtain binary data in encoded form if no primary keys exist.
6832 | 16 | FOR XML AUTO cannot generate a URL address for binary data if a primary key is also binary.
6833 | 16 | Parent tag ID %d is not among the open tags. FOR XML EXPLICIT requires parent tags to be opened first. Check the ordering of the result set.
6834 | 16 | XMLTEXT field '%.*ls' contains an invalid XML document. Check the root tag and its attributes.
6835 | 16 | FOR XML EXPLICIT field '%.*ls' can specify the directive HIDE only once.
6836 | 16 | FOR XML EXPLICIT requires attribute-centric IDREFS or NMTOKENS field '%.*ls' to precede element-centric IDREFS/NMTOKEN fields.
6837 | 16 | The XMLTEXT document attribute that starts with '%.*ls' is too long. Maximum length is %d.
6838 | 16 | Attribute-centric IDREFS or NMTOKENS field not supported on tags having element-centric field '%.*ls' of type TEXT/NTEXT or IMAGE. Either specify ELEMENT on IDREFS/NMTOKENS field or remove the ELEMENT directive.
6839 | 16 | FOR XML EXPLICIT does not support XMLTEXT field on tag '%.*ls' that has IDREFS or NMTOKENS fields.
6840 | 16 | XMLDATA does not support namespace elements or attributes such as '%.*ls'. Run the SELECT FOR XML statement without XMLDATA or remove the namespace prefix declaration.


Errors 7000 - 7999

Error | Severity | Description (Message Text)
7000 | 16 | OPENXML document handle parameter must be of data type int.
7001 | 16 | OPENXML flags parameter must be of data type int.
7002 | 16 | OPENXML XPath must be of a string data type, such as nvarchar.
7003 | 16 | Only one OPENXML column can be of type %ls.
7004 | 16 | OPENXML does not support retrieving schema from remote tables, as in '%.*ls'.
7005 | 16 | OPENXML requires a metaproperty namespace to be declared if 'mp' is used for another namespace in sp_xml_preparedocument.
7006 | 16 | OPENXML encountered a problem identifying the metaproperty namespace prefix. Consider removing the namespace parameter from the corresponding sp_xml_preparedocument statement.
7007 | 16 | OPENXML encountered unknown metaproperty '%.*ls'.
7008 | 16 | The OPENXML EDGETABLE is incompatible with the XMLTEXT OVERFLOW flag.
7009 | 16 | OPENXML allows only one metaproperty namespace prefix declaration in sp_xml_preparedocument.
7101 | 16 | You cannot use a text pointer for a table with option 'text in row' set to ON.
7102 | 20 | SQL Server Internal Error. Text manager cannot continue with current statement.
7103 | 16 | You cannot set option 'text in row' for table %s.
7104 | 16 | Offset or size type is invalid. Must be int or smallint data type.
7105 | 22 | Page %S_PGID, slot %d for text, ntext, or image node does not exist.
7106 | 16 | You cannot update a blob with a read-only text pointer
7107 | 16 | You can have only 1,024 in-row text pointers in one transaction
7116 | 16 | Offset %d is not in the range of available text, ntext, or image data.
7122 | 16 | Invalid text, ntext, or image pointer type. Must be binary(16).
7123 | 16 | Invalid text, ntext, or image pointer value %hs.
7124 | 16 | The offset and length specified in the READTEXT statement is greater than the actual data length of %ld.
7125 | 16 | The text, ntext, or image pointer value conflicts with the column name specified.
7126 | 16 | The text, ntext, or image pointer value references a data page with an invalid text, ntext, or image status.
7127 | 16 | The text, ntext, or image pointer value references a data page with an invalid timestamp.
7128 | 16 | The text, ntext, or image pointer value references a data page that is no longer allocated.
7130 | 16 | %ls WITH NO LOG is not valid at this time. Use sp_dboption to set the 'select into/bulkcopy' option on for database '%.*ls'.
7133 | 16 | NULL textptr (text, ntext, or image pointer) passed to %ls function.
7135 | 16 | Deletion length %ld is not in the range of available text, ntext, or image data.
7137 | 16 | %s is not allowed because the column is being processed by a concurrent snapshot and is being replicated to a non-SQL Server Subscriber or Published in a publication allowing Data Transformation Services (DTS).
7138 | 16 | The WRITETEXT statement is not allowed because the column is being replicated with Data Transformation Services (DTS).
7139 | 16 | Length of text, ntext, or image data (%ld) to be replicated exceeds configured maximum %ld.
7141 | 16 | Must create orphaned text inside a user transaction.
7142 | 16 | Must drop orphaned text before committing the transaction.
7143 | 16 | Invalid locator de-referenced.
7201 | 17 | Could not execute procedure on remote server '%.*ls' because SQL Server is not configured for remote access. Ask your system administrator to reconfigure SQL Server to allow remote access.
7202 | 11 | Could not find server '%.*ls' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.
7212 | 16 | Could not execute procedure '%.*ls' on remote server '%.*ls'.
7213 | 20 | Could not set up parameter for remote server '%.*ls'.
7214 | 16 | Remote procedure time out of %d seconds exceeded. Remote procedure '%.*ls' is canceled.
7221 | 16 | Could not relay results of procedure '%.*ls' from remote server '%.*ls'.
7300 | 16 | OLE DB error trace [%ls].
7301 | 16 | Could not obtain a required interface from OLE DB provider '%ls'.
7302 | 16 | Could not create an instance of OLE DB provider '%ls'.
7303 | 16 | Could not initialize data source object of OLE DB provider '%ls'. %ls
7304 | 16 | Could not create a new session on OLE DB provider '%ls'.
7305 | 16 | Could not create a statement object using OLE DB provider '%ls'.
7306 | 16 | Could not open table '%ls' from OLE DB provider '%ls'. %ls
7307 | 16 | Could not obtain the data source of a session from OLE DB provider '%ls'. This action must be supported by the provider.
7310 | 16 | Could not obtain the schema options for OLE DB provider '%ls'. The provider supports the interface, but returns a failure code when it is used.
7311 | 16 | Could not obtain the schema rowset for OLE DB provider '%ls'. The provider supports the interface, but returns a failure code when it is used.
7312 | 16 | Invalid use of schema and/or catalog for OLE DB provider '%ls'. A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog and/or schema.
7313 | 16 | Invalid schema or catalog specified for provider '%ls'.
7314 | 16 | OLE DB provider '%ls' does not contain table '%ls'. The table either does not exist or the current user does not have permissions on that table.
7315 | 16 | OLE DB provider '%ls' contains multiple tables that match the name '%ls'.
7316 | 16 | Could not use qualified table names (schema or catalog) with OLE DB provider '%ls' because it does not implement required functionality.
7317 | 16 | OLE DB provider '%ls' returned an invalid schema definition.
7318 | 16 | OLE DB provider '%ls' returned an invalid column definition.
7319 | 16 | OLE DB provider '%ls' returned a '%ls' index '%ls' with incorrect bookmark ordinal %d.
7320 | 16 | Could not execute query against OLE DB provider '%ls'. %ls
7321 | 16 | An error occurred while preparing a query for execution against OLE DB provider '%ls'. %ls
7322 | 16 | A failure occurred while giving parameter information to OLE DB provider '%ls'. %ls
7323 | 16 | An error occurred while submitting the query text to OLE DB provider '%ls'. %ls
7330 | 16 | Could not fetch a row from OLE DB provider '%ls'. %ls
7331 | 16 | Rows from OLE DB provider '%ls' cannot be released. %ls
7332 | 16 | Could not rescan the result set from OLE DB provider '%ls'. %ls
7333 | 16 | Could not fetch a row using a bookmark from OLE DB provider '%ls'. %ls
7340 | 16 | Could not create a column accessor for OLE DB provider '%ls'. %ls
7341 | 16 | Could not get the current row value of column '%ls.%ls' from the OLE DB provider '%ls'. %ls
7342 | 16 | Unexpected NULL value returned for column '%ls.%ls' from the OLE DB provider '%ls'. This column cannot be NULL.
7343 | 16 | OLE DB provider '%ls' could not %ls table '%ls'. %ls
7344 | 16 | OLE DB provider '%ls' could not %ls table '%ls' because of column '%ls'. %ls
7345 | 16 | OLE DB provider '%ls' could not delete from table '%ls'. %ls
7346 | 16 | Could not get the data of the row from the OLE DB provider '%ls'. %ls
7347 | 16 | OLE DB provider '%ls' returned an unexpected data length for the fixed-length column '%ls.%ls'. The expected data length is %ls, while the returned data length is %ls.
7348 | 16 | OLE DB provider '%ls' could not set range for table '%ls'.%ls
7349 | 16 | OLE DB provider '%ls' could not set range for table '%ls' because of column '%ls'.%ls
7350 | 16 | Could not get the column information from the OLE DB provider '%ls'.
7351 | 16 | OLE DB provider '%ls' could not map ordinals for one or more columns of object '%ls'.
7352 | 16 | OLE DB provider '%ls' supplied inconsistent metadata. The object '%ls' was missing expected column '%ls'.
7353 | 16 | OLE DB provider '%ls' supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time.
7354 | 16 | OLE DB provider '%ls' supplied invalid metadata for column '%ls'. %ls
7355 | 16 | OLE DB provider '%ls' supplied inconsistent metadata for a column. The name was changed at execution time.
7356 | 16 | OLE DB provider '%ls' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
7357 | 16 | Could not process object '%ls'. The OLE DB provider '%ls' indicates that the object has no columns.
7358 | 16 | Could not execute query. The OLE DB provider '%ls' did not provide an appropriate interface to access the text, ntext, or image column '%ls.%ls'.
7359 | 16 | The OLE DB provider '%ls' reported a schema version for table '%ls' that changed between compilation and execution.
7360 | 16 | Could not get the length of a storage object from the OLE DB provider '%ls' for table '%ls', column '%ls'.
7361 | 16 | Could not read a storage object from the OLE DB provider '%ls', for table '%ls', column '%ls'.
7362 | 16 | The OLE DB provider '%ls' reported different meta data at run time for table '%ls' column '%ls'.
7365 | 16 | Could not obtain optional metadata columns of columns rowset from the OLE DB provider '%ls'.
7366 | 16 | Could not obtain columns rowset from OLE DB provider '%ls'. The provider supports the interface, but returns a failure code when used.
7367 | 16 | The OLE DB provider '%ls' supports column-level collation, but failed to provide metadata column '%ls' at run time.
7368 | 16 | The OLE DB provider '%ls' supports column-level collation, but failed to provide collation data for column '%ls'.
7369 | 16 | The OLE DB provider '%ls' provided invalid collation. %ls.
7370 | 16 | One or more properties could not be set on the query for OLE DB provider '%ls'. %ls
7371 | 16 | One or more properties could not be set on the table for OLE DB provider '%ls'.
7372 | 16 | Cannot get properties from OLE DB provider '%ls'.
7373 | 16 | Could not set the initialization properties for the OLE DB provider '%ls'.
7374 | 16 | Could not set the session properties for the OLE DB provider '%ls'.
7375 | 16 | Could not open index '%ls' on table '%ls' from OLE DB provider '%ls'. %ls
7376 | 16 | Could not enforce the remote join hint for this query.
7377 | 16 | Cannot specify an index or locking hint for a remote data source.
7378 | 16 | The update/delete operation requires a unique key or a clustered index on the remote table.
7379 | 16 | OLE DB provider '%ls' returned an unexpected '%ls' for the decimal/numeric column '%ls.%ls'. The expected data length is '%ls', while the returned data length is '%ls'.
7390 | 16 | The requested operation could not be performed because the OLE DB provider '%ls' does not support the required transaction interface.
7391 | 16 | The operation could not be performed because the OLE DB provider '%ls' was unable to begin a distributed transaction.
7392 | 16 | Could not start a transaction for OLE DB provider '%ls'.
7393 | 16 | OLE DB provider '%ls' reported an error aborting the current transaction.
7394 | 16 | OLE DB provider '%ls' reported an error committing the current transaction.
7395 | 16 | Unable to start a nested transaction for OLE DB provider '%ls'. A nested transaction was required because the XACT_ABORT option was set to OFF.
7399 | 16 | OLE DB provider '%ls' reported an error. %ls
7401 | 16 | Cannot create OLE DB provider enumeration object installed with SQL Server. Verify installation.
7403 | 16 | Could not locate registry entry for OLE DB provider '%ls'.
7404 | 16 | The server could not load DCOM.
7405 | 16 | Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query.
7410 | 16 | Remote access not allowed for Windows NT user activated by SETUSER.
7411 | 16 | Server '%.*ls' is not configured for %ls.
7413 | 16 | Could not perform a Windows NT authenticated login because delegation is not available.
7414 | 16 | Invalid number of parameters. Rowset '%ls' expects %d parameter(s).
7415 | 16 | Ad hoc access to OLE DB provider '%ls' has been denied. You must access this provider through a linked server.
7416 | 16 | Access to the remote server is denied because no login-mapping exists.
7417 | 16 | GROUP BY ALL is not supported in queries that access remote tables if there is also a WHERE clause in the query.
7418 | 16 | Text, image, or ntext column was too large to send to the remote data source due to the storage interface used by the provider.
7419 | 16 | Lazy schema validation error. Linked server schema version has changed. Re-run the query.
7601 | 16 | Cannot use a CONTAINS or FREETEXT predicate on %S_MSG '%.*ls' because it is not full-text indexed.
7602 | 16 | The Full-Text Service (Microsoft Search) is not available. The system administrator must start this service.
7603 | 15 | Syntax error in search condition, or empty or null search condition '%ls'.
7604 | 17 | Full-text operation failed due to a time out.
7605 | 17 | Full-text catalog '%ls' has been lost. Use sp_fulltext_catalog to rebuild and to repopulate this full-text catalog.
7606 | 17 | Could not find full-text index for database ID %d, table ID %d. Use sp_fulltext_table to deactivate then activate this index.
7607 | 17 | Search on full-text catalog '%ls' for database ID %d, table ID %d with search condition '%ls' failed with unknown result (%x).
7608 | 17 | An unknown full-text failure (%x) occurred in function %hs on full-text catalog '%ls'.
7609 | 17 | Full-Text Search is not installed, or a full-text component cannot be loaded.
7610 | 16 | Access is denied to '%ls', or the path is invalid. Full-text search was not installed properly.
7611 | 10 | Warning: Request to start a population in full-text catalog '%ls' ignored because a population is currently active for this full-text catalog.
7612 | 16 | %d is not a valid value for full-text system resource usage.
7613 | 16 | Cannot drop index '%.*ls' because it enforces the full-text key for table '%.*ls'.
7614 | 16 | Cannot alter or drop column '%.*ls' because it is enabled for Full-Text Search.
7615 | 16 | A CONTAINS or FREETEXT predicate can only operate on one table. Qualify the use of * with a table name.
7616 | 16 | Full-Text Search is not enabled for the current database. Use sp_fulltext_database to enable full-text search for the database.
7617 | 16 | Query does not reference the full-text indexed table.
7618 | 16 | %d is not a valid value for a full-text connection time out.
7620 | 16 | Conversion to data type %ls failed for full-text search key value 0x%ls.
7621 | 16 | Invalid use of full-text predicate in the HAVING clause.
7622 | 17 | Full-text catalog '%ls' lacks sufficient disk space to complete this operation.
7623 | 17 | Full-text query failed because full-text catalog '%ls' is not yet ready for queries.
7624 | 17 | Full-text catalog '%ls' is in an unusable state. Drop and re-create this full-text catalog.
7625 | 16 | Full-text table has more than one LCID among its full-text indexed columns.
7626 | 15 | The top_n_by_rank argument ('%d') must be greater than zero.
7627 | 16 | Full-text catalog in directory '%ls' for clustered server cannot be created. Only directories on a disk in the cluster group of the server can be used.
7628 | 17 | Cannot copy Schema.txt to '%.*ls' because access is denied or the path is invalid. Full-text search was not installed properly.
7629 | 17 | Cannot open or query registry key '%.*ls'.
7630 | 15 | Syntax error occurred near '%.*ls' in search condition '%.*ls'.
7631 | 15 | Syntax error occurred near '%.*ls'. Expected '%.*ls' in search condition '%.*ls'.
7632 | 15 | The value of the Weight argument must be between 0.0 and 1.0.
7633 | 15 | The syntax <content search condition> OR NOT <content boolean term> is not allowed.
7634 | 17 | Stack overflow occurred in parsing search condition '%.*ls'.
7635 | 16 | The Microsoft Search service cannot be administered under the present user account
7636 | 10 | Warning: Request to start a full-text index population on table '%ls' is ignored because a population is currently active for this table.
7637 | 16 | Value %d is not valid for full-text data time-out.
7638 | 10 | Warning: Request to stop change tracking has deleted all changes tracked on table '%ls'.
7639 | 16 | Cannot use a full-text predicate on %S_MSG '%.*ls' because it is not located on the local server.
7640 | 10 | Warning: Request to stop tracking changes on table '%ls' will not stop population currently in progress on the table.
7641 | 16 | Full-Text catalog '%ls' does not exist.
7642 | 16 | A full-text catalog named '%ls' already exists in this database.
7905 | 16 | The object specified is neither a table nor a constraint
7908 | 10 | The table '%.*ls' was created with the NO_LOG option.
7910 | 10 | Repair: Page %S_PGID has been allocated to object ID %d, index ID %d.
7911 | 10 | Repair: Page %S_PGID has been deallocated from object ID %d, index ID %d.
7912 | 10 | Repair: Extent %S_PGID has been allocated to object ID %d, index ID %d.
7913 | 10 | Repair: Extent %S_PGID has been deallocated from object ID %d, index ID %d.
7914 | 10 | Repair: %ls page at %S_PGID has been rebuilt.
7915 | 10 | Repair: IAM chain for object ID %d, index ID %d, has been truncated before page %S_PGID and will be rebuilt.
7916 | 10 | Repair: Deleted record for object ID %d, index ID %d, on page %S_PGID, slot %d. Indexes will be rebuilt.
7917 | 10 | Repair: Converted forwarded record for object ID %d, index ID %d, at page %S_PGID, slot %d to a data row.
7918 | 10 | Repair: Page %S_PGID next and %S_PGID previous pointers have been set to match each other in object ID %d, index ID %d.
7919 | 16 | Repair statement not processed. Database needs to be in single user mode.
7920 | 10 | Processed %ld entries in sysindexes for database ID %d.
7923 | 10 | Table %.*ls Object ID %ld.
7924 | 16 | Index ID %ld. FirstIAM %S_PGID. Root %S_PGID. Dpages %ld.
7925 | 16 | Index ID %d. %ld pages used in %ld dedicated extents.
7927 | 16 | Total number of extents is %ld.
7932 | 16 | The indexes for '%.*ls' are already correct. They will not be rebuilt.
7933 | 16 | One or more indexes contain errors. They will be rebuilt.
7934 | 16 | The table '%.*ls' has no indexes.
7935 | 16 | REINDEX received an exception. Statement terminated.
7937 | 16 | The data in table '%.*ls' is possibly inconsistent. REINDEX terminated. Run DBCC CHECKTABLE and report errors to your system administrator.
7939 | 16 | Cannot detach database '%.*ls' because it does not exist.
7940 | 16 | System databases master, model, msdb, and tempdb cannot be detached.
7941 | 10 | Trace option(s) not enabled for this connection. Use 'DBCC TRACEON()'.
7942 | 10 | DBCC %ls scanning '%.*ls' table...
7943 | 10 | Table: '%.*ls' (%d); index ID: %d, database ID: %d
7944 | 10 | %ls level scan performed.
7945 | 10 | - Pages Scanned................................: %lu
7946 | 10 | - Extents Scanned..............................: %lu
7947 | 10 | - Extent Switches..............................: %lu
7948 | 10 | - Avg. Pages per Extent........................: %3.1f
7949 | 10 | - Scan Density [Best Count:Actual Count].......: %4.2f%ls [%lu:%lu]
7950 | 10 | - Logical Scan Fragmentation ..................: %4.2f%ls
7951 | 10 | - Physical Scan Fragmentation .................: %4.2f%ls
7952 | 10 | - Extent Scan Fragmentation ...................: %4.2f%ls
7953 | 10 | - Avg. Bytes Free per Page.....................: %3.1f
7954 | 10 | - Avg. Page Density (full).....................: %4.2f%ls
7955 | 10 | Invalid SPID %d specified.
7956 | 10 | Permission to execute DBCC %ls denied.
7957 | 10 | Cannot display the specified SPID's buffer; in transition.
7958 | 10 | The specified SPID does not process input/output data streams.
7959 | 10 | The DBCC statement is not supported in this release.
7961 | 16 | Object ID %d, index ID %d, page ID %S_PGID, row ID %d. Column '%.*ls' is a var column with a NULL value and non-zero data length.
7962 | 16 | Upgrade requires SQL Server to be started in single user mode. Restart SQL Server with the -m flag.
7963 | 16 | Upgrade encountered a fatal error. See the SQL Server errorlog for more information.
7965 | 16 | Table error: Could not check object ID %d, index ID %d due to invalid allocation (IAM) page(s).
7966 | 10 | Warning: NO_INDEX option of %ls being used. Checks on non-system indexes will be skipped.
7968 | 10 | Transaction information for database '%.*ls'.
7969 | 10 | No active open transactions.
7970 | 10 | %hsOldest active transaction:
7971 | 10 | SPID (server process ID) : %d
7972 | 10 | UID (user ID) : %d
7974 | 10 | Name : %.*ls
7975 | 10 | LSN : (%d:%d:%d)
7977 | 10 | Start time : %.*ls
7979 | 10 | %hsReplicated Transaction Information:
7980 | 10 | Oldest distributed LSN : (%d:%d:%d)
7982 | 10 | Oldest non-distributed LSN : (%d:%d:%d)
7983 | 14 | User '%.*ls' does not have permission to run DBCC %ls for database '%.*ls'.
7984 | 16 | Invalid object name '%.*ls'.
7985 | 16 | The object name '%.*ls' contains more than the maximum number of prefixes. The maximum is %d.
7986 | 16 | Warning: Pinning tables should be carefully considered. If a pinned table is larger, or grows larger, than the available data cache, the server may need to be restarted and the table unpinned.
7991 | 16 | System table mismatch: Table '%.*ls', object ID %d has index ID 1 in sysindexes but the status in sysobjects does not have the clustered bit set. The table will be checked as a heap.
7992 | 16 | Cannot shrink 'read only' database '%.*ls'.
7993 | 10 | Cannot shrink file '%d' in database '%.*ls' to %d pages as it only contains %d pages.
7994 | 16 | Object ID %d, index ID %d: FirstIAM field in sysindexes is %S_PGID. FirstIAM for statistics only and dummy index entries should be (0:0).
7995 | 16 | Database '%ls' consistency errors in sysobjects, sysindexes, syscolumns, or systypes prevent further %ls processing.
7996 | 16 | Extended stored procedures can only be created in the master database.
7997 | 16 | '%.*ls' does not contain an identity column.
7998 | 16 | Checking identity information: current identity value '%.*hs', current column value '%.*hs'.
7999 | 16 | Could not find any index named '%.*ls' for table '%.*ls'.


Errors 8000 - 8999

Error | Severity | Description (Message Text)
8101 | 16 | An explicit value for the identity column in table '%.*ls' can only be specified when a column list is used and IDENTITY_INSERT is ON.
8102 | 16 | Cannot update identity column '%.*ls'.
8103 | 16 | Table '%.*ls' does not exist or cannot be opened for SET operation.
8104 | 16 | The current user is not the database or object owner of table '%.*ls'. Cannot perform SET operation.
8105 | 16 | '%.*ls' is not a user table. Cannot perform SET operation.
8106 | 16 | Table '%.*ls' does not have the identity property. Cannot perform SET operation.
8107 | 16 | IDENTITY_INSERT is already ON for table '%.*ls.%.*ls.%.*ls'. Cannot perform SET operation for table '%.*ls'.
8108 | 16 | Cannot add identity column, using the SELECT INTO statement, to table '%.*ls', which already has column '%.*ls' that inherits the identity property.
8109 | 16 | Attempting to add multiple identity columns to table '%.*ls' using the SELECT INTO statement.
8110 | 16 | Cannot add multiple PRIMARY KEY constraints to table '%.*ls'.
8111 | 16 | Cannot define PRIMARY KEY constraint on nullable column in table '%.*ls'.
8112 | 16 | Cannot add more than one clustered index for constraints on table '%.*ls'.
8114 | 16 | Error converting data type %ls to %ls.
8115 | 16 | Arithmetic overflow error converting %ls to data type %ls.
8116 | 16 | Argument data type %ls is invalid for argument %d of %ls function.
8117 | 16 | Operand data type %ls is invalid for %ls operator.
8118 | 16 | Column '%.*ls.%.*ls' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause.
8119 | 16 | Column '%.*ls.%.*ls' is invalid in the HAVING clause because it is not contained in an aggregate function and there is no GROUP BY clause.
8120 | 16 | Column '%.*ls.%.*ls' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
8121 | 16 | Column '%.*ls.%.*ls' is invalid in the HAVING clause because it is not contained in either an aggregate function or the GROUP BY clause.
8122 | 16 | Only the first query in a UNION statement can have a SELECT with an assignment.
8123 | 16 | A correlated expression is invalid because it is not in a GROUP BY clause.
8124 | 16 | Multiple columns are specified in an aggregated expression containing an outer reference. If an expression being aggregated contains an outer reference, then that outer reference must be the only column referenced in the expression.
8125 | 16 | An aggregated expression containing an outer reference must be contained in either the select list, or a HAVING clause subquery in the query whose FROM clause contains the table with the column being aggregated.
8126 | 16 | Column name '%.*ls.%.*ls' is invalid in the ORDER BY clause because it is not contained in an aggregate function and there is no GROUP BY clause.
8127 | 16 | Column name '%.*ls.%.*ls' is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.
8128 | 10 | Using '%s' version '%s' to execute extended stored procedure '%s'.
8129 | 16 | The new disk size must be greater than %d. Consider using DBCC SHRINKDB.
8130 | 16 | The device is not a database device. Only database devices can be expanded.
8131 | 10 | Extended stored procedure DLL '%s' does not export __GetXpVersion(). Refer to the topic "Backward Compatibility Details (Level 1) - Open Data Services" in the documentation for more information.
8132 | 10 | Extended stored procedure DLL '%s' reports its version is %d.%d. Server expects version %d.%d.
8133 | 16 | None of the result expressions in a CASE specification can be NULL.
8134 | 16 | Divide by zero error encountered.
8135 | 16 | Table level constraint does not specify column list, table '%.*ls'.
8136 | 16 | Duplicate columns specified in %ls constraint key list, table '%.*ls'.
8138 | 16 | More than 16 columns specified in foreign key column list, table '%.*ls'.
8139 | 16 | Number of referencing columns in foreign key differs from number of referenced columns, table '%.*ls'.
8140 | 16 | More than one key specified in column level %ls constraint, table '%.*ls'.
8141 | 16 | Column %ls constraint for column '%.*ls' references another column, table '%.*ls'.
8142 | 16 | Subqueries are not supported in %ls constraints, table '%.*ls'.
8143 | 16 | Parameter '%.*ls' was supplied multiple times.
8144 | 16 | Procedure or function %.*ls has too many arguments specified.
8145 | 16 | %.*ls is not a parameter for procedure %.*ls.
8146 | 16 | Procedure %.*ls has no parameters and arguments were supplied.
8147 | 16 | Could not create IDENTITY attribute on nullable column '%.*ls', table '%.*ls'.
8148 | 16 | More than one column %ls constraint specified for column '%.*ls', table '%.*ls'.
8149 | 16 | OLE Automation objects are not supported in fiber mode.
8150 | 16 | Multiple NULL constraints were specified for column '%.*ls', table '%.*ls'.
8151 | 16 | Both a PRIMARY KEY and UNIQUE constraint have been defined for column '%.*ls', table '%.*ls'. Only one is allowed.
8152 | 16 | String or binary data would be truncated.
8153 | 0 | Warning: Null value is eliminated by an aggregate or other SET operation.
8154 | 15 | The table '%.*ls' is ambiguous.
8155 | 15 | No column was specified for column %d of '%.*ls'.
8156 | 15 | The column '%.*ls' was specified multiple times for '%.*ls'.
8157 | 15 | All the queries in a query expression containing a UNION operator must have the same number of expressions in their select lists.
8158 | 15 | '%.*ls' has more columns than were specified in the column list.
8159 | 15 | '%.*ls' has fewer columns than were specified in the column list.
8160 | 15 | A grouping function can only be specified when either CUBE or ROLLUP is specified in the GROUP BY clause.
8161 | 15 | A grouping function argument does not match any of the expressions in the GROUP BY clause.
8162 | 16 | Formal parameter '%.*ls' was defined as OUTPUT but the actual parameter not declared OUTPUT.
8163 | 16 | The text, ntext, or image data type cannot be selected as DISTINCT.
8164 | 16 | An INSERT EXEC statement cannot be nested.
8165 | 16 | Invalid subcommand value %d. Legal range from %d to %d.
8166 | 16 | Constraint name '%.*ls' not permitted. Constraint names cannot begin with a number sign (#).
8168 | 16 | Cannot create two constraints named '%.*ls'. Duplicate constraint names are not allowed.
8169 | 16 | Syntax error converting from a character string to uniqueidentifier.
8170 | 16 | Insufficient result space to convert uniqueidentifier value to char.
8171 | 16 | Hint '%ls' on object '%.*ls' is invalid.
8175 | 10 | Could not find table %.*ls. Will try to resolve this table name later.
8176 | 16 | Resync procedure expects value of key '%.*ls', which was not supplied.
8177 | 16 | Cannot use a column in the %hs clause unless it is contained in either an aggregate function or the GROUP BY clause.
8178 | 16 | Prepared statement '%.*ls' expects parameter %.*ls, which was not supplied.
8179 | 16 | Could not find prepared statement with handle %d.
8180 | 16 | Statement(s) could not be prepared.
8181 | 16 | Text for '%.*ls' is missing from syscomments. The object must be dropped and re-created before it can be used.
8183 | 16 | Only UNIQUE or PRIMARY KEY constraints are allowed on computed columns.
8184 | 16 | Error expanding '*': all columns incomparable, '*' expanded to zero columns.
8185 | 16 | Error expanding '*': An uncomparable column has been found in an underlying table or view.
8186 | 16 | Function '%.*ls' can be used only on user and system tables.
8190 | 16 | Cannot compile replication filter procedure without defining table being filtered.
8191 | 16 | Replication filter procedures can only contain SELECT, GOTO, IF, WHILE, RETURN, and DECLARE statements.
8192 | 16 | Replication filter procedures cannot have parameters.
8193 | 16 | Cannot execute a procedure marked FOR REPLICATION.
8194 | 16 | Cannot execute a USE statement while an application role is active.
8196 | 16 | Duplicate column specified as ROWGUIDCOL.
8197 | 16 | Windows NT user '%.*ls' does not have server access.
8198 | 16 | Could not obtain information about Windows NT group/user '%ls'.
8199 | 16 | In EXECUTE <procname>, procname can only be a literal or variable of type char, varchar, nchar, or nvarchar.
8501 | 16 | MSDTC on server '%.*ls' is unavailable.
8502 | 20 | Unknown MSDTC token '0x%x' received.
8504 | 20 | Invalid transaction import buffer.
8506 | 20 | Invalid transaction state change requested from %hs to %hs.
8508 | 20 | QueryInterface failed for '%hs': %hs.
8509 | 20 | Import of MSDTC transaction failed: %hs.
8510 | 20 | Enlist of MSDTC transaction failed: %hs.
8511 | 20 | Unknown isolation level %d requested from MSDTC.
8512 | 20 | MSDTC Commit acknowledgement failed: %hs.
8513 | 20 | MSDTC Abort acknowledgement failed: %hs.
8514 | 20 | MSDTC PREPARE acknowledgement failed: %hs.
8515 | 20 | MSDTC Global state is invalid.
8517 | 20 | Failed to get MSDTC PREPARE information: %hs.
8518 | 20 | MSDTC BEGIN TRANSACTION failed: %hs.
8519 | 16 | Current MSDTC transaction must be committed by remote client.
8520 | 20 | Commit of internal MSDTC transaction failed: %hs.
8521 | 20 | Invalid awakening state. Slept in %hs; awoke in %hs.
8522 | 20 | Distributed transaction aborted by MSDTC.
8523 | 15 | PREPARE TRAN statement not allowed on MSDTC transaction.
8524 | 16 | The current transaction could not be exported to the remote provider. It has been rolled back.
8525 | 16 | Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.
8601 | 17 | Internal Query Processor Error: The query processor could not obtain access to a required interface.
8602 | 16 | Indexes used in hints must be explicitly included by the index tuning wizard.
8616 | 10 | The index hints for table '%.*ls' were ignored because the table was considered a fact table in the star join.
8617 | 17 | Invalid Query: CUBE and ROLLUP cannot compute distinct aggregates.
8618 | 17 | Warning: The query processor could not produce a query plan from the optimizer because the total length of all the columns in the GROUP BY or ORDER BY clause exceeds 8000 bytes.
8619 | 17 | Warning: The query processor could not produce a query plan from the optimizer because the total length of all the columns in the GROUP BY or ORDER BY clause exceeds 8000 bytes. Resubmit your query without the ROBUST PLAN hint.
8620 | 17 | Internal Query Processor Error: The query processor encountered an internal limit overflow.
8621 | 16 | Internal Query Processor Error: The query processor ran out of stack space during query optimization.
8622 | 16 | Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN.
8623 | 16 | Internal Query Processor Error: The query processor could not produce a query plan. Contact your primary support provider for more information.
8624 | 16 | Internal SQL Server error.
8625 | 16 | Warning: The join order has been enforced because a local join hint is used.
8626 | 16 | Only text pointers are allowed in work tables, never text, ntext, or image columns. The query processor produced a query plan that required a text, ntext, or image column in a work table.
8627 | 16 | The query processor could not produce a query plan because of the combination of hints and text, ntext, or image data passing through operators using work tables.
8628 | 17 | A time out occurred while waiting to optimize the query. Rerun the query.
8629 | 16 | The query processor could not produce a query plan from the optimizer because a query cannot update a text, ntext, or image column and a clustering key at the same time.
8630 | 17 | Internal Query Processor Error: The query processor encountered an unexpected error during execution.
8640 | 17 | Internal Query Processor Error: The query processor encountered an unexpected work table error during execution.
8642 | 17 | The query processor could not start the necessary thread resources for parallel query execution.
8644 | 16 | Internal Query Processor Error: The plan selected for execution does not support the invoked given execution routine.
8645 | 17 | A time out occurred while waiting for memory resources to execute the query. Rerun the query.
8646 | 21 | The index entry for row ID %.*hs was not found in index ID %d, of table %d, in database '%.*ls'.
8647 | 20 | Scan on sysindexes for database ID %d, object ID %ld, returned a duplicate index ID %d. Run DBCC CHECKTABLE on sysindexes.
8648 | 20 | Could not insert a row larger than the page size into a hash table. Resubmit the query with the ROBUST PLAN hint.
8649 | 17 | The query has been canceled because the estimated cost of this query (%d) exceeds the configured threshold of %d. Contact the system administrator.
8650 | 13 | Intra-query parallelism caused your server command (process ID #%d) to deadlock. Rerun the query without intra-query parallelism by using the query hint option (maxdop 1).
8651 | 17 | Could not perform the requested operation because the minimum query memory is not available. Decrease the configured value for the 'min memory per query' server configuration option.
8653 | 17 | Warning: The query processor is unable to produce a plan because the table '%.*ls' is marked OFFLINE.
8654 | 16 | A cursor plan could not be generated for the given statement because it contains textptr ( inrow lob ).
8660 | 16 | An index cannot be created on the view '%.*ls' because the view definition does not include all the columns in the GROUP BY clause.
8661 | 16 | A clustered index cannot be created on the view '%.*ls' because the index key includes columns which are not in the GROUP BY clause.
8662 | 16 | An index cannot be created on the view '%.*ls' because the view definition includes an unknown value (the sum of a nullable expression).
8663 | 16 | An index cannot be created on the view '%.*ls' because the view definition does not include count_big(*).
8664 | 16 | An index cannot be created on the view '%.*ls' because the view definition includes duplicate column names.
8665 | 16 | An index cannot be created on the view '%.*ls' because no row can satisfy the view definition.
8666 | 10 | Warning: The optimizer cannot use the index because the select list of the view contains a non-aggregate expression.
8667 | 10 | Warning: The optimizer cannot use the index because the group-by list in the view forms a key and is redundant.
8680 | 17 | Internal Query Processor Error: The query processor encountered an unexpected error during the processing of a remote query phase.
8901 | 13 | Deadlock detected during DBCC. Complete the transaction in progress and retry this statement.
8902 | 17 | Memory allocation error during DBCC processing.
8903 | 16 | Extent %S_PGID in database ID %d is allocated in both GAM %S_PGID and SGAM %S_PGID.
8904 | 16 | Extent %S_PGID in database ID %d is allocated by more than one allocation object.
8905 | 16 | Extent %S_PGID in database ID %d is marked allocated in the GAM, but no SGAM or IAM has allocated it.
8906 | 16 | Page %S_PGID in database ID %d is allocated in the SGAM %S_PGID and PFS %S_PGID, but was not allocated in any IAM. PFS flags '%hs'.
8908 | 16 | Table error: Database ID %d, object ID %d, index ID %d. Chain linkage mismatch. %S_PGID->next = %S_PGID, but %S_PGID->prev = %S_PGID.
8909 | 16 | Table error: Object ID %d, index ID %d, page ID %S_PGID. The PageId in the page header = %S_PGID.
8910 | 16 | Page %S_PGID in database ID %d is allocated to both object ID %d, index ID %d, and object ID %d, index ID %d.
8911 | 10 | The error has been repaired.
8912 | 10 | %.*ls fixed %d allocation errors and %d consistency errors in database '%ls'.
8913 | 16 | Extent %S_PGID is allocated to '%ls' and at least one other object.
8914 | 10 | Incorrect PFS free space information for page %S_PGID, object ID %d, index ID %d, in database ID %d. Expected value %hs, actual value %hs.
8915 | 10 | File %d (number of mixed extents = %ld, mixed pages = %ld).
8916 | 10 | Object ID %ld, Index ID %ld, data extents %ld, pages %ld, mixed extent pages %ld.
8917 | 10 | Object ID %ld, Index ID %ld, index extents %ld, pages %ld, mixed extent pages %ld.
8918 | 10 | (number of mixed extents = %ld, mixed pages = %ld) in this database.
8919 | 16 | Single page allocation %S_PGID in table %ls, object ID %d, index ID %d is not allocated in PFS page ID %S_PGID.
8920 | 16 | Cannot perform a %ls operation inside a user transaction. Terminate the transaction and reissue the statement.
8921 | 16 | CHECKTABLE terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors.
8922 | 10 | Could not repair this error.
8923 | 10 | The repair level on the DBCC statement caused this repair to be bypassed.
8924 | 10 | Repairing this error requires other errors to be corrected first.
8925 | 16 | Table error: Cross object linkage: Page %S_PGID, slot %d, in object ID %d, index ID %d, refers to page %S_PGID, slot %d, in object ID %d, index ID %d.
8926 | 16 | Table error: Cross object linkage: Parent page %S_PGID, slot %d, in object ID %d, index ID %d, and page %S_PGID, slot %d, in object ID %d, index ID %d, next refer to page %S_PGID but are not in the same object.
8927 | 16 | Object ID %d, index ID %d: The ghosted record count (%d) in the header does not match the number of ghosted records (%d) found on page %S_PGID.
8928 | 16 | Object ID %d, index ID %d: Page %S_PGID could not be processed. See other errors for details.
8929 | 16 | Object ID %d: Errors found in text ID %I64d owned by data record identified by %.*ls.
8930 | 16 | Table error: Object ID %d, index ID %d cross-object chain linkage. Page %S_PGID points to %S_PGID in object ID %d, index ID %d.
8931 | 16 | Table error: Object ID %d, index ID %d B-tree level mismatch, page %S_PGID. Level %d does not match level %d from parent %S_PGID.
8932 | 16 | Table error: Object ID %d, index ID %d, column '%.*ls'. The column ID %d is not valid for this table. The valid range is from 1 to %d.
8933 | 16 | Table error: Object ID %d, index ID %d. The low key value on page %S_PGID (level %d) is not %ls the key value in the parent %S_PGID slot %d.
8934 | 16 | Table error: Object ID %d, index ID %d. The high key value on page %S_PGID (level %d) is not less than the low key value in the parent %S_PGID, slot %d of the next page %S_PGID.
8935 | 16 | Table error: Object ID %d, index ID %d. The previous link %S_PGID on page %S_PGID does not match the previous page %S_PGID that the parent %S_PGID, slot %d expects for this page.
8936 | 16 | Table error: Object ID %d, index ID %d. B-tree chain linkage mismatch. %S_PGID->next = %S_PGID, but %S_PGID->Prev = %S_PGID.
8937 | 16 | Table error: Object ID %d, index ID %d. B-tree page %S_PGID has two parent nodes %S_PGID, slot %d and %S_PGID, slot %d.
8938 | 16 | Table error: Page %S_PGID, Object ID %d, index ID %d. Unexpected page type %d.
8939 | 16 | Table error: Object ID %d, index ID %d, page %S_PGID. Test (%hs) failed. Values are %ld and %ld.
8940 | 16 | Table error: Object ID %d, index ID %d, page %S_PGID. Test (%hs) failed. Address 0x%x is not aligned.
8941 | 16 | Table error: Object ID %d, index ID %d, page %S_PGID. Test (%hs) failed. Slot %d, offset 0x%x is invalid.
8942 | 16 | Table error: Object ID %d, index ID %d, page %S_PGID. Test (%hs) failed. Slot %d, offset 0x%x overlaps with the prior row.
8943 | 16 | Table error: Object ID %d, index ID %d, page %S_PGID. Test (%hs) failed. Slot %d, row extends into free space at 0x%x.
8944 | 16 | Table error: Object ID %d, index ID %d, page %S_PGID, row %d. Test (%hs) failed. Values are %ld and %ld.
8945 | 16 | Table error: Object ID %d, index ID %d will be rebuilt.
8946 | 16 | Table error: Allocation page %S_PGID has invalid %ls page header values. Type is %d. Check type, object ID and page ID on the page.
8947 | 16 | Table error: Multiple IAM pages for object ID %d, index ID %d contain allocations for the same interval. IAM pages %S_PGID and %S_PGID.
8948 | 16 | Database error: Page %S_PGID is marked with the wrong type in PFS page %S_PGID. PFS status 0x%x expected 0x%x.
8949 | 10 | %.*ls fixed %d allocation errors and %d consistency errors in table '%ls' (object ID %d).
8950 | 16 | %.*ls fixed %d allocation errors and %d consistency errors not associated with any single object.
8951 | 16 | Table error: Table '%ls' (ID %d). Missing or invalid key in index '%ls' (ID %d) for the row:
8952 | 16 | Table error: Database '%ls', index '%ls.%ls' (ID %d) (index ID %d). Extra or invalid key for the keys:
8953 | 10 | Repair: Deleted text column, text ID %I64d, for object ID %d on page %S_PGID, slot %d.
8954 | 10 | %.*ls found %d allocation errors and %d consistency errors not associated with any single object.
8955 | 16 | Data row (%d:%d:%d) identified by (%ls) has index values (%ls).
8956 | 16 | Index row (%d:%d:%d) with values (%ls) points to the data row identified by (%ls).
8957 | 10 | DBCC %ls (%ls%ls%ls) executed by %ls found %d errors and repaired %d errors.
8958 | 10 | %ls is the minimum repair level for the errors found by DBCC %ls (%ls %ls).
8959 | 16 | Table error: IAM page %S_PGID for object ID %d, index ID %d is linked in the IAM chain for object ID %d, index ID %d by page %S_PGID.
8960 | 23 | Table error: Page %S_PGID, slot %d, column %d is not a valid complex column.
8961 | 23 | Table error: Object ID %d. The text, ntext, or image node at page %S_PGID, slot %d, text ID %I64d does not match its reference from page %S_PGID, slot %d.
8962 | 23 | Table error: The text, ntext, or image node at page %S_PGID, slot %d, text ID %I64d has incorrect node type %d.
8963 | 23 | Table error: The text, ntext, or image node at page %S_PGID, slot %d, text ID %I64d has type %d. It cannot be placed on a page of type %d.
8964 | 23 | Table error: Object ID %d. The text, ntext, or image node at page %S_PGID, slot %d, text ID %I64d is not referenced.
8965 | 23 | Table error: Object ID %d. The text, ntext, or image node at page %S_PGID, slot %d, text ID %I64d is referenced by page %S_PGID, slot %d, but was not seen in the scan.
8966 | 22 | Could not read and latch page %S_PGID with latch type %ls. %ls failed.
8967 | 16 | Table error: Invalid value detected in %ls for Object ID %d, index ID %d. Row skipped.
8968 | 16 | Table error: %ls page %S_PGID (object ID %d, index ID %d) is out of the range of this database.
8969 | 16 | Table error: IAM chain linkage error: Object ID %d, index ID %d. The next page for IAM page %S_PGID is %S_PGID, but the previous link for page %S_PGID is %S_PGID.
8970 | 16 | Row error: Object ID %d, index ID %d, page ID %S_PGID, row ID %d. Column '%.*ls' was created NOT NULL, but is NULL in the row.
8971 | 16 | Forwarded row mismatch: Object ID %d, page %S_PGID, slot %d points to forwarded row page %S_PGID, slot %d; the forwarded row points back to page %S_PGID, slot %d.
8972 | 16 | Forwarded row referenced by more than one row. Object ID %d, page %S_PGID, slot %d incorrectly points to forwarded row page %S_PGID, slot %d; the forwarded row correctly refers back to page %S_PGID, slot %d.
8973 | 16 | CHECKTABLE processing of object ID %d, index ID %d encountered page %S_PGID, slot %d twice. Possible internal error or allocation fault.
8974 | 16 | Text node referenced by more than one node. Object ID %d, text, ntext, or image node page %S_PGID, slot %d, text ID %I64d is pointed to by page %S_PGID, slot %d and by page %S_PGID, slot %d.
8975 | 16 | Table error: Object ID %d, index ID %d. The child page pointer %S_PGID on PageId %S_PGID, slot %d is not a valid page for this database.
8976 | 16 | Table error: Object ID %d, index ID %d. Page %S_PGID was not seen in the scan although its parent %S_PGID and previous %S_PGID refer to it. Check any previous errors.
8978 | 16 | Table error: Object ID %d, index ID %d. Page %S_PGID is missing a reference from previous page %S_PGID. Possible chain linkage problem.
8979 | 16 | Table error: Object ID %d, index ID %d. Page %S_PGID is missing references from parent (unknown) and previous (page %S_PGID) nodes. Possible bad root entry in sysindexes.
8980 | 16 | Table error: Object ID %d, index ID %d. Index node page %S_PGID, slot %d refers to child page %S_PGID and previous child %S_PGID, but they were not encountered.
8981 | 16 | Table error: Object ID %d, index ID %d. The next pointer of %S_PGID refers to page %S_PGID. Neither %S_PGID nor its parent were encountered. Possible bad chain linkage.
8982 | 16 | Table error: Cross object linkage. Page %S_PGID->next in object ID %d, index ID %d refers to page %S_PGID in object ID %d, index ID %d but is not in the same index.
8983 | 10 | File %d. Extents %d, used pages %d, reserved pages %d, mixed extents %d, mixed pages %d.
8984 | 10 | Object ID %d, index ID %d. Allocations for %S_PGID. IAM %S_PGID, extents %d, used pages %d, mixed pages %d.
8985 | 16 | Could not locate file '%.*ls' in sysfiles.
8986 | 16 | Too many errors found (%d) for object ID %d. To see all error messages rerun the statement using "WITH ALL_ERRORMSGS".
8987 | 16 | No help available for DBCC statement '%.*ls'.
8988 | 10 | The schema for database '%ls' is changing. May find spurious allocation problems due to schema changes in progress.
8989 | 10 | %.*ls found %d allocation errors and %d consistency errors in database '%ls'.
8990 | 10 | %.*ls found %d allocation errors and %d consistency errors in table '%ls' (object ID %d).
8991 | 16 | 0x%.8x + 0x%.8x bytes is not a valid address range.
8992 | 16 | Database ID %d, object '%ls' (ID %d). Loop in data chain detected at %S_PGID.
8993 | 16 | Object ID %d, forwarding row page %S_PGID, slot %d points to page %S_PGID, slot %d. Did not encounter forwarded row. Possible allocation error.
8994 | 16 | Object ID %d, forwarded row page %S_PGID, slot %d should be pointed to by forwarding row page %S_PGID, slot %d. Did not encounter forwarding row. Possible allocation error.
8995 | 16 | System table '%.*ls' (object ID %d, index ID %d) is in filegroup %d. All system tables must be in filegroup %d.
8996 | 16 | IAM page %S_PGID for object ID %d, index ID %d controls pages in filegroup %d, that should be in filegroup %d.
8997 | 16 | Single page allocation %S_PGID for object ID %d, index ID %d is in filegroup %d; it should be in filegroup %d.
8998 | 16 | Page errors on the GAM, SGAM, or PFS pages do not allow CHECKALLOC to verify database ID %d pages from %S_PGID to %S_PGID. See other errors for cause.
8999 | 10 | Database tempdb allocation errors prevent further %ls processing.


Errors 9000 - 9999

Error | Severity | Description (Message Text)
9001 | 10 | The log for database '%.*ls' is not available.
9002 | 19 | The log file for database '%.*ls' is full. Back up the transaction log for the database to free up some log space.
9003 | 20 | The LSN %S_LSN passed to log scan in database '%.*ls' is invalid.
9004 | 21 | An error occurred while processing the log for database '%.*ls'.
9005 | 16 | Either start LSN or end LSN specified in OpenRowset(DBLog, ...) is invalid.
9006 | 10 | Cannot shrink log file %d (%s) because total number of logical log files cannot be fewer than %d.
9007 | 10 | Cannot shrink log file %d (%s) because requested size (%dKB) is larger than the start of the last logical log file.
9008 | 10 | Cannot shrink log file %d (%s) because all logical log files are in use.
9009 | 10 | Cannot shrink log file %d (%s) because of minimum log space required.
9010 | 14 | User does not have permission to query the virtual table, DBLog. Only members of the sysadmin fixed server role and the db_owner fixed database role have this permission


Errors 10000 - 10999

Error | Severity | Description (Message Text)
10000 | 16 | Unknown provider error.
10001 | 16 | The provider reported an unexpected catastrophic failure.
10002 | 16 | The provider did not implement the functionality.
10003 | 16 | The provider ran out of memory.
10004 | 16 | One or more arguments were reported invalid by the provider.
10005 | 16 | The provider did not support an interface.
10006 | 16 | The provider indicated an invalid pointer was used.
10007 | 16 | The provider indicated an invalid handle was used.
10008 | 16 | The provider terminated the operation.
10009 | 16 | The provider did not give any information about the error.
10010 | 16 | The data necessary to complete this operation was not yet available to the provider.
10011 | 16 | Access denied.
10021 | 16 | Execution terminated by the provider because a resource limit was reached.
10022 | 16 | The provider called a method from IRowsetNotify in the consumer, and the method has not yet returned.
10023 | 16 | The provider does not support the necessary method.
10024 | 16 | The provider indicates that the user did not have the permission to perform the operation.
10025 | 16 | Provider caused a server fault in an external process.
10026 | 16 | No command text was set.
10027 | 16 | Command was not prepared.
10028 | 16 | Authentication failed.
10031 | 16 | An error occurred because one or more properties could not be set.
10032 | 16 | Cannot return multiple result sets (not supported by the provider).
10033 | 16 | The specified index does not exist or the provider does not support an index scan on this data source.
10034 | 16 | The specified table does not exist.
10035 | 16 | No value was given for one or more of the required parameters.
10041 | 16 | Could not set any property values.
10042 | 16 | Cannot set any properties while there is an open rowset.
10051 | 16 | An error occurred while setting the data.
10052 | 16 | The insertion was canceled by the provider during notification.
10053 | 16 | Could not convert the data value due to reasons other than sign mismatch or overflow.
10054 | 16 | The data value for one or more columns overflowed the type used by the provider.
10055 | 16 | The data violated the integrity constraints for one or more columns.
10056 | 16 | The number of rows that have pending changes has exceeded the limit specified by the DBPROP_MAXPENDINGROWS property.
10057 | 16 | Cannot create the row. Would exceed the total number of active rows supported by the rowset.
10058 | 16 | The consumer cannot insert a new row before releasing previously-retrieved row handles.
10061 | 16 | An error occurred while setting data for one or more columns.
10062 | 16 | The change was canceled by the provider during notification.
10063 | 16 | Could not convert the data value due to reasons other than sign mismatch or overflow.
10064 | 16 | The data value for one or more columns overflowed the type used by the provider.
10065 | 16 | The data violated the integrity constraints for one or more columns.
10066 | 16 | The number of rows that have pending changes has exceeded the limit specified by the DBPROP_MAXPENDINGROWS property.
10067 | 16 | The rowset was using optimistic concurrency and the value of a column has been changed after the containing row was last fetched or resynchronized.
10068 | 16 | The consumer could not delete the row. A deletion is pending or has already been transmitted to the data source.
10069 | 16 | The consumer could not delete the row. The insertion has been transmitted to the data source.
10075 | 16 | An error occurred while deleting the row.
10081 | 16 | The rowset uses integrated indexes and there is no current index.
10085 | 16 | RestartPosition on the table was canceled during notification.
10086 | 16 | The table was built over a live data stream and the position cannot be restarted.
10087 | 16 | The provider did not release some of the existing rows.
10088 | 16 | The order of the columns was not specified in the object that created the rowset. The provider had to reexecute the command to reposition the next fetch position to its initial position, and the order of the columns changed.


Errors 11000 - 11999

Error | Severity | Description (Message Text)
11000 | 16 | Unknown status code for this column.
11001 | 16 | Non-NULL value successfully returned.
11002 | 16 | Deferred accessor validation occurred. Invalid binding for this column.
11003 | 16 | Could not convert the data value due to reasons other than sign mismatch or overflow.
11004 | 16 | Successfully returned a NULL value.
11005 | 16 | Successfully returned a truncated value.
11006 | 16 | Could not convert the data type because of a sign mismatch.
11007 | 16 | Conversion failed because the data value overflowed the data type used by the provider.
11008 | 16 | The provider cannot allocate memory or open another storage object on this column.
11009 | 16 | The provider cannot determine the value for this column.
11010 | 16 | The user did not have permission to write to the column.
11011 | 16 | The data value violated the integrity constraints for the column.
11012 | 16 | The data value violated the schema for the column.
11013 | 16 | The column had a bad status.
11014 | 16 | The column used the default value.
11015 | 16 | The column was skipped when setting data.
11031 | 16 | The row was successfully deleted.
11032 | 16 | The table was in immediate-update mode, and deleting a single row caused more than one row to be deleted in the data source.
11033 | 16 | The row was released even though it had a pending change.
11034 | 16 | Deletion of the row was canceled during notification.
11036 | 16 | The rowset was using optimistic concurrency and the value of a column has been changed after the containing row was last fetched or resynchronized.
11037 | 16 | The row has a pending delete or the deletion had been transmitted to the data source.
11038 | 16 | The row is a pending insert row.
11039 | 16 | DBPROP_CHANGEINSERTEDROWS was VARIANT_FALSE and the insertion for the row has been transmitted to the data source.
11040 | 16 | Deleting the row violated the integrity constraints for the column or table.
11041 | 16 | The row handle was invalid or was a row handle to which the current thread does not have access rights.
11042 | 16 | Deleting the row would exceed the limit for pending changes specified by the rowset property DBPROP_MAXPENDINGROWS.
11043 | 16 | The row has a storage object open.
11044 | 16 | The provider ran out of memory and could not fetch the row.
11045 | 16 | User did not have sufficient permission to delete the row.
11046 | 16 | The table was in immediate-update mode and the row was not deleted due to reaching a limit on the server, such as query execution timing out.
11047 | 16 | Updating did not meet the schema requirements.
11048 | 16 | There was a recoverable, provider-specific error, such as an RPC failure.
11100 | 16 | The provider indicates that conflicts occurred with other properties or requirements.
11101 | 16 | Could not obtain an interface required for text, ntext, or image access.
11102 | 16 | The provider could not support a required row lookup interface.
11103 | 16 | The provider could not support an interface required for the UPDATE/DELETE/INSERT statements.
11104 | 16 | The provider could not support insertion on this table.
11105 | 16 | The provider could not support updates on this table.
11106 | 16 | The provider could not support deletion on this table.
11107 | 16 | The provider could not support a row lookup position.
11108 | 16 | The provider could not support a required property.
11109 | 16 | The provider does not support an index scan on this data source.


Errors 13000 - 13999

Error | Severity | Description (Message Text)
13001 | 10 | data page
13002 | 10 | index page
13003 | 10 | leaf page
13004 | 10 | last
13005 | 10 | root
13006 | 10 | read from
13007 | 10 | send to
13008 | 10 | receive
13009 | 10 | send
13010 | 10 | read
13011 | 10 | wait
13012 | 10 | a USE database statement
13013 | 10 | a procedure or trigger
13014 | 10 | a DISTINCT clause
13015 | 10 | a view
13016 | 10 | an INTO clause
13017 | 10 | an ORDER BY clause
13018 | 10 | a COMPUTE clause
13019 | 10 | a SELECT INTO statement
13020 | 10 | option
13021 | 10 | offset option
13022 | 10 | statistics option
13023 | 10 | parameter option
13024 | 10 | function name
13025 | 10 | varbinary (128) NOT NULL
13026 | 10 | parameter
13027 | 10 | convert specification
13028 | 10 | index
13029 | 10 | table
13030 | 10 | database
13031 | 10 | procedure
13032 | 10 | trigger
13033 | 10 | view
13034 | 10 | default
13035 | 10 | rule
13036 | 10 | system table
13037 | 10 | unknown type
13038 | 10 | SET statement
13039 | 10 | column
13040 | 10 | type
13041 | 10 | character string
13042 | 10 | integer
13043 | 10 | identifier
13044 | 10 | number
13045 | 10 | integer value
13046 | 10 | floating point value
13047 | 10 | object
13048 | 10 | column heading
13076 | 10 | an assignment
13077 | 10 | a cursor declaration
13078 | 10 | replication filter
13079 | 10 | variable assignment
13080 | 10 | statistics
13081 | 10 | file
13082 | 10 | filegroup
13083 | 10 | server
13084 | 0 | write
13085 | 0 | function
13086 | 10 | database collation
13087 | 10 | drop
13088 | 10 | alter


Errors 14000 - 14999

Error | Severity | Description (Message Text).
14002 | 16 | Could not find the 'Sync' subsystem with the task ID %ld.
14003 | 16 | You must supply a publication name.
14004 | 16 | %s must be in the current database.
14005 | 16 | Could not drop publication. A subscription exists to it.
14006 | 16 | Could not drop the publication.
14008 | 11 | There are no publications.
14009 | 11 | There are no articles for publication '%s'.
14010 | 16 | The remote server is not defined as a subscription server.
14012 | 16 | The @status parameter value must be either 'active' or 'inactive'.
14013 | 16 | This database is not enabled for publication.
14014 | 16 | The synchronization method (@sync_method) must be '[bcp] native', '[bcp] character', 'concurrent' or 'concurrent_c'.
14015 | 16 | The replication frequency (@repl_freq) must be either 'continuous' or 'snapshot'.
14016 | 16 | The publication '%s' already exists.
14017 | 16 | Invalid @restricted parameter value. Valid options are 'true' or 'false'.
14018 | 16 | Could not create the publication.
14019 | 16 | The @operation parameter value must be either 'add' or 'drop'.
14020 | 16 | Could not obtain the column ID for the specified column. Schema replication failed.
14021 | 16 | The column was not added correctly to the article.
14022 | 16 | The @property parameter value must be either 'description', 'sync_object', 'type', 'ins_cmd', 'del_cmd', 'upd_cmd', 'filter', 'dest_table', 'dest_object', 'creation_script', 'pre_creation_cmd', 'status', 'schema_option', or 'destination_owner'.
14023 | 16 | The type must be '[indexed view] logbased', '[indexed view] logbased manualfilter', '[indexed view] logbased manualview', '[indexed view] logbased manualboth', or '( view | indexed view | proc | func ) schema only'.
14025 | 10 | Article update successful.
14027 | 11 | %s does not exist in the current database.
14028 | 16 | Only user tables, materialized views, and stored procedures can be published as 'logbased' articles.
14029 | 16 | The vertical partition switch must be either 'true' or 'false'.
14030 | 16 | The article '%s' exists in publication '%s'.
14031 | 16 | User tables and views are the only valid synchronization objects.
14032 | 16 | The value of parameter %s cannot be 'all'. It is reserved by replication stored procedures.
14033 | 16 | Could not change replication frequency because there are active subscriptions on the publication.
14034 | 16 | The publication name (@publication) cannot be the keyword 'all'.
14035 | 16 | The replication option '%s' of database '%s' has already been set to true.
14036 | 16 | Could not enable database for publishing.
14037 | 16 | The replication option '%s' of database '%s' has been set to false.
14038 | 16 | Could not disable database for publishing.
14039 | 16 | Could not construct column clause for article view. Reduce the number of columns or create the view manually.
14040 | 16 | The server '%s' is already a Subscriber.
14042 | 16 | Could not create Subscriber.
14043 | 16 | The parameter %s cannot be NULL.
14046 | 16 | Could not drop article. A subscription exists on it.
14047 | 16 | Could not drop %s.
14048 | 16 | The server '%s' is not a Subscriber.
14049 | 16 | Stored procedures for replication are the only objects that can be used as a filter.
14050 | 11 | No subscription is on this publication or article.
14051 | 16 | The parameter value must be 'sync_type' or 'dest_db'.
14052 | 16 | The @sync_type parameter value must be 'automatic' or 'none'.
14053 | 16 | The subscription could not be updated at this time.
14054 | 10 | The subscription was updated successfully.
14055 | 10 | The subscription does not exist.
14056 | 16 | The subscription could not be dropped at this time.
14057 | 16 | The subscription could not be created.
14058 | 16 | The subscription already exists.
14059 | 16 | Materialized view articles cannot be created for publications with the properties allow_sync_tran, allow_queued_tran, or allow_dts.
14061 | 16 | The @pre_creation_cmd parameter value must be 'none', 'drop', 'delete', or 'truncate'.
14062 | 10 | The Subscriber was dropped.
14063 | 11 | The remote server does not exist or has not been designated as a valid Subscriber.
14065 | 16 | The @status parameter value must be 'initiated', 'active', 'inactive', or 'subscribed'.
14066 | 16 | The previous status must be 'active', 'inactive', or 'subscribed'.
14067 | 16 | The status value is the same as the previous status value.
14068 | 16 | Could not update sysobjects. The subscription status could not be changed.
14069 | 16 | Could not update sysarticles. The subscription status could not be changed.
14070 | 16 | Could not update the distribution database subscription table. The subscription status could not be changed.
14071 | 16 | Could not find the Distributor or the distribution database for the local server. The Distributor may not be installed, or the local server may not be configured as a Publisher at the Distributor.
14074 | 16 | The server '%s' is already listed as a Publisher.
14075 | 16 | The Publisher could not be created at this time.
14076 | 16 | Could not grant replication login permission to '%s'.
14077 | 10 | The publication was updated successfully.
14078 | 16 | The parameter must be 'description', 'taskid', 'sync_method', 'status', 'repl_freq', 'restricted', 'retention', 'immediate_sync', 'enabled_for_internet', 'allow_push', 'allow_pull', 'allow_anonymous', or 'retention'.
14080 | 11 | The remote server does not exist or has not been designated as a valid Publisher.
14085 | 16 | The Subscriber information could not be obtained from the Distributor.
14088 | 16 | The table '%s' must have a primary key to be published using the transaction-based method.
14089 | 16 | The clustered index on materialized view '%s' may not contain nullable columns if it is to be published using the transaction-based method.
14090 | 16 | Error evaluating article synchronization object after column drop. The filter clause for article '%s' must not reference the dropped column.
14091 | 16 | The @type parameter passed to sp_helpreplicationdb must be either 'pub' or 'sub'.
14092 | 16 | Could not change article because there is an existing subscription to the article.
14093 | 16 | Cannot grant or revoke access directly on publication '%s' because it uses the default publication access list.
14094 | 16 | Could not subscribe to article '%s' because heterogeneous Subscriber '%s' does not support the @pre_creation_cmd parameter value 'truncate'.
14095 | 16 | Could not subscribe to publication '%s' because heterogeneous Subscriber '%s' only supports the @sync_method parameter value 'bcp character' .
14096 | 16 | The path and name of the table creation script must be specified if the @pre_creation_cmd parameter value is 'drop'.
14097 | 16 | The 'status' value must be 'no column names', 'include column names', 'string literals', 'parameters', 'DTS horizontal partitions' or 'no DTS horizontal partitions'.
14098 | 16 | Cannot drop Distribution Publisher '%s'. The remote Publisher is using '%s' as Distributor.
14099 | 16 | The server '%s' is already defined as a Distributor.
14100 | 16 | Specify all articles when subscribing to a publication using concurrent snapshot processing.
14101 | 16 | The publication '%s' already has a Snapshot Agent defined.
14102 | 16 | Specify all articles when unsubscribing from a publication using concurrent snapshot processing.
14105 | 10 | You have updated the distribution database property '%s' successfully.
14106 | 10 | Distribution retention periods must be greater than 0.
14107 | 10 | The @max_distretention value must be larger than the @min_distretention value.
14108 | 10 | Removed %ld history records from %s.
14109 | 10 | The @security_mode parameter value must be 0 (SQL Server Authentication) or 1 (Windows Authentication).
14110 | 16 | For stored procedure articles, the @property parameter value must be 'description', 'dest_table', 'dest_object', 'creation_script', 'pre_creation_cmd', 'schema_option', or 'destination_owner'.
14111 | 16 | The @pre_creation_cmd parameter value must be 'none' or 'drop'.
14112 | 16 | This procedure can be executed only against table-based articles.
14113 | 16 | Could not execute '%s'. Check '%s' in the install directory.
14114 | 16 | '%s' is not configured as a Distributor.
14115 | 16 | The property parameter value must be %s.
14117 | 16 | '%s' is not configured as a distribution database.
14118 | 16 | A stored procedure can be published only as a 'serializable proc exec' article, a 'proc exec' article, or a 'proc schema only' article.
14119 | 16 | Could not add the distribution database '%s'. This distribution database already exists.
14120 | 16 | Could not drop the distribution database '%s'. This distributor database is associated with a Publisher.
14121 | 16 | Could not drop the Distributor '%s'. This Distributor has associated distribution databases.
14122 | 16 | The @article parameter value must be 'all' for immediate_sync publications.
14123 | 16 | The subscription @sync_type parameter value 'manual' is no longer supported.
14124 | 16 | A publication must have at least one article before a subscription to it can be created.
14126 | 16 | You do not have the required permissions to complete the operation.
14128 | 16 | Invalid @subscription_type parameter value. Valid options are 'push' or 'pull'.
14129 | 16 | The @status parameter value must be NULL for 'automatic' sync_type when you add subscriptions to an immediate_sync publication.
14135 | 16 | There is no subscription on Publisher '%s', publisher database '%s', publication '%s'.
14136 | 16 | The keyword 'all' is reserved by replication stored procedures.
14137 | 16 | The @value parameter value must be either 'true' or 'false'.
14138 | 16 | Invalid option name '%s'.
14139 | 16 | The replication system table '%s' already exists.
14143 | 16 | Cannot drop Distributor Publisher '%s'. There are Subscribers associated with it in the distribution database '%s'.
14144 | 16 | Cannot drop Subscriber '%s'. There are subscriptions from it in the publication database '%s'.
14146 | 16 | The article parameter '@schema_option' cannot be NULL.
14147 | 16 | Restricted publications are no longer supported.
14148 | 16 | Invalid '%s' value. Valid values are 'true' or 'false'.
14149 | 10 | Removed %ld replication history records in %s seconds (%ld row/secs).
14150 | 10 | Replication-%s: agent %s succeeded. %s
14151 | 18 | Replication-%s: agent %s failed. %s
14152 | 10 | Replication-%s: agent %s scheduled for retry. %s
14153 | 10 | Replication-%s: agent %s warning. %s
14154 | 16 | The Distributor parameter must be '@heartbeat_interval'.
14155 | 16 | Invalid article ID specified for procedure script generation.
14156 | 16 | The custom stored procedure was not specified in the article definition.
14157 | 10 | The subscription created by Subscriber '%s' to publication '%s' has expired and has been dropped.
14158 | 10 | Replication-%s: agent %s: %s.
14159 | 16 | Could not change property '%s' for article '%s' because there is an existing subscription to the article.
14199 | 10 | The specified job "%s" is not created for maintenance plans.
14200 | 16 | The specified '%s' is invalid.
14201 | 10 | 0 (all steps) ..
14202 | 10 | before or after @active_start_time
14203 | 10 | sp_helplogins [excluding Windows NT groups]
14204 | 10 | 0 (non-idle), 1 (executing), 2 (waiting for thread), 3 (between retries), 4 (idle), 5 (suspended), 7 (performing completion actions)
14205 | 10 | (unknown)
14206 | 10 | 0..n seconds
14207 | 10 | -1 [no maximum], 0..n
14208 | 10 | 1..7 [1 = E-mail, 2 = Pager, 4 = NetSend]
14209 | 10 | 0..127 [1 = Sunday .. 64 = Saturday]
14210 | 10 | notification
14211 | 10 | server
14212 | 10 | (all jobs)
14213 | 16 | Core Job Details:
14214 | 16 | Job Steps:
14215 | 16 | Job Schedules:
14216 | 16 | Job Target Servers:
14217 | 16 | SQL Server Warning: '%s' has performed a forced defection of TSX server '%s'. Run sp_delete_targetserver at the MSX in order to complete the defection.
14218 | 10 | hour
14219 | 10 | minute
14220 | 10 | second
14221 | 16 | This job has one or more notifications to operators other than '%s'. The job cannot be targeted at remote servers as currently defined.
14222 | 16 | Cannot rename the '%s' operator.
14223 | 16 | Cannot modify or delete operator '%s' while this server is a %s.
14224 | 0 | Warning: The server name given is not the current MSX server ('%s').
14225 | 16 | Warning: Could not determine local machine name. This prevents MSX operations from being posted.
14226 | 0 | %ld history entries purged.
14227 | 0 | Server defected from MSX '%s'. %ld job(s) deleted.
14228 | 0 | Server MSX enlistment changed from '%s' to '%s'.
14229 | 0 | Server enlisted into MSX '%s'.
14230 | 0 | SP_POST_MSX_OPERATION: %ld %s download instruction(s) posted.
14231 | 0 | SP_POST_MSX_OPERATION Warning: The specified %s ('%s') is not involved in a multiserver job.
14232 | 16 | Specify either a job_name, job_id, or an originating_server.
14233 | 16 | Specify a valid job_id (or 0x00 for all jobs).
14234 | 16 | The specified '%s' is invalid (valid values are returned by %s).
14235 | 16 | The specified '%s' is invalid (valid values are greater than 0 but excluding %ld).
14236 | 0 | Warning: Non-existent step referenced by %s.
14237 | 16 | When an action of 'REASSIGN' is specified, the New Login parameter must also be supplied.
14238 | 0 | %ld jobs deleted.
14239 | 0 | %ld jobs reassigned to %s.
14240 | 0 | Job applied to %ld new servers.
14241 | 0 | Job removed from %ld servers.
14242 | 16 | Only a system administrator can reassign ownership of a job.
14243 | 0 | Job '%s' started successfully.
14244 | 16 | Only a system administrator can reassign tasks.
14245 | 16 | Specify either the @name, @id, or @loginname of the task(s) to be deleted.
14246 | 16 | Specify either the @currentname or @id of the task to be updated.
14247 | 16 | Only a system administrator can view tasks owned by others.
14248 | 16 | This login is the owner of %ld job(s). You must delete or reassign these jobs before the login can be dropped.
14249 | 16 | Specify either @taskname or @oldloginname when reassigning a task.
14250 | 16 | The specified %s is too long. It must contain no more than %ld characters.
14251 | 16 | Cannot specify '%s' as the operator to be notified.
14252 | 16 | Cannot perform this action on a job you do not own.
14253 | 0 | %ld (of %ld) job(s) stopped successfully.
14254 | 0 | Job '%s' stopped successfully.
14255 | 16 | The owner ('%s') of this job is either an invalid login, or is not a valid user of database '%s'.
14256 | 16 | Cannot start job '%s' (ID %s) because it does not have any job server(s) defined.
14257 | 16 | Cannot stop job '%s' (ID %s) because it does not have any job server(s) defined.
14258 | 16 | Cannot perform this operation while SQLServerAgent is starting. Try again later.
14259 | 16 | A schedule (ID %ld, '%s') for this job with this definition already exists.
14260 | 16 | You do not have sufficient permission to run this command.
14261 | 16 | The specified %s ('%s') already exists.
14262 | 16 | The specified %s ('%s') does not exist.
14263 | 16 | Target server '%s' is already a member of group '%s'.
14264 | 16 | Target server '%s' is not a member of group '%s'.
14265 | 25 | The MSSQLServer service terminated unexpectedly.
14266 | 16 | The specified '%s' is invalid (valid values are: %s).
14267 | 16 | Cannot add a job to the '%s' job category.
14268 | 16 | There are no jobs at this server that originated from server '%s'.
14269 | 16 | Job '%s' is already targeted at server '%s'.
14270 | 16 | Job '%s' is not currently targeted at server '%s'.
14271 | 16 | A target server cannot be named '%s'.
14272 | 16 | Object-type and object-name must be supplied as a pair.
14273 | 16 | You must provide either @job_id or @job_name (and, optionally, @schedule_name), or @schedule_id.
14274 | 16 | Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server.
14275 | 16 | The originating server must be either '(local)' or '%s'.
14276 | 16 | '%s' is a permanent %s category and cannot be deleted.
14277 | 16 | The command script does not destroy all the objects that it creates. Revise the command script.
14278 | 16 | The schedule for this job is invalid (reason: %s).
14279 | 16 | Supply either @job_name or @originating_server.
14280 | 16 | Supply either a job name (and job aspect), or one or more job filter parameters.
14281 | 0 | Warning: The @new_owner_login_name parameter is not necessary when specifying a 'DELETE' action.
14282 | 16 | Supply either a date (created or last modified) and a data comparator, or no date parameters at all.
14283 | 16 | Supply @target_server_groups or @target_servers, or both.
14284 | 16 | Cannot specify a job ID for a new job. An ID will be assigned by the procedure.
14285 | 16 | Cannot add a local job to a multiserver job category.
14286 | 16 | Cannot add a multiserver job to a local job category.
14287 | 16 | The '%s' supplied has an invalid %s.
14288 | 16 | %s cannot be before %s.
14289 | 16 | %s cannot contain '%s' characters.
14290 | 16 | This job is currently targeted at the local server so cannot also be targeted at a remote server.
14291 | 16 | This job is currently targeted at a remote server so cannot also be targeted at the local server.
14292 | 16 | There are two or more tasks named '%s'. Specify %s instead of %s to uniquely identify the task.
14293 | 16 | There are two or more jobs named '%s'. Specify %s instead of %s to uniquely identify the job.
14294 | 16 | Supply either %s or %s to identify the job.
14295 | 16 | Frequency Type 0x2 (OnDemand) is no longer supported.
14296 | 16 | This server is already enlisted into MSX '%s'.
14297 | 16 | Cannot enlist into the local machine.
14298 | 16 | This server is not currently enlisted into an MSX.
14299 | 16 | Server '%s' is an MSX. Cannot enlist one MSX into another MSX.
14300 | 16 | Circular dependencies exist. Dependency evaluation cannot continue.
14301 | 16 | Logins other than the current user can only be seen by members of the sysadmin role.
14302 | 16 | You must upgrade your client to version 6.5 of SQL-DMO and SQL Server Enterprise Manager to connect to this server. The upgraded versions will administer both SQL Server version 6.5 and 6.0 (if sqlole65.sql is run).
14303 | 16 | Stored procedure '%s' failed to access registry key.
14304 | 16 | Stored procedure '%s' can run only on Windows 2000 servers.
14410 | 16 | You must supply either a plan_name or a plan_id.
14411 | 16 | Cannot delete this plan. The plan contains enlisted databases.
14412 | 16 | The destination database is already part of a log shipping plan.
14413 | 16 | This database is already log shipping.
14414 | 16 | A log shipping monitor is already defined.
14415 | 16 | The user name cannot be null when using SQL Server authentication.
14416 | 16 | This stored procedure must be run in msdb.
14417 | 16 | Cannot delete the monitor server while databases are participating in log shipping.
14418 | 16 | The specified @backup_file_name was not created from database '%s'.
14419 | 16 | The specified @backup_file_name is not a database backup.
14420 | 16 | The log shipping source %s.%s has not backed up for %s minutes.
14421 | 16 | The log shipping destination %s.%s is out of sync by %s minutes.
14422 | 16 | Supply either @plan_id or @plan_name.
14423 | 16 | Other databases are enlisted on this plan and must be removed before the plan can be deleted.
14424 | 16 | The database '%s' is already involved in log shipping.
14425 | 16 | The database '%s' does not seem to be involved in log shipping.
14426 | 16 | A log shipping monitor is already defined. Call sp_define_log_shipping_monitor with @delete_existing = 1.
14427 | 16 | A user name is necessary for SQL Server security.
14428 | 16 | Could not remove the monitor as there are still databases involved in log shipping.
14429 | 16 | There are still secondary servers attached to this primary.
14430 | 16 | Invalid destination path %s.
14440 | 16 | Could not set single user mode.
14441 | 16 | Role change succeeded.
14442 | 16 | Role change failed.
14450 | 16 | The specified @backup_file_name was not taken from database '%s'.
14451 | 16 | The specified @backup_file_name is not a database backup.
14500 | 16 | Supply either a non-zero message ID, non-zero severity, or non-null performance condition.
14501 | 16 | An alert ('%s') has already been defined on this condition.
14502 | 16 | The @target_name parameter must be supplied when specifying an @enum_type of 'TARGET'.
14503 | 16 | The @target_name parameter should not be supplied when specifying an @enum_type of 'ALL' or 'ACTUAL'.
14504 | 16 | '%s' is the fail-safe operator. You must make another operator the fail-safe operator before '%s' can be dropped.
14505 | 16 | Specify a null %s when supplying a performance condition.
14506 | 16 | Cannot set alerts on message ID %ld.
14507 | 16 | A performance condition must be formatted as: 'object_name|counter_name|instance_name|comparator(> or < or =)|numeric value'.
14539 | 16 | Only a Standard or Enterprise edition of SQL Server can be enlisted into an MSX.
14540 | 16 | Only a SQL Server running on Microsoft Windows NT can be enlisted into an MSX.
14541 | 16 | The version of the MSX (%s) is not recent enough to support this TSX. Version %s or later is required at the MSX.
14542 | 16 | It is invalid for any TSQL step of a multiserver job to have a non-null %s value.
14543 | 16 | Login '%s' owns one or more multiserver jobs. Ownership of these jobs can only be assigned to members of the %s role.
14544 | 16 | This job is owned by '%s'. Only a job owned by a member of the %s role can be a multiserver job.
14545 | 16 | The %s parameter is not valid for a job step of type '%s'.
14546 | 16 | The %s parameter is not supported on Windows 95/98 platforms.
14547 | 10 | Warning: This change will not be downloaded by the target server(s) until an %s for the job is posted using %s.
14548 | 10 | Target server '%s' does not have any jobs assigned to it.
14549 | 10 | (Description not requested.)
14550 | 10 | Command-Line Subsystem
14551 | 10 | Replication Snapshot Subsystem
14552 | 10 | Replication Transaction-Log Reader Subsystem
14553 | 10 | Replication Distribution Subsystem
14554 | 10 | Replication Merge Subsystem
14555 | 10 | Active Scripting Subsystem
14556 | 10 | Transact-SQL Subsystem
14557 | 10 | [Internal]
14558 | 10 | (encrypted command)
14559 | 10 | (append output file)
14560 | 10 | (include results in history)
14561 | 10 | (normal)
14562 | 10 | (quit with success)
14563 | 10 | (quit with failure)
14564 | 10 | (goto next step)
14565 | 10 | (goto step)
14566 | 10 | (idle)
14567 | 10 | (below normal)
14568 | 10 | (above normal)
14569 | 10 | (time critical)
14570 | 10 | (Job outcome)
14571 | 10 | No description available.
14572 | 10 | @freq_interval must be at least 1 for a daily job.
14573 | 10 | @freq_interval must be a valid day of the week bitmask [Sunday = 1 .. Saturday = 64] for a weekly job.
14574 | 10 | @freq_interval must be between 1 and 31 for a monthly job.
14575 | 10 | @freq_relative_interval must be one of 1st (0x1), 2nd (0x2), 3rd [0x4], 4th (0x8) or Last (0x10).
14576 | 10 | @freq_interval must be between 1 and 10 (1 = Sunday .. 7 = Saturday, 8 = Day, 9 = Weekday, 10 = Weekend-day) for a monthly-relative job.
14577 | 10 | @freq_recurrence_factor must be at least 1.
14578 | 10 | Starts whenever the CPU usage has remained below %ld percent for %ld seconds.
14579 | 10 | Automatically starts when SQLServerAgent starts.
14580 | 10 | job
14581 | 10 | Replication Transaction Queue Reader Subsystem
14585 | 16 | Only the owner of DTS Package '%s' or a member of the sysadmin role may reassign its ownership.
14586 | 16 | Only the owner of DTS Package '%s' or a member of the sysadmin role may create new versions of it.
14587 | 16 | Only the owner of DTS Package '%s' or a member of the sysadmin role may drop it or any of its versions.
14588 | 10 | ID.VersionID =
14589 | 10 | [not specified]
14590 | 16 | DTS Package '%s' already exists with a different ID in this category.
14591 | 16 | DTS Category '%s' already exists in the specified parent category.
14592 | 16 | DTS Category '%s' was found in multiple parent categories. You must uniquely specify the category to be dropped.
14593 | 16 | DTS Category '%s' contains packages and/or other categories. You must drop these first, or specify a recursive drop.
14594 | 10 | DTS Package
14595 | 16 | DTS Package '%s' exists in different categories. You must uniquely specify the package.
14596 | 16 | DTS Package '%s' exists in another category.
14597 | 16 | DTS Package ID '%s' already exists with a different name.
14598 | 16 | Cannot drop the Local, Repository, or LocalDefault DTS categories.
14599 | 10 | Name


Errors 15000 - 15999

Error | Severity | Description (Message Text)
15001 | 16 | Object '%ls' does not exist or is not a valid object for this operation.
15002 | 16 | The procedure '%s' cannot be executed within a transaction.
15003 | 16 | Only members of the %s role can execute this stored procedure.
15004 | 16 | Name cannot be NULL.
15005 | 0 | Statistics for all tables have been updated.
15006 | 16 | '%s' is not a valid name because it contains invalid characters.
15007 | 16 | The login '%s' does not exist.
15008 | 16 | User '%s' does not exist in the current database.
15009 | 16 | The object '%s' does not exist in database '%s'.
15010 | 16 | The database '%s' does not exist. Use sp_helpdb to show available databases.
15011 | 16 | Database option '%s' does not exist.
15012 | 16 | The device '%s' does not exist. Use sp_helpdevice to show available devices.
15013 | 0 | Table '%s': No columns without statistics found.
15014 | 16 | The role '%s' does not exist in the current database.
15015 | 16 | The server '%s' does not exist. Use sp_helpserver to show available servers.
15016 | 16 | The default '%s' does not exist.
15017 | 16 | The rule '%s' does not exist.
15018 | 0 | Table '%s': Creating statistics for the following columns:
15019 | 16 | The extended stored procedure '%s' does not exist.
15020 | 0 | Statistics have been created for the %d listed columns of the above tables.
15021 | 16 | There are no remote users mapped to any local user from remote server '%s'.
15022 | 16 | The specified user name is already aliased.
15023 | 16 | User or role '%s' already exists in the current database.
15024 | 16 | The group '%s' already exists in the current database.
15025 | 16 | The login '%s' already exists.
15026 | 16 | Logical device '%s' already exists.
15027 | 16 | There are no remote users mapped to local user '%s' from remote server '%s'.
15028 | 16 | The server '%s' already exists.
15029 | 16 | The data type '%s' already exists in the current database.
15030 | 16 | The read-only bit cannot be turned off because the database is in standby mode.
15031 | 0 | 'Virtual_device' device added.
15032 | 16 | The database '%s' already exists.
15033 | 16 | '%s' is not a valid official language name.
15034 | 16 | The application role password must not be NULL.
15035 | 16 | '%s' is not a database device.
15036 | 16 | The data type '%s' does not exist.
15037 | 16 | The physical data type '%s' does not allow nulls.
15038 | 16 | User-defined data types based on timestamp are not allowed.
15039 | 16 | The language %s already exists in syslanguages.
15040 | 16 | User-defined error messages must have an ID greater than 50000.
15041 | 16 | User-defined error messages must have a severity level between 1 and 25.
15043 | 16 | You must specify 'REPLACE' to overwrite an existing message.
15044 | 16 | '%s' is an unknown device type. Use 'disk', 'tape', or 'pipe'.
15045 | 16 | The logical name cannot be NULL.
15046 | 16 | The physical name cannot be NULL.
15047 | 16 | The only permitted options for a tape device are 'skip' and 'noskip'.
15048 | 0 | Valid values of database compatibility level are %d, %d, %d, or %d.
15049 | 11 | Cannot unbind from '%s'. Use ALTER TABLE DROP CONSTRAINT.
15050 | 11 | Cannot bind default '%s'. The default must be created using the CREATE DEFAULT statement.
15051 | 11 | Cannot rename the table because it is published for replication.
15052 | 0 | Prior to updating sysdatabases entry for database '%s', mode = %d and status = %d (status suspect_bit = %d).
15053 | 16 | Objects exist which are not owned by the database owner.
15054 | 0 | The current compatibility level is %d.
15055 | 11 | Error. Updating sysdatabases returned @@error <> 0.
15056 | 0 | No row in sysdatabases was updated because mode and status are already correctly reset. No error and no changes made.
15057 | 16 | List of %s name contains spaces, which are not allowed.
15058 | 16 | List of %s has too few names.
15059 | 16 | List of %s has too many names.
15060 | 16 | List of %s names contains name(s) which have '%s' non-alphabetic characters.
15061 | 16 | Add device request denied. A physical device named '%s' already exists.
15062 | 16 | The guest user cannot be mapped to a login name.
15063 | 16 | The login already has an account under a different user name.
15064 | 11 | PRIMARY KEY and UNIQUE KEY constraints do not have space allocated.
15065 | 16 | All user IDs have been assigned.
15066 | 16 | A default-name mapping of a remote login from remote server '%s' already exists.
15067 | 16 | '%s' is not a local user. Remote login denied.
15068 | 16 | A remote user '%s' already exists for remote server '%s'.
15069 | 16 | One or more users are using the database. The requested operation cannot be completed.
15070 | 0 | Object '%s' was successfully marked for recompilation.
15071 | 16 | Usage: sp_addmessage <msgnum>,<severity>,<msgtext> [,<language> [,FALSE | TRUE [,REPLACE]]]
15072 | 16 | Usage: sp_addremotelogin remoteserver [, loginame [,remotename]]
15073 | 0 | For row in sysdatabases for database '%s', the status bit %d was forced off and mode was forced to 0.
15074 | 0 | Warning: You must recover this database prior to access.
15075 | 16 | The data type '%s' is reserved for future use.
15076 | 16 | Default, table, and user data types must be in the current database.
15077 | 16 | Rule, table, and user data type must be in the current database.
15078 | 16 | The table or view must be in the current database.
15079 | 10 | Queries processed: %d.
15081 | 16 | Membership of the public role cannot be changed.
15082 | 11 | NULL is not an acceptable parameter value for this procedure. Use a percent sign instead.
15083 | 16 | Physical data type '%s' does not accept a collation
15084 | 16 | The column or user data type must be in the current database.
15085 | 16 | Usage: sp_addtype name, 'data type' [,'NULL' | 'NOT NULL']
15086 | 16 | Invalid precision specified. Precision must be between 1 and 38.
15087 | 16 | Invalid scale specified. Scale must be less than precision and positive.
15088 | 16 | The physical data type is fixed length. You cannot specify the length.
15089 | 11 | Cannot change the '%s' option of a database while another user is in the database.
15090 | 16 | There is already a local server.
15091 | 16 | You must specify a length with this physical data type.
15092 | 16 | Invalid length specified. Length must be between 1 and 8000 bytes.
15093 | 16 | '%s' is not a valid date order.
15094 | 16 | '%s' is not a valid first day.
15095 | 16 | Insert into syslanguages failed. Language not added.
15097 | 16 | The size associated with an extended property cannot be more than 7,500 bytes.
15100 | 16 | Usage: sp_bindefault defaultname, objectname [, 'futureonly']
15101 | 16 | Cannot bind a default to a column of data type timestamp.
15102 | 16 | Cannot bind a default to an identity column.
15103 | 16 | Cannot bind a default to a column created with or altered to have a default value.
15104 | 16 | You do not own a table named '%s' that has a column named '%s'.
15105 | 16 | You do not own a data type with that name.
15106 | 16 | Usage: sp_bindrule rulename, objectname [, 'futureonly']
15107 | 16 | Cannot bind a rule to a column of data type text, ntext, image, or timestamp.
15109 | 16 | Cannot change the owner of the master database.
15110 | 16 | The proposed new database owner is already a user in the database.
15111 | 16 | The proposed new database owner is already aliased in the database.
15112 | 11 | The third parameter for table option 'text in row' is invalid. It should be 'on', 'off', '0', or a number from 24 through 7000.
15123 | 16 | The configuration option '%s' does not exist, or it may be an advanced option.
15124 | 16 | The configuration option '%s' is not unique.
15125 | 16 | Trigger '%s' is not a trigger for '%s'.
15126 | 16 | Trigger '%s' was not found.
15127 | 16 | Cannot set the default language to a language ID not defined in syslanguages.
15129 | 16 | '%d' is not a valid value for configuration option '%s'.
15130 | 16 | Table '%s' already has a '%s' trigger for '%s'.
15131 | 16 | Usage: sp_dbremove <dbname> [,dropdev]
15132 | 16 | Cannot change default database belonging to someone else.
15133 | 16 | INSTEAD OF trigger '%s' cannot be associated with an order.
15134 | 16 | No alias exists for the specified user.
15135 | 16 | Object is invalid. Extended properties are not permitted on '%s', or the object does not exist.
15139 | 16 | The device is a RAM disk and cannot be used as a default device.
15140 | 16 | Usage: sp_diskdefault logicalname {defaulton | defaultoff}
15142 | 16 | Cannot drop the role '%s'.
15143 | 16 | '%s' is not a valid option for the @updateusage parameter. Enter either 'true' or 'false'.
15144 | 16 | The role has members. It must be empty before it can be dropped.
15174 | 16 | Login '%s' owns one or more database(s). Change the owner of the following database(s) before dropping login:
15175 | 16 | Login '%s' is aliased or mapped to a user in one or more database(s). Drop the user or alias before dropping the login.
15176 | 16 | The only valid @parameter value is 'WITH_LOG'.
15177 | 16 | Usage: sp_dropmessage <msg number> [,<language> | 'ALL']
15178 | 16 | Cannot drop a message with an ID less than 50000.
15179 | 16 | Message number %u does not exist.
15180 | 16 | Cannot drop. The data type is being used.
15181 | 16 | Cannot drop the database owner.
15182 | 16 | Cannot drop the guest user from master or tempdb.
15183 | 16 | The user owns objects in the database and cannot be dropped.
15184 | 16 | The user owns data types in the database and cannot be dropped.
15185 | 16 | There is no remote user '%s' mapped to local user '%s' from the remote server '%s'.
15190 | 16 | There are still remote logins for the server '%s'.
15191 | 16 | Usage: sp_dropserver server [, droplogins]
15193 | 16 | This procedure can only be used on system tables.
15194 | 16 | Cannot re-create index on this table.
15197 | 16 | There is no text for object '%s'.
15198 | 16 | The name supplied (%s) is not a user, role, or aliased login.
15200 | 16 | There are no remote servers defined.
15201 | 16 | There are no remote logins for the remote server '%s'.
15202 | 16 | There are no remote logins defined.
15203 | 16 | There are no remote logins for '%s'.
15204 | 16 | There are no remote logins for '%s' on remote server '%s'.
15205 | 16 | There are no servers defined.
15206 | 16 | Invalid Remote Server Option: '%s'.
15210 | 16 | Only members of the sysadmin role can use the loginame option. The password was not changed.
15211 | 16 | Old (current) password incorrect for user. The password was not changed.
15216 | 16 | '%s' is not a valid option for the @delfile parameter.
15217 | 16 | Property cannot be updated or deleted. Property '%s' does not exist for '%s'.
15218 | 16 | Object '%s' is not a table.
15220 | 16 | Usage: sp_remoteoption [remoteserver, loginame, remotename, optname, {true | false}]
15221 | 16 | Remote login option does not exist or cannot be set by user. Run sp_remoteoption with no parameters to see options.
15222 | 16 | Remote login option '%s' is not unique.
15223 | 11 | Error: The input parameter '%s' is not allowed to be null.
15224 | 11 | Error: The value for the @newname parameter contains invalid characters or violates a basic restriction (%s).
15225 | 11 | No item by the name of '%s' could be found in the current database '%s', given that @itemtype was input as '%s'.
15227 | 16 | The database '%s' cannot be renamed.
15228 | 16 | A member of the sysadmin role must set database '%s' to single user mode with sp_dboption before it can be renamed.
15233 | 16 | Property cannot be added. Property '%s' already exists for '%s'.
15234 | 16 | Object is stored in sysprocedures and has no space allocated directly.
15235 | 16 | Views do not have space allocated.
15236 | 16 | Column '%s' has no default.
15237 | 16 | User data type '%s' has no default.
15238 | 16 | Column '%s' has no rule.
15239 | 16 | User data type '%s' has no rule.
15241 | 16 | Usage: sp_dboption [dbname [,optname [,'true' | 'false']]]
15242 | 16 | Database option '%s' is not unique.
15243 | 16 | The option '%s' cannot be changed for the master database.
15244 | 16 | Only members of the sysadmin role or the database owner may set database options.
15245 | 16 | DBCC DBCONTROL error. Database was not placed offline.
15247 | 16 | User does not have permission to perform this action.
15248 | 11 | Error: The parameter @oldname is either ambiguous or the claimed @itemtype (%s) was wrong.
15249 | 11 | Error: Explicit @itemtype '%s' is unrecognized (%d).
15250 | 16 | The database name component of the object qualifier must be the name of the current database.
15251 | 16 | Invalid '%s' specified. It must be %s.
15252 | 16 | The primary or foreign key table name must be given.
15253 | 11 | Syntax error parsing SQL identifier '%s'.
15254 | 16 | Users other than the database owner or guest exist in the database. Drop them before removing the database.
15255 | 11 | '%s' is not a valid value for @autofix. The only valid value is 'auto'.
15256 | 16 | Usage: sp_certify_removable <dbname> [,'auto']
15257 | 16 | The database that you are attempting to certify cannot be in use at the same time.
15258 | 16 | The database must be owned by a member of the sysadmin role before it can be removed.
15261 | 16 | Usage: sp_create_removable <dbname>,<syslogical>,<sysphysical>,<syssize>,<loglogical>,<logphysical>,<logsize>,<datalogical1>,<dataphysical1>,<datasize1> [,<datalogical2>,<dataphysical2>,<datasize2>...<datalogical16>,<dataphysical16>,<datasize16>]
15262 | 0 | Invalid file size entered. All files must be at least 1 MB.
15264 | 16 | Could not create the '%s' portion of the database.
15266 | 16 | Cannot make '%s' database removable.
15269 | 16 | Logical data device '%s' not created.
15270 | 16 | You cannot specify a length for user data types based on sysname.
15271 | 16 | Invalid @with_log parameter value. Valid values are 'true' or 'false'.
15275 | 16 | FOREIGN KEY constraints do not have space allocated.
15277 | 16 | The only valid @parameter_value values are 'true' or 'false'.
15278 | 16 | Login '%s' is already mapped to user '%s' in database '%s'.
15279 | 16 | You must add the us_english version of this message before you can add the '%s' version.
15280 | 16 | All localized versions of this message must be dropped before the us_english version can be dropped.
15283 | 16 | The name '%s' contains too many characters.
15284 | 16 | The user has granted or revoked privileges to the following in the database and cannot be dropped.
15285 | 16 | The special word '%s' cannot be used for a logical device name.
15286 | 16 | Terminating this procedure. The @action '%s' is unrecognized. Try 'REPORT', 'UPDATE_ONE', or 'AUTO_FIX'.
15287 | 16 | Terminating this procedure. '%s' is a forbidden value for the login name parameter in this procedure.
15289 | 16 | Terminating this procedure. Cannot have an open transaction when this is run.
15290 | 16 | Terminating this procedure. The Action '%s' is incompatible with the other parameter values ('%s', '%s').
15291 | 16 | Terminating this procedure. The %s name '%s' is absent or invalid.
15292 | 0 | The row for user '%s' will be fixed by updating its login link to a login already in existence.
15293 | 0 | Barring a conflict, the row for user '%s' will be fixed by updating its link to a new login. Consider changing the new password from null.
15294 | 0 | The number of orphaned users fixed by adding new logins and then updating users was %d.
15295 | 0 | The number of orphaned users fixed by updating users was %d.
15298 | 0 | New login created.
15300 | 11 | No recognized letter is contained in the parameter value for General Permission Type (%s). Valid letters are in this set: %s.
15301 | 16 | Collation '%s' is supported for Unicode data types only and cannot be set at either the database or server level.
15302 | 11 | Database_Name should not be used to qualify owner.object for the parameter into this procedure.
15303 | 11 | The "user options" config value (%d) was rejected because it would set incompatible options.
15304 | 16 | The severity level of the '%s' version of this message must be the same as the severity level (%ld) of the us_english version.
15305 | 16 | The @TriggerType parameter value must be 'insert', 'update', or 'delete'.
15306 | 16 | Cannot change the compatibility level of replicated or distributed databases.
15307 | 16 | Could not change the merge publish option because the server is not set up for replication.
15308 | 16 | You must set database '%s' to single user mode with sp_dboption before fixing indexes on system tables.
15311 | 16 | The file named '%s' does not exist.
15312 | 16 | The file named '%s' is a primary file and cannot be removed.
15318 | 0 | All fragments for database '%s' on device '%s' are now dedicated for log usage only.
15319 | 17 | Error: DBCC DBREPAIR REMAP failed for database '%s' (device '%s').
15321 | 16 | There was some problem removing '%s' from sysaltfiles.
15322 | 0 | File '%s' was removed from tempdb, and will take effect upon server restart.
15323 | 16 | The selected index does not exist on table '%s'.
15324 | 16 | The option %s cannot be changed for the '%s' database.
15325 | 16 | The current database does not contain a %s named '%ls'.
15326 | 0 | No extended stored procedures exist.
15327 | 0 | The database is now offline.
15328 | 0 | The database is offline already.
15330 | 11 | There are no matching rows on which to report.
15331 | 11 | The user "%s" cannot take the action auto_fix due to duplicate SID.
15333 | 11 | Error: The qualified @oldname references a database (%s) other than the current database.
15335 | 11 | Error: The @newname value '%s' is already in use as a %s name and would cause a duplicate that is not permitted.
15336 | 16 | Object '%s' cannot be renamed because the object participates in enforced dependencies.
15337 | 0 | Caution: sysdepends shows that other objects (views, procedures and so on) are referencing this object by its old name. These objects will become invalid, and should be dropped and re-created promptly.
15338 | 0 | The %s was renamed to '%s'.
15339 | 0 | Creating '%s'.
15340 | 0 | Alias user added.
15341 | 0 | Granted database access to '%s'.
15354 | 0 | Usage: sp_detachdb <dbname>, [TRUE|FALSE]
15358 | 0 | User-defined filegroups should be made read-only.
15363 | 16 | The role '%s' already exists in the current database.
15379 | 11 | The server option value '%s' supplied is unrecognized.
15394 | 16 | Collation '%s' is not supported by the operating system
15387 | 11 | If the qualified object name specifies a database, that database must be the current database.
15388 | 11 | There is no user table matching the input name '%s' in the current database.
15390 | 11 | Input name '%s' does not have a matching user table or indexed view in the current database.
15395 | 11 | The qualified old name could not be found for item type '%s'.
15398 | 11 | Only objects in the master database owned by dbo can have the startup setting changed.
15399 | 11 | Could not change startup option because this option %s. This type of change is restricted to objects that have no parameters or columns.
15401 | 11 | Windows NT user or group '%s' not found. Check the name again.
15402 | 11 | '%s' is not a fixed server role.
15405 | 11 | Cannot use the reserved user or role name '%s'.
15407 | 11 | '%s' is not a valid Windows NT name. Give the complete name: <domain\username>.
15409 | 11 | '%s' is not a role.
15410 | 11 | User or role '%s' does not exist in this database.
15412 | 11 | '%s' is not a known fixed role.
15413 | 11 | Cannot make a role a member of itself.
15414 | 16 | Cannot set compatibility level because database has a view or computed column that is indexed. These indexes require a SQL Server compatible database.
15415 | 11 | User is a member of more than one group. sp_changegroup is set up for backward compatibility and expects membership in one group at most.
15416 | 16 | Usage: sp_dbcmptlevel [dbname [, compatibilitylevel]]
15417 | 16 | Cannot change the compatibility level of the '%s' database.
15418 | 16 | Only members of the sysadmin role or the database owner may set the database compatibility level.
15419 | 16 | Supplied parameter @sid should be binary(16).
15420 | 16 | The group '%s' does not exist in this database.
15421 | 16 | The user owns role(s) in the database and cannot be dropped.
15422 | 16 | Application roles can only be activated at the ad hoc level.
15423 | 0 | The password for application role '%s' has been changed.
15424 | 0 | New role added.
15425 | 0 | New application role added.
15426 | 16 | You must specify a provider name with this set of properties.
15427 | 16 | You must specify a provider name for unknown product '%ls'.
15428 | 16 | You cannot specify a provider or any properties for product '%ls'.
15429 | 16 | '%ls' is an invalid product name.
15430 | 19 | Limit exceeded for number of servers.
15431 | 16 | You must specify the @rolename parameter.
15432 | 16 | Stored procedure '%s' can only be executed at the ad hoc level.
15433 | 16 | Supplied parameter @sid is in use.
15434 | 16 | Could not drop login '%s' as the user is currently logged in.
15435 | 0 | Database successfully published.
15436 | 0 | Database successfully enabled for subscriptions.
15437 | 0 | Database successfully published using merge replication.
15438 | 0 | Database is already online.
15439 | 0 | Database is now online.
15440 | 0 | Database is no longer published.
15441 | 0 | Database is no longer enabled for subscriptions.
15442 | 0 | Database is no longer enabled for merge publications.
15443 | 0 | Checkpointing database that was changed.
15444 | 0 | 'Disk' device added.
15445 | 0 | 'Diskette' device added.
15446 | 0 | 'Tape' device added.
15447 | 0 | 'Pipe' device added.
15449 | 0 | Type added.
15450 | 0 | New language inserted.
15452 | 0 | No alternate languages are available.
15453 | 0 | us_english is always available, even though it is not in syslanguages.
15454 | 0 | Language deleted.
15456 | 0 | Valid configuration options are:
15457 | 0 | Configuration option '%ls' changed from %ld to %ld. Run the RECONFIGURE statement to install.
15458 | 0 | Database removed.
15459 | 0 | In the current database, the specified object references the following:
15460 | 0 | In the current database, the specified object is referenced by the following:
15461 | 0 | Object does not reference any object, and no objects reference it.
15462 | 0 | File '%s' closed.
15463 | 0 | Device dropped.
15467 | 0 | Type has been dropped.
15469 | 0 | No constraints have been defined for this object.
15470 | 0 | No foreign keys reference this table.
15471 | 0 | The object comments have been encrypted.
15472 | 0 | The object does not have any indexes.
15473 | 0 | Settable remote login options.
15475 | 0 | The database is renamed and in single user mode.
15476 | 0 | A member of the sysadmin role must reset the database to multiuser mode with sp_dboption.
15477 | 0 | Caution: Changing any part of an object name could break scripts and stored procedures.
15478 | 0 | Password changed.
15479 | 0 | Login dropped.
15480 | 0 | Could not grant login access to '%s'.
15481 | 0 | Granted login access to '%s'.
15482 | 0 | Could not deny login access to '%s'.
15483 | 0 | Denied login access to '%s'.
15484 | 0 | Could not revoke login access from '%s'.
15485 | 0 | Revoked login access from '%s'.
15486 | 0 | Default database changed.
15487 | 0 | %s's default language is changed to %s.
15488 | 0 | '%s' added to role '%s'.
15489 | 0 | '%s' dropped from role '%s'.
15490 | 0 | The dependent aliases were also dropped.
15491 | 0 | User has been dropped from current database.
15492 | 0 | Alias user dropped.
15493 | 0 | Role dropped.
15494 | 0 | The application role '%s' is now active.
15495 | 0 | Application role dropped.
15496 | 0 | Group changed.
15497 | 0 | Could not add login using sp_addlogin (user = %s). Terminating this procedure.
15498 | 17 | Inside txn_1a_, update failed. Will roll back (1a1).
15499 | 0 | The dependent aliases were mapped to the new database owner.
15500 | 0 | The dependent aliases were dropped.
15501 | 0 | Database owner changed.
15502 | 0 | Setting database owner to SA.
15503 | 0 | Giving ownership of all objects to the database owner.
15504 | 0 | Deleting users except guest and the database owner from sysusers.
15505 | 16 | Cannot change owner of object '%ls' or one of its child objects because the new owner '%ls' already has an object with the same name.
15511 | 0 | Default bound to column.
15512 | 0 | Default bound to data type.
15513 | 0 | The new default has been bound to columns(s) of the specified user data type.
15514 | 0 | Rule bound to table column.
15515 | 0 | Rule bound to data type.
15516 | 0 | The new rule has been bound to column(s) of the specified user data type.
15519 | 0 | Default unbound from table column.
15520 | 0 | Default unbound from data type.
15521 | 0 | Columns of the specified user data type had their defaults unbound.
15522 | 0 | Rule unbound from table column.
15523 | 0 | Rule unbound from data type.
15524 | 0 | Columns of the specified user data type had their rules unbound.
15525 | 0 | sp_checknames is used to search for non 7-bit ASCII characters.
15526 | 0 | in several important columns of system tables. The following
15527 | 0 | columns are searched:
15528 | 0 | In master:
15536 | 0 | In all databases:
15543 | 0 | Looking for non 7-bit ASCII characters in the system tables of database '%s'.
15544 | 0 | Table.column '%s'
15545 | 0 | The following database names contain non 7-bit ASCII characters.
15546 | 0 | If you wish to change these names, use '%s'.
15547 | 0 | The following logins have default database names that contain
15548 | 0 | non 7-bit ASCII characters. If you wish to change these names use
15549 | 0 | sp_defaultdb.
15550 | 0 | The following servers have 'initialization file' names that contain
15551 | 0 | non 7-bit ASCII characters. If you wish to change these names,
15552 | 0 | use UPDATE.
15553 | 0 | Database '%s' has no object, user, and so on
15554 | 0 | names that contain non 7-bit ASCII characters.
15555 | 0 | The database name provided '%s' must be the current database when executing this stored procedure.
15564 | 0 | The following device names contain non 7-bit ASCII characters.
15565 | 0 | The following login names contain non 7-bit ASCII characters.
15566 | 0 | The following remote login names contain non 7-bit ASCII characters.
15567 | 0 | The following server names contain non 7-bit ASCII characters.
15568 | 0 | The following column and parameter names contain non 7-bit ASCII characters.
15569 | 0 | The following index names contain non 7-bit ASCII characters.
15570 | 0 | The following object names contain non 7-bit ASCII characters.
15571 | 0 | The following segment names contain non 7-bit ASCII characters.
15572 | 0 | The following data type names contain non 7-bit ASCII characters.
15573 | 0 | The following user or role names contain non 7-bit ASCII characters.
15574 | 10 | This object does not have any statistics.
15575 | 10 | This object does not have any statistics or indexes.
15576 | 16 | You cannot set network name on server '%ls' because it is not a linked SQL Server.
15600 | 15 | An invalid parameter or option was specified for procedure '%s'.
15601 | 16 | Full-Text Search is not enabled for the current database. Use sp_fulltext_database to enable Full-Text Search.
15604 | 16 | Cannot drop full-text catalog '%ls' because it contains a full-text index.
15605 | 16 | A full-text index for table '%ls' has already been created.
15606 | 16 | You must first create a full-text index on table '%ls'.
15607 | 16 | '%ls' is not a valid index to enforce a full-text search key. You must specify a unique, non-nullable, single-column index.
15608 | 16 | Full-text search has already been activated for table '%ls'.
15609 | 16 | Cannot activate full-text search for table '%ls' because no columns have been enabled for full-text search.
15610 | 16 | You must deactivate full-text search on table '%ls' before adding columns to or removing columns from the full-text index.
15611 | 16 | Column '%ls' of table '%ls' cannot be used for full-text search because it is not a character-based column.
15612 | 16 | DBCC DBCONTROL error. Database was not made read-only.
15613 | 0 | The database is now read-only.
15614 | 0 | The database already is read-only.
15615 | 16 | DBCC DBCONTROL error. Database was not made single user.
15616 | 0 | The database is now single user.
15617 | 0 | The database already is single user.
15618 | 0 | The database is now read/write.
15619 | 0 | The database already is read/write.
15620 | 0 | The database is now multiuser.
15621 | 0 | The database already is multiuser.
15622 | 10 | No permission to access database '%s'.
15623 | 10 | Enabling %ls option for database '%ls'.
15624 | 10 | Disabling %ls option for database '%ls'.
15625 | 10 | Option '%ls' not recognized for '%ls' parameter.
15626 | 10 | You attempted to acquire a transactional application lock without an active transaction.
15627 | 10 | sp_dboption command failed.
15630 | 16 | Full-text search must be activated on table '%ls' before this operation can be performed.
15631 | 16 | Full-text change tracking is currently enabled for table '%ls'.
15632 | 16 | Full-text change tracking must be started on table '%ls' before full-text auto propagation can begin.
15633 | 16 | Full-text auto propagation is currently enabled for table '%ls'.
15634 | 16 | Full-text change tracking must be started on table '%ls' before the changes can be flushed.
15635 | 16 | Cannot execute '%ls' because the database is in read-only access mode.
15636 | 16 | Full-text catalog '%ls' cannot be populated because the database is in single-user access mode.
15637 | 16 | Full-text index for table '%ls' cannot be populated because the database is in single-user access mode.
15638 | 10 | Warning: Full-text index for table '%ls' cannot be populated because the database is in single-user access mode. Change tracking is stopped for this table. Use sp_fulltext_table to start change tracking.
15639 | 10 | Warning: Table '%s' does not have the option 'text in row' enabled and has full-text indexed columns that are of type image, text, or ntext. Full-text change tracking cannot track WRITETEXT or UPDATETEXT operations performed on these columns.
15640 | 16 | sp_fulltext_table 'start_full' must be executed on table '%ls'. Columns affecting the index have been added or dropped since the last index full population.
15642 | 16 | The ongoing population is necessary to ensure an up-to-date index. If needed, stop change tracking, and then deactivate the full-text index population.
15643 | 10 | Warning: This operation did not succeed on one or more tables. A table may be inactive, or a full-text index population may already be active.
15644 | 16 | Full-text index population failed to start on this table. Execute sp_fulltext_table '%ls', '%ls' to update the index.
15645 | 16 | Column '%ls' does not exist.
15646 | 16 | Column '%ls' is not a computed column.
15647 | 10 | No views with schema binding reference this table.


Errors 16000 - 16999

Error | Severity | Description (Message Text)
16801 | 11 | sp_dropwebtask requires at least one defined parameter @outputfile or @procname.
16802 | 11 | sp_dropwebtask cannot find the specified task.
16803 | 11 | sp_runwebtask requires at least one defined parameter @outputfile or @procname.
16804 | 11 | SQL Web Assistant: Could not establish a local connection to SQL Server.
16805 | 11 | SQL Web Assistant: Could not execute the SQL statement.
16806 | 11 | SQL Web Assistant: Could not bind the parameter to the SQL statement.
16807 | 11 | SQL Web Assistant: Could not obtain a bind token.
16808 | 11 | SQL Web Assistant: Could not find the existing trigger. This could be due to encryption.
16809 | 11 | SQL Web Assistant failed on the call to SQLGetData.
16810 | 11 | SQL Web Assistant failed on the call to SQLFetch.
16811 | 11 | SQL Web Assistant failed to bind a results column.
16812 | 11 | SQL Web Assistant: The @query parameter must be specified.
16813 | 11 | SQL Web Assistant: Parameters can be passed either by name or position.
16814 | 11 | SQL Web Assistant: Invalid parameter.
16815 | 11 | SQL Web Assistant: @procname is not valid.
16816 | 11 | SQL Web Assistant: @outputfile is not valid.
16817 | 11 | SQL Web Assistant: Could not read the given file.
16820 | 11 | SQL Web Assistant failed because the state of the Web task in msdb..MSwebtasks is invalid.
16821 | 11 | SQL Web Assistant: Could not open the output file.
16822 | 11 | SQL Web Assistant: Could not open the template file.
16823 | 11 | SQL Web Assistant: Could not allocate enough memory to satisfy this request.
16824 | 11 | SQL Web Assistant: The template file specified in the Web task has a bad size.
16825 | 11 | SQL Web Assistant: Could not read the template file.
16826 | 11 | SQL Web Assistant: Could not find the specified marker for data insertion in the template file.
16827 | 11 | SQL Web Assistant: Could not write to the output file.
16828 | 11 | SQL Web Assistant: @tabborder must be tinyint.
16829 | 11 | SQL Web Assistant: @singlerow must be 0 or 1. Cannot specify this parameter with @nrowsperpage.
16830 | 11 | SQL Web Assistant: The @blobfmt parameter specification is invalid.
16831 | 11 | SQL Web Assistant: The output file name is mandatory for every column specified in the @blobfmt parameter.
16832 | 11 | SQL Web Assistant: Procedure called with too many parameters.
16833 | 11 | SQL Web Assistant: @nrowsperpage must be a positive number and it cannot be used with @singlerow.
16834 | 11 | SQL Web Assistant: Read/write operation on text, ntext, or image column failed.
16838 | 11 | SQL Web Assistant: Could not find the table in the HTML file.
16839 | 11 | SQL Web Assistant: Could not find the matching end table tag in the HTML file.
16841 | 11 | SQL Web Assistant: The @datachg parameter cannot be specified with the given @whentype value.
16842 | 11 | SQL Web Assistant: Could not find and drop the necessary trigger for updating the Web page.
16843 | 11 | SQL Web Assistant: Could not add the necessary trigger for the @datachg parameter. There could be an existing trigger on the table with missing or encrypted text.
16844 | 11 | SQL Web Assistant: Incorrect syntax for the @datachg parameter.
16845 | 11 | SQL Web Assistant: @datachg must be specified for the given @whentype option.
16846 | 11 | SQL Web Assistant: @unittype and/or @numunits must be specified for the given @whentype option.
16847 | 11 | SQL Web Assistant: @fixedfont must be 0 or 1.
16848 | 11 | SQL Web Assistant: @bold must be 0 or 1.
16849 | 11 | SQL Web Assistant: @italic must be 0 or 1.
16850 | 11 | SQL Web Assistant: @colheaders must be 0 or 1.
16851 | 11 | SQL Web Assistant: @lastupdated must be 0 or 1.
16852 | 11 | SQL Web Assistant: @HTMLheader must be in the range 1 to 6.
16853 | 11 | SQL Web Assistant: @username is not valid.
16854 | 11 | SQL Web Assistant: @dbname is not valid.
16855 | 11 | SQL Web Assistant: @whentype must be in the range 1 to 9.
16856 | 11 | SQL Web Assistant: @unittype must be in the range 1 to 4.
16857 | 11 | SQL Web Assistant: @targetdate is invalid. It must be a valid date after 1900-01-01.
16858 | 11 | SQL Web Assistant: The @targettime parameter must be between 0 and 240000.
16859 | 11 | SQL Web Assistant: @dayflags must be 1, 2, 4, 8, 16, 32, or 64.
16860 | 11 | SQL Web Assistant: @numunits must be greater than 0.
16861 | 11 | SQL Web Assistant: @targetdate must be specified for the given @whentype option.
16862 | 11 | SQL Web Assistant: @dayflags must be specified for the given @whentype option.
16863 | 11 | SQL Web Assistant: URL specification is invalid.
16864 | 11 | SQL Web Assistant: @blobfmt is invalid. The file must include the full path to the output_file location.
16865 | 11 | SQL Web Assistant: URL hyperlink text column must not be of the image data type.
16866 | 11 | SQL Web Assistant: Could not obtain the number of columns in @query.
16867 | 11 | SQL Web Assistant: URL hyperlink text column is missing in @query.
16868 | 11 | SQL Web Assistant failed on the call to SQLColAttribute.
16869 | 11 | SQL Web Assistant: Columns of data type image cannot have a template.
16870 | 11 | SQL Web Assistant: Internal error. Could not read @ parameters.
16871 | 11 | SQL Web Assistant: Invalid @charset. Execute sp_enumcodepages for a list of character sets.
16873 | 11 | SQL Web Assistant: Invalid @codepage. Execute sp_enumcodepages for a list of code pages.
16874 | 11 | SQL Web Assistant: Internal error. Cannot translate to the specified code page.
16875 | 11 | SQL Web Assistant: Translation to the desired code page is unavailable on this system.
16876 | 11 | SQL Web Assistant: Internal error. Could not obtain COM interface ID.
16877 | 11 | SQL Web Assistant: Internal error. Could not obtain COM language ID.
16878 | 11 | SQL Web Assistant: Internal error. Could not initialize COM library.
16879 | 11 | SQL Web Assistant: Internal error. Could not translate from Unicode to the specified code page.
16880 | 11 | SQL Web Assistant: Internal error. Could not create translation object. Make sure that the file MLang.dll is in your system directory.
16881 | 16 | SQL Web Assistant: This version is not supported on Win32s of Windows 3.1.
16882 | 16 | SQL Web Assistant: Web task not found. Verify the name of the task for possible errors.
16883 | 16 | SQL Web Assistant: Could not list Web task parameters. xp_readwebtask requires @procname.
16884 | 16 | SQL Web Assistant: Procedure name is required to convert Web tasks.
16885 | 16 | SQL Web Assistant: Could not upgrade the Web task to 8.0. The Web task will remain in 6.5 format and will need to be re-created.
16886 | 16 | SQL Web Assistant: Could not update Web tasks system table. The Web task remains in 6.5 format.
16887 | 16 | SQL Web Assistant: @procname parameter is missing. The parameter is required to upgrade a Web task to 8.0.
16888 | 16 | SQL Web Assistant: Source code page is not supported on the system. Ensure @charset and @codepage language files are installed on your system.
16889 | 16 | SQL Web Assistant: Could not send Web task row to the client.
16890 | 16 | SQL Web Assistant: ODS error occurred. Could not send Web task parameters.
16901 | 16 | %hs: This feature has not been implemented yet.
16902 | 16 | %hs: The value of parameter %hs is invalid.
16903 | 16 | %hs procedure called with incorrect number of parameters.
16904 | 16 | sp_cursor: optype: You can only specify ABSOLUTE in conjunction with DELETE or UPDATE.
16905 | 16 | The cursor is already open.
16907 | 16 | %hs is not allowed in cursor statements.
16909 | 16 | %hs: The cursor identifier value provided (%x) is not valid.
16911 | 16 | %hs: The fetch type %hs cannot be used with forward only cursors.
16914 | 16 | %hs procedure called with too many parameters.
16915 | 16 | A cursor with the name '%.*ls' already exists.
16916 | 16 | A cursor with the name '%.*ls' does not exist.
16917 | 16 | Cursor is not open.
16922 | 16 | Cursor Fetch: Implicit conversion from data type %s to %s is not allowed.
16924 | 16 | Cursorfetch: The number of variables declared in the INTO list must match that of selected columns.
16925 | 16 | The fetch type %hs cannot be used with dynamic cursors.
16926 | 16 | sp_cursoroption: The column ID (%d) does not correspond to a text, ntext, or image column.
16927 | 16 | Cannot fetch into text, ntext, and image variables.
16929 | 16 | The cursor is READ ONLY.
16930 | 16 | The requested row is not in the fetch buffer.
16931 | 16 | There are no rows in the current fetch buffer.
16932 | 16 | The cursor has a FOR UPDATE list and the requested column to be updated is not in this list.
16933 | 16 | The cursor does not include the table being modified or the table is not updatable through the cursor.
16934 | 16 | Optimistic concurrency check failed. The row was modified outside of this cursor.
16935 | 16 | No parameter values were specified for the sp_cursor-%hs statement.
16936 | 16 | sp_cursor: One or more values parameters were invalid.
16937 | 16 | A server cursor is not allowed on a remote stored procedure or stored procedure with more than one SELECT statement. Use a default result set or client cursor.
16938 | 16 | sp_cursoropen/sp_cursorprepare: The statement parameter can only be a single select or a single stored procedure.
16940 | 16 | Cannot specify UPDLOCK or TABLOCKX with READ ONLY or INSENSITIVE cursors.
16941 | 16 | Cursor updates are not allowed on tables opened with the NOLOCK option.
16942 | 16 | Could not generate asynchronous keyset. The cursor has been deallocated.
16943 | 16 | Could not complete cursor operation because the table schema changed after the cursor was declared.
16944 | 16 | Cannot specify UPDLOCK or TABLOCKX on a read-only table in a cursor.
16945 | 16 | The cursor was not declared.
16946 | 16 | Could not open the cursor because one or more of its tables have gone out of scope.
16947 | 10 | No rows were updated or deleted.
16948 | 16 | The variable '%.*ls' is not a cursor variable, but it is used in a place where a cursor variable is expected.
16949 | 16 | The variable '%.*ls' is a cursor variable, but it is used in a place where a cursor variable is not valid.
16950 | 10 | The variable '%.*ls' does not currently have a cursor allocated to it.
16951 | 16 | The variable '%.*ls' cannot be used as a parameter because a CURSOR OUTPUT parameter must not have a cursor allocated to it before execution of the procedure.
16952 | 16 | A cursor variable cannot be used as a parameter to a remote procedure call.
16953 | 10 | Remote tables are not updatable. Updatable keyset-driven cursors on remote tables require a transaction with the REPEATABLE_READ or SERIALIZABLE isolation level spanning the cursor.
16954 | 16 | Executing SQL directly; no cursor.
16955 | 16 | Could not create an acceptable cursor.
16956 | 10 | Cursor created was not of the requested type.
16957 | 16 | FOR UPDATE cannot be specified on a READ ONLY cursor.
16958 | 16 | Could not complete cursor operation because the set options have changed since the cursor was declared.
16959 | 16 | Unique table computation failed.
16960 | 16 | You have reached the maximum number of cursors allowed.
16961 | 10 | One or more FOR UPDATE columns have been adjusted to the first instance of their table in the query.
16962 | 16 | The target object type is not updatable through a cursor.
16963 | 16 | You cannot specify scroll locking on a cursor that contains a remote table.
16995 | 16 | %hs requires the NO_BROWSETABLE option to be set.
16996 | 16 | %hs cannot take output parameters.
16998 | 20 | Internal Cursor Error: A cursor work table operation failed.
16999 | 20 | Internal Cursor Error: The cursor is in an invalid state.


Errors 17000 - 17999

Error | Severity | Description (Message Text)
17000 | 10 | Usage: sp_autostats <table_name> [, {ON|OFF} [, <index_name>] ]
17050 | 10 | The '%ls' option is ignored in this edition of SQL Server.
17550 | 10 | DBCC TRACEON %d, server process ID (SPID) %d.
17551 | 10 | DBCC TRACEOFF %d, server process ID (SPID) %d.
17557 | 16 | DBCC DBRECOVER failed for database ID %d.
17558 | 10 | *** Bypassing recovery for database ID %d.
17560 | 10 | DBCC DBREPAIR: '%ls' index restored for '%ls.%ls'.
17561 | 10 | %ls index restored for %ls.%ls.
17569 | 16 | DBCC cannot find the library initialization function %ls.
17570 | 16 | DBCC cannot find the function %ls in the library %ls.
17571 | 20 | DBCC function %ls in the library %ls generated an access violation. SQL Server is terminating process %d.
17572 | 16 | DBCC cannot free DLL %ls. SQL Server depends on this DLL to function properly.
17750 | 16 | Cannot load the DLL %ls, or one of the DLLs it references. Reason: %ls.
17751 | 16 | Cannot find the function %ls in the library %ls. Reason: %ls.
17752 | 16 | Extended procedure memory allocation failed for '%ls'.
17753 | 16 | %.*ls can only be executed in the master database.


Errors 18000 - 18999

Error | Severity | Description (Message Text)
18002 | 20 | Stored function '%.*ls' in the library '%.*ls' generated an access violation. SQL Server is terminating process %d.
18100 | 10 | Process ID %d killed by hostname %.*ls, host process ID %d.
18450 | 14 | Login failed for user '%ls'. Reason: Not defined as a valid user of a trusted SQL Server connection.
18451 | 14 | Login failed for user '%ls'. Only administrators may connect at this time.
18452 | 14 | Login failed for user '%ls'. Reason: Not associated with a trusted SQL Server connection.
18453 | 14 | Login succeeded for user '%ls'. Connection: Trusted.
18454 | 14 | Login succeeded for user '%ls'. Connection: Non-Trusted.
18455 | 14 | Login succeeded for user '%ls'.
18456 | 14 | Login failed for user '%ls'.
18457 | 14 | Login failed for user '%ls'. Reason: User name contains a mapping character or is longer than 30 characters.
18458 | 14 | Login failed. The maximum simultaneous user count of %d licenses for this server has been exceeded. Additional licenses should be obtained and registered through the Licensing application in the Windows NT Control Panel.
18459 | 14 | Login failed. The maximum workstation licensing limit for SQL Server access has been exceeded.
18460 | 14 | Login failed. The maximum simultaneous user count of %d licenses for this '%ls' server has been exceeded. Additional licenses should be obtained and installed or you should upgrade to a full version.
18461 | 14 | Login failed for user '%ls'. Reason: Server is in single user mode. Only one administrator can connect at this time.
18482 | 16 | Could not connect to server '%ls' because '%ls' is not defined as a remote server.
18483 | 16 | Could not connect to server '%ls' because '%ls' is not defined as a remote login at the server.
18485 | 16 | Could not connect to server '%ls' because it is not configured for remote access.
18666 | 17 | Could not free up descriptor in rel_desclosed() system function.
18750 | 16 | %ls: The parameter '%ls' is invalid.
18751 | 16 | %ls procedure called with incorrect number of parameters.
18752 | 16 | Another log reader is replicating the database.
18754 | 16 | Could not open table %d.
18755 | 16 | Could not allocate memory for replication.
18756 | 16 | Could not get replication information for table %d.
18757 | 16 | The database is not published.
18759 | 16 | Replication failure. File '%ls', line %d.
18760 | 16 | Invalid %ls statement for article %d.
18761 | 16 | Commit record at (%ls) has already been distributed. Check DBTABLE.
18762 | 16 | Invalid begin LSN (%ls) for commit record (%ls). Check DBTABLE.
18763 | 16 | Commit record (%ls) reports oldest active LSN as (0:0:0).
18764 | 16 | Execution of filter stored procedure %d failed. See the SQL Server errorlog for more information.
18765 | 16 | Begin LSN specified for replication log scan is invalid.
18766 | 16 | The replbeginlsn field in the DBTABLE is invalid.
18767 | 16 | The specified begin LSN (%ls) for replication log scan occurs before replbeginlsn (%ls).
18768 | 16 | The specified LSN (%ls) for repldone log scan occurs before the current start of replication in the log (%ls).
18769 | 16 | The specified LSN (%ls) for repldone log scan is not a replicated commit record.
18770 | 16 | The specified LSN (%ls) for repldone log scan is not present in the transaction log.
18771 | 16 | Invalid storage type %d specified writing variant of type %d.
18772 | 16 | Invalid server data type (%d) specified in repl type lookup.
18773 | 16 | Could not locate text information records for column %d during command construction.
18774 | 16 | The stored procedure sp_replsetoriginator must be executed within a transaction.
18775 | 16 | The Log Reader Agent encountered an unexpected log record of type %u encountered while processing DML operation.
18776 | 16 | An error occurred while waiting on the article cache access event.
18777 | 16 | %s: Error initializing MSMQ components
18778 | 16 | %s: Error opening Microsoft Message Queue %s


Errors 19000 -19999

 Troubleshooting

Errors 19000 - 19999

Microsoft® SQL Server™ 2000 currently has no system error messages in the range 19000 to 19999.


Errors 20000 - 20999

Error | Severity | Description (Message Text)
20001 | 0 | There is no nickname for article '%s' in publication '%s'.
20002 | 0 | The filter '%s' already exists for article '%s' in publication '%s'.
20003 | 0 | Could not generate nickname for '%s'.
20007 | 16 | The system tables for merge replication could not be dropped successfully.
20008 | 16 | The system tables for merge replication could not be created successfully.
20009 | 16 | The article '%s' could not be added to the publication '%s'.
20010 | 16 | The Snapshot Agent corresponding to the publication '%s' could not be dropped.
20011 | 16 | Cannot set incompatible publication properties. The 'allow_anonymous' property of a publication depends on the 'immediate_sync' property.
20012 | 16 | The subscription type '%s' is not allowed on publication '%s'.
20013 | 16 | The publication property '%s' cannot be changed when there are subscriptions on it.
20014 | 16 | Invalid @schema_option value.
20015 | 16 | Could not remove directory '%ls'. Check the security context of xp_cmdshell and close other processes that may be accessing the directory.
20016 | 16 | Invalid @subscription_type value. Valid values are 'pull' or 'anonymous'.
20017 | 16 | The subscription on the Subscriber does not exist.
20018 | 16 | The @optional_command_line is too long. Use an agent definition file.
20019 | 16 | Replication database option '%s' cannot be set unless the database is a publishing database or a distribution database.
20020 | 16 | The article resolver supplied is either invalid or nonexistent.
20021 | 16 | The subscription could not be found.
20023 | 16 | Invalid @subscriber_type value. Valid options are 'local', 'global', 'anonymous', or 'repub'.
20025 | 16 | The publication name must be unique. The specified publication name '%s' has already been used.
20026 | 16 | The publication '%s' does not exist.
20027 | 16 | The article '%s' does not exist.
20028 | 16 | The Distributor has not been installed correctly. Could not enable database for publishing.
20029 | 16 | The Distributor has not been installed correctly. Could not disable database for publishing.
20030 | 16 | The article '%s' already exists on another publication with a different column tracking option.
20031 | 16 | Could not delete the row because it does not exist.
20032 | 16 | '%s' is not defined as a Subscriber for '%s'.
20033 | 16 | Invalid publication type.
20034 | 16 | Publication '%s' does not support '%s' subscriptions.
20036 | 16 | The Distributor has not been installed correctly.
20037 | 16 | The article '%s' already exists in another publication with a different article resolver.
20038 | 16 | The article filter could not be added to the article '%s' in the publication '%s'.
20039 | 16 | The article filter could not be dropped from the article '%s' in the publication '%s'.
20040 | 16 | Could not drop the article(s) from the publication '%s'.
20041 | 16 | Transaction rolled back. Could not execute trigger. Retry your transaction.
20043 | 16 | Could not change the article '%s' because the publication has already been activated.
20044 | 16 | The priority property is invalid for local subscribers.
20045 | 16 | You must supply an article name.
20046 | 16 | The article does not exist.
20047 | 16 | You are not authorized to perform this operation.
20049 | 16 | The priority value should not be larger than 100.0.
20050 | 16 | The retention period must be greater than or equal to %d.
20051 | 16 | The Subscriber is not registered.
20054 | 16 | Current database is not enabled for publishing.
20055 | 16 | Table '%s' cannot be published for merge replication because it has a timestamp column.
20056 | 16 | Table '%s' cannot be republished.
20057 | 16 | The profile name '%s' already exists for the specified agent type.
20058 | 16 | The @agent_type must be 1 (Snapshot), 2 (Logreader), 3 (Distribution), or 4 (Merge)
20059 | 16 | The @profile_type must be 0 (System) or 1 (Custom)
20060 | 16 | Compatibility level cannot be smaller than 60.
20061 | 16 | The compatibility level of this database must be set to 70 or higher to be enabled for merge publishing.
20062 | 16 | Updating columns with the rowguidcol property is not allowed.
20064 | 16 | Cannot drop profile. Either it is not defined or it is defined as the default profile.
20065 | 16 | Cannot drop profile because it is in use.
20066 | 16 | Profile not defined.
20067 | 16 | The parameter name '%s' already exists for the specified profile.
20068 | 16 | The article cannot be created on table '%s' because it has more than %d columns.
20069 | 16 | Cannot validate a merge article that uses looping join filters.
20070 | 16 | Cannot update subscription row.
20072 | 16 | Cannot update Subscriber information row.
20073 | 16 | Articles can be added or changed only at the Publisher.
20074 | 16 | Only a table object can be published as a "table" article for merge replication.
20075 | 16 | The 'status' parameter value must be either 'active' or 'unsynced'.
20076 | 16 | The @sync_mode parameter value must be 'native' or 'character'.
20077 | 16 | Problem encountered generating replica nickname.
20078 | 16 | The @property parameter value must be 'sync_type', 'priority', or 'description'.
20079 | 16 | Invalid @subscription_type parameter value. Valid options are 'push', 'pull', or 'both'.
20081 | 16 | Publication property '%s' cannot be NULL.
20084 | 16 | Publication '%s' cannot be subscribed to by Subscriber database '%s'.
20086 | 16 | Publication '%s' does not support the nosync type because it contains a table that does not have a rowguidcol column.
20087 | 16 | You cannot push an anonymous subscription.
20088 | 16 | Only assign priorities that are greater than or equal to 0 and less than 100.
20089 | 16 | Could not get license information correctly.
20090 | 16 | Could not get version information correctly.
20091 | 16 | sp_mergesubscription_cleanup is used to clean up push subscriptions. Use sp_dropmergepullsubscription to clean up pull or anonymous subscriptions.
20100 | 16 | Cannot drop Subscriber '%s'. There are existing subscriptions.
20500 | 16 | The updatable Subscriber stored procedure '%s' does not exist in sysobjects.
20501 | 16 | Could not insert into sysarticleupdates using sp_articlecolumn.
20502 | 16 | Invalid '%s' value. Valid values are 'read only', 'sync tran', 'queued tran', or 'failover'.
20503 | 16 | Invalid '%s' value in '%s'. The publication is not enabled for '%s' updatable subscriptions.
20505 | 16 | Could not drop synchronous update stored procedure '%s' in '%s'.
20506 | 16 | Source table '%s' not found in '%s'.
20507 | 16 | Table '%s' not found in '%s'.
20508 | 16 | Updatable Subscriptions: The text/ntext/image values inserted at Subscriber will be NULL.
20509 | 16 | Updatable Subscriptions: The text/ntext/image values cannot be updated at Subscriber.
20510 | 16 | Updatable Subscriptions: Cannot update identity columns.
20511 | 16 | Updatable Subscriptions: Cannot update timestamp columns.
20512 | 16 | Updatable Subscriptions: Rolling back transaction.
20515 | 16 | Updatable Subscriptions: Rows do not match between Publisher and Subscriber. Run the Distribution Agent to refresh rows at the Subscriber.
20516 | 16 | Updatable Subscriptions: Replicated data is not updatable.
20517 | 16 | Updatable Subscriptions: Update of replica's primary key is not allowed unless published table has a timestamp column.
20518 | 16 | Updatable Subscriptions: INSERT and DELETE operations are not supported unless published table has a timestamp column.
20519 | 16 | Updatable Subscriptions: INSERT operations on tables with identity or timestamp columns are not allowed unless a primary key is defined at the Subscriber.
20520 | 16 | Updatable Subscriptions: UPDATE operations on tables with identity or timestamp columns are not allowed unless a primary key is defined at the Subscriber.
20521 | 16 | sp_MSmark_proc_norepl: must be a member of the db_owner or sysadmin roles.
20522 | 16 | sp_MSmark_proc_norepl: invalid object name '%s'.
20523 | 16 | Could not validate the article '%s'. It is not activated.
20524 | 10 | Table '%s' may be out of synchronization. Rowcounts (actual: %s, expected: %s). Rowcount method %d used (0 = Full, 1 = Fast).
20525 | 10 | Table '%s' might be out of synchronization. Rowcounts (actual: %s, expected %s). Checksum values (actual: %s, expected: %s).
20526 | 10 | Table '%s' passed rowcount (%s) validation. Rowcount method %d used (0 = Full, 1 = Fast).
20527 | 10 | Table '%s' passed rowcount (%s) and checksum validation. Checksum is not compared for any text or image columns.
20528 | 10 | Log Reader Agent startup message.
20529 | 10 | Starting agent.
20530 | 10 | Run agent.
20531 | 10 | Detect nonlogged agent shutdown.
20532 | 10 | Replication agent schedule.
20533 | 10 | Replication agents checkup
20534 | 10 | Detects replication agents that are not logging history actively.
20535 | 10 | Removes replication agent history from the distribution database.
20536 | 10 | Replication: agent failure
20537 | 10 | Replication: agent retry
20538 | 10 | Replication: expired subscription dropped
20540 | 10 | Replication: agent success
20541 | 10 | Removes replicated transactions from the distribution database.
20542 | 10 | Detects and removes expired subscriptions from published databases.
20543 | 10 | @rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum. 1=only check rowcounts. 2=new checksum functionality introduced in version 8.0.
20545 | 10 | Default agent profile
20546 | 10 | Verbose history agent profile.
20547 | 10 | Agent profile for detailed history logging.
20548 | 10 | Slow link agent profile.
20549 | 10 | Agent profile for low bandwidth connections.
20550 | 10 | Windows Synchronization Manager profile
20551 | 10 | Profile used by the Windows Synchronization Manager.
20552 | 10 | Could not clean up the distribution transaction tables.
20553 | 10 | Could not clean up the distribution history tables.
20554 | 10 | The agent is suspect. No response within last %ld minutes.
20555 | 10 | 6.x publication.
20556 | 10 | Heartbeats detected for all running replication agents.
20557 | 10 | Agent shutdown. For more information, see the SQL Server Agent job history for job '%s'.
20558 | 10 | Table '%s' passed full rowcount validation after failing the fast check. DBCC UPDATEUSAGE will be initiated automatically.
20559 | 10 | Conditional Fast Rowcount method requested without specifying an expected count. Fast method will be used.
20560 | 10 | An expected checksum value was passed, but checksums will not be compared because rowcount-only checking was requested.
20561 | 10 | Generated expected rowcount value of %s for %s.
20562 | 10 | User delete.
20563 | 10 | No longer belongs in this partial.
20564 | 10 | System delete.
20565 | 10 | Replication: Subscriber has failed data validation
20566 | 10 | Replication: Subscriber has passed data validation
20567 | 10 | Agent history clean up: %s
20568 | 10 | Distribution clean up: %s
20569 | 10 | Expired subscription clean up
20570 | 10 | Reinitialize subscriptions having data validation failures
20571 | 10 | Reinitializes all subscriptions that have data validation failures.
20572 | 10 | Subscriber '%s' subscription to article '%s' in publication '%s' has been reinitialized after a validation failure.
20573 | 10 | Replication: Subscription reinitialized after validation failure
20574 | 10 | Subscriber '%s' subscription to article '%s' in publication '%s' failed data validation.
20575 | 10 | Subscriber '%s' subscription to article '%s' in publication '%s' passed data validation.
20576 | 10 | Subscriber '%s' subscription to article '%s' in publication '%s' has been reinitialized after a synchronization failure.
20577 | 10 | No entries were found in msdb..sysreplicationalerts.
20578 | 10 | Replication: agent custom shutdown
20579 | 10 | Generated expected rowcount value of %s and expected checksum value of %s for %s.
20580 | 10 | Heartbeats not detected for some replication agents. The status of these agents have been changed to 'Failed'.
20581 | 10 | Cannot drop server '%s' because it is used as a Distributor in replication.
20582 | 10 | Cannot drop server '%s' because it is used as a Publisher in replication.
20583 | 10 | Cannot drop server '%s' because it is used as a Subscriber in replication.
20584 | 10 | Cannot drop server '%s' because it is used as a Subscriber to remote Publisher '%s' in replication.
20585 | 16 | Validation Failure. Object '%s' does not exist.
20586 | 16 | (default destination)
20587 | 16 | Invalid '%s' value for stored procedure '%s'.
20588 | 16 | The subscription is not initialized. Run the Distribution Agent first.
20589 | 10 | Agent profile for replicated queued transaction reader.
20590 | 16 | The article property 'status' cannot include bit 64, 'DTS horizontal partitions' because the publication does not allow data transformations.
20591 | 16 | Only 'DTS horizontal partitions' and 'no DTS horizontal partitions' are valid 'status' values because the publication allows data transformations.
20592 | 16 | 'dts horizontal partitions' and 'no dts horizontal partitions' are not valid 'status' values because the publication does not allow data transformations.
20593 | 16 | Cannot modify publication '%s'. The sync_method cannot be changed to 'native', 'concurrent' or 'concurrent_c' because the publication has subscriptions from ODBC or OLE DB Subscribers.
20594 | 16 | A push subscription to the publication exists. Use sp_subscription_cleanup to drop defunct push subscriptions.
20595 | 16 | Skipping error signaled.
20596 | 16 | Only '%s' or members of db_owner can drop the anonymous agent.
20597 | 10 | Dropped %d anonymous subscription(s).
20598 | 16 | The row was not found at the Subscriber when applying the replicated command.
20599 | 16 | Continue on data consistency errors.
20600 | 10 | Agent profile for skipping data consistency errors. It can be used only by SQL Server Subscribers.
20601 | 10 | Invalid value specified for agent parameter 'SkipErrors'.
20602 | 10 | The value specified for agent parameter 'SkipErrors' is too long.
20603 | 10 | The agent profile cannot be used by heterogeneous Subscribers.
20604 | 10 | You do not have permissions to run agents for push subscriptions. Make sure that you specify the agent parameter 'SubscriptionType'.
20605 | 10 | Invalidated the existing snapshot of the publication. Run the Snapshot Agent again to generate a new snapshot.
20606 | 10 | Reinitialized subscription(s).
20607 | 10 | Cannot make the change because a snapshot is already generated. Set @force_invalidate_snapshot to 1 to force the change and invalidate the existing snapshot.
20608 | 10 | Cannot make the change because there are active subscriptions. Set @force_reinit_subscription to 1 to force the change and reinitialize the active subscriptions.
20609 | 16 | Cannot attach subscription file '%s'. Make sure that it is a valid subscription copy file.
20610 | 16 | Cannot run '%s' when the Log Reader Agent is replicating the database.
20611 | 16 | Only table or indexed view to table articles are allowed in publications that allow DTS.
20612 | 16 | Checksum validation is not supported because the publication allows DTS. Use row count only validation.
20613 | 16 | Validation is not supported for articles that are set up for DTS horizontal partitions.
20614 | 16 | Validation is not supported for heterogeneous Subscribers.
20616 | 10 | High Volume Server-to-Server Profile
20617 | 10 | Merge agent profile optimized for the high volume server-to-server synchronization scenario.
20618 | 16 | You must have CREATE DATABASE permission to attach a subscription database.
20619 | 16 | Server user '%s' is not a valid user in database '%s'. Add the user account or 'guest' user account into the database first.
20620 | 11 | The security mode specified requires the server '%s' in sysservers. Use sp_addlinkedserver to add the server.
20621 | 11 | Cannot copy a subscription database to an existing database.


Errors 21000 -21999

 Troubleshooting

Errors 21000 - 21999

Error | Severity | Description (Message Text)
21000 | 16 | Cannot subscribe to an inactive publication.
21001 | 16 | Cannot add a Distribution Agent at the Subscriber for a push subscription.
21002 | 16 | The Distribution Agent for this subscription already exists (%s).
21003 | 16 | Changing publication names is no longer supported.
21004 | 16 | Cannot publish the database object '%s' because it is encrypted.
21005 | 10 | For backward compatibility, sp_addpublisher can be used to add a Publisher for this Distributor. However, sp_adddistpublisher is more flexible.
21006 | 16 | Cannot use sp_addpublisher to add a Publisher. Use sp_adddistpublisher.
21007 | 16 | Cannot add the remote Distributor. Make sure that the local server is configured as a Publisher at the Distributor.
21008 | 16 | Cannot uninstall the Distributor because there are Subscribers defined.
21009 | 16 | The specified filter procedure is already associated with a table.
21010 | 16 | Removed %ld replicated transactions consisting of %ld statements in %ld seconds (%ld rows/sec).
21011 | 16 | Deactivated subscriptions.
21012 | 16 | Cannot change the 'allow_push' property of the publication to "false". There are push subscriptions on the publication.
21013 | 16 | Cannot change the 'allow_pull' property of the publication to "false". There are pull subscriptions on the publication.
21014 | 16 | The @optname parameter value must be 'transactional' or 'merge'.
21015 | 16 | The replication option '%s' has been set to TRUE already.
21016 | 16 | The replication option '%s' has been set to FALSE already.
21017 | 16 | Cannot perform SQL Server 7.0 compatible checksum operation on a merge article that has a vertical or horizontal partition. Rowcount validation and SQL Server 2000 compatible binary checksum operation can be performed on this article.
21018 | 16 | There are too many consecutive snapshot transactions in the distribution database. Run the Log Reader Agent again or clean up the distribution database.
21021 | 16 | Drop the Distributor before you uninstall replication.
21022 | 16 | Cannot set incompatible publication properties. The 'immediate_sync' property of a publication is dependent on the 'independent agent' property of a publication.
21023 | 16 | '%s' is no longer supported.
21024 | 16 | The stored procedure '%s' is already published as an incompatible type.
21025 | 16 | The string being encrypted cannot have null characters.
21026 | 16 | Cannot have an anonymous subscription on a publication that does not have an independent agent.
21027 | 16 | '%s' replication stored procedures are not installed. Use sp_replicationoption to install them.
21028 | 16 | Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication.
21029 | 16 | Cannot drop a push subscription entry at the Subscriber unless @drop_push is 'true'.
21030 | 16 | Names of SQL Server replication agents cannot be changed.
21031 | 16 | 'post_script' is not supported for stored procedure articles.
21032 | 16 | Could not subscribe because non-SQL Server Subscriber '%s' does not support 'sync tran' update mode.
21033 | 16 | Cannot drop server '%s' as Distribution Publisher because there are databases enabled for replication on that server.
21034 | 16 | Rows inserted or updated at the Subscriber cannot be outside the article partition.
21035 | 16 | You have updated the Publisher property '%s' successfully.
21036 | 16 | Another %s agent for the subscription(s) is running.
21037 | 16 | Invalid working directory '%s'.
21038 | 16 | Windows Authentication is not supported by the server.
21039 | 16 | The destination owner name is not supported for publications that can have heterogeneous Subscribers. Use native mode bcp for this functionality.
21040 | 16 | Publication '%s' does not exist.
21041 | 16 | A remote distribution Publisher is not allowed on this server version.
21042 | 16 | The distribution Publisher property, 'distributor_password', has no usage and is not supported for a Distributor running on Windows NT 4.0.
21043 | 16 | The Distributor is not installed.
21044 | 16 | Cannot ignore the remote Distributor (@ignore_remote_distributor cannot be 1) when enabling the database for publishing or merge publishing.
21045 | 16 | Cannot uninstall the Distributor because there are databases enabled for publishing or merge publishing.
21046 | 16 | Cannot change distribution Publisher property 'distribution_db' because the remote Publisher is using the current distribution database.
21047 | 16 | Cannot drop the local distribution Publisher because there are Subscribers defined.
21048 | 16 | Cannot add login '%s' to the publication access list because it does not have access to the distribution server '%s'.
21049 | 16 | The login '%s' does not have access permission on publication '%s' because it is not in the publication access list.
21050 | 16 | Only members of the sysadmin or db_owner roles can perform this operation.
21051 | 16 | Could not subscribe because non-SQL Server Subscriber '%s' does not support custom stored procedures.
21052 | 16 | Queued Updating Subscriptions: write to message queue failed.
21053 | 16 | The parameter must be one of the following: 'description', 'status', 'retention', 'sync_mode', 'allow_push', 'allow_pull', 'allow_anonymous', 'enabled_for_internet', 'centralized_conflicts', 'conflict_retention', or 'snapshot_ready'.
21054 | 16 | Updatable Subscribers: RPC to Publisher failed.
21055 | 15 | Invalid parameter %s specified for %s.
21056 | 16 | The subscription to publication '%s' has expired and does not exist.
21057 | 16 | Anonymous Subscribers cannot have updatable subscriptions.
21058 | 16 | An updatable subscription to publication '%s' on Subscriber '%s' already exists.
21059 | 16 | Cannot reinitialize subscriptions of non-immediate_sync publications.
21060 | 16 | Could not subscribe because non-SQL Server Subscriber '%s' does not support parameterized statements.
21061 | 16 | Invalid article status %d specified when adding article '%s'.
21062 | 16 | The row size of table '%s' exceeds the replication limit of 6,000 bytes.
21063 | 16 | Table '%s' cannot participate in updatable subscriptions because it is published for merge replication.
21064 | 16 | The subscription is unavailable for immediate updating because it is marked for reinitialization. Try again after the reinitialization completes.
21070 | 16 | This subscription does not support automatic reinitialization (subscribed with the 'no sync' option). To reinitialize this subscription, you must drop and re-create the subscription.
21071 | 10 | Cannot reinitialize article '%s' in subscription '%s:%s' to publication '%s' (subscribed with the 'no sync' option).
21072 | 16 | The subscription has not been synchronized within the maximum retention period or it has been dropped at the Publisher. You must reinitialize the subscription to receive data.
21073 | 16 | The publication specified does not exist.
21074 | 16 | The subscription has been marked inactive and must be reinitialized at the Publisher. Contact the database administrator.
21075 | 10 | The initial snapshot for publication '%s' is not yet available.
21076 | 10 | The initial snapshot for article '%s' is not yet available.
21077 | 10 | Deactivated initial snapshot for anonymous publication(s). New subscriptions must wait for the next scheduled snapshot.
21078 | 16 | Table '%s' does not exist in the Subscriber database.
21079 | 16 | The RPC security information for the Publisher is missing or invalid. Use sp_link_publication to specify it.
21080 | 16 | The 'msrepl_tran_version' column must be in the vertical partition of the article that is enabled for updatable subscriptions; it cannot be dropped.
21081 | 16 | Server setting 'Allow triggers to be fired which fire other triggers (nested triggers)' must exist on updatable Subscribers.
21082 | 16 | Database property 'IsRecursiveTriggersEnabled' has to be false for subscription databases at Subscribers that allow updatable subscriptions.
21083 | 16 | Database compatibility level at immediate updating Subscribers cannot be less than 70.
21084 | 16 | Publication '%s' does not allow anonymous subscriptions.
21085 | 16 | The retention period must be less than the retention period for the distribution database.
21086 | 16 | The retention period for the distribution database must be greater than the retention period of any existing non-merge publications.
21087 | 16 | Anonymous Subscribers or Subscribers at this server are not allowed to create merge publications.
21088 | 10 | The initial snapshot for the publication is not yet available.
21107 | 16 | '%ls' is not a table or view.
21108 | 16 | This edition of SQL Server does not support transactional publications.
21109 | 16 | The parameters @xact_seqno_start and @xact_seqno_end must be identical if @command_id is specified.
21110 | 16 | @xact_seqno_start and @publisher_database_id must be specified if @command_id is specified.
21111 | 16 | '%s' is not a valid parameter for the Snapshot Agent.
21112 | 16 | '%s' is not a valid parameter for the Log Reader Agent.
21113 | 16 | '%s' is not a valid parameter for the Distribution Agent.
21114 | 16 | '%s' is not a valid parameter for the Merge Agent.
21115 | 16 | '%s' is not a valid value for the '%s' parameter. The value must be a positive integer.
21116 | 16 | '%s' is not a valid value for the '%s' parameter. The value must be 1, 2, or 3.
21117 | 16 | '%s' is not a valid value for the '%s' parameter. The value must be 0, 1, or 2.
21118 | 16 | '%s' is not a valid value for the '%s' parameter. The value must be greater than or equal to 0 and less than or equal to 10,000.
21119 | 16 | '%s' is not a valid value for the '%s' parameter. The value must be a non-negative integer.
21120 | 16 | Only members of the sysadmin fixed server role and db_owner fixed database role can drop subscription '%s' to publication '%s'.
21121 | 16 | Only members of the sysadmin fixed server role and '%s' can drop the pull subscription to the publication '%s'.
21122 | 16 | Cannot drop the distribution database '%s' because it is currently in use.
21123 | 16 | The agent profile '%s' could not be found at the Distributor.
21124 | 16 | Cannot find the table name or the table owner corresponding to the alternative table ID(nickname) '%d' in sysmergearticles.
21125 | 16 | A table used in merge replication must have at least one non-computed column.
21126 | 16 | Pull subscriptions cannot be created in the same database as the publication.
21127 | 16 | Only global merge subscriptions can be added to database '%s'.
21128 | 16 | Terminating immediate updating or queued updating INSERT trigger because it is not the first trigger to fire. Use sp_settriggerorder procedure to set the firing order for trigger '%s' to first.
21129 | 16 | Terminating immediate updating or queued updating UPDATE trigger because it is not the first trigger to fire. Use sp_settriggerorder procedure to set the firing order for trigger '%s' to first.
21130 | 16 | Terminating immediate updating or queued updating DELETE trigger because it is not the first trigger to fire. Use sp_settriggerorder procedure to set the firing order for trigger '%s' to first.
21131 | 16 | There are existing subscriptions to heterogeneous publication '%s'. To add new articles, first drop the existing subscriptions to the publication.
21132 | 16 | Cannot create transactional subscription to merge publication '%s'. The publication type should be either transactional(0) or snapshot(1) for this operation.
21133 | 16 | Publication '%s' is not enabled to use an independent agent.
21134 | 16 | The specified job ID must identify a Distribution Agent or a Merge Agent job.
21135 | 16 | Detected inconsistencies in the replication agent table. The specified job ID does not correspond to an entry in '%ls'.
21136 | 16 | Detected inconsistencies in the replication agent table. The specified job ID corresponds to multiple entries in '%ls'.
21137 | 16 | This procedure supports only remote execution of push subscription agents.
21138 | 16 | The 'offload_server' property cannot be the same as the Distributor name.
21139 | 16 | Could not determine the Subscriber name for distributed agent execution.
21140 | 16 | Agent execution cannot be distributed to a Subscriber that resides on the same server as the Distributor.
21141 | 16 | The @change_active flag may not be specified for articles with manual filters or views.
21142 | 16 | The SQL Server '%s' could not obtain Windows group membership information for login '%s'. Verify that the Windows account has access to the domain of the login.
21143 | 16 | The custom stored procedure schema option is invalid for a snapshot publication article.
21144 | 16 | Cannot subscribe to publication of sync_type 'dump database' because the Subscriber has subscriptions to other publications.
21145 | 16 | Cannot subscribe to publication %s because the Subscriber has a subscription to a publication of sync_type 'dump database'.
21146 | 16 | @use_ftp cannot be 'true' while @alt_snapshot_folder is neither NULL nor empty.
21147 | 16 | The '%s' database is not published for merge replication.
21148 | 16 | Both @subscriber and @subscriberdb must be specified with non-null values simultaneously, or both must be left unspecified.
21149 | 16 | The '%s' database is not published for transactional or snapshot replication.
21150 | 16 | Unable to determine the snapshot folder for the specified subscription because the specified Subscriber is not known to the Distributor.
21151 | 16 | Pre- and post-snapshot commands are not supported for a publication that may support non-SQL Server Subscribers by using the character-mode bcp as the synchronization method.
21152 | 16 | Cannot create a subscription of sync_type 'none' to a publication using the 'concurrent' or 'concurrent_c' synchronization method.
21153 | 16 | Cannot create article '%s'. All articles that are part of a concurrent synchronization publication must use stored procedures to apply changes to the Subscriber.
21154 | 16 | Cannot change article '%s'. All articles that are part of a concurrent synchronization publication must use stored procedures to apply changes to the Subscriber.
21156 | 16 | The @status parameter value must be 'initiated' or 'active'.
21157 | 16 | The snapshot compression option can be enabled only for a publication having an alternate snapshot generation folder defined.
21158 | 16 | For a publication to be enabled for the Internet, the 'ftp_address' property must not be null.
21159 | 16 | If a publication is enabled for the Internet, the 'alt_snapshot_folder' property must be non-empty.
21160 | 16 | The @ftp_port parameter cannot be NULL.
21161 | 16 | Could not change the Publisher because the subscription has been dropped. Use sp_subscription_cleanup to clean up the triggers.
21162 | 16 | It is invalid to exclude the rowguid column for the table from the partition.
21163 | 16 | It is not possible to add column '%s' to article '%s' because the snapshot for publication '%s' has been run.
21164 | 16 | Column '%s' cannot be included in a vertical partition because it is neither nullable nor defined with a default value.
21165 | 16 | Column '%s' cannot be excluded from a vertical partition because it is neither nullable nor defined with a default value.
21166 | 16 | Column '%s' does not exist.
21167 | 16 | The specified job ID does not represent a %s agent job for any push subscription in this database.
21168 | 16 | Only members of the sysadmin fixed server role, members of the db_owner fixed database role, and owners of subscriptions served by the specified replication agent job can modify the agent offload settings.
21169 | 16 | Could not identify the Publisher '%s' at the Distributor '%s'. Make sure that '%s' is registered in the sysservers table at the Distributor.
21170 | 16 | Only a SQL Server 2000 or OLE DB Subscriber can use DTS.
21171 | 16 | Could not find package '%s' in msdb at server '%s'.
21172 | 16 | The publication has to be in 'character' or 'concurrent_c' bcp mode to allow DTS.
21173 | 16 | The publication has to be 'independent_agent type' to allow DTS.
21174 | 16 | You must use default values for @ins_cmd, @upd_cmd, and @del_cmd, and @status can be only 16 or 80 because the publication allows DTS.
21175 | 16 | You cannot change 'ins_cmd','upd_cmd', or 'del_cmd' article properties because the publication allows DTS or queued updating option.
21176 | 16 | Only members of the sysadmin fixed server role, db_owner fixed database role, or the creator of the subscription can change the subscription properties.
21177 | 16 | Could not create column list because it is too long. Create the list manually.
21178 | 16 | DTS properties cannot be set because the publication does not allow for data transformation.
21179 | 16 | Invalid @dts_package_location parameter value. Valid options are 'Distributor' or 'Subscriber'.
21180 | 16 | A publication that allows DTS cannot be enabled for updatable subscriptions.
21181 | 16 | @dts_package_name can be set for push subscriptions only.
21182 | 16 | The @agent_type parameter must be one of 'distribution', 'merge', or NULL.
21183 | 16 | Invalid property name '%s'.
21184 | 16 | %s parameter is incorrect: it should be '%s', '%s' or '%s'.
21185 | 16 | The subscription is not initialized or not created for failover mode operations.
21186 | 16 | Subscription for Publisher '%s' does not have a valid queue_id.
21187 | 16 | The current mode is the same as the requested mode.
21188 | 10 | Changed update mode from [%s] to [%s].
21189 | 16 | The queue for this subscription with queue_id = '%s' is not empty. Run the Queue Reader Agent to make sure the queue is empty before setting mode from [queued] to [immediate].
21190 | 10 | Overriding queue check for setting mode from [%s] to [%s].
21191 | 16 | Values for @ins_cmd, @upd_cmd, and @del_cmd can be only [%s], [%s] and [%s] respectively because the publication allows queued transactions.
21192 | 16 | MSrepl_tran_version column is a predefined column used for replication and can be only of data type uniqueidentifier
21193 | 16 | @identity_range, @pub_identity_range, or @threshold cannot be NULL when @auto_identity_support is set to TRUE.
21194 | 16 | Cannot support identity_range_control because this table does not have an identity column.
21195 | 16 | A valid identity range is not available. Check the data type of the identity column.
21196 | 16 | Identity automation failed.
21197 | 16 | Failed to allocate new identity range.
21198 | 16 | Schema replication failed.
21199 | 16 | This change cannot take effect until you run the snapshot again.
21200 | 16 | Publication '%s' does not exist.
21201 | 16 | Dropping a column that is being used by a merge filter clause is not allowed.
21202 | 16 | It is not possible to drop column '%s' to article '%s' because the snapshot for publication '%s' has already been run.
21203 | 10 | Duplicate rows found in %s. Unique index not created.
21204 | 16 | The publication '%s' does not allow subscription copy or its subscription has not been synchronized.
21205 | 16 | The subscription cannot be attached because the publication does not allow subscription copies to synchronize changes.
21206 | 16 | Cannot resolve load hint for object %d because the object is not a user table.
21207 | 16 | Cannot find source object ID information for article %d.
21208 | 16 | This step failed because column '%s' exists in the vertical partition.
21209 | 16 | This step failed because column '%s' does not exist in the vertical partition.
21210 | 16 | The publication must be immediate_sync type to allow subscription copy.
21211 | 16 | The database is attached from a subscription copy file without using sp_attach_subscription. Drop the database and reattach it using sp_attach_subscription.
21212 | 16 | Cannot copy subscription. Only single file subscription databases are supported for this operation.
21213 | 16 | Non-SQL Server Subscribers cannot subscribe to publications that allow DTS without using a DTS package.
21214 | 16 | Cannot create file '%s' because it already exists.
21215 | 16 | An alternate synchronization partner can be configured only at the Publisher.
21216 | 16 | Publisher '%s', publisher database '%s', and publication '%s' are not valid synchronization partners.
21217 | 10 | Publication of '%s' data from Publisher '%s'.
21218 | 16 | The creation_script property cannot be NULL if a schema option of 0x0000000000000000 is specified for the article.
21219 | 16 | The specified source object must be a stored procedure object if it is published as a 'proc schema only' type article.
21220 | 16 | Unable to add the article '%s' because a snapshot has been generated for the publication '%s'.
21221 | 16 | The specified source object must be a view object if it is going to be as a 'view schema only' type article.
21222 | 16 | The @schema_option parameter for a procedure or function schema article can include only the options 0x0000000000000001 or 0x0000000000002000.
21223 | 16 | The @pre_creation_command parameter for a schema only article must be either 'none' or 'drop'.
21224 | 16 | '%s' is not a valid property for a schema only article.
21225 | 16 | The 'offload_server' property cannot be NULL or empty if the pull subscription agent is to be enabled for remote activation.
21226 | 16 | The database '%s' does not have a pull subscription to the specified publication.
21227 | 16 | The 'offload_server' property cannot be the same as the Subscriber server name.
21228 | 16 | The specified source object must be a user-defined function object if it is going to be published as a 'func schema only' type article.
21229 | 16 | The only schema options available for a view schema article are: 0x0000000000000001, 0x0000000000000010, 0x0000000000000040, 0x0000000000000100, and 0x0000000000002000.
21230 | 16 | Do not call this stored procedure for schema change because the current database is not enabled for replication.
21231 | 16 | Automatic identity range support is useful only for publications that allow queued updating.
21232 | 16 | Identity range values must be positive numbers that are greater than 1.
21233 | 16 | Threshold value must be from 1 through 100.
21234 | 16 | Cannot use the INSERT command because the table has an identity column. The insert custom stored procedure must be used to set 'identity_insert' settings at the Subscriber.
21235 | 16 | Article property '%s' can be set only when the article uses automatic identity range management.
21236 | 16 | The subscription(s) to Publisher '%s' does not allow subscription copy or it has not been synchronized.
21237 | 16 | There is a push subscription to Publisher '%s'. Only pull and anonymous subscriptions can be copied.
21238 | 16 | There is a push subscription to publication '%s'. Only pull and anonymous subscriptions can be copied.
21239 | 16 | Cannot copy subscriptions because there is no synchronized subscription found in the database.
21240 | 16 | The table '%s' is already published as another article with a different automatic identity support option.
21241 | 16 | The threshold value should be from 0 through 99.
21242 | 16 | Conflict table for article '%s' could not be created successfully.
21243 | 16 | Publisher '%s', publication database '%s', and publication '%s' could not be added to the list of synchronization partners.
21244 | 16 | Character mode publication does not support vertical filtering when the base table does not support column-level tracking.
21245 | 16 | Table '%s' is not part of publication '%s'.
21246 | 16 | This step failed because table '%s' is not part of any publication.
21247 | 16 | Cannot create file at '%s'. Ensure the file path is valid.
21248 | 16 | Cannot attach subscription file '%s'. Ensure the file path is valid and the file is updatable.
21249 | 16 | OLE DB or ODBC Subscribers cannot subscribe to article '%s' in publication '%s' because the article has a timestamp column and the publication is 'allow_queued_tran' (allows queued updating subscriptions).
21250 | 16 | Primary key column '%s' cannot be excluded from a vertical partition.
21251 | 16 | Publisher '%s', publisher database '%s', publication '%s' could not be removed from the list of synchronization partners.
21252 | 16 | It is invalid to remove the default Publisher '%s', publication database '%s', and publication '%s' from the list of synchronization partners
21253 | 16 | Parameter '@add_to_active_directory' cannot be set to TRUE because Active Directory client package is not installed properly on the machine where SQL Server is running.
21254 | 16 | The Active Directory operation on publication '%s' could not be completed because Active Directory client package is not installed properly on the machine where SQL Server is running.
21255 | 16 | Column '%s' already exists in table '%s'.
21256 | 16 | A column used in filter clause '%s' either does not exist in the table '%s' or cannot be excluded from the current partition.
21257 | 16 | Invalid property '%s' for article '%s'.
21258 | 16 | You must first drop all existing merge publications to add an anonymous or local subscription to database '%s'.
21259 | 16 | Invalid property value '%s'.
21260 | 16 | Schema replication failed because database '%s' on server '%s' is not the original Publisher of table '%s'.
21261 | 16 | The offload server must be specified if the agent for this subscription is to be offloaded for remote execution.
21262 | 16 | Failed to drop column '%s' from the partition because a computed column is accessing it.
21263 | 16 | Parameter '%s' cannot be NULL or an empty string.
21264 | 16 | Column '%s' cannot be dropped from table '%s' because it is a primary key column.
21265 | 16 | Column '%s' cannot be dropped from table '%s' because there is a unique index accessing this column.
21266 | 16 | Cannot publish table '%s' for both a merge publication and a publication with the queued updating option .
21267 | 10 | Invalid value for queue type was specified. Valid values = (%s).
21268 | 10 | Cannot change queue type while there are subscriptions to the publication.
21269 | 16 | Cannot add a computed column or a timestamp column to a vertical partition for a character mode publication.
21270 | 10 | Queued snapshot publication property '%s' cannot have the value '%s'.
21272 | 16 | Cannot clean up the meta data for publication '%s' because other publications are using one or more articles in this publication.
21273 | 16 | You must upgrade the Subscriber to SQL Server 2000 to create updatable subscriptions to SQL Server 2000 Publishers.
21274 | 16 | Invalid publication name '%s'.
21275 | 16 | The schema-bound view '%ls' can be published only as 'indexed view schema only' or a log-based indexed view (transactional only) article.
21276 | 16 | The type must be 'table' or '( view | indexed view | proc | func ) schema only'.
21277 | 16 | The source object '%ls' must be a schema-bound view to be published as 'indexed view schema only' or a log-based indexed view article.
21278 | 16 | The source object '%ls' must be a schema-bound view with at least a clustered index to be published as a log-based indexed view article.
21279 | 16 | The 'schema_option' property for a merge article cannot be changed after a snapshot is generated for the publication. To change the 'schema_option' property of this article the corresponding merge publication must be dropped and re-created.
21280 | 16 | Publication '%s' cannot be subscribed to by Subscriber database '%s' because it contains one or more articles that have been subscribed to by the same Subscriber database at transaction level.
21281 | 16 | Publication '%s' cannot be subscribed to by Subscriber database '%s' because it contains one or more articles that have been subscribed to by the same Subscriber database at merge level.
21282 | 16 | @identity_range, @pub_identity_range, and @threshold must be NULL when @auto_identity_support is set to FALSE.
21283 | 16 | Column '%s' of table '%s' cannot be excluded from a vertical partition because there is a computed column that depends on it.
21284 | 16 | Failed to drop column '%s' from table '%s'.
21285 | 16 | Failed to add column '%s' to table '%s'.
21286 | 16 | Conflict table '%s' does not exist.
21287 | 16 | The specified @destination_folder is not a valid path of an existing folder.
21288 | 16 | Could not create the snapshot directory structure in the specified @destination_folder.
21289 | 16 | Either the snapshot files have not been generated or they have been cleaned up.
21290 | 16 | Identity range value is too large for the data type of the identity column.
21291 | 16 | The specified automatic identity support parameters conflict with the settings in another article.
21292 | 16 | Object '%s' cannot be published twice in the same publication.
21293 | 10 | Warning: adding updatable subscription for article '%s' may cause data inconsistency as the source table is already subscribed to '%s'
21294 | 16 | Either @publisher (and @publisher_db) or @subscriber (and @subscriber_db) must be specified, but both cannot be specified.
21295 | 16 | Publication '%s' does not contain any article that uses automatic identity range management.
21296 | 16 | Parameter @resync_type must be either 0, 1, 2.
21297 | 16 | Invalid resync type. No validation has been performed for this subscription.
21298 | 16 | Failed to resynchronize this subscription.
21299 | 16 | Invalid Subscriber partition validation expression '%s'.
21300 | 10 | The resolver information was specified without specifying the resolver to be used for article '%s'. The default resolver will be used.
21301 | 16 | The resolver information should be specified while using the '%s' resolver.
21302 | 16 | The resolver information should specify a column with data type, datetime, or smalldatetime while using the '%s' resolver.
21303 | 16 | The article '%s' should enable column tracking to use the '%s' resolver. The default resolver will be used to resolve conflicts on this article.
21304 | 16 | The merge triggers could not be created on the table '%s'.
21305 | 16 | The schema change information could not be updated at the subscription database.
21306 | 16 | The copy of the subscription could not be made because the subscription to publication '%s' has expired.
21307 | 16 | The subscription could not be attached because the subscription to publication '%s' has expired.
21308 | 10 | Rowcount validation profile.
21309 | 10 | Profile used by the Merge Agent to perform rowcount validation.
21310 | 10 | Rowcount and checksum validation profile.
21311 | 10 | Profile used by the Merge Agent to perform rowcount and checksum validation.
21312 | 10 | Cannot change this publication property because there are active subscriptions to this publication.
21313 | 10 | Subscriber partition validation expression must be NULL for static publications.
21314 | 10 | There must be one and only one of '%s' and '%s' that is not NULL.
21315 | 10 | Failed to adjust Publisher identity range for table '%s'.
21316 | 10 | Failed to adjust Publisher identity range for publication '%s'.
21317 | 10 | A push subscription to the publication '%s' already exists. Use sp_mergesubscription_cleanup to drop defunct push subscriptions.
21318 | 10 | Table '%s' must have at least one column that is included in the vertical partition.
21319 | 16 | Could not find the Snapshot Agent command line for the specified publication.
21320 | 16 | This version of the Publisher cannot use a SQL Server 7.0 Distributor.
21321 | 16 | The parameter @dynamic_snapshot_location cannot be an empty string.
21323 | 16 | A dynamic snapshot job can be scheduled only for a publication with dynamic filtering enabled.
21324 | 16 | A Snapshot Agent must be added for the specified publication before a dynamic snapshot job can be scheduled.
21325 | 16 | Could not find the Snapshot Agent ID for the specified publication.
21326 | 16 | Could not find the dynamic snapshot job with a '%ls' of '%ls' for the specified publication.
21327 | 16 | '%ls' is not a valid dynamic snapshot job name.
21328 | 16 | The specified dynamic snapshot job name '%ls' is already in use. Try the operation again with a different job name.
21329 | 16 | Only one of the parameters, @dynamic_snapshot_jobid or @dynamic_snapshot_jobname, can be specified with a nondefault value.
21330 | 16 | Failed to create a sub-directory under the replication working directory.(%ls)
21331 | 16 | Failed to copy user script file to the Distributor.(%ls)
21332 | 16 | Failed to retrieve information about the publication : %ls. Check the name again.
21333 | 16 | Protocol error. Message indicates a generation has disappeared.
21334 | 16 | Cannot initialize Message Queuing-based subscription because the platform is not Message Queuing %s compliant
21335 | 16 | Warning: column '%s' already exists in the vertical partition already.
21336 | 16 | Warning: column '%s' does not exist in the vertical partition.
21337 | 16 | Invalid @subscriber_type value. Valid options are 'local' and 'global'.
21338 | 16 | Cannot drop article '%s' from publication '%s' because its snapshot has been run and this publication could have active subscriptions.
21339 | 10 | Warning: the publication uses a feature that is only supported only by Ssubscribers running '%s' or higher.
21340 | 16 | On Demand user script cannot be applied to the snapshot publication.
21341 | 16 | @dynamic_snapshot_location cannot be a non-empty string while @alt_snapshot_folder is neither empty nor null.
21342 | 16 | @dynamic_snapshot_location cannot be a non-empty string while @use_ftp is 'true'.
21343 | 16 | Could not find stored procedure '%s'.
21344 | 16 | Invalid value specified for %ls parameter.
21345 | 16 | Excluding the last column in the partition is not allowed.
21346 | 16 | Failed to change the owner of '%s' to '%s'.
21347 | 16 | Column '%s' cannot be excluded from the vertical partitioning because there is a unique index accessing this column.
21348 | 16 | Invalid property name '%s'.
21349 | 10 | Warning: only Subscribers running SQL Server 7.0 Service Pack 2 or later can synchronize with publication '%s' because decentralized conflict logging is designated.
21350 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because a compressed snapshot is used.
21351 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because vertical filters are being used.
21352 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because schema replication is performed.
21353 | 10 | Warning: only Subscribers running SQL Server 7.0 Service Pack 2 or later can synchronize with publication '%s' because publication wide reinitialization is performed.
21354 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because publication wide reinitialization is performed.
21355 | 10 | Warning: only Subscribers running SQL Server 7.0 Service Pack 2 or later can synchronize with publication '%s' because merge metadata cleanup task is performed.
21356 | 10 | Warning: only Subscribers running SQL Server 7.0 Service Pack 2 or later can synchronize with publication '%s' because publication wide validation task is performed.
21357 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because data types new in SQL Server 2000 exist in one of its articles.
21358 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because at least one timestamp column exists in one of its articles
21359 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because automatic identity ranges are being used.
21360 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because a new article has been added to the publication after its snapshot has been generated.
21361 | 16 | The specified @agent_jobid is not a valid job id for a '%s' agent job.
21362 | 16 | Merge filter '%s' does not exist.
21363 | 16 | Failed to add publication '%s' to Active Directory. %s.
21364 | 16 | Could not add article '%s' because a snapshot is already generated. Set @force_invalidate_snapshot to 1 to force this and invalidate the existing snapshot.
21365 | 16 | Could not add article '%s' because there are active subscriptions. Set @force_reinit_subscription to 1 to force this and reintialize the active subscriptions.
21366 | 16 | Could not add filter '%s' because a snapshot is already generated. Set @force_invalidate_snapshot to 1 to force this and invalidate the existing snapshot.
21367 | 16 | Could not add filter '%s' because there are active subscriptions. Set @force_reinit_subscription to 1 to force this and reinitialize the active subscriptions.
21368 | 16 | The specified offload server name contains the invalid character '%s'.
21369 | 16 | Could not remove publication '%s' from Active Directory.
21370 | 16 | The resync date specified '%s' is not a valid date.
21371 | 10 | Could not propagate the change on publication '%s' to Active Directory.
21372 | 16 | Cannot drop filter '%s' from publication '%s' because its snapshot has been run and this publication could have active subscriptions.
21373 | 11 | Could not open database %s. Replication settings and system objects could not be upgraded. If the database is used for replication, run sp_vupgrade_replication in the [master] database when the database is available.
21374 | 10 | Upgrading distribution settings and system objects in database %s.
21375 | 10 | Upgrading publication settings and system objects in database %s.
21376 | 11 | Could not open database %s. Replication settings and system objects could not be upgraded. If the database is used for replication, run sp_vupgrade_replication in the [master] database when the database is available.
21377 | 10 | Upgrading subscription settings and system objects in database %s.
21378 | 16 | Could not open distribution database %s because it is offline or being recovered. Replication settings and system objects could not be upgraded. Be sure this database is available and run sp_vupgrade_replication again.
21379 | 16 | Cannot drop article '%s' from publication '%s' because a snapshot is already generated. Set @force_invalidate_snapshot to 1 to force this and invalidate the existing snapshot.
21380 | 16 | Cannot add identity column without forcing reinitialization. Set @force_reinit_subscription to 1 to force reinitialization.
21381 | 16 | Cannot add (drop) column to table '%s' because the table belongs to publication(s) with an active updatable subscription. Set @force_reinit_subscription to 1 to force reinitialization.
21382 | 16 | Cannot drop filter '%s' because a snapshot is already generated. Set @force_invalidate_snapshot to 1 to force this and invalidate the existing snapshot.
21383 | 16 | Cannot enable a merge publication on this server because the working directory of its Distributors is not using a UNC path.
21384 | 16 | The specified subscription does not exist or has not been synchronized yet.
21385 | 16 | Snapshot failed to process publication '%s'. Possibly due to active schema change activity.
21386 | 16 | Schema change failed on publication '%s'. Possibly due to active snapshot or other schema change activity.
21387 | 16 | The expanded dynamic snapshot view definition of one of the articles exceeds the system limit of 3499 characters. Consider using the default mechanism instead of the dynamic snapshot for initializing the specified subscription.
21388 | 10 | The concurrent snapshot for publication '%s' has not been activated by the Log Reader Agent.
21389 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because column-level collation is scripted out with the article schema creation script.
21390 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because extended properties are scripted out with the article schema creation script.
21391 | 10 | Warning: only Subscribers running SQL Server 2000 can synchronize with publication '%s' because it contains schema-only articles.
21392 | 16 | Row filter(%s) is invalid for column partition(%s) for article '%s' in publication '%s'.
21393 | 16 | Dropping row filter(%s) for article '%s' in '%s'. Reissue sp_articlefilter and sp_articleview to create a row filter.
21394 | 16 | Invalid schema option specified for Queued updating publication. Need to set the schema option to include DRI constraints.
21395 | 10 | This column cannot be included in a transactional publication because the column ID is greater than 255.
21396 | 16 | The subscription is marked inactive and must be dropped and re-created.
21400 | 16 | Article property must be changed at the original Publisher of article '%s'.
21401 | 16 | Article name cannot be 'all'.
21402 | 16 | Incorrect value for parameter ''%s''
21403 | 10 | The 'max_concurrent_dynamic_snapshots' publication property must be greater than or equal to zero.
21404 | 10 | '%s' is not a valid value for the '%s' parameter. The value must be a positive integer greater than 300 or 0.
21405 | 10 | '%s' is not a valid value for the '%s' parameter. The value must be an integer greater than or equal to %d.
21406 | 10 | '%s' is not a valid value for the '%s' parameter. The value must be 0 or 1.
21413 | 16 | Failed to acquire the application lock indicating the front of the queue.
21414 | 10 | Unexpected failure acquiring application lock.
21415 | 10 | Unexpected failure releasing application lock.
21416 | 10 | Property "%s" of article "%s" cannot be changed.
21417 | 10 | Having a queue timeout value of over 12 hours is not allowed.
21418 | 10 | Failed to add column "%s" to table "%s" because of metadata overflow.
21419 | 10 | Filter "%s" of article "%s" cannot be changed.
21420 | 10 | Subscription property "%s" cannot be changed.
21421 | 10 | Article ''%s'' cannot be dropped because there are other articles using it as a join article.
21500 | 10 | Invalid subscription type is specified. A subscription to publication '%s' already exists in the database with a different subscription type.
21501 | 10 | The supplied resolver information does not specify a valid column name to be used for conflict resolution by '%s'.
21502 | 10 | The publication '%s' does not allow the subscription to synchronize to an alternate synchronization partner.


Resolving System Error Messages

This topic identifies system error messages for which additional information or user action is provided.


Error 103

Severity Level 15
Message Text

The %S_MSG that starts with '%.*ls' is too long. Maximum length is %d.

Explanation

If you enclose a character string that is more than 128 characters in double quotation marks, the application may receive this error. When the QUOTED_IDENTIFIERS option is set ON (SET QUOTED_IDENTIFIERS ON), Microsoft® SQL Server™ expects quoted identifiers to be enclosed in double quotation marks (") and data values to be enclosed in single quotation marks ('). In the case of character parameters of stored procedures, SQL Server accepts data values enclosed in double quotation marks if the character string is less than 128 characters. They should be considered syntax errors by SQL Server and generate an error.

You can also see this in ODBC applications using the SQL Server ODBC driver versions 2.50.0121 and later. These drivers set QUOTED_IDENTIFIERS ON when run against a SQL Server version 6.x or later server so that the ODBC driver's behavior more closely matches the ANSI and ODBC standards. ODBC applications that use double quotation marks for parameter values may see this behavior after you upgrade to SQL Server 6.x or later and the ODBC 2.50.0121 or later driver.

This behavior has been seen when using stored procedures that contain nested stored procedure execution with parameters delimited in double quotation marks (such as xp_cmdshell) from ODBC applications such as Microsoft Internet Information Service (IIS).

SQL Server does not always flag stored procedure parameters enclosed in double quotation marks if the SET QUOTED_IDENTIFIER ON option has been issued.

Action

Change the procedure call to enclose the parameter values in single quotation marks:

EXECUTE myproc 1, 'abcdefghijklmn'

ODBC applications can also use bound parameter markers instead of providing the values directly using either proprietary Transact-SQL syntax:

SQLExecDirect(hstmt, "EXECUTE myproc ?,?", SQL_NTS);

or, the ODBC standard syntax:

SQLExecDirect(hstmt, "{ call myproc (?,?)}", SQL_NTS);

In these cases, you may be able to work around the problem by placing a SET QUOTED_IDENTIFIER OFF statement at the beginning of the stored procedure. This setting will be in effect only for the scope of the stored procedure and will not affect other statement execution outside of the stored procedure.

CREATE PROCEDURE iisproc
AS
   BEGIN
      DECLARE @stmt varchar(255)
      SET QUOTED_IDENTIFIER OFF
      SELECT @stmt = 'xp_cmdshell "c:\myprog xxxxxxxxxxxxxxxxxxxxxxx"'       EXECUTE (@stmt)
   END

See Also

Errors 1 - 999

EXECUTE

SET QUOTED_IDENTIFIER

Using Identifiers


Error 107

Severity Level 15
Message Text

The column prefix '%.*ls' does not match with a table name or alias name used in the query.

Explanation

A column prefix was specified that does not correspond to any table name specified in the query. Match the column prefixes against the table names and alias names in the FROM clause.

One common cause of this error is the use of a table name when an alias name for the table is also supplied. When working with a table alias (a correlation name in ANSI terminology), the syntax checking in Microsoft® SQL Server™ complies with the ANSI specification. ANSI states,

A <table name> ... is exposed ... if and only if the <table reference>
does not specify a <correlation name>.

If an alias has been provided for a table name in the FROM clause, you can use the alias only to qualify columns from the table; the table name cannot be used elsewhere in the statement because they are flagged as syntax errors.

As an example of the difference in behavior, assume this script has been executed:

USE Northwind
GO
SELECT Customers.ContactName
FROM Customers cu
WHERE ContactName LIKE 'C%'
GO
SELECT cu.ContactName
FROM Customers cu
WHERE Customers.ContactName LIKE 'C%'
GO

In both SELECT statements, notice the use of Customers to qualify the column ContactName even though a table alias of cu has been provided to substitute for the table name. Both of these queries return this error message:

Server: Msg 107, Level 16, State 3

The column prefix 'Customers' does not match with a table name or alias name used in the query.

Action

Use the column prefix that corresponds to the exposed name of the table.

Rewrite any queries where column names are qualified with the table name. Use the table alias instead. For example, this SELECT statement is equivalent to the ones above and uses a table alias for column qualification:

USE Northwind
GO
SELECT cu.ContactName
FROM Customers cu
WHERE cu.ContactName LIKE 'C%'
GO

See Also

Errors 1 - 999

Query Fundamentals

SELECT

Using Table Aliases


Error 109

Severity Level 15
Message Text

There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

Explanation

This error occurs when more columns are listed in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

Do not confuse error 109 with operating-system error 109. Operating-system error 109 means that a named pipe connection has been terminated.

Action

Rewrite the INSERT statement, ensuring that the number of columns specified matches the number of columns in the VALUES clause. For example:

INSERT t1 (col1,col2,col3) VALUES (val1,val2,val3)

See Also

INSERT


Error 137

Severity Level 15
Message Text

Must declare the variable '%.*ls'.

Explanation

This error occurs when a variable is used in a SQL script without first declaring the variable. This example returns error 137:

SET @mycol = 'ContactName'
SELECT @mycol
GO

One of the more complicated causes of this error includes the use of a variable that was declared outside the EXECUTE statement. For example:

USE Northwind
GO
DECLARE @mycol nvarchar(20)
SET @mycol = 'ContactName'
EXECUTE ('SELECT @mycol FROM Customers')
Action

Verify that any variables used in a SQL script are declared before being used elsewhere in the script.

Rewrite the procedure so that it does not reference variables in the EXECUTE statement that were declared outside of it.

USE Northwind
GO
DECLARE @mycol nvarchar(20)
SET @mycol = 'ContactName'
EXECUTE ('SELECT ' + @mycol + ' FROM Customers')

See Also

DECLARE @local_variable

Errors 1 - 999

EXECUTE

SELECT @local_variable

SET @local_variable


Error 156

Severity Level 15
Message Text

Incorrect syntax near the keyword '%.*ls'.

Explanation

This error indicates that the syntax of a Transact-SQL statement is incorrect and that the syntax error was detected near the keyword specified in the error message. The most frequent causes for syntax errors are misspellings of Transact-SQL keywords or operators, and specifying the syntax of a Transact-SQL statement in the wrong order.

One of the more complicated causes for this error may be a compatibility level mismatch for the current database. If the current database has a compatibility level other than 70, Microsoft® SQL Server™ will not recognize any of the keywords that a database with a compatibility level of 70 would recognize.

Action

First, check the Transact-SQL statement syntax near the keyword specified in the error message. Because Transact-SQL language syntax can be very complex, SQL Server may incorrectly report the position of the syntax error as later in the Transact-SQL statement than it actually occurred. Second, reexamine the entire Transact-SQL statement that generated the error. Verify the syntax order of the statement.

Ensure that the database does not have a compatibility level of 65 and has a compatibility level of 70.

See Also

Backward Compatibility

Errors 1 - 999

Transact-SQL Overview

Reserved Keywords

sp_dbcmptlevel


Error 170

Severity Level 15
Message Text

Line %d: Incorrect syntax near '%.*ls'.

Explanation

This error indicates that the syntax of a Transact-SQL statement is incorrect and that the syntax error was detected near the Transact-SQL syntax element specified in the error message. The most frequent causes for syntax errors are misspellings of Transact-SQL syntax elements or operators, and specifying the syntax of a Transact-SQL statement in the wrong order.

This example produces error 170:

USE Northwind
GO
SELECT &
FROM Categories
ORDER BY CategoryName ASC
Action

First, check the Transact-SQL statement syntax near the syntax element specified in the error message. Because Transact-SQL language syntax can be very complex, Microsoft® SQL Server™ may report the syntax error later in the Transact-SQL statement syntax than it actually occurred. Second, reexamine the entire Transact-SQL statement that generated the error. Verify the syntax order of the statement.

In the above example, changing the ampersand (&) to an asterisk (*) corrects the problem:

USE Northwind
GO
SELECT *
FROM Categories
ORDER BY CategoryName ASC

See Also

Errors 1 - 999

Transact-SQL Overview


Error 207

Severity Level 16
Message Text

Invalid column name '%.*ls'.

Explanation

This error occurs when a column referenced in a Transact-SQL statement was not found in any table specified in the FROM clause of the query.

Action

Change the column name to a column name present in one of the tables referenced in the query.

This example returns error 207:

USE Northwind
GO
SELECT CategoryName1
FROM Categories
GO

Evaluate the problem by looking at the full command. For the above example, ensure that the SELECT statement contains the name of a valid column name (CategoryName rather than CategoryName1 as specified above) for the specified table.

USE Northwind
GO
SELECT CategoryName
FROM Categories
GO

See Also

Errors 1 - 999

SELECT


Error 208

Severity Level 16
Message Text

Invalid object name '%.*ls'.

Explanation

This error occurs when an object that does not exist is referenced. If the object exists, you might need to include the owner's name in the object name.

If the object is not owned by the user attempting to access it, and it is not owned by the database owner, all references to the object must include the owner's name. For example, if user1 creates a table called test, other users must use the name user1.test when they refer to the table.

The Microsoft® SQL Server™ naming convention for database objects is:

[[[server_name.][database_name].][owner_name].]object_name

The default value for server_name is the current server and the default value for database_name is the current database. The default value for owner_name is the current user. Because owner_name is part of the object name, it is possible for two different users to have tables with the same name in the same database (for example, user1.test and user2.test). For more information about naming conventions, see Transact-SQL Syntax Conventions.

This message can also occur when you reference a temporary table that was created with an EXECUTE statement.

Action

The procedure for handling this error depends on what you know about the object indicated in the error message text.

The appropriate permissions must also be set to allow access to an object. If these permissions are not set, error 229 or 230 occurs.

If you do not know who owns the object
  • Execute sp_help with no parameters to display the object owner.

    Or

  • Query the Information Schema Views if the object is a table or view to determine the object owner and type. If the object is not a table or a view, query the sysobjects system table to determine the object owner and type.

For example, to determine the owner and type for the object named table_1, execute the following:

USE master
GO
SELECT TABLE_SCHEMA
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'table_1'
GO

If no rows are returned from this query, the object either resides in a different database or does not exist.

If you do not own the object in question
  • Include the object owner in the object name. For example:
    SELECT *
FROM user1.table_1

    Although using fully qualified object names eliminates this problem, remember that including the fully qualified object name in an application might complicate the maintenance of the application. For example, if all references to a table include the database name, changing the database name could become difficult.

    Or

  • Have the database owner create the object. If the owner creates the object, any user can find the object without specifying the owner. However, temporary tables reside in tempdb and are dropped automatically when the user process or server connection that created them is terminated. Users cannot share temporary tables, even if they are created by the database owner.
If the object does not reside in the database
  • Switch context to the correct database using the USE statement. For example:
    USE database_1

    Or

  • Qualify the object name with the database name. For example:
    SELECT *
FROM database_1.user1.table_1

    If you own the object or if the object is owned by the database owner, the owner name is not needed. For example:

    SELECT *
FROM database_1..table_1
If a temporary table created with an EXECUTE statement is referenced
  • If you must use the EXECUTE statement to create a temporary table, create it as a global temporary table using the syntax ##tablename.

See Also

CREATE TABLE

Creating and Modifying a Table

Errors 1 - 999

EXECUTE

Information Schema Views

Querying SQL Server System Catalogs

SELECT

sp_help

sysobjects

Transact-SQL Syntax Conventions

USE


Error 220

Severity Level 16
Message Text

Arithmetic overflow error for data type %ls, value = %ld.

Explanation

This error occurs when an attempt is made to convert a float or real data type value into a data type that cannot store the result. This error prevents the operation from being completed. For example, if you attempt to place the number 32770 into a variable or column of smallint data type, Microsoft® SQL Server™ returns this error because variables or columns of smallint data type can address integers from 215 (–32,768) through 215 (32,767).

This example raises the error:

DECLARE @myval smallint
SET @myval = 32770
SELECT @myval
GO
Action

For numeric operations, use the ROUND, CAST, and CONVERT functions to manipulate the value in question to fit into the column or variable. Change the data type of the column or variable in question. In the example described above, change the column or variable from smallint to int).

Here is the corrected example:

DECLARE @myval int
SET @myval = 32770
SELECT @myval
GO

See Also

CAST and CONVERT

Data Types

Errors 1 - 999

ROUND


Error 229

Severity Level 14
Message Text

%ls permission denied on object '%.*ls', database '%.*ls', owner '%.*ls'.

Explanation

This error occurs when a Microsoft® SQL Server™ user attempts an action, such as executing a stored procedure, or reading or modifying a table, for which the user does not have the appropriate privileges.

Action

Any user with full-control over the object in question (such as the object owner or system administrator) can grant the necessary privileges to the user requiring access to the object.

See Also

Errors 1 - 999

EXECUTE

GRANT

Managing Permissions

SELECT

UPDATE


Error 245

Severity Level 16
Message Text

Syntax error converting the %ls value '%.*ls' to a column of data type %ls.

Explanation

Microsoft® SQL Server™ returns this message if a character is converted to an integer. For example, these SELECT statements return error 245:

SELECT CONVERT(int, 'A')
-- Or
SELECT CAST('A' AS int)

SQL Server returns this error message because a conversion from a character value to an integer can only be done if it resembles a numeric value. For example, the character 1 (one) can be converted to an integer.

SELECT CONVERT(int, '1')
-- Or
SELECT CAST('1' AS int)
Action

To convert a character to an integer, use the ASCII function, which returns a numerical representation of the character. For example:

SELECT CONVERT(int, ASCII('A'))
-- Or
SELECT CAST(ASCII('A') AS int)

See Also

ASCII

CAST and CONVERT

Data Types

Errors 1 - 999


Error 259

Severity Level 16
Message Text

Ad hoc updates to system catalogs are not enabled. The system administrator must reconfigure SQL Server to allow this.

Explanation

This error occurs when Microsoft® SQL Server™ detected an attempt to modify the system catalogs directly while the allow updates system configuration option of sp_configure is set to 0.

The allow updates system configuration option allows the system administrator to change the system catalogs directly.

Warning Severe problems can result from the direct manipulation of the system catalogs. Do not modify the system catalogs unless instructed to do so by your primary support provider.

Action

Before modifying any system catalogs, be sure that you have a valid backup of the database.

Warning Incorrect modification of the system catalogs can result in database corruption or data loss.

If possible, restart SQL Server in single-user mode by using the -m flag of the sqlservr application so that inadvertent modifications do not occur. For more information, see sqlservr Application.

To modify system catalogs, use the osql utility to alter the allow updates system configuration setting.

Note Only the system administrator can alter the value for the allow updates system configuration setting.

See Also

allow updates Option

Backing Up and Restoring Databases

Errors 1 - 999

osql Utility

RECONFIGURE

Reporting Errors to Your Primary Support Provider

Setting Configuration Options

sp_configure

Using Startup Options


Error 266

Severity Level 16
Message Text

Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = %ld, current count = %ld.

Explanation

If a stored procedure exits with the @@TRANCOUNT value that is not the same as when the stored procedure was entered, Microsoft® SQL Server™ returns error 266.

Note This error can be ignored because it only sends a message to the client and does not affect execution.

This example reproduces the problem:

CREATE PROCEDURE test
AS
SELECT @@TRANCOUNT
ROLLBACK TRANSACTION
SELECT @@TRANCOUNT
GO
BEGIN TRANSACTION
EXECUTE test
GO

Because @@TRANCOUNT is not the same in both SELECT statements, error 266 is generated on return from the stored procedure.

This is expected behavior, but it does not mean that transactions cannot be started, completed, or terminated in a stored procedure. Instead, care must be taken so that the @@TRANSACTION function matches on both the entry and exit of the stored procedure. For more information, see ROLLBACK TRANSACTION.

This problem is more likely to occur when writing nested stored procedures.

Action

There is a solution so that the stored procedure works without the error. The following is a list of solutions, with sample code for each:

  1. Perform final COMMIT TRANSACTION or ROLLBACK TRANSACTION statements from the same stored procedure nesting level where the transaction began, as shown by the following examples:
    -- Example 1.a
CREATE PROCEDURE test1a
AS
SELECT @@TRANCOUNT
GO
BEGIN TRANSACTION
EXECUTE test1a
ROLLBACK TRANSACTION
GO
-- Example 1.b
CREATE PROCEDURE test1c
AS
SELECT @@TRANCOUNT
GO
CREATE PROCEDURE test1b
AS
BEGIN TRANSACTION
EXEC test1c
COMMIT TRANSACTION
GO
EXECUTE test1b
GO
  2. If nested transactions are used in a stored procedure, perform matching commits.

    Note The transaction is not committed until @@TRANCOUNT is equal to 0 (zero).

    -- Example 2
CREATE PROCEDURE test2b
AS
SELECT @@TRANCOUNT
BEGIN TRANSACTION
SELECT @@TRANCOUNT
COMMIT TRANSACTION
SELECT @@TRANCOUNT
GO
CREATE PROCEDURE test2a
AS
BEGIN TRANSACTION
EXECUTE test2b
COMMIT TRANSACTION
GO
EXECUTE test2a
GO
  3. If a rollback is needed and the stored procedure nesting level is different than where the transaction began, use RAISERROR, with a valid user-defined error, and check the @@ERROR function after the EXECUTE statement.
    -- Example 3
USE master
EXECUTE sp_addmessage 50001, 16, 'Rollback of transaction in test3'
GO
CREATE PROCEDURE test3
AS
RAISERROR (50001,16,1)
GO
BEGIN TRANSACTION
EXEC test3
    IF @@error <> 50001
        BEGIN
            PRINT 'Commit'
            COMMIT TRANSACTION
        END
    ELSE
        BEGIN
            PRINT 'Rollback'
            ROLLBACK TRANSACTION
        END
GO
  4. The exception to this rule is that if a trigger performs a rollback, @@TRANCOUNT need not match its starting value, because the batch is terminated. However, a stored procedure called by a trigger may cause the problem if it terminated the transaction.
    -- Example 4
CREATE TABLE x (col1 int)
GO
CREATE TRIGGER xins
    ON x
    FOR INSERT AS
        ROLLBACK TRANSACTION
GO
CREATE PROCEDURE sp_xinsert
AS
    SELECT @@TRANCOUNT
    INSERT x (col1) VALUES (1)
    SELECT @@TRANCOUNT
GO
BEGIN TRANSACTION
EXECUTE sp_xinsert
    IF @@error <> 0
        BEGIN
            PRINT 'Commit'
            COMMIT TRANSACTION
        END
    ELSE
        BEGIN
            PRINT 'Rollback'
            ROLLBACK TRANSACTION
        END
GO
SELECT *
FROM x

See Also

@@ERROR

@@TRANCOUNT

BEGIN TRANSACTION

COMMIT TRANSACTION

Errors 1 - 999

EXECUTE

ROLLBACK TRANSACTION

Transactions


Error 268

Severity Level 16
Message Text

Cannot run SELECT INTO in this database. The database owner must run sp_dboption to enable this option.

Explanation

This error occurs when an attempt to use the SELECT INTO statement has not been permitted because the select into/bulkcopy database option is not enabled for this database. The database owner must turn on the select into/bulkcopy database option before the SELECT INTO statement can be completed successfully.

This error can also be triggered by stored procedures.

Caution Enabling the select into/bulkcopy database option permits nonlogged operations to take place. Have a specific backup strategy in place to ensure data integrity after nonlogged operations have been performed. A transaction log cannot be backed up after a nonlogged operation. Use the BACKUP DATABASE statement after nonlogged operations have been performed.

Action

The database owner or system administrator must use the sp_dboption system stored procedure to enable the select into/bulkcopy database option. For example, for the pubs database, you would use the osql command prompt utility to perform the following steps:

  1. Switch to the master database and set the database option for the Northwind database. Type:
    USE master
GO
sp_dboption Northwind, 'select into/bulkcopy', true
GO
USE Northwind
GO
CHECKPOINT
GO
  2. Verify that the change has taken place correctly. Execute the sp_helpdb system stored procedure on Northwind. The status result column should show the select into/bulkcopy database option as enabled. Type:
    sp_helpdb Northwind
GO

You may want to review information about the bcp Utility and SELECT INTO statement. For more information, see the SELECT and bcp Utility. In some cases, bcp is a logged operation that can affect your backup strategy and transaction log backup frequency.

See Also

Backing Up and Restoring Databases

BACKUP

Errors 1 - 999

osql Utility

Setting Database Options

sp_dboption

sp_help

sp_helpdb


Error 511

Severity Level 16
Message Text

Cannot create a row of size %d which is greater than the allowable maximum of %d.

Explanation

This error occurs when you attempt to insert a row that is larger than the defined maximum for that table. This error occurs if the row you attempt to insert into a table is too big to fit into a data page.

In Microsoft® SQL Server™, the maximum allowable size of a row in a table is 8060 bytes. A row cannot be split across data pages. A data page is 8 KB in size and consists of the data row and some internal data structures.

Action

Change the data being inserted so it does not exceed the maximum number of bytes (8060) that can be stored in a single row.

See Also

Adding Rows with INSERT

CREATE TABLE

INSERT

Maximum Capacity Specifications


Error 515

Severity Level 16
Message Text

Cannot insert the value NULL into column '%.*ls', table '%.*ls'; column does not allow nulls. %ls fails.

Explanation

This error occurs at run time when an attempt is made to use a null value while inserting or updating a column that does not allow null values.

This message differs from the following message, which indicates that the attempt has been detected at compile time.

error 233: The column '%.*ls' in table '%.*ls' cannot be null.

This error can also occur if the table that is the target of an INSERT or UPDATE statement in a stored procedure or trigger is being dropped and re-created, and one or more of the table column definition(s) have changed from NULL to NOT NULL.

Action

If this error occurs when you are running an UPDATE or INSERT statement, verify that the data inserted or updated matches the column definition for the affected table.

Inserting or updating a column does not allow null values.

Note In a direct UPDATE or INSERT by value, you will get compile error 233 instead of error 515. Usually 515 errors occur in an INSERT/SELECT or an UPDATE statement that uses data in another table.

If this error occurs when a stored procedure or trigger references a table that has been dropped and re-created with different nullability, drop and re-create the affected stored procedure or trigger.

If you are unable to resolve the problem, contact your primary support provider for assistance.

See Also

ALTER PROCEDURE

ALTER TABLE

ALTER TRIGGER

CREATE PROCEDURE

CREATE TABLE

CREATE TRIGGER

DROP PROCEDURE

DROP TRIGGER

Errors 1 - 999

INSERT

Reporting Errors to Your Primary Support Provider

SELECT

UPDATE


Error 544

Severity Level 16
Message Text

Cannot insert explicit value for identity column in table '%.*ls' when IDENTITY_INSERT is set to OFF.

Explanation

This error occurs when you have attempted to insert a row that contains a specific identity value into a table that contains an identity column. However, SET IDENTITY_INSERT is not enabled for the specified table.

Action

To insert a specific identity row successfully into a table containing an identity column, you must enable SET IDENTITY_INSERT. The following example inserts identity row 2, where iID is defined as the identity column.

USE pubs
GO
IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
      WHERE TABLE_NAME = 'tblTest')
   DROP TABLE tblTest
GO
CREATE TABLE tblTest
( iID   int IDENTITY(1, 1),
  strData nvarchar(15)
)
GO
INSERT INTO tblTest (strData) VALUES (N'Leverling')
INSERT INTO tblTest (strData) VALUES (N'Davolio')
GO
SET IDENTITY_INSERT tblTest ON
GO

-- Insert the specified identity row using a column list.
INSERT INTO tblTest (iID, strData) VALUES (5, N'Callahan')
GO
-- Display the rows in tblTest to see identity values.

SELECT *
FROM tblTest

-- Disable IDENTITY_INSERT.
SET IDENTITY_INSERT tblTest OFF
GO

See Also

ALTER TABLE

CREATE TABLE

Errors 1 - 999

SET IDENTITY_INSERT


Error 601

Severity Level 12
Message Text

Could not continue scan with NOLOCK due to data movement.

Explanation

When scanning with the NOLOCK locking hint or with the transaction isolation level set to READ UNCOMMITTED, it is possible for the page at the current position of the scan to be deleted. When this happens, Microsoft® SQL Server™ is not able to continue the scan.

Action

This error aborts the query. Either resubmit the query or remove the NOLOCK locking hint.

See Also

Locking Hints

SELECT

SET TRANSACTION ISOLATION LEVEL


Error 602

Severity Level 21
Message Text

Could not find row in sysindexes for database ID %d, object ID %ld, index ID %d. Run DBCC CHECKTABLE on sysindexes.

Explanation

This error occurs when Microsoft® SQL Server™ cannot find a row in the sysindexes table for a needed table or index (for example, when executing a stored procedure that references a table that has been dropped).

Action

If the error occurs because a stored procedure references a dropped table, drop and re-create the stored procedure. This error may also occur in conjunction with other error messages that better point to the root cause of the problem. Execute DBCC CHECKTABLE on sysindexes; also execute DBCC CHECKDB.

If the problem persists, contact your primary support provider. Have the output from the DBCC CHECKDB statement available for review.

See Also

ALTER PROCEDURE

CREATE PROCEDURE

DBCC CHECKDB

DBCC CHECKTABLE

DROP PROCEDURE

Errors 1 - 999

Reporting Errors to Your Primary Support Provider

sysindexes


Error 605

Severity Level 21
Message Text

Attempt to fetch logical page %S_PGID in database '%.*ls' belongs to object '%.*ls', not to object '%.*ls'.

Explanation

This error occurs when Microsoft® SQL Server™ detects database corruption. The second object specified in the text not to object '%.*ls' is probably corrupt. Because this error can mask the existence of other errors, execute DBCC CHECKDB to determine the extent of the damage. If DBCC CHECKDB does not report additional errors, the first object mentioned is not corrupt.

SQL Server detects database corruption when it traverses the pages of an object and finds a page in the chain whose object ID does not match that of the object being accessed. There is probably a damaged page chain, a corrupt Index Allocation Map (IAM), or an invalid entry in the sysobjects system table for that object. A clustered table has one doubly-linked page chain for the table data as well as one for each index level. A nonclustered index has a page chain for each level of the index. Pages in a heap are not linked. The IAM is used to find the pages of a heap.

Although error 605 usually displays two object names, other variations can occur:

  • If instead of an object name the error displays a number greater than 0, it means that an attempt was made to reference an object ID that does not exist in a system table for that object.

  • If the error reports the first object ID as 0, an unallocated page was probably encountered. (There is no object ID equal to 0.)

  • If the error states that a page belongs to object ALLOCATION, some of the allocation structures used by the database might be corrupted.

Usually this error occurs after the corruption has been written to the database on disk, but it can also occur entirely in the cache without the damage ever being written to the disk. This is known as a transient 605 error and is not associated with data corruption. If error 605 occurs during data access, but subsequent DBCC CHECKDB statements complete without error, the 605 error was probably transient. Transient 605 errors can be caused by the operating system prematurely notifying SQL Server that an I/O operation has completed; the error message is displayed even though no actual data corruption exists.

Nontransient 605 errors are often caused by hardware or disk device driver failure.

Action

Execute DBCC CHECKTABLE on the second object specified in the error message. To determine the full extent of the corruption, execute DBCC CHECKDB as soon as possible. Also check the error log for other errors, which often accompany a 605 error.

If the 605 error is not transient, the problem is severe and you must run DBCC CHECKDB with one of the repair clauses. If the error involves an index page, use the REPAIR_REBUILD clause. If the error involves a data page, it may be necessary to use the REPAIR_ALLOW_DATA_LOSS clause. In the likely event that you cannot allow the loss of data, you will need to restore from a known clean backup. If the problem persists, contact your primary support provider. Have the output from DBCC CHECKDB available for review.

Important If running DBCC CHECKDB with one of the repair clauses does not correct the index problem, or if you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider.

In addition, run hardware diagnostics and correct any problems. You might find it beneficial to perform a completely new setup on the computer, including reformatting the disk drives and reinstalling the operating system. This eliminates the possibility that a .dll or .exe program is corrupted. You can also examine your operating-system error log to see if the error occurred as the result of hardware failure.

Finally, be sure that your system does not have write caching enabled on the disk controller. If you suspect this to be the problem, contact your hardware vendor.

Additional Information

DBCC CHECKDB offers the REPAIR_REBUILD and REPAIR_ALLOW_DATA_LOSS clauses. The REPAIR_REBUILD clause rebuilds corrupt indexes and the REPAIR_ALLOW_DATA_LOSS clause fixes allocation problems. Sometimes, deleting pages is the only way to fix allocation problems. Typically, these pages contain data that was already deleted, but the pages may contain valid data. Therefore, deleting pages is a more risky option than using DBCC CHECKDB with a repair clause. Using DBCC CHECKDB with a repair clause fixes database corruption when a database backup is not available.

If your database is a data warehouse, you may be able to continue operating without the lost data for some time before reloading the missing data. In these cases, use DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS clause to fix the damaged database.

You can prevent problems by following these guidelines:

  1. Run SQL Server only on hardware and controllers that are certified for your operating system.

  2. Perform regular backups in conjunction with DBCC CHECKDB statements. DBCC CHECKDB performs all checks that DBCC NEWALLOC and DBCC CHECKALLOC previously did, but DBCC CHECKDB is faster. This is the only way to be confident of the state of the database at the time of the backup.

  3. If the data is critical, back up the transaction log frequently. This makes it possible to reduce your window of vulnerability, even in the event of a catastrophic hardware problem, to an hour or less.

  4. In the most critical situations, use a standby server and a continually running batch job to take transaction backups off of the primary computer and continually restore them on the standby computer.

  5. If you have persistent data corruption problems, try to swap the computer, the controllers, and the disk device drivers for components of a different type. This makes it easier to determine whether the problem is specifically platform-related.

See Also

Backing Up and Restoring Databases

BACKUP

Errors 1 - 999

Managing Space Used by Objects

Reporting Errors to Your Primary Support Provider

Using Standby Servers


Error 624

Severity Level 21
Message Text

Could not retrieve row from page by RID because the requested RID has a higher number than the last RID on the page. %S_RID.%S_PAGE, Dbid %d

Explanation

This error occurs when an attempt to retrieve a row from a data page by specifying the row ID (RID) failed because the requested RID was a higher number than the last RID on the page. This can happen during normal processing, if the leaf page of a corrupt nonclustered index points to an incorrect or nonexistent RID on a data page.

If the error occurs on a system table during a read-only operation while other users are updating system tables (executing DDL), it is probably a transient 624 error (rather than a corrupted index). To confirm that there is no corruption, execute DBCC CHECKTABLE without a repair clause.

Action

The recovery procedure depends on when the error occurred. If problems persist, the following procedures might not be sufficient to clean up the index corruption. In this case, contact your primary support provider. Have the output from either DBCC CHECKTABLE (if investigating possible system table corruption) or DBCC CHECKDB available for review.

If the error occurred during normal processing

Execute DBCC CHECKTABLE with the REPAIR_REBUILD clause. If executing DBCC CHECKTABLE with the REPAIR_REBUILD clause does not correct the problem, drop and re-create the affected index(es).

Important If executing DBCC CHECKDB with the REPAIR_REBUILD clause does not correct the index problem or if you are unsure what effect DBCC CHECKDB with the REPAIR_REBUILD clause has on your data, contact your primary support provider.

Index unknown, query known

The fastest way to resolve this problem is to execute DBCC CHECKDB with the REPAIR_REBUILD clause. This fixes any index corruption in the entire database. If the database is so large that you do not want to run DBCC CHECKDB, use these instructions to locate the specific index to drop and re-create.

If you do not know which index is causing the problem but you do know which query encounters the problem, follow the instructions below. If you do not know the index or the query, follow the instructions under the next section, "Index and query both unknown."

  1. Determine which index should be dropped by reading the showplan output for the query that encounters the error. If you SET SHOWPLAN_TEXT to ON, SET NOEXEC to ON, and then run the query in question, the output indicates which nonclustered index the query is using to access the table in question.

    For example:

    USE pubs
GO
SET SHOWPLAN_TEXT ON
GO
SET NOEXEC ON
GO
SELECT title
FROM titles
WHERE title > 'Cooking'
GO

    Here is the result set:

    StmtText
----------------
SET NOEXEC ON

(1 row(s) affected)

StmtText
-------------------------------------------------------
SELECT title
FROM titles
WHERE title > 'Cooking'

(1 row(s) affected)

StmtText
---------------------------------------------------------------------
  |--Index Seek(pubs..titles.titleind, SEEK:(titles.title > @1) ORDERED)

(1 row(s) affected)
  2. SET NOEXEC to OFF and SET SHOWPLAN_TEXT TO OFF again:
    SET NOEXEC OFF
GO
SET SHOWPLAN_TEXT OFF
GO
  3. Drop and re-create the index identified in Step 1 (in this example, titleind).
Index and query both unknown

If you do not know the index or the query, rebuild all nonclustered indexes on the table as follows:

  1. Look at the output you created with DBCC CHECKDB when you obtained the table name:
    • If the object ID is less than 100, you cannot drop and re-create the indexes. Do not continue with Steps 2 or 3. You must restore the database from a known clean backup.

    • If the object ID is 100 or greater, continue with Step 2.
  2. Use sp_helpindex to list all indexes on the table, and then rebuild all the nonclustered indexes using one of the following methods:
    • Drop and re-create each nonclustered index on the table.

    • If the table has a clustered index, drop and re-create it. This causes all nonclustered indexes to be rebuilt automatically. If your table is large, you might not have the space to do this. Generally, 1.2 times of the size of the table must be available.
  3. After the appropriate index has been re-created, run DBCC CHECKTABLE on the table to confirm that the problem has been resolved.

See Also

DBCC CHECKDB

DBCC CHECKTABLE

Errors 1 - 999

Reporting Errors to Your Primary Support Provider

Resetting the Suspect Status

SET NOEXEC

SET SHOWPLAN_TEXT

sp_helpindex


Error 625

Severity Level 21
Message Text

Cannot retrieve row from page %S_PGID by RID because the slotid (%d) is not valid.

Explanation

This error occurs when an object to which this row belongs is in error. The problem was detected during the reading of a specific row from that logical page. This error can occur as a result of:

  • Hardware problems, especially problems with the hard drive, controller or hardware write caching.

  • Other errors in the database.
Action

Execute DBCC CHECKDB to determine the full extent of the error. Also check the error log for other errors such as 25xx messages, which often accompany this error.

If DBCC CHECKDB issues other error messages, resolving those messages first may take care of this error. Execute DBCC CHECKDB with the REPAIR_REBUILD clause to repair the damage.

Important If executing DBCC CHECKDB with the REPAIR_REBUILD clause does not correct the index problem or if you are unsure what effect DBCC CHECKDB with the REPAIR_REBUILD clause has on your data, contact your primary support provider.

If executing DBCC CHECKDB with the REPAIR_REBUILD clause does not resolve all table error problems, determine which table is affected by examining the page in the error message. If the page is associated with an index, you may be able to resolve the problem by dropping and then re-creating the index. If the page is a data page and a clean current backup is available, restore the database from the backup.

If no backup is available, select the table into another table or bulk copy data out of the table, drop the table, re-create it, and then select data back into the table.

If you suspect a hardware problem, run hardware diagnostics and correct any problems. You might find it beneficial to perform a completely new setup, including reformatting the disk drives and reinstalling the operating system. Also examine the Microsoft® Windows NT® application log to see if the error occurred as the result of hardware failure.

Finally, be sure that your system does not have write caching enabled on the disk controller. If you suspect this to be the problem, contact your hardware vendor.

See Also

BACKUP

DBCC CHECKDB

Errors 1 - 999


Error 644

Severity Level 21
Message Text

Could not find the index entry for RID '%.*hs' in index page %S_PGID, index ID %d, database '%.*ls'.

Explanation

This error occurs when the nonclustered index indicated by the index ID is in error. The corruption is detected when a process tries to delete a nonexistent row.

Action

Execute DBCC CHECKDB without a repair clause to determine the extent of the damage. Then, execute DBCC CHECKDB with REPAIR_REBUILD clause to correct the damage. If problems persist, either drop and re-create the index (as shown below) or contact your primary support provider.

Important If executing DBCC CHECKDB with the REPAIR_REBUILD clause does not correct the index problem or if you are unsure what effect DBCC CHECKDB with the REPAIR_REBUILD clause has on your data, contact your primary support provider.

To drop and re-create the index:

  1. Record the value of index page and index ID specified in the error text.

  2. Identify which table and index correspond to the index page number.

  3. Note the object ID.

    If the object with the error is a system table (the object ID is less than 100), you cannot drop the index. Execute DBCC CHECKDB with the REPAIR_REBUILD clause or restore the database from a known clean backup.

  4. If the object ID is greater than 100, drop and re-create the index using the table name and index name obtained in Step 1. In most cases, this will clear the error.

  5. Execute DBCC CHECKDB with the REPAIR_REBUILD clause on the affected database to verify that all problems have been resolved.

If problems persist, this procedure might not be sufficient to clean up the index error. In this case, contact your primary support provider. Have the output from DBCC CHECKDB available for review.

See Also

CREATE INDEX

DBCC CHECKDB

DROP INDEX

Errors 1 - 999

Reporting Errors to Your Primary Support Provider


Error 701

Severity Level 19
Message Text

There is insufficient system memory to run this query.

Explanation

The memory requirements for the set of tasks Microsoft® SQL Server™ is attempting to perform exceeds the amount of available memory. Either increase the amount of server memory or reduce the server workload.

Action

To decrease the server workload, reduce the number of users currently using SQL Server. To prevent additional users from logging in to SQL Server, pause the server. For more information, see Pausing and Resuming SQL Server.

To increase server memory:

  1. Check the settings for both min server memory (MB) and max server memory (MB).

    If max server memory (MB) is a value close to the value of min server memory (MB), then increase the max server memory (MB) value.

  2. Check the size of the virtual memory paging file.

    If possible, increase the size of the file.

  3. Shut down any other applications running, if applicable, on the server.

  4. View the current memory usage information in Windows NT Performance Monitor.

    To view current memory usage information in preparation for tuning memory configuration, use the Total Server Memory (KB) Performance Monitor Counter of the SQLServer:General Statistics object.

  5. Add additional memory to the server.

See Also

Errors 1 - 999

Programming Stored Procedures

Server Memory Options

SQL Server: General Statistics Object


Error 813

Severity Level 20
Message Text

Logical page %S_PGID in database ID %d is already hashed.

Explanation

This error occurs when Microsoft® SQL Server™ attempts to hash the logical page %S_PGID of database ID%d and the page is already in the SQL Server hash table.

This error usually occurs as a side effect of other data errors that can usually be detected by executing DBCC CHECKDB without a repair clause.

Action

Review the SQL Server error log, and then execute DBCC CHECKDB with the appropriate repair clause on the database. If the error involves an index page, use the REPAIR_REBUILD clause. If the error involves a data page, it may be necessary to use the REPAIR_ALLOW_DATA_LOSS clause. In the likely event that you cannot allow the loss of data, you will need to restore from a known clean backup. If the problem persists, contact your primary support provider. Have the output from DBCC CHECKDB available for review.

Important If executing DBCC CHECKDB with one of the repair clauses does not correct the index problem or if you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider.

Verify with your hardware vendor that the disk subsystem being used by SQL Server is at the currently supported and recommended firmware and hardware levels.

If DBCC CHECKDB finds no errors, or if errors are found and corrected so that subsequent DBCC statements indicate no errors, but this error reoccurs, contact your primary support provider. Have the SQL Server error logs and the output from DBCC CHECKDB and sp_configure available for review.

See Also

DBCC CHECKALLOC

DBCC CHECKDB

Errors 1 - 999

Reporting Errors to Your Primary Support Provider

Setting Configuration Options

sp_configure


Error 822

Severity Level 21
Message Text

Could not start I/O for request %S_BLKIOPTR.

Explanation

Microsoft® SQL Server™ encountered an error while attempting to initiate a read or write request. This error can occur for any of the following reasons:

  • A database file is off-line.

  • A database file has been removed or renamed.

  • A database file is inaccessible for another reason (such as insufficient permissions).

The parameter in the error message refers to an internal structure and does not help determine which database file is involved. However, other error messages appearing in the error log just before error 822 usually indicate the file involved.

Action

Examine the availability and condition of the file involved using your standard operating-system procedures, and make sure the file is accessible.

Because error 822 marks the database as suspect, SQL Server cannot recover the database upon restarting. If you know that the database was marked suspect because the file was unavailable, you can reset the status of the database to allow recovery to continue.

Caution Do not use these procedures if there are other errors in the error log, near the error 822 message, that suggest that the database might have been marked suspect for some other reason.

Reset the suspect status by executing sp_resetstatus. This is the safest method. After you execute sp_resetstatus, restart SQL Server.

Here are two examples of error 822 and the associated messages from the log. Examining the error messages that occurred just before error 822 usually helps determine the type of problem.

Device missing

In this example, the device C:\Mssql7\data\mydb_data.mdf did not exist when SQL Server started, causing access to the device to fail:

kernel   udopen: Operating system error 2(The system cannot find the file specified.) during the creation/opening of physical device C:\MSSQL7\data\mydb_Data.MDF.
kernel   FCB::Open failed: Could not open device C:\MSSQL7\data\mydb_Data.MDF for virtual device number (VDN) 1.
spid9    Device activation error. The physical file name 'C:\MSSQL7\data\mydb_Data.MDF' may be incorrect.

To correct an error like this, be sure that the virtual device appearing in the error message exists, and correct whatever error prevented SQL Server from finding it. For example, it might have been renamed or moved while SQL Server was not running.

If the virtual device no longer exists, you must restore from known clean backups. Merely creating an empty device with the correct name will not solve this problem.

Permission problems

Permission problems can occur if the device is on an NTFS partition.

In this example, the permissions on C:\Mssql7\Data\Mydb_DATA.Mdf were incorrect, so SQL Server could not access it:

kernel   udopen: Operating system error 2(The system cannot find the file specified.) during the creation/opening of physical device C:\MSSQL7\data\mydb_Data.MDF.
kernel: dopen: open "c:\mssql7\data\mydb_data.mdf", Permission denied
kernel   FCB::Open failed: Could not open device C:\MSSQL7\data\mydb_Data.MDF for virtual device number (VDN) 1.
spid9    Device activation error. The physical file name 'C:\MSSQL7\data\mydb_Data.MDF' may be incorrect.

To correct an error like this, change the object ownership for the device to Administrator, and be sure that the account under which SQL Server was started has read and write permissions on the object.

See Also

BEGIN TRANSACTION

CHECKPOINT

Errors 1 - 999

RECONFIGURE

Resetting the Suspect Status

Setting Configuration Options

Setting Database Options

SHUTDOWN

sp_configure

sp_dboption

UPDATE


Error 823

Severity Level 24
Message Text

I/O error %ls detected during %S_MSG at offset %#016I64x in file '%ls'.

Explanation

Microsoft® SQL Server™ encountered an I/O error on a read or write request made to a device. This error usually indicates disk problems. However, additional kernel messages in the error log, recorded before error 823, should indicate which device is involved.

Action

Check the accessibility and condition of the device in question.

Run hardware diagnostics and correct problems, if possible.

Restore damaged files from the latest database backup. Restoring from a database backup should always be considered the primary means of fixing a damaged database.

If you don't have a backup or if the errors detected are very isolated, the repair functionality of DBCC CHECKDB may be useful. However, using DBCC CHECKDB can be more time consuming than restoring the damaged files from a backup, and you may not be able to recover all your data .

Caution If running DBCC CHECKDB with one of the repair clauses does not correct the problem or if you are unsure how this process may affect your data, contact your primary support provider.

See Also

RESTORE

DBCC CHECKDB

Errors 1 - 999


Error 844

Severity Level 10
Message Text

Time out occurred while waiting for buffer latch type %d, bp %#x, page %S_PGID, stat %#x, object ID %d:%d:%d, waittime %d. Continuing to wait.

Explanation

When under a heavy stress load or high I/O conditions, your system may produce this message.

Action

This message can usually be ignored. However, if you receive repeated messages where the wait time increases, it may indicate an internal server problem, in which case, contact your system administrator. The system administrator should check the waittype, waittime, lastwaittype, and the waitresource columns of sysprocesses to see what activities each SPID is performing.

See Also

Errors 1 - 999

sysprocesses


Error 845

Severity Level 17
Message Text

Time-out occurred while waiting for buffer latch type %d for page %S_PGID, database ID %d.

Explanation

When under a heavy stress load or high I/O conditions, your system may produce this message.

Action

This message can usually be ignored; however, if you receive repeated messages where the wait time increases, it may indicate an internal server problem. Contact your system administrator. The system administrator should check the waittype, waittime, lastwaittype, and the waitresource columns of sysprocesses to see what activities each SPIDs is performing.

See Also

Errors 1 - 999

sysprocesses


Error 911

Severity Level 16
Message Text

Could not locate entry in sysdatabases for database '%.*ls'. No entry found with that name. Make sure that the name is entered correctly.

Explanation

This error occurs when attempting to change database context (with a USE statement) to a database that does not exist, or when the default database established for a login does not exist. In the latter case, the user login then attempts to access the master database.

Action

To obtain a list of databases, execute sp_helpdb or issuing this query:

SELECT name
FROM master..sysdatabases

The list returned will contain the databases that exist on the Microsoft® SQL Server™ installation. Either create a missing database or connect to an existing one. To correct login-level errors, it may be necessary to execute sp_defaultdb.

See Also

Errors 1 - 999

sp_defaultdb

sp_helpdb

sysdatabases

USE


Error 913

Severity Level 22
Message Text

Could not find database ID %d. Database may not be activated yet or may be in transition.

Explanation

This error can occur if there is a problem with the view resolution process. During execution of various compiled objects in a database that references the database dbid (such as stored procedures and views), it is typical to resolve the dbid with other structures within the database. When a compiled object is first created, the dbid where the object is located is embedded in the compiled code. For example, when a view is accessed or a stored procedure is executed, the rights to access the view or execute the stored procedure are checked.

Action

If the error occurs when a stored procedure or view is accessed, you may be able to correct the problem by simply dropping and re-creating the database object (stored procedure or view).

If this error continues to occur, contact your primary support provider and have the Microsoft® SQL Server™ error log and any additional information relevant to the circumstances when the error occurred available for review.

See Also

CREATE PROCEDURE

CREATE VIEW

DROP PROCEDURE

DROP VIEW

Errors 1 - 999

Reporting Errors to Your Primary Support Provider


Error 924

Severity Level 14
Message Text

Database '%.*ls' is already open and can only have one user at a time.

Explanation

This error occurs when trying to access a database that is already in use by another user or session. Microsoft® SQL Server™ detected an attempt to access a database that is in single-user mode.

Action

Verify that the database in question is actually in single-user mode by executing this query (substitute your database name for <database>).

sp_helpdb <database>
GO

If the database is truly in single-user mode, the status result set column heading will list single user as the access mode.

To see what login is accessing the database, execute sp_who and scan the dbname result set column heading for the specified database.

If single-user mode privilege is a problem, contact your system administrator and ask to have the single-user mode database option set to multiuser. The system administrator can do so by executing sp_dboption from the master database, as shown here:

sp_dboption database, 'single user', false

See Also

Errors 1 - 999

Setting Database Options

sp_dboption

sp_helpdb

sp_who


Error 926

Severity Level 14
Message Text

Database '%.*ls' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.

Explanation

The database is marked as suspect because it failed the recovery process that brings a database to a consistent transactional state. This can occur during the following operations:

  • Starting up an instance of Microsoft® SQL Server™ 2000.

  • Attaching a database.

  • Using the RESTORE database or RESTORE LOG procedures.
Action

Inspect the Microsoft SQL Server error log and determine the cause of the error. If SQL Server has been restarted since the failed recovery, look at previous SQL Server error logs to see the reason why recovery failed.

If the recovery failed because of a persistent I/O error, a torn page, or other possible hardware problem, resolve the underlying hardware problem and restore the database by using a backup. If no backups are available, consider the repair options of DBCC CHECKDB.

If you are unable to resolve this problem, contact your primary support provider. Have the SQL Server error log available for review.

See Also

Backing Up and Restoring Databases

Errors 1 - 999

Reporting Errors to Your Primary Support Provider

Resetting the Suspect Status

RESTORE

sysdatabases


Error 945

Severity Level 16
Message Text

Database '%.*ls' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.

Explanation

Error 945 is returned when the database is marked IsShutdown. This occurs when a database cannot be recovered due to missing files, or some other resource error that usually can be corrected easily.

Action

First, verify that the database is marked IsShutdown using DATABASEPROPERTY.

Then, determine the cause of the error by consulting the errorlog, and take action as noted below.

If one or more data or log files are missing:
  1. Make the files available and bring the database OFFLINE using ALTER DATABASE.

  2. Use ALTER DATABASE to bring the database ONLINE
If insufficient log space:
  • Use sp_add_log_file_recover_suspect_db() to add another log file.

The database is recovered and brought online by this procedure.

If insufficient data space:
  • Use sp_add_data_file_recover_suspect_db() to add another log file.

The database is recovered and brought online by this procedure.

If insufficient memory:

The insufficient memory error can occur when a number of databases are recovered at the same time. Retrying the operation may fix the problem:

  1. Retry the operation using ALTER DATABASE to bring the database OFFLINE.

  2. Use ALTER DATABASE to bring the database ONLINE.

If retrying the operation does not work, consider freeing up memory.

See Also

DATABASEPROPERTY


Error 1002

Severity Level 16
Message Text

Line %d: Specified scale %d is invalid.

Explanation

This error occurs when the scale of a decimal or numeric column does not fall between the allowable minimum and maximum values based on the precision of the column.

Action

Specify the precision with p, which must be between 1 and the maximum precision, and the scale with s, which must be between 0 and p. If you do not specify the precision, Microsoft® SQL Server™ uses a default precision of 18. If you do not specify the scale, SQL Server uses a default scale of 0. For more information, see the decimal and numeric topic and the Precision, Scale, and Length.


Error 1105

Severity Level 17
Message Text

Could not allocate space for object '%.*ls' in database '%.*ls' because the '%.*ls' filegroup is full.

Explanation

The specified filegroup has run out of free space.

Action

To gain more space, you can free disk space on any disk drive containing a file in the full filegroup, allowing files in the group to grow. Or you can gain space using a data file with the specified database.

Freeing disk space

You can free disk space on your local drive or on another disk drive. To free disk space on another drive:

  1. Move the data files in the filegroup with an insufficient amount of free disk space to a different disk drive.

  2. Detach the database by executing sp_detach_db.

  3. Attach the database by executing sp_attach_db, pointing to the moved files.
Using a data file

Another solution is to add a data file to the specified database using the ADD FILE clause of the ALTER DATABASE statement. Or you can enlarge the data file by using the MODIFY FILE clause of the ALTER DATABASE statement, specifying the SIZE and MAXSIZE syntax.

See Also

ALTER DATABASE

Errors 1000 - 1999

Expanding a Database

Insufficient Disk Space

sp_attach_db

sp_detach_db

sp_add_data_file_recover_suspect_db


Error 1203

Severity Level 20
Message Text

Process ID %d attempting to unlock unowned resource %.*ls.

Explanation

This error occurs when Microsoft® SQL Server™ is engaged in some activity other than normal post-processing cleanup and it finds that a particular page it is attempting to unlock is already unlocked. The underlying cause for this error may be related to structural problems within the affected database. SQL Server manages the acquisition and release of pages to maintain concurrency control in the multi-user environment. This mechanism is maintained through the use of various internal lock structures that identify the page and the type of lock present. Locks are acquired for processing of affected pages and released when the processing is completed.

Action

Execute DBCC CHECKDB against the database in which the object belongs. If DBCC CHECKDB reports no errors, attempt to reestablish the connection and execute the command.

Important If executing DBCC CHECKDB with one of the repair clauses does not correct the index problem, or if you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider.

See Also

DBCC CHECKDB

Errors 1000 - 1999

Reporting Errors to Your Primary Support Provider


Error 1204

Severity Level 19
Message Text

The SQL Server cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users or ask the system administrator to check the SQL Server lock and memory configuration.

Explanation

This error occurs when there are not enough system locks to complete the current command. SQL Server then attempts to obtain a LOCK block to represent and control the desired lock. When dynamically configured, the lock limit is determined by the available memory. When statically configured, the lock limit is determined by the sp_configure setting.

If you continue to encounter this problem, make sure your statistics are up to date, you have sufficient indexes to run your query efficiently, and that the transaction isolation level for your application is not more restrictive than necessary.

Action

Either execute the command again when activity on the server is low, or have the system administrator increase the number of locks by executing sp_configure from the master database.

To view the current configuration:

sp_configure locks
GO

This reports the minimum, maximum, current run, and configuration values. To increase the number of locks, run sp_configure again, specifying the number of locks to be configured. For example, to configure 10,000 locks:

sp_configure locks, 10000
GO
RECONFIGURE WITH OVERRIDE
GO

Stop and restart Microsoft® SQL Server™ so the changes can take effect. Locks are allocated at system startup.

If the number of locks cannot be increased at the current time, and the single action requires more locks than the server is currently configured for, you may be able to reduce the number of locks required for the operation. For example, try the following:

  • For large UPDATE statements, break the updates into smaller units that will affect only a subset of records at a time. For example, you could use the primary key, changing the single UPDATE statement from:
    UPDATE employees
SET salary = salary * 1.05
WHERE employee_id BETWEEN 1000 AND 9999
GO

to several UPDATE statements:

UPDATE employees
SET salary = salary * 1.05
WHERE employee_id BETWEEN 1000 AND 4999
GO
UPDATE employees
SET salary = salary * 1.05
WHERE employee_id BETWEEN 5000 AND 9999
GO
  • For a maintenance type of task or for a global update, consider putting the database into single-user mode (if it is feasible to keep other users out of the database). Single-user mode does not set locks, so you will not run out of locks, and the operation will run somewhat faster (because you save the locking overhead).

  • For a large bulk copy operation, the entire operation is treated as a single transaction. When you use the batch parameter (-b), the bcp utility will treat the operation in small transactions with the number of rows specified. At the end of each small transaction, the system resources held by that transaction are freed, so fewer locks are needed.

See Also

Understanding and Avoiding Blocking

bcp Utility

BULK INSERT

Errors 1000 - 1999

Setting Configuration Options

sp_configure

Starting, Pausing, and Stopping SQL Server

UPDATE


Error 1205

Severity Level 13
Message Text

Transaction (Process ID %d) was deadlocked on {%Z} resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Explanation

This error occurs when Microsoft® SQL Server™ encounters a deadlock. A deadlock occurs when two (or more) processes attempt to access a resource that the other process holds a lock on. Because each process has a request for another resource, neither process can be completed. When a deadlock is detected, SQL Server rolls back the command that has the least processing time and returns error message 1205 to the client application. This error is not fatal and may not cause the batch to be terminated.

Action

In some instances, a deadlock condition will cause a DB-Library function (such as dbsqlexec, dbsqlok, dbresults, or dbnextrow) to return FAIL. It is always the responsibility of the program to check the return codes from each DB-Library function. If FAIL is returned by one of these DB-Library functions, the program should cancel the batch and not attempt to continue. In some cases, it is possible to continue execution of subsequent functions in the batch. However, because a deadlock situation occurred and the functions that caused it were rolled back, later functions in the batch will probably fail with a more serious error, such as "object not found".

In other instances, a deadlock condition will not cause a DB-Library function to return FAIL. In these cases, the program must check for error message 1205 in the message handler and use the dbsetuserdata function to communicate this to the application. The program must then check for the deadlock indicator after every DB-Library call and should cancel the batch if a deadlock is detected.

Although it may seem unnecessary to cancel a batch after receiving a 1205 deadlock message, it is necessary because the server does not always terminate the batch in a deadlock situation. If the batch is not canceled, any attempt to submit a new batch can result in a DB-Library error 10038 "Results Pending".

You can also use the SET DEADLOCK_PRIORITY statement (LOW or NORMAL). SET DEADLOCK_PRIORITY controls how the session reacts when in a deadlock situation. If set to LOW, the process will be the preferred victim of a deadlock situation. If set to NORMAL, the session will use the default deadlock-handling method.

If a deadlock situation continues, it is often useful to use trace flag 1204 to gather more information. Trace flag 1204 prints out the deadlock chains and victim, as shown in this sample output:

*** Deadlock Detected ***
 ==> Process 7 chosen as deadlock victim
 == Deadlock Detected at: 1998-09-10 16:39:29.17
 == Session participant information:
 SPID: 7 ECID: 0 Statement Type: UPDATE
 Input Buf: update t1 set c1 = c1  where  c1 = 2

 SPID: 8 ECID: 0 Statement Type: UPDATE
 Input Buf: update t1 set c1 = c1  where  c1 = 1

 == Deadlock Lock participant information:
 == Lock: KEY: 2:117575457:1 (010001000000)
 Database: tempdb
 Table: t1
 Index: i1
  - Held by: SPID 7 ECID 0 Mode "S"
  - Requested by: SPID 8 ECID 0 Mode "X"
 == Lock: KEY: 2:117575457:1 (020002000000)
 Database: tempdb
 Table: t1
 Index: i1
  - Held by: SPID 8 ECID 0 Mode "S"
  - Requested by: SPID 7 ECID 0 Mode "X"

This deadlock information can be interpreted as follows:

  • The first section displays the deadlock victim and time of deadlock, along with the sessions involved in the deadlock. For each session, the current SPID, statement type, and a portion of the input buffer are displayed.

  • The second section displays details about the locks involved in the deadlock. From the output above, note that the deadlock involves key locks on table t1, index i1. The deadlock output shows which processes own the locks involved in the deadlock and which sessions are waiting for the locks to be granted as well as the associated lock modes.

  • The process that has generated the least amount of log volume will, by default, be chosen as the deadlock victim and be rolled back automatically. To influence which session is rolled back, set the DEADLOCK_PRIORITY for a session.

See Also

Deadlocking

Errors 1000 - 1999

SET DEADLOCK_PRIORITY

Trace Flags


Error 1505

Severity Level 14
Message Text

CREATE UNIQUE INDEX terminated because a duplicate key was found for index ID %d. Most significant primary key is '%S_KEY'.

Explanation

This error occurs when you attempt to create a unique index and more than one row contains the duplicate value. Microsoft® SQL Server™ has detected a uniqueness violation and cancels the CREATE INDEX operation.

For example, the creation for the index below would be canceled due to the uniqueness violation at row 3. The BUCHANAN STEVEN combination is already located in row 1.

TABLE:     tblTest
Row      strLastName     strFirstName    strCity        strState
1        BUCHANAN        STEVEN          BOISE          ID
2        SUYAMA          MICHAEL         BUTTE          MT
3        BUCHANAN        STEVEN          SEATTLE        WA
4        DAVOLIO         NANCY           SAN FRANCISCO  CA

CREATE UNIQUE NONCLUSTERED INDEX
idxUniqueNames ON
tblText(strLastName, strFirstName)
Action

You must review your index objective. If your index does not need to be unique, remove the UNIQUE keyword and reissue the CREATE INDEX statement. However, if you still want to create a unique index, you must query the table in question and remove the rows in error. For more information about the CREATE INDEX statement, see CREATE INDEX.

To find the duplicate rows, issue a GROUP BY statement:

SELECT * FROM tblTest
GROUP BY strLastName, strFirstName

See Also

Errors 1000 - 1999

SELECT


Error 1508

Severity Level 14
Message Text

'CREATE INDEX terminated because a duplicate row was found. Primary key is ''%S_KEY''.'

Explanation

This error occurs when you attempt to create a clustered index and a duplicate row is encountered in the table.

The following example produces error 1508 when the index creation process reaches row 3, which is an exact duplicate of row 1:

TABLE:     tblTest
Row      strLastName     strFirstName    strCity        strState
1        BUCHANAN        STEVEN          BOISE          ID
2        SUYAMA          MICHAEL         BUTTE          MT
3        BUCHANAN        STEVEN          BOISE          ID
4        DAVOLIO         NANCY           SAN FRANCISCO  CA

CREATE CLUSTERED INDEX
idxClusteredName ON
tblText(strLastName)
Action

You must decide whether to allow or prevent duplicate rows in the table. To allow duplicate rows, you should add the ALLOW_DUP_ROW keyword to the CREATE INDEX statement. Be cautious when using IGNORE_DUP_ROW, because it physically removes duplicate data from the table. Also note that when creating clustered indexes, the amount of space required can be 120 percent to 150 percent of the original table size. For more information, see CREATE INDEX.

The following example creates the clustered index while allowing the duplicate rows to remain in the table:

CREATE CLUSTERED INDEX
idxClusteredName ON
tblText(strLastName)
WITH ALLOW_DUP_ROW

See Also

Errors 1000 - 1999

SELECT


Error 1510

Severity Level 17
Message Text

Sort failed. Out of space or locks in database '%.*ls'.

Explanation

This error occurs when you attempt to create an index and there is not enough space in the database to complete the operation or no more locks are currently available.

Creating indexes can require 1.2 times the original table size when building a clustered index (this amount is in addition to the table size during the time that CREATE INDEX is processing). This space must be available in the indicated database or in the segment on which you were attempting to create the index.

Action

When there is not enough space in the database, you may be able to select a specific filegroup on which to place the index. To locate a specific filegroup and to check the size available on the filegroup, execute sp_helpfilegroup:

sp_helpfilegroup 'PRIMARY'

Or use the ALTER DATABASE statement to increase the overall database size. Note that after you increase the size of the database, you may not be allowed to decrease the size. For more information about creating and extending files or filegroups, and altering or moving databases, see ALTER DATABASE.

If your database has no more locks available, execute sp_configure to increase the number of locks. This example increases the amount of locks to 10,000:

sp_configure 'locks', 10000
GO
RECONFIGURE
GO

For the configuration option to take effect, stop and restart the Microsoft® SQL Server™ service. For user convenience, you may want to pause the service and allow current user activity to gracefully finish before officially stopping the service. For more information about starting, pausing, and stopping the SQL Server service, see Starting, Pausing, and Stopping SQL Server.

See Also

CREATE INDEX

Errors 1000 - 1999

Setting Configuration Options

sp_configure

sp_helpfilegroup


Error 1530

Severity Level 16
Message Text

CREATE INDEX with DROP_EXISTING was aborted because a row was out of order. Most significant offending primary key is '%S_KEY'. Explicitly drop and create the index instead.

Explanation

This error occurs when you try to create an index using the DROP_EXISTING clause of the CREATE INDEX statement on a column or columns containing data that is not in sorted order. When this error occurs, no index is created.

The DROP_EXISTING clause speeds the creation of an index when the data in the table is already in order. The space required to build a clustered index is less when the DROP_EXISTING clause is used.

The DROP_EXISTING clause speeds index creation only for clustered indexes or unique nonclustered indexes. Creating a nonunique, nonclustered index with the DROP_EXISTING clause may succeed, but there is no improvement in performance.

Action

Use either of these strategies:

  • Execute CREATE INDEX with the DROP_EXISTING clause.

  • Drop and re-create the index without any clauses.

You can also use the SORTED_DATA_REORG clause, which physically reorganizes the data.

See Also

CREATE INDEX

Errors 1000 - 1999


Error 1702

Severity Level 16
Message Text

CREATE TABLE failed because column '%.*ls' in table '%.*ls' exceeds the maximum of %d columns.

Explanation

This error occurs when you try to create a table with more than 1,024 columns. The maximum number of definable columns per table is 1,024.

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 to 1,024 or less. For more information about creating tables, see CREATE TABLE.

See Also

Errors 1000 - 1999

Maximum Capacity Specifications

Using Identifiers


Error 1803

Severity Level 17
Message Text

CREATE DATABASE failed. Could not allocate enough disk space for a new database on the named disks. Total space allocated must be at least %d MB to accommodate a copy of the model database.

Explanation

This error occurs when there is not enough space on the device to create the tempdb database.

Action

The procedure for handling this error depends on whether the error occurred on a user database or on tempdb.

If the error occurred on a user database
  • Create the database on a different disk.

    Or

  • Delete some files to free space on the disk.
If the error occurred on tempdb

If you moved tempdb from one device back to any default device and you do not have enough space on the device (2 MB), Microsoft® SQL Server™ will attempt to create tempdb on another device. If you do not have a device with at least 2 MB free, SQL Server will not start. Start SQL Server using the -f minimum configuration option.

You can free at least 2 MB on the device, or create a new device with at least 2 MB. If you create a new device, make sure it is specified as a default device, as in this example:

sp_diskdefault new_device_name, defaulton

If no default is specified, SQL Server sends an "out of memory" message (you can ignore this message) and then moves tempdb to RAM automatically.

See Also

Errors 1000 - 1999

sqlservr Application


Error 1814

Severity Level 10
Message Text

Could not create tempdb. If space is low, extend the amount of space and restart.

Explanation

This error occurs when there is not enough space on the device to create the tempdb database.

Action

You can free at least 2 MB on the device, or create a new device with at least 2 MB. If you create a new device, make sure it is specified as a default device, as in the following example:

sp_diskdefault new_device_name, defaulton

If no default device is specified, Microsoft® SQL Server™ sends an "out of memory" message (you can ignore this message) and then moves tempdb to RAM automatically.

See Also

Errors 1000 - 1999


Error 1902

Severity Level 16
Message Text

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

Explanation

This error occurs when a table can have only one clustered index, but it can have many nonclustered indexes. Microsoft® SQL Server™ uses the clustered index to sort rows so that their physical order is the same as their logical (indexed) order. The bottom (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. In a nonclustered index, the bottom (leaf level) contains pointers to rows on data pages, which creates an extra level between the index structure and the data itself.

Action

Use the sp_helpindex system stored procedure to examine the existing indexes on the table. If a clustered index already exists, you must drop it before creating another clustered index.

See Also

CREATE INDEX

Errors 1000 - 1999

sp_helpindex


Error 1903

Severity Level 16
Message Text

Index keys are too large. The %d bytes needed to represent the keys for index %d exceeds the size limit of %d bytes.

Explanation

This error occurs when the sum of the lengths of the columns that make up the composite index exceeds 900 bytes.

A composite index is an index that uses from 2 to 16 columns. For example, the following shows a composite index using objects from the Northwind database:

USE Northwind
GO
CREATE INDEX CompanyNameCity
ON Customers (CompanyName, City)
GO

In this example, CompanyName is defined as nvarchar(40) and City as nvarchar(15). Each character requires 2 bytes of storage, so the total length of this composite index is 110 bytes (2* (40 + 15)). Note that when using varchar columns, the index will assume the maximum length of the varchar column to calculate the length of the composite index.

Action

Examine the lengths of the columns in your composite index and make sure that the total does not exceed 900 bytes. For more information about determining the storage size for different Microsoft® SQL Server™ data types, see the Data Types topic, and for more information about indexes, see the CREATE INDEX and Creating an Index.

See Also

Errors 1000 - 1999


Error 1904

Severity Level 16
Message Text

Cannot specify more than %d column names for statistics or index key list. %d specified.

Explanation

This error occurs when more than 16 columns are used to create a composite index. A composite index is an index that uses from 2 to 16 columns.

The following example shows a composite index using objects from the pubs database:

USE pubs
GO
CREATE INDEX idxPubNameCity
ON publishers (pub_name, city)
GO
Action

Modify the CREATE INDEX statement to use no more than 16 columns. For more information, see CREATE INDEX.

See Also

Creating an Index

Errors 1000 - 1999


Error 1910

Severity Level 16
Message Text

Cannot create more than %d nonclustered indices or column statistics on one table.

Explanation

This error occurs when either:

  • A table already has 250 indexes.

    Or

  • A table has a large number of indexes and statistics are either being created or updated. Microsoft® SQL Server™ makes an entry in sysindexes for each set of column-level statistics that are either created or updated, if the base column does not already have an index.

The following example produces this error message by updating statistics on a table with 250 indexes:

USE pubs
GO
IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
      WHERE TABLE_NAME = 'TestCols')
   DROP TABLE TestCols
GO
DECLARE @counter int, @stmt varchar(255)
SET @counter = 1
CREATE TABLE TestCols
 (
  c1 int IDENTITY(1, 1),
  c2 char(255)
 )
-- Creating 250 indexes.
WHILE (@counter < 251)
   BEGIN
      IF (@counter = 1)
         CREATE UNIQUE CLUSTERED INDEX Ind1 ON TestCols (c1)
      ELSE
      BEGIN
         SELECT @stmt = 'CREATE INDEX t1Ind' + LTRIM(STR(@counter)) +
            ' ON TestCols (c1)'
         EXEC (@stmt)
      END
      SET @counter = @counter + 1
   END

-- Updating Statistics. Returns error 1910.
UPDATE STATISTICS TestCols (c2) WITH COLUMNS, FULLSCAN
Action

Either:

  • Modify the CREATE INDEX statement to use no more than 250 indexes.

    Or

  • Remove any unused, nonclustered indexes to create or update statistics successfully.

For more information, see CREATE INDEX.

See Also

Errors 1000 - 1999

sysindexes

UPDATE STATISTICS


Error 1916

Severity Level 16
Message Text

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

Explanation

This error occurs when you attempt to create an index with two mutually exclusive CREATE INDEX statement clauses. The index is not created when this error occurs.

This table shows when to use the CREATE INDEX clauses:

Index type | Clause
Unique clustered | IGNORE_DUP_KEY
Nonclustered | None
Unique nonclustered | IGNORE_DUP_KEY

Action

Select the correct clauses for the CREATE INDEX statement.

See Also

CREATE INDEX

Creating an Index

Errors 1000 - 1999


Error 2501

Severity Level 16
Message Text

Could not find table named '%.*ls'. Check sysobjects.

Explanation

Usually some form of corruption in the database causes this error. This often happens when a table is being dropped and a serious error occurs that causes the drop to fail.

Action

Executing DBCC CHECKDB and DBCC CHECKCATALOG can indicate other problems in the database. Restore your database from backup or contact your primary support provider for assistance.

You may also be able to use the bcp utility to copy out other tables. But because this problem is often caused by other problems in the database, problems can occur when you copy out other tables.

See Also

bcp Utility

BULK INSERT

DBCC CHECKDB

DBCC CHECKCATALOG

Errors 2000 - 2999

Reporting Errors to Your Primary Support Provider


Error 2511

Severity Level 16
Message Text

Table Corrupt: Object ID %d, Index ID %d. Keys out of order on page %S_PGID, slots %d and %d.

Table error: Object ID %d, Index ID %d. Keys out of order on page %S_PGID, slots %d and %d.

Explanation

This error occurs when an index is not ordered correctly. The %S_PGID variable can be a data page (for clustered indexes), an index page, or a leaf page.

Action

The fastest way to resolve this problem is to execute DBCC CHECKDB with the REPAIR_REBUILD clause. This fixes any index corruption in the entire database. If the database is so large that you do not want to run DBCC CHECKDB, use these instructions to locate the specific table that is corrupt. Then, execute DBCC CHECKTABLE with the REPAIR_REBUILD clause for that table.

Important If executing DBCC CHECKDB or DBCC CHECKTABLE with the REPAIR_REBUILD clause does not correct the index problem or if you are unsure what effect either of these DBCC statements with the REPAIR_REBUILD clause has on your data, contact your primary support provider.

Follow these steps:

  1. Note the object ID.

  2. If the object with the error is not a system table (its object ID is more than 100), continue with the next step.

  3. If the object with the error is a system table (its object ID is less than 100), you cannot drop the index. Restore the database from a known clean backup.

  4. Find the name of the index involved, as follows:
    USE master
GO
SELECT name
FROM sysindexes
WHERE indid = index_id
    AND id = object_id
  5. Drop and re-create the index.

  6. Run DBCC CHECKTABLE on the affected table to verify that all problems have been resolved at the table level.

If problems persist, contact your primary support provider. Have the output from either DBCC CHECKDB or DBCC CHECKTABLE available for review.

See Also

DBCC CHECKDB

DBCC CHECKTABLE

Errors 2000-2999

Reporting Errors to Your Primary Support Provider


Error 2513

Severity Level 16
Message Text

Table error: Object ID %ld (object '%.*ls') does not match between '%.*ls' and '%.*ls'.

Explanation

This error occurs when the DBCC CHECKCATALOG statement detects a database object in one system table and the object is not expected in another table. Most often, this occurs when one or more rows in the syscolumns, syscomments, sysindexes, or sysdepends tables have no corresponding rows in sysobjects. This error can also occur if an operation affecting the system table, such as deletion of a user table, was interrupted.

Action

Although this error seldom interferes with database use, it is a good idea to restore the affected system table.

Warning Severe problems can result from the direct manipulation of the system catalogs. Do not modify the system catalogs unless instructed to do so by your primary support provider.

Follow these steps to restore the consistency of the system tables:

  1. Display the offending rows by executing a query in the problem database against the two tables mentioned in the message. For example, if the message reports one or more mismatches between syscolumns and sysobjects:
    USE master
GO
SELECT * FROM syscolumns
WHERE syscolumns.id NOT IN
    (SELECT sysobjects.id FROM sysobjects)
  2. Enable updates to system tables by enabling the allow updates configuration option.

    Before modifying any system catalogs, be sure that you have a valid backup of the database. For more information about backup operations, see Backing Up and Restoring Databases.

    Warning Incorrect modification of the system catalogs can result in database corruption or data loss.

  3. Make sure that the rows displayed in Step 1 correspond to reported 2513 errors, and then delete them from the first table mentioned in the message text.

  4. If the number of rows affected by the delete does not match the number found in Step 1, roll back the transaction. If the numbers match, commit it.

  5. To confirm that the mismatches are fixed, re-execute DBCC CHECKCATALOG. Then, disable the allow updates configuration option.

See Also

BEGIN TRANSACTION

CHECKPOINT

Errors 2000-2999

Setting Configuration Options

Using Startup Options


Error 2535

Severity Level 16
Message Text

Table error: Page %S_PGID is allocated to object ID %d, index ID %d, not to object ID %d, index ID %d found in page header.

Explanation

The DBCC CHECKALLOC statement detected a mismatch in the object ID between an allocation structure (extent) and sysindexes.

Note Occasionally, DBCC CHECKALLOC reports this error when no real error condition exists. Execute DBCC CHECKALLOC in single-user mode if you suspect the 2535 error is incorrect.

Action

Follow these steps:

  1. Examine the index ID associated with the page number in the message to determine whether the error occurred on the table data or on an index.

  2. Restore the database:
    • If the object ID is less than or equal to 100, the error is on a system table. Restore the database from a clean backup.

    • If the object ID is greater than 100, the error is on a user table.

    • If this error occurs on table data (the index ID = 1), restore the database from a clean backup.

    • If the error occurs on an index, you can usually correct it by dropping and re-creating the index. If dropping and re-creating the index is not feasible, or if you cannot drop the index, contact your primary support provider for assistance.

If the problem persists, contact your primary support provider for assistance. Have the output of the appropriate DBCC statements available for review.

See Also

DBCC CHECKALLOC

DBCC CHECKDB

DBCC CHECKTABLE

Errors 2000-2999

Reporting Errors to Your Primary Support Provider


Error 2601

Severity Level 14
Message Text

Cannot insert duplicate key row in object '%.*ls' with unique index '%.*ls'.

Explanation

This error occurs when you attempt to put duplicate index values into a column or columns that have a unique index. Microsoft® SQL Server™ does not allow two rows to have the same index value (including NULL) in columns that have a unique index. SQL Server checks for duplicate values when the index is created and each time the table is modified using the INSERT or UPDATE statement.

Action

If you need duplicate index values in the indexed column(s), drop the unique index and create a nonunique index.

To use a unique index on data that contains duplicate values, you must change some values to prevent the duplication. You can change the data already in the table by using the SELECT or UPDATE statement, or you can change the data to be inserted.

See Also

CREATE INDEX

Creating an Index

DELETE

Errors 2000-2999

INSERT

SELECT

UPDATE


Error 2731

Severity Level 16
Message Text

Column '%.*ls' has invalid width: %d.

Explanation

This error occurs when a user is attempting to create a view in which a column is empty, or has a length that is less than or equal to 0. This is not allowed in Microsoft® SQL Server™ 2000.

An example of a query which generates this error follows. Note that the data for CategoryName is 0-length.

CREATE VIEW myview AS

SELECT CategoryName = '', p.ProductName, c.Description

FROM Products p, Categories c

WHERE p.CategoryId = c.CategoryId

AND p.UnitsInStock > 0

GO

Action

You can resolve this error by:

  • Not using zero-length columns when creating a view.

  • Specifying a default value for column length. For example:
    create view myview as char(10) "empty column"


Error 2750

Severity Level 16
Message Text

Column or parameter #%d: Specified column precision %d is greater than the maximum precision of %d.

Explanation

This error occurs when the precision of a float, decimal, or numeric column exceeds the maximum value for the specified data type.

For decimal and numeric data types, Microsoft® SQL Server™ normally supports a maximum precision of 38 digits for compatibility with various front ends, such as Microsoft Visual Basic®. For more information about running the sqlservr application, see sqlservr Application.

Action

Define the column to have a precision that falls within the allowable precision range for that data type.

See Also

decimal and numeric

float and real

Precision, Scale, and Length


Error 2751

Severity Level 16
Message Text

Column or parameter #%d: Specified column scale %d is greater than the specified precision of %d.

Explanation

This error occurs when the scale of a decimal or numeric column exceeds the precision value for that column.

For decimal and numeric data types, Microsoft® SQL Server™ normally supports a maximum precision of 38 digits for compatibility with various applications. For more information about running the sqlservr application, see sqlservr Application.

Action

Specify the precision with p, which must be between 1 and the maximum precision, and the scale with s, which must be between 0 and p. If you do not specify the precision, SQL Server uses a default precision of 18. If you do not specify the scale, SQL Server uses a default scale of 0.

See Also

decimal and numeric

Errors 2000-2999

float and real

Precision, Scale, and Length


Error 2812

Severity Level 16
Message Text

Could not find stored procedure '%.*ls'.

Explanation

An attempt was made to execute a stored procedure that does not exist. If the procedure does exist (it appears when sp_help is run with no parameters), the error might have occurred because you did not fully qualify the procedure name. If the procedure is not owned by the user attempting to execute it, and it is not owned by the database owner (dbo), all references to it must include the owner name. For example, suppose user1 creates a procedure called proc1. Any users must add the owner name before the procedure name, as shown in the following example:

EXECUTE user1.proc1

Naming conventions for database objects are as follows:

[[[server_name.][database_name].][owner_name].]object_name

The default value for database_name is the current database; the default value for owner_name is the current user. If the current user is not the owner, the current user must specify the owner name when using the procedure. Because the owner name is part of the object name, two different users can have procedures with the same object name in the same database (for example user1.proc1 and user2.proc1). For more information about naming conventions, see Transact-SQL Syntax Conventions.

The only exceptions to this naming convention are system procedures, which can be executed from any database. System procedures reside in the master database, are owned by the system administrator, and have names that begin with sp_. System procedures reference the system tables for the current database.

Action

If you do not know who owns the procedure, use sp_help to display the owner. If you run sp_help without any parameters, it displays objects owned by other users. To determine which procedures exist in a database and who owns them, use the following:

USE master
GO
SELECT name,owner = USER_NAME(uid)
FROM sysobjects
WHERE type = 'P'
GO

If the procedure does not appear in the output of this query, the procedure is either in a different database or does not exist.

If you do not own the procedure in question, you can avoid error 2812 by qualifying the procedure name with the owner name, as shown in the following example:

EXECUTE user1.proc1

For procedures used by many users of a database, it is usually easiest if the dbo creates the procedure. This allows any user to find the procedure without specifying an owner name.

If the procedure is not in the database where it is executed, you can avoid this error by fully qualifying the procedure name with the database name, as shown in the following example:

EXECUTE database_1.user1.proc1

The owner name is not needed if you or the dbo own the procedure. For example:

EXECUTE database_1..proc1

Execute permission must be provided so that other users can execute this procedure, but no permissions are required to see the text of the procedure.

If this error occurs on system procedures, it might be resolved by running Instmstr.SQL. This reinstalls all system procedures and initializes various other structures.

See Also

Errors 2000-2999

EXECUTE

sp_configure

sp_help


Error 3023

Severity Level 16
Message Text

Backup and file manipulation operations (such as ALTER DATABASE ADD FILE) on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed.

Explanation

These operations may not be performed at the same time as a backup operation:

  • File management operations such as the ALTER DATABASE statement with either the ADD FILE or REMOVE FILE clauses.

  • The file truncation phase of shrink database or shrink file.

If a backup is started when either an add or remove file operation is in progress, the backup will wait for a timeout period, then fail. If a backup is running and one of these operations is attempted, the operation fails immediately.

If a shrink operation tries to truncate a file while a backup is running, the shrink stops without truncating the file, however data pages have been relocated. If a backup is started just as a file is being truncated, backup normally waits long enough for the file truncation to complete.

Action

Reissue the operation after the conflicting operation has completed.

If a shrink operation fails, reissue the shrink command with the TRUNCATE_ONLY option after the backup completes.

See Also

ALTER DATABASE

Backing Up and Restoring Databases

BACKUP

DBCC SHRINKDATABASE

DBCC SHRINKFILE

Setting Database Options

Troubleshooting Backing Up and Restoring


Error 3036

Severity Level 16
Message Text

Database '%ls' is in warm-standby state (set by executing RESTORE WITH STANDBY) and cannot be backed up until the entire load sequence is completed.

Explanation

Your standby database has not been recovered and may not be backed up. Usually, you recover this database only if your primary fails and you switch operations to the standby. Until this occurs, rely on backups taken from the primary server.

See Also

Backing Up and Restoring Databases

BACKUP

Troubleshooting Backing Up and Restoring


Error 3041

Severity Level 16
Message Text

BACKUP failed to complete the command %.*ls

Explanation

This error indicates that Microsoft® SQL Server™ could not complete the BACKUP of the specified database due to a previous error. The BACKUP command that failed is given at the end of the error message. This message also appears in the Microsoft Windows NT® application log.

Action

To determine why the BACKUP failed, examine the Microsoft SQL Server error log for any errors prior to error 3041.

See Also

Viewing the SQL Server Error Log


Error 3101

Severity Level 16
Message Text

Exclusive access could not be obtained because the database is in use.

Explanation

This error occurs when you attempt to load a backup while users are accessing the database. This error can occur with RESTORE DATABASE or RESTORE LOG. You cannot use the RESTORE DATABASE statement while the database is in use by any user, including yourself.

Action

Use the ALTER DATABASE SET SINGLE_USER to remove users from the database.

Or, wait until all users have finished using the database, and then use the RESTORE DATABASE statement. Make sure that you are not using the database being loaded when you issue the RESTORE DATABASE statement. Although not required, it is best to run the RESTORE DATABASE statement from the master database.

See Also

Backing Up and Restoring Databases

RESTORE


Error 3143

Severity Level 16
Message Text

The data set on device '%ls' is not a SQL Server backup set.

Explanation

The backup being restored conforms to the Microsoft Tape Format, but is not a Microsoft® SQL Server™ backup. The backup may have been written by another software product.

Action

To determine the contents of the backup, consider using RESTORE HEADERONLY.

See Also

Backing Up and Restoring Databases

BACKUP

RESTORE HEADERONLY

Troubleshooting Backing Up and Restoring


Error 3154

Severity Level 16
Message Text

The backup set holds a backup of a database other than the existing '%ls' database.

Explanation

The backup set is a backup of a database with the same name as the database to which you are restoring. However, the database being restored was created by a different CREATE DATABASE statement than the database in the backup set. Even though the databases have the same name, they are in fact different databases.

Action

Either overwrite the existing database by reissuing the RESTORE DATABASE command using the WITH REPLACE clause, or restore the backup set to a different database name. If you restore the backup set to a different database name, ensure that the files that will be created do not already exist and are not being used by another database. If you chose the wrong backup set to restore, select a backup of the existing database and restore it.

See Also

Backing Up and Restoring Databases

CREATE DATABASE

RESTORE

Troubleshooting Backing Up and Restoring


Error 3155

Severity Level 16
Message Text

The RESTORE operation cannot proceed because one or more files have been added or dropped from the database since the backup set was created.

Explanation

You must begin the restore sequence by restoring a full database backup created after files were added or removed from the database. You cannot roll forward across file creation or deletion operations.

See Also

Backing Up and Restoring Databases

RESTORE

Troubleshooting Backing Up and Restoring


Error 3206

Severity Level 16
Message Text

No entry in sysdevices for backup device '%.*ls'. Update sysdevices and rerun statement.

Explanation

You have attempted to use a logical device that is not a backup device.

Action

Either define the device using sp_addumpdevice, or refer to the physical device directly by specifying the TAPE = or DISK = syntax of the BACKUP statement.

See Also

Backing Up and Restoring Databases

Error 3209

sysdevices

Troubleshooting Backing Up and Restoring


Error 3209

Severity Level 16
Message Text

'%.*ls' is not a backup device. Check sysdevices.

Explanation

You have attempted to use a logical device that is not a backup device.

Action

Either define the device using sp_addumpdevice, or refer to the physical device directly by specifying the TAPE = or DISK = syntax of the BACKUP statement.

See Also

Backing Up and Restoring Databases

Error 3206

sp_addumpdevice

sysdevices

Troubleshooting Backing Up and Restoring


Error 3227

Severity Level 16
Message Text

The volume on device '%ls' is a duplicate of stripe set member %d.

Explanation

This message occurs when either:

  • Volumes from the same media family are mounted in more than one tape device. All such volumes must be mounted on the same device.

  • A volume from a media family that has already been processed has been loaded into the specified device.
Action

Remove the volume from the specified device and insert the correct volume.

See Also

Backing Up and Restoring Databases

RESTORE

Troubleshooting Backing Up and Restoring


Error 3242

Severity Level 16
Message Text

The file on device '%ls' is not a valid Microsoft Tape Format backup set.

Explanation

The backup device does not contain data in Microsoft Tape Format due to one of the following situations:

  • The contents of the backup set were not generated by SQL Server version 7.0 or later.

  • The contents of the backup set have been damaged.

See Also

Backing Up and Restoring Databases

BACKUP

RESTORE

Troubleshooting Backing Up and Restoring


Error 3247

Severity Level 16
Message Text

The volume on device '%ls' has the wrong media sequence number (%d). Remove it and insert volume %d.

Explanation

The media family spans multiple volumes. The restore operation expected to process the volume specified in the error message, but found a different volume of the same media family instead.

Action

Remove the volume from the specified device and insert the volume with the requested value.

See Also

Backing Up and Restoring Databases

RESTORE

Troubleshooting Backing Up and Restoring


Error 3249

Severity Level 16
Message Text

The volume on device '%ls' is a continuation volume for the backup set. Remove it and insert the volume holding the start of the backup set.

Explanation

The media family spans multiple volumes. The backup set to be processed by the restore operation starts on an earlier volume than the one inserted into the named device.

Action

Remove the volume and insert the volume containing the start of the target backup set. To determine which backup sets are contained on which volumes, use RESTORE HEADERONLY.

See Also

Backing Up and Restoring Databases

RESTORE

RESTORE HEADERONLY

Troubleshooting Backing Up and Restoring


Error 3251

Severity Level 10
Message Text

The media family on device '%ls' is complete. The device is now being reused for one of the remaining families.

Explanation

The restore operation allows a media set to be restored with fewer physical devices than were used to create it. This message means that the restore operation has completely processed the media family on the named device, and is now ready to reuse the device to restore one of the remaining media families in the media set.

Action

Remove the volume from the named device and insert the first volume of a media family that has not yet been processed.

See Also

Backing Up and Restoring Databases

RESTORE

Troubleshooting Backing Up and Restoring


Error 3256

Severity Level 16
Message Text

The backup set on device '%ls' was terminated while it was being created and is incomplete. RESTORE sequence is terminated abnormally.

Explanation

The backup operation that created the backup set did not finish successfully. You can only restore backup sets that were created successfully. For example, the backup may have been terminated with an attention message. The backup set is not complete, and the restore operation must terminate.

Action

If you were restoring a database backup, restore a different database backup, and use log backups to roll forward. If you were restoring a log backup, apply the next log backup, the log backup made following the incomplete backup, instead.

See Also

Backing Up and Restoring Databases

BACKUP

RESTORE

Troubleshooting Backing Up and Restoring


Error 3258

Severity Level 16
Message Text

The volume on device '%ls' belongs to a different media set.

Explanation

The volume on the named device does not belong to the same media set as the other volumes being processed.

Action

For tape media sets, remove the offending volume and insert the next volume of the media family.

For disks, reissue the command. Name only those backup devices that were part of the same media set.

See Also

Backing Up and Restoring Databases

BACKUP

RESTORE

Troubleshooting Backing Up and Restoring


Error 3263

Severity Level 10
Message Text

Cannot use the volume on device '%ls' as a continuation volume. It is sequence number %d of family %d for the current media set. Insert a new volume, or sequence number %d of family %d for the current set.

Explanation

The media set spans multiple volumes. Initializing the volume currently in the named device would destroy the integrity of the media set because the volume has already been used as a member of the media set.

Action

Remove the volume and insert a fresh tape that can be overwritten.

See Also

Backing Up and Restoring Databases

RESTORE

Troubleshooting Backing Up and Restoring


Error 3267

Severity Level 16
Message Text

Insufficient resources to create UMS scheduler.

Explanation

When attempting a backup or restore operation, this error message indicates that the server is too busy to perform the backup or restore operation.

Action

Retry the operation after reducing the server load.

See Also

Backing Up and Restoring Databases

BACKUP

RESTORE

Troubleshooting Backing Up and Restoring


Error 3414

Severity Level 10
Message Text

Database '%.*ls' (database ID %d) could not recover. Contact Technical Support for further instructions.

Explanation

During startup, Microsoft® SQL Server™ could not complete the recovery of the specified database.

Action

To determine why recovery failed, examine the error log for any errors prior to error 3414. It is important to examine errors that occurred before the first occurrence of error 3414 because subsequent attempts to start the server might not give the detailed error information you need to diagnose the problem. If you do not have sufficient information to recover from the previous errors, you can recover from known clean backups, or you can contact your primary support provider for assistance. Note that you cannot use the database until whatever caused the error has been corrected.

See Also

Reporting Errors to Your Primary Support Provider


Error 3604

Severity Level 10
Message Text

Duplicate key was ignored.

Explanation

This error occurs when you attempt to insert a row that has an index value that violates the uniqueness property (UNIQUE with IGNORE_DUP_KEY) on an existing index.

Microsoft® SQL Server™ ignores the statement that caused the error and continues processing the transaction.

Action

No action is necessary unless you want to insert that row into the table. If so, you can drop and re-create the index without the UNIQUE clause, or you can change the data causing the uniqueness violation.

See Also

CREATE INDEX

Creating an Index


Error 3627

Severity Level 16
Message Text

Could not create worker thread.

Explanation

When attempting a backup or restore operation, this error message indicates that the server is too busy to perform the backup or restore operation.

Action

Retry the operation after reducing the server load.

See Also

Backing Up and Restoring Databases

BACKUP

RESTORE

Troubleshooting Backing Up and Restoring


Error 4208

Severity Level 16
Message Text

The statement %hs is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.

Explanation

When using the Simple Recovery model, the log is truncated when periodic checkpoints occur. Only full database and differential database backups are allowed because the log has been truncated and any log backups made would be unusable.

Action

To maintain your database by performing only full and differential database backups, keep using the Simple Recovery model along with BACKUP DATABASE.

To maintain a full set of transaction log backups to guarantee that no change to the database is lost in the event of a failure, use ALTER DATABASE to change the recovery model to full or bulk-logged. Then use BACKUP DATABASE, and begin taking periodic transaction log backups using BACKUP LOG.

See Also

BACKUP

Setting Database Options

sp_dboption

Troubleshooting Backing Up and Restoring


Error 4214

Severity Level 10
Message Text

There is no current database backup. This log backup cannot be used to roll forward a preceding database backup.

Explanation

To restore the database after failure, you must begin either with a full database backup, or with a partial or complete set of file backups. Either this database has never been backed up, or a BACKUP LOG statement was executed after switching from the Simple Recovery model to Full or Bulk-Logged recovery before a database or file backup was performed. Therefore, the log backup just completed is not useful.

Action

Perform a full database backup before backing up the log.

See Also

BACKUP

Troubleshooting Backing Up and Restoring


Error 4305

Severity Level 16
Message Text

The log in this backup set begins at LSN %.*ls, which is too late to apply to the database. An earlier log backup that includes LSN %.*ls can be restored.

Explanation

The restore operation found a gap between the last restore and the transaction log that you attempted to apply.

Action

Locate the missing, earlier transaction log backups and apply these first. Transaction logs must be restored in the same order in which they were backed up.

See Also

Backing Up and Restoring Databases

RESTORE

Troubleshooting Backing Up and Restoring


Error 4306

Severity Level 16
Message Text

The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step.

Explanation

After the database has been recovered, no further restore operations may be performed.

Action

To recover a database, start the sequence over and use the NORECOVERY clause on all RESTORE statements except the last. If you are maintaining a standby server and want to bring up the database in read-only mode between restore operations, use the STANDBY clause of RESTORE instead of the NORECOVERY clause.

See Also

Backing Up and Restoring Databases

RESTORE

Troubleshooting Backing Up and Restoring


Error 4318

Severity Level 16
Message Text

File '%ls' has been rolled forward to LSN %.*ls. This log terminates at LSN %.*ls, which is too early to apply the WITH RECOVERY option. Reissue the RESTORE LOG statement WITH NORECOVERY.

Explanation

You have attempted to recover the database to its state at the time the current log backup was made. However, at least one file has been modified since this backup was created. Recovery is not possible because the database would be left in an inconsistent state.

Action

To recover the database to its most recent state, reissue the RESTORE LOG statement with the NORECOVERY clause and continue to apply transaction logs, recovering only when you have rolled far enough forward.

To recover the database to the point-in-time at the end of this log backup, use RESTORE DATABASE to restore the indicated file to an earlier state and roll it forward.

See Also

Backing Up and Restoring Databases

RESTORE

Troubleshooting Backing Up and Restoring


Error 5013

Severity Level 16
Message Text

The master and model databases cannot have files added to them. ALTER DATABASE was aborted.

Explanation

This error occurs when you attempt to extend either the master or model databases by adding database files.

Action

Extend the master or model databases only when necessary. The master database will grow automatically, if needed. If there is no room on the disk drive where the master files reside, either delete other files to make more disk space or replace the disk drive with a larger disk drive. If you need to expand the model database, ensure that there is available disk space on the disk drive where the model data files currently reside.

See Also

ALTER DATABASE

Rebuilding the master Database (Level 4)

Restoring the master Database from a Current Backup


Error 5701

Severity Level 10
Message Text

Changed database context to '%.*ls'.

Explanation

This is an informational message indicating that the database context has changed. This message is returned anytime a USE database statement is executed.

Action

None needed.

See Also

USE


Error 5808

Severity Level 16
Message Text

Ad hoc updates to system catalogs not recommended. Use the RECONFIGURE WITH OVERRIDE statement to force this configuration.

Explanation

This error message occurs in one of these two situations:

  • When a user tries to use the sp_configure system stored procedure with the allow updates option.

  • When a user tries to set a configuration parameter to a value that Microsoft® SQL Server™ recognizes as likely to interfere with performance or smooth operation.

When the allow updates option is enabled, SQL Server allows direct updates to the system tables, so any user who can log on as the SQL Server system administrator can update the system tables directly with ad hoc queries and can create stored procedures that update the system catalog. Incorrect changes to the system tables can cause unrecoverable database corruption or data loss.

Warning Severe problems can result from the direct manipulation of the system catalogs. Do not modify the system catalogs unless instructed to do so by your primary support provider.

Action

Before modifying any system catalogs, be sure that you have a valid backup of the database. For more information about backup operations, see Backing Up and Restoring Databases.

Warning Incorrect modification of the system catalogs can result in database corruption or data loss.

If possible, restart SQL Server in single-user mode by using the -m flag of the sqlservr application so that inadvertent modifications do not occur. For more information, see sqlservr Application.

To modify system catalogs, use the osql utility to alter the allow updates system configuration setting.

Note Only the system administrator can alter the value for the allow updates system configuration setting.

See Also

allow updates Option

osql Utility

Reporting Errors to Your Primary Support Provider

Setting Configuration Options

sp_configure

Using Startup Options


Error 6103

Severity Level 17
Message Text

Could not do cleanup for the killed process. Received message %d.

Explanation

This error message occurs when another error caused a user connection to terminate abnormally. The message number that caused this error will be printed in the error 6103 message.

Action

Examine and resolve the "received message" reported in this error message.

See Also

How to kill a process (Enterprise Manager)

KILL


Error 6826

Severity Level 16
Message Text

Every IDREFS or NMTOKENS column in a FOR XML EXPLICIT query must appear in a separate SELECT clause, and the instances must be ordered directly after the element to which they belong.

Explanation

The schema may not have sufficient key fields specified.

Action

This can be resolved by adding sql:key-fields annotation.


Error 7130

Severity Level 16
Message Text

%ls WITH NO LOG is not valid at this time. Use sp_dboption to set the 'select into/bulkcopy' option on for database '%.*ls'.

Explanation

This error occurs upon executing either the UPDATETEXT or WRITETEXT statements, or either the dbupdatetext or dbwritetext routines in a database that does not have the sp_dboption system stored procedure's select into/bulkcopy option enabled. Because these are nonlogged operations, the option must be enabled.

Often, UPDATETEXT, WRITETEXT, dbupdatetext, and dbwritetext are run against a temporary table. The select into/bulkcopy option must be enabled in tempdb, or these will not run successfully.

Action

Enable the sp_dboption system stored procedure's select into/bulkcopy option for all databases affected by the query that contains a nonlogged operation. To do this, the system administrator and database owners should follow these steps:

  1. Enable the option:
    USE master
GO
sp_dboption database_name, 'select into/bulkcopy',true
GO
USE database_name
GO
CHECKPOINT
GO
  2. Verify that the change is active:
    sp_helpdb database_name
GO
  3. Execute the nonlogged operation.

  4. When the nonlogged operation is complete, backup the database.

    Caution After executing a nonlogged operation, do not back up the transaction log. Although the procedure may appear to succeed, you may have been backing up only empty text pages. Whenever you make nonlogged changes to your database, you must use the BACKUP DATABASE statement, because changes made by the nonlogged operation cannot be recovered from transaction logs.

    5. Return the database to its original condition by disabling the select into/bulkcopy option:
    USE master
GO
sp_dboption database_name, 'select into/bulkcopy',false
GO
USE database_name
GO
CHECKPOINT
GO
  6. Verify that the change is active:
    sp_helpdb database_name
GO

See Also

CHECKPOINT

dbwritetext

dbupdatetext

Setting Database Options

sp_dboption

sp_helpdb

UPDATETEXT

WRITETEXT


Error 7303

Severity Level 16
Message Text

Could not initialize data source object of OLE DB provider '%ls'. %ls

Explanation

This error message indicates that the OLE DB data source object could not be initialized.

Action

This error message can occur because of one of these problems.

Problem | Resolution
One of the initialization parameters specified in sp_addlinkedserver (data_source, location, provider_string, or catalog) is incorrect for this provider. | Verify that these parameters defined for the linked server, specified by executing sp_addlinkedserver, are correct for the given provider. Check the provider's documentation for the appropriate values for these parameters.
Login and password sent to the provider is invalid. | Verify that there is a valid login and password configured for the linked server and the current SQL Server login through sp_addlinkedsrvlogin.

See Also

Distributed Queries

Errors 7000 - 7999

sp_addlinkedserver

sp_addlinkedsrvlogin


Error 7304

Severity Level 16
Message Text

Could not create a new session on OLE DB provider '%ls'.

Explanation

Unable to create a new session to the OLE DB data source.

Action

Check for error messages returned by the provider and review provider documentation.

See Also

Accessing External Data

sp_addlinkedserver


Error 7306

Severity Level 16
Message Text

Could not open table '%ls' from OLE DB provider '%ls'. %ls

Explanation

This error message is returned if the OLE DB provider does not support the interfaces and OLE DB properties required for the UPDATE, DELETE, and INSERT statements.

Action

In this scenario, a trace on OLE DB Errors would output additional information on the specific missing OLE DB support. For example, in the case of Microsoft® SQL Server™, the INSERT, UPDATE, and DELETE statements are not supported on the remote table if the table does not have a unique index defined on it. In this case, SQL Profiler would output the following information:

OLE/DB Provider 'SQLOLEDB' IOpenRowset::OpenRowset returned 0x80040e21:
[PROPID=DBPROP_BOOKMARKS VALUE=True STATUS=DBPROPSTATUS_OK], [PROPID=DBPROP_IRowsetLocate
VALUE=True STATUS=DBPROPSTATUS_OK], [PROPID=DBPROP_IRowsetChange VALUE=True
STATUS=DBPROPSTATUS_CONFLICTING], [PROPID=DBPROP_UPDATABILITY VALUE=1 STATUS=DBPROPSTATUS_OK]

This error message indicates the status of each OLE DB property that was requested on the rowset opened against the table being updated. This information indicates that all properties required by SQL Server to perform this query, except the DBPROP_IRowsetChange property, were satisfied by the provider.

See Also

Distributed Queries

Errors 7000 - 7999

sp_addlinkedserver


Error 7314

Severity Level 16
Message Text

OLE DB provider '%ls' does not contain table '%ls'.  The table either does not exist or the current user does not have permissions on that table.

Explanation

Either the specified table or columns do not exist or the login used to connect to the provider does not have the required permissions on the table or columns.

This message occurs on case-sensitive servers.

Action

Verify that the table or columns specified exist. Verify that the appropriate permissions are granted on the table or columns specified.

If the table was originally created in Oracle without quotation marks, specify the table name in the distributed query using all uppercase letters. If the table was originally created in Oracle with quotation marks, specify the table name in the distributed query using all lowercase letters.

See Also

Distributed Queries

Errors 7000 - 7999

OLE DB Providers Tested with SQL Server

sp_addlinkedserver


Error 7321

Severity Level 16
Message Text

An error occurred while preparing a query for execution against OLE DB provider '%ls'. %ls

Explanation

Indicates a possible syntax error in the pass-through query's query string parameter.

Action

Verify that the query string is free of syntax errors (with respect to the query language supported by the OLE DB provider).

See Also

Distributed Queries

Errors 7000 - 7999

OPENQUERY


Error 7356

Severity Level 16
Message Text

OLE DB provider '%ls' supplied inconsistent metadata for a column. Metadata information was changed at execution time.

Explanation

This error indicates that there was inconsistent metadata reported by the provider on a given table between compilation time and execution time of the query. This typically occurs because the provider returns inconsistent metadata between the OLE DB schema rowset COLUMNS (during compilation) and that metadata reported by the IColumnsInfo interface on the table's rowset.

Action

Consult SQL Profiler to determine which table column caused this error.

See Also

Distributed Queries

Errors 7000 - 7999

Monitoring with SQL Profiler

sp_addlinkedserver


Error 7357

Severity Level 16
Message Text

Could not process object '%ls'. The OLE DB provider '%ls' indicates that the object has no columns.

Explanation

Either the specified table or columns do not exist or the login used to connect to the provider does not have the required permissions on the table or columns.

Action

Verify that the table or columns specified exist. Verify that the appropriate permissions are granted on the table or columns specified.

See Also

Distributed Queries

sp_addlinkedserver


Error 7391

Severity Level 16
Message Text

The operation could not be performed because the OLE DB provider '%ls' was unable to begin a distributed transaction.

Explanation

This error can occur while processing an INSERT, UPDATE, or DELETE statement inside an explicit or implicit transaction. This indicates that the OLE DB provider does not support distributed transactions, which is needed for data modification statements inside an explicit or implicit transaction. A data modification statement can be executed against such a provider only in the case where the statement is a transaction by itself.

Action

Verify that the OLE DB provider specified supports distributed transactions. If the provider does not support distributed transactions, rewrite the data modification statement not to use distributed transactions.

See Also

Distributed Queries


Error 7392

Severity Level 16
Message Text

Could not start a transaction for OLE DB provider '%ls'.

Microsoft® SQL Server™ also returns this error message if the provider is a SQL Server-specific provider:

Only one transaction can be active on this session.

Explanation

The OLE DB provider returned error 7392 because only one transaction can be active for this session. This error indicates that a data modification statement is being attempted against an OLE DB provider when the connection is in an explicit or implicit transaction, and the OLE DB provider does not support nested transactions. SQL Server requires this support so that, on certain error conditions, it can terminate the effects of the data modification statement while continuing with the transaction.

Action

SET XACT_ABORT is ON. This causes SQL Server to terminate the surrounding transaction when there is an error while processing the data modification statement. If SET XACT_ABORT is ON, SQL Server does not require nested transaction support from the OLE DB provider.

See Also

Distributed Queries

SET XACT_ABORT


Error 7399

Severity Level 16
Message Text

OLE DB provider '%ls' reported an error. %ls

Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

Explanation

This error message returned by the Microsoft OLE DB Provider for Jet indicates one of the following:

  • The Microsoft® Access database is not a secured database and the login and password specified was not Admin with no password.

  • The Access database is secured and the HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\SystemDB registry key is not pointing to the correct Access workgroup file. Secured Access databases have a corresponding workgroup file, including the full path, which should be indicated by the above registry key.
Action

Verify that there is a login mapping for the current Microsoft SQL Server™ login to Admin with no password.

If the Access database being accessed is secured, make sure that the above registry key points to the full pathname of the Access workgroup file.

See Also

Distributed Queries

sp_addlinkedserver


Error 7403

Severity Level 16
Message Text

Could not locate registry entry for OLE DB provider '%ls'.

Explanation

This error message indicates one of the following:

  • The OLE DB provider is not registered properly.

  • The name of the provider used in the provider_name parameter of sp_addlinkedserver (or specified in the OPENROWSET function) is incorrect.
Action

Verify that the provider has been registered correctly and that the provider_name parameter uses the PROGID of the provider.

See Also

Distributed Queries

OPENROWSET

sp_addlinkedserver


Error 7413

Severity Level 16
Message Text

Could not perform a Windows NT authenticated login because delegation is not available.

Explanation

This error message indicates that a distributed query is being attempted for a Microsoft® Windows® authenticated login without an explicit login mapping. In an operating-system environment in which security delegation is not supported, Windows NT authenticated logins need an explicit mapping to a remote login and password created using sp_addlinkedsrvlogin.

Action

Create explicit mapping to a remote login and password using sp_addlinkedsrvlogin.

See Also

Distributed Queries

sp_addlinkedsrvlogin


Error 8101

Severity Level 16
Message Text

An explicit value for the identity column in table '%.*ls' can only be specified when a column list is used and IDENTITY_INSERT is ON.

Explanation

You have attempted to insert a row containing a specific identity value into a table that contains an identity column. However, you did not provide a column list or have SET IDENTITY_INSERT enabled for the specified table.

Action

To insert a specific identity row in a table containing an identity column successfully you must provide a column list and SET IDENTITY_INSERT to ON. The following example inserts identity row 2, where iID is defined as the identity column.

Table: tblTest
iID         strData
1           King
3           Suyama

-- Enable IDENTITY_INSERT.
SET IDENTITY_INSERT tblTest ON
GO
-- Insert the specified identity row using a column list.
INSERT INTO tblTest (iID, strData) values (2, 'Davolio')
GO
-- Disable IDENTITY_INSERT.
SET IDENTITY_INSERT tblTest OFF
GO

See Also

SET IDENTITY_INSERT


Error 8102

Severity Level 16
Message Text

Cannot update identity column '%.*ls'.

Explanation

You have specifically attempted to alter the value of an identity column in the SET portion of the UPDATE statement. You can only use the identity column in the WHERE clause of the UPDATE statement.

Action

Updating of the identity column is not allowed. To update an identity column, you can use the following techniques:

  • To reassign all identity values, bulk copy the data out, and then drop and re-create the table with the proper seed and increment values. Then bulk copy the data back into the newly created table. When bcp inserts the values it will appropriately increase the values and redistribute the identity values. You can also use the INSERT INTO and sp_rename commands to accomplish the same action.

  • To reassign a single row, you must delete the row and insert it using the SET IDENTITY_INSERT tblName ON clause.

See Also

bcp Utility

INSERT

SET IDENTITY_INSERT

sp_rename

UPDATE


Error 8106

Severity Level 16
Message Text

Table '%.*ls' does not have the identity property. Cannot perform SET operation.

Explanation

You have attempted to use the SET IDENTITY_INSERT property on a table that does not contain an identity column.

Action

Double-check the table in question by using the sp_help tblName stored procedure to verify the identity column information.

See Also

SET IDENTITY_INSERT

sp_help


Error 8114

Severity Level 16
Message Text

Error converting data type %ls to %ls.

Explanation

If the error text refers to both DBTYPE_DATE and datetime, respectively, this error message indicates that a DBTYPE_DATE OLE DB data type column from a remote table could not be converted to a datetime value in Microsoft® SQL Server™. The DBTYPE_DATE column most likely has a value outside the range supported by the datetime data type (datetime values must be from January 1, 1753, through December 31, 9999). Because the range of values of the DBTYPE_DATE data type is larger than that of the SQL Server datetime data type, such errors can occur if the column contains values outside of the range supported by SQL Server.

Action

Remove the remote table column of DBTYPE_DATE data type from the query select list or predicate list.

See Also

datetime and smalldatetime

Distributed Queries

Errors 7000 - 7999


Error 8155

Severity Level 16
Message Text

No column was specified for column %d of ''%.*ls''

Explanation

One or more of the aggregate or computed columns in your select list have not been supplied with an alias.

Action

Supply an alias for all aggregate or computed column. For example:

select pub_name, "count"=count(*)

into #t

from publishers p, titles t

where p.pub_id = t.pub_id

group by pub_name


Error 8163

Severity Level 16
Message Text

The text, ntext, or image data type cannot be selected as DISTINCT.

Explanation

When querying, Microsoft® SQL Server™ does not allow the use of SELECT DISTINCT on a text, ntext, or image column. For example, this query fails, returning error 8163:

USE Northwind
SELECT DISTINCT Description
FROM Categories
Action

Remove references to any text, ntext, or image columns when using SELECT DISTINCT.

See Also

Eliminating Duplicates with DISTINCT

Query Fundamentals

SELECT


Error 8501

Severity Level 16
Message Text

MS DTC on server '%.*ls' is unavailable.

Explanation

This error can occur while processing an INSERT, UPDATE, or DELETE statement inside an explicit or implicit transaction. This error typically indicates that the MSDTC service is not running on the local server. Data modification statements in an explicit or implicit transaction require the MSDTC service to be running and the provider's support of distributed transactions.

Action

Use SQL Server Service Manager to verify that the MSDTC service has been started on the server. For more information, see the Microsoft Distributed Transaction Coordinator documentation.

See Also

Distributed Queries

Errors 7000 - 7999


Error 8645

Severity Level 17
Message Text

A time out occurred while waiting for memory resources to execute the query. Re-run the query.

Explanation

If the query wait configuration option is -1, then Microsoft® SQL Server™ waited 25 times the estimated query cost for the memory required to run the query. If query time is a nonnegative value, then SQL Server waited this amount of time, in seconds, for the memory required to run the query. The query timed out and it has not been executed.

Action

You can:

  • Free memory on the server.
    • Check the size of the virtual memory paging file.

    • If possible, increase the size of the file.

    • Shut down any other applications running, if applicable, on the server.
  • Add additional memory to the server.

  • Reduce the server workload.

    To decrease the server workload, reduce the number of users currently using SQL Server. To prevent additional users from logging in to SQL Server, pause the server. For more information, see Pausing and Resuming SQL Server.

  • Create one or more indexes.

  • Increase the query wait configuration value.

See Also

Index Tuning Wizard

query wait Option

sp_configure


Error 8621

Severity Level 16
Message Text

Internal Query Processor Error: The query processor ran out of stack space during query optimization.

Explanation

The Query Processor is using a large but limited memory stack when optimizing queries. In some extreme situations the stack size may become a limit for a given very large query--for example, a query containing an inlist with 100,000 constants.

Action

Simplify the query to avoid this problem. For example, in the case of an extremely large inlist use temporary table or table variable to store the constants, and rewrite the query to use this variable or temporary table instead.


Error 8651

Severity Level 17
Message Text

Could not perform the requested operation because the minimum query memory is not available. Decrease the configured value for the 'min memory per query' server configuration option.

Explanation

SQL Server has computed the amount of memory that this query requires to complete. This amount of required memory is not currently available; the min memory per query option may be too high.

Action

Resubmit the query. If resubmitting the query does not allow the query to run, you can:

  • Add additional memory to the server.

  • Create one or more indexes.

  • Reduce the value of min memory per query.

  • Increase the query wait configuration option if it is a nonzero value.

See Also

Index Tuning Wizard

min memory per query Option

query wait Option

sp_configure


Error 8906

Severity Level 16
Message Text

Page %S_PGID in database ID %d is allocated in the SGAM %S_PGID and PFS %S_PGID, but was not allocated in any IAM. PFS flags '%hs'.

Explanation

SQL Server has found an allocation error in the specified database.

Action

Either restore from a known clean backup or execute DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS clause. For example:

DBCC CHECKDB('pubs', REPAIR_ALLOW_DATA_LOSS)

If the error involves an index page, use the REPAIR_REBUILD clause. If the error involves a data page, it may be necessary to use the REPAIR_ALLOW_DATA_LOSS clause. In the likely event that you cannot allow the loss of data, you will need to restore from a known clean backup. If the problem persists, contact your primary support provider. Have the output from DBCC CHECKDB available for review.

Important If executing DBCC CHECKDB with one of the repair clauses does not correct the index problem or if you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider.

If DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS clause does not resolve the allocation error, contact your primary support provider.

See Also

DBCC CHECKDB

Managing Extent Allocations and Free Space

Reporting Errors to Your Primary Support Provider


Error 8908

Severity Level 16
Message Text

Table error: Database ID %d, object ID %d, index ID %d. Chain linkage mismatch. %S_PGID->next = %S_PGID, but %S_PGID->prev = %S_PGID.

Explanation

This error occurs when Microsoft® SQL Server™ detects an inconsistency in the page linkage of one of the page chains associated with a table, for example, when a page's next pointer points to a page whose previous pointer points back to a different page. There is one doubly-linked page chain for the table data as well as one for each index level.

Important This is a serious error and must be corrected immediately.

If DBCC statements detect this error during run-time processing, error 605 will also occur.

Action

Determine which table is corrupt by examining the current page in the error message. Execute DBCC CHECKDB without a repair clause to determine the extent of the corruption. Then, execute DBCC CHECKDB with the appropriate repair clause to repair the corruption. If the page is associated with an index, it is sometimes possible to resolve the problem by dropping the index. In most cases, you must recover the database from a known clean backup.

If the error involves an index page, use the REPAIR_REBUILD clause. If the error involves a data page, it may be necessary to use the REPAIR_ALLOW_DATA_LOSS clause. In the likely event that you cannot allow the loss of data, you will need to restore from a known clean backup. If the problem persists, contact your primary support provider. Have the output from DBCC CHECKDB available for review.

Important If executing DBCC CHECKDB with one of the repair clauses does not correct the index problem or if you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider.

You should also examine your operating-system error log file, in addition to the SQL Server error log, to determine if hardware errors might have caused the corruption.

If the problem persists, contact your primary support provider. Have the output from the DBCC CHECKDB statement available for review.

See Also

DBCC CHECKDB

Errors 2000 - 2999

Errors 8000 - 8999

Reporting Errors to Your Primary Support Provider


Error 8925

Severity Level 16
Message Text

Table error: Cross object linkage: Page %S_PGID, slot %d, in object ID %d, index ID %d, refers to page %S_PGID, slot %d, in object ID %d, index ID %d.

Explanation

This error occurs when Microsoft® SQL Server™ detects an inconsistency in the page linkage of one of the page chains associated with a table. One of the pages has been found to be linked in more than one page chain when it should be linked in only one chain. There is one doubly-linked page chain for the table data, as well as one for each index level.

Important This is a serious error and must be corrected immediately.

If DBCC CHECKDB without a repair clause detects this error during run-time processing, error 605 can also occur.

Action

Follow these steps to resolve the error:

  1. Examine the index ID associated with the page number indicated in the message to determine whether the error occurred on the table data or on an index.

  2. Restore the database:
    • If the object ID is less than or equal to 100, the error is on a system table. Restore the database from a clean backup.

    • If the object ID is greater than 100, the error is on a user table.

    • If this error occurs on table data (the index ID = 0), restore the database from a clean backup.

    • If the error occurs on an index, you can usually correct it by dropping and re-creating the index. If dropping and re-creating the index is not feasible, or if you cannot drop the index, contact your primary support provider for assistance.

If the problem persists, contact your primary support provider for assistance. Have the output of the appropriate DBCC statements available for review.

See Also

Errors 2000 - 2999

Errors 8000 - 8999

Reporting Errors to Your Primary Support Provider


Error 8952

Severity Level 16
Message Text

Table error: Database '%ls', index '%ls.%ls' (ID %d) (index ID %d). Extra or invalid key for the keys:

Explanation

This error message indicates that one or more indexes are damaged and must be repaired or dropped.

Action

Repair indexes by executing DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS, REPAIR_FAST, or REPAIR_REBUILD clauses. To determine which repair clause best suits your needs, consult DBCC CHECKDB before executing it.

Important If executing DBCC CHECKDB with one of the repair clauses does not correct the index problem or if you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider.

See Also

DBCC CHECKDB

Error 8956

Reporting Errors to Your Primary Support Provider


Error 8956

Severity Level 16
Message Text

Index row (%d:%d:%d) with values (%ls) points to the data row identified by (%ls).

Explanation

If Microsoft® SQL Server™ returns this error message, it always follows error 8952.

This error message indicates that one or more indexes are damaged and must be repaired or dropped.

Action

Repair indexes by executing DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS, REPAIR_FAST, or REPAIR_REBUILD clauses. To determine which repair clause best suits your needs, consult DBCC CHECKDB before executing it.

Important If executing DBCC CHECKDB with one of the repair clauses does not correct the index problem or if you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider.

See Also

DBCC CHECKDB

Error 8952

Reporting Errors to Your Primary Support Provider


Error 8976

Severity Level 16
Message Text

Table error: Object ID %d, index ID %d. Page %S_PGID was not seen in the scan although its parent %S_PGID and previous %S_PGID refer to it. Check any previous errors.

Explanation

This error means that a page is not allocated to an object that references it. When the index is used, Microsoft® SQL Server™ returns either error 605 or error 823.

Caution This error is serious. Data corruption is possible.

Pages encountering error 8976 may not be included in a database backup, because database backups are performed by reading allocation pages and not by traversing page chains. Correct this error before backing up the database.

Action

If a known clean backup is available, restore the database from the backup.

If no clean backup is available, use DBCC CHECKDB or DBCC CHECKFILEGROUP to determine the extent of the problem. Then, use DBCC CHECKDB with the appropriate repair clause to repair the damage. If the Object ID is 1 or 2 and the index ID is 1, or the table is sysfiles1, then DBCC CHECKDB cannot repair the page.

Caution If executing DBCC CHECKDB with one of the repair clauses does not correct the index problem or if you are unsure what effect DBCC CHECKDB with a repair clause has on your data, contact your primary support provider.

For indexes (0 < Index ID < 255)

The problem can be resolved by dropping and re-creating the index in question. After the index is rebuilt, run DBCC CHECKALLOC to verify that the problem no longer exists. If it persists, call your primary support provider.

See Also

DBCC CHECKALLOC

DBCC CHECKDB

DBCC CHECKFILEGROUP

Reporting Errors to Your Primary Support Provider


Error 8986

Severity Level 16
Message Text

Too many errors found (%d) for object ID %d. To see all error messages rerun the statement using "WITH ALL_ERRORMSGS".

Explanation

As the text for messages on this object from checkdb is printed, the limit for the maximum number of errors that will be reported on a given object has been exceeded. Currently, that hard-coded limit is 200.

Action

You can specify the additional statement "WITH ALL_ERRORMSGS" to get a complete listing of errors for the object in question.


Error 9002

Severity Level 19
Message Text

The log file for database '%.*ls' is full. Back up the transaction log for the database to free up some log space.

Explanation

The specified transaction log file has run out of free space.

Action

To gain more space, you can free disk space on any disk drive containing the transaction log file for the related database. Freeing disk space allows the recovery system to enlarge the log file automatically. Or you can gain space by adding or enlarging a log file for the specified database.

Freeing disk space

You can free disk space on your local drive or on another disk drive. To free disk space on another drive:

  1. Move the transaction log files with an insufficient amount of free disk space to a different disk drive.

  2. Detach the database by executing sp_detach_db.

  3. Attach the database by executing sp_attach_db, pointing to the moved files.
Adding a log file

Another solution is to add a log file to the specified database using the ADD FILE clause of the ALTER DATABASE statement. Or you can enlarge the log file using the MODIFY FILE clause of the ALTER DATABASE statement, specifying the SIZE and MAXSIZE syntax. Adding an additional log file allows the existing log to grow.

See Also

ALTER DATABASE

Errors 9000-9999

Expanding a Database

Insufficient Disk Space

sp_attach_db

sp_detach_db

sp_add_log_file_recover_suspect_db


Error 17050

Severity Level 16
Message Text

The '%ls' option is ignored in this edition of SQL Server.

Explanation

When installing Microsoft® SQL Server™ on an NTFS partition, make sure that the NTFS file permissions allow read/write access. Otherwise, this error message may appear in the Microsoft Windows NT® application log (for each installation attempt).

Action

Ensure that the NTFS file permissions allow read/write access. In addition, the SYSTEM account should have full-control rights to the computer. It is recommended that everyone using the computer have full-control rights, but that the NTFS partition not be shared.

See Also

Errors 17000 - 17999

Troubleshooting the Operating System


Error 18456

Severity Level 14
Message Text

Login failed for user '%ls'.

Explanation

You do not have permission to log in to the server.

Action

Contact a member of the sysadmin fixed server role to request login permission.

See Also

Logins

Managing Security


Error 18458

Severity Level 14
Message Text

Login failed. The maximum simultaneous user count of %d licenses for this server has been exceeded. Additional licenses should be obtained and registered through the Licensing application in the Windows NT Control Panel.

Explanation

This error occurs when the server is set for Per Server licensing and the number of attempted client connections exceeds the number of Client Access Licenses for this server.

Action

Obtain additional Client Access Licenses or reduce the number of simultaneous client connection attempts.

See Also

Errors 18000 - 18999


Error 18459

Level 14
Message Text

Login failed. The maximum workstation licensing limit for SQL Server access has been exceeded.

Explanation

This error occurs when the server is set for Per Seat licensing and a connection is attempted from a client computer that does not have a Client Access License.

Action

Obtain a Client Access License for the client computer.

See Also

SQL Server 2000 Databases on the Desktop

SQL Server 2000 Databases on Windows 98

Editions of SQL Server 2000


Read/Write Error

Message Text

%s: operating system error %d (%s) encountered

Explanation

The Read/Write Error is raised when opening or closing a file and Microsoft® SQL Server™ fails to read from or write to the specified disk location. This failure is usually a result of a physical disk problem like a bad sector on the disk drive or a failure of the disk drive or controller.

Action

Identify the device with the problem database by selecting the row from sysaltfiles that has the same disk name indicated in the error message:

USE master
GO
SELECT name, filename
FROM master..sysaltfiles
GO

The output from this query should provide the physical name of the damaged disk. Examine the disk as soon as possible and correct any problems.

After the disk drive or controller problem is resolved, restart SQL Server.

If the disk is found to be damaged, restore data from a backup database or consider using DBCC CHECKDB.

See Also

sysaltfiles


Error Log Messages

In reviewing the error log, you may see one or more of these messages.

Message Text

Failed to obtain TransactionDispenserInterface: XACT_E_TMNOTAVAILABLE.

Explanation

This message is an informational error message indicating that the Microsoft Distributed Transaction Coordinator (MS DTC) service either is currently not running on the server or is currently unavailable. For more information about MS DTC, see the Microsoft Distributed Transaction Coordinator documentation.

Message Text

Warning: Server cursor memory usage: %d pages. If this message repeats, see the Error Log Messages topic in Troubleshooting.

Explanation

Too many cursors either have been created and left open or have not been deallocated. It is recommended that a cursor be closed and deallocated as soon as it is no longer needed. For more information, see Cursors.

In time-critical situations, the system administrator may need to terminate those connections that have not been closing or deallocating cursors using the KILL command.

Message Text

Warning: SQL cache memory usage: %d (pages). If this condition persists, see the Error Log Messages topic in Troubleshooting.

Explanation

The Microsoft® SQL Server™ cache consumes memory and holds ad hoc and prepared SQL text. This message occurs if the SQL Server cache exceeds a certain number of pages of server memory. For example, this error occurs if one or more clients are preparing large numbers of SQL statements without performing corresponding unprepare operations. This lack of corresponding unprepare operations can be due to poor application design, an application bug, or repeated creation of prepared SQL text.

This message will be printed again if server memory changes significantly and if the memory consumption of the SQL Server cache remains high.

Either warn the suspected clients that server memory is at a low level or terminate suspected connections using KILL.


MAPI Error Messages

These MAPI error values are used by SQL Mail.

MAPI Constant | Description
MAPI_USER_ABORT | User abort.
MAPI_E_FAILURE | General MAPI failure.
MAPI_E_LOGIN_FAILURE | MAPI login failure.
MAPI_E_DISK_FULL | Disk full.
MAPI_E_INSUFFICIENT_MEMORY | Insufficient memory.
MAPI_E_ACCESS_DENIED | Access denied.
MAPI_E_TOO_MANY_SESSIONS | Too many sessions.
MAPI_E_TOO_MANY_FILES | Too many files were specified.
MAPI_E_TOO_MANY_RECIPIENTS | Too many recipients were specified.
MAPI_E_ATTACHMENT_NOT_FOUND | A specified attachment was not found.
MAPI_E_ATTACHMENT_OPEN_FAILURE | Attachment open failure.
MAPI_E_ATTACHMENT_WRITE_FAILURE | Attachment write failure.
MAPI_E_UNKNOWN_RECIPIENT | Unknown recipient: Parameter '%s', recipient '%s'.
MAPI_E_BAD_RECIPTYPE | Bad recipient type.
MAPI_E_NO_MESSAGES | No messages.
MAPI_E_INVALID_MESSAGE | Invalid message.
MAPI_E_TEXT_TOO_LARGE | Text too large.
MAPI_E_INVALID_SESSION | Invalid session.
MAPI_E_TYPE_NOT_SUPPORTED | Type not supported.
MAPI_E_AMBIGUOUS_RECIPIENT | A recipient was specified ambiguously.
MAPI_E_MESSAGE_IN_USE | Message in use.
MAPI_E_NETWORK_FAILURE | Network failure.
MAPI_E_INVALID_EDITFIELDS | Invalid edit fields.
MAPI_E_INVALID_RECIPS | Invalid recipients.
MAPI_E_NOT_SUPPORTED | Not supported.

See Also

SQL Server and Mail Integration

Help with SQL Mail


DB-Library, error messages

Troubleshooting

DB-Library Error Messages

This topic describes all DB-Library error messages and severity levels. The information in this topic is divided into two tables. The following table lists the errors alphabetically, along with their severities. The table under DB-Library Error Severities summarizes the error severity levels. Number values corresponding to the errors are passed to the currently installed, user-supplied error handler. For information about creating error handlers, see dberrhandle. To access these error definitions, include the Sqlfront.h and Sqldb.h header files in your program.

The following error values are defined in the Sqlfront.h header file. Errors with a severity of EXCOMM also have a network-related error message appended to the dberrstr value. In addition, EXCOMM errors have network-specific error information in oserr and oserrstr.

Error number | Error/ Error severity | Description
10000 | SQLEMEM EXRESOURCE | Unable to allocate sufficient memory.
10001 | SQLENULL EXPROGRAM | NULL DBPROCESS pointer encountered.
10002 | SQLENLOG EXCONSISTENCY | NULL LOGINREC pointer encountered.
10003 | SQLEPWD EXUSER | Login incorrect.
10004 | SQLECONN EXCOMM | Unable to connect: SQL Server is unavailable or does not exist.
10005 | SQLEDDNE EXINFO | DBPROCESS is dead or not enabled.
10006 | SQLENULLO EXCONSISTENCY | Attempt to login with NULL LOGINREC.
10007 | SQLESMSG EXSERVER | General SQL Server error: Check messages from SQL Server.
10008 (DB-Library) | SQLEBTOK EXCOMM | Bad token from SQL Server: Datastream processing out of synchronization.
10009 | SQLENSPE EXPROGRAM | General nonspecific DB-Library error.
10010 | SQLEREAD EXCOMM | Read from SQL Server failed.
10011 | SQLECNOR EXPROGRAM | Column number out of range.
10012 | SQLETSIT EXINFO | Attempt to call dbtsput with an invalid timestamp.
10013 | SQLEPARM EXCONSISTENCY | Invalid parameter in DB-Library function reference.
10014 | SQLEAUTN EXPROGRAM | Attempt to update the timestamp of a table with no timestamp column.
10015 | SQLECOFL EXCONVERSION | Data conversion resulted in overflow.
10016 | SQLERDCN EXCONVERSION | Requested data conversion does not exist.
10017 | SQLEICN EXPROGRAM | Invalid value for computeid or invalid compute column number.
10019 | SQLENTXT EXPROGRAM | Attempt to get text point/timestamp from a nontext column.
10020 | SQLEDNTI EXPROGRAM | Attempt to use dbtxtsput to put a new text timestamp into a column whose data type is neither SQLTEXT nor SQLIMAGE.
10021 | SQLETMTD EXPROGRAM | Attempt to send too much TEXT data through dbmoretext.
10022 | SQLEASEC EXPROGRAM | Attempt to send an empty command buffer to the SQL Server.
10023 | SQLENTLL EXUSER | Name too long for LOGINREC field.
10024 (DB-Library) | SQLETIME EXTIME | SQL Server connection timed out.
10026 | SQLEMODE EXCOMM | Network connection not in correct mode – invalid SQL Server connection.
10027 | SQLEOOB EXCOMM | Error in sending out-of-band data to SQL Server.
10028 | SQLEITIM EXPROGRAM | Illegal timeout value specified.
10029 | SQLEDBPS EXRESOURCE | Maximum number of DBPROCESSes already allocated.
10030 | SQLEIOPT EXPROGRAM | Attempt to use invalid dboption.
10031 | SQLEASNL EXPROGRAM | Attempt to set fields in a null LOGINREC.
10032 | SQLEASUL EXPROGRAM | Attempt to set unknown LOGINREC field.
10033 | SQLENPRM EXPROGRAM | NULL parameter not allowed for this dboption.
10034 | SQLEDBOP EXPROGRAM | Invalid or out of range dbn parameter.
10035 | SQLENSIP EXPROGRAM | Negative starting index passed to dbstrcpy.
10036 | SQLECNULL EXPROGRAM | NULL destination variable not allowed.
10037 | SQLESEOF EXCOMM | Unexpected EOF from SQL Server.
10038 | SQLERPND EXPROGRAM | Attempt to initiate a new SQL Server operation with results pending.
10039 | SQLECSYN EXCONVERSION | Attempt to convert data stopped by syntax error in source field.
10040 | SQLENONET EXCOMM | DB-Library network communications layer not loaded.
10041 | SQLEBTYP EXPROGRAM | Unknown bind type passed to DB-Library function.
10042 | SQLEABNC EXPROGRAM | Attempt to bind to a nonexistent column.
10043 | SQLEABMT EXPROGRAM | User attempted a dbbind with mismatched column and variable types.
10044 | SQLEABNP EXPROGRAM | Attempt to bind using NULL pointers.
10045 | SQLEBNCR EXPROGRAM | Attempt to bind user variable to a nonexistent compute row.
10046 | SQLEAAMT EXPROGRAM | User attempted a dbaltbind with mismatched column and variable types.
10047 | SQLENXID EXNONFATAL | The server did not grant us a distributed-transaction ID.
10048 | SQLEIFNB EXPROGRAM | Illegal field number passed to bcp_control.
10049 | SQLEKBCO EXINFO | 1000 rows successfully bulk copied to host file.
10050 | SQLEBBCI EXINFO | Batch successfully bulk copied to SQL Server.
10051 | SQLEKBCI EXINFO | 1000 rows sent to SQL Server.
10052 | SQLEBCWE EXNONFATAL | I/O error while writing bcp datafile.
10053 (DB-Library) | SQLEBCNN EXUSER | Attempt to bulk copy a null value into a server column that does not accept null values.
10054 (DB-Library) | SQLEBCOR EXCONSISTENCY | Attempt to bulk copy an oversized row to SQL Server.
10055 | SQLEBCPI EXPROGRAM | Call bcp_init before any other bcp routines.
10056 | SQLEBCPN EXPROGRAM | Use bcp_bind, bcp_collen, and bcp_colptr only after calling bcp_init with the copy direction set to DB_IN.
10057 | SQLEBCPB EXPROGRAM | Do not use bcp_bind after bcp_init has been passed a non-null input filename.
10058 | SQLEVDPT EXUSER | For bulk copy, all variable-length data must have either a length-prefix or a terminator specified.
10059 | SQLEBIVI EXPROGRAM | Use bcp_columns and bcp_colfmt only after bcp_init has been passed a valid input file.
10060 | SQLEBCBC EXPROGRAM | Call bcp_columns before bcp_colfmt.
10061 | SQLEBCFO EXUSER | Host files must contain at least one column: bcp.
10062 | SQLEBCVH EXPROGRAM | Call bcp_exec only after bcp_init has been passed a valid host file.
10063 | SQLEBCUO EXRESOURCE | Unable to open host datafile: bcp.
10064 | SQLEBUOE EXRESOURCE | Unable to open error file: bcp.
10065 | SQLEBWEF EXNONFATAL | I/O error while writing bcp error file.
10066 | SQLEBTMT EXPROGRAM | Attempt to send too much text data with bcp_moretext.
10067 | SQLEBEOF EXNONFATAL | Unexpected EOF encountered in bcp datafile.
10068 | SQLEBCSI EXCONSISTENCY | Host-file columns may be skipped only when copying into the server.
10069 | SQLEPNUL EXCONSISTENCY | NULL program pointer encountered.
10070 | SQLEBSKERR EXCONSISTENCY | Cannot seek in data file.
10071 | SQLEBDIO EXPROGRAM | Bad bulk-copy direction.
10072 | SQLEBCNT EXUSER | Attempt to use bulk copy with a nonexistent server table.
10073 | SQLEMDBP EXPROGRAM | Attempt to set maximum number of DPPROCESS lower than 1.
10075 | SQLCRSINV EXPROGRAM | Invalid cursor statement.
10076 | SQLCRSCMD EXPROGRAM | Attempt to call cursor functions when there are commands waiting to be executed.
10077 | SQLCRSNOIND EXINFO | One of the tables involved in the cursor statement does not have a unique index.
10078 | SQLCRSDIS EXPROGRAM | Cursor statement contains one of the disallowed phrases COMPUTE, UNION, FOR BROWSE, or SELECT INTO.
10079 | SQLCRSAGR EXPROGRAM | Aggregate functions are not allowed in a cursor statement.
10080 | SQLCRSORD EXPROGRAM | Only fully keyset-driven cursors can have ORDER BY, GROUP BY, or HAVING PHRASES.
10081 | SQLCRSMEM EXPROGRAM | Keyset or window scroll size exceeds the memory limitations of this machine.
10082 | SQLCRSBSKEY EXPROGRAM | Keyset cannot be scrolled backward in mixed cursors with a previous fetch type.
10083 | SQLCRSNORES EXINFO | Cursor statement generated no results.
10084 | SQLCRSVIEW EXPROGRAM | A view cannot be joined with another table or a view in a cursor statement.
10085 | SQLCRSBUFR EXPROGRAM | Row buffering should not be turned on when using cursor functions.
10086 | SQLCRSFROWN EXINFO | Row number to be fetched is outside valid range.
10087 | SQLCRSBROL EXPROGRAM | Backward scrolling cannot be used in a forward scrolling cursor.
10088 | SQLCRSFRAND EXPROGRAM | Fetch types RANDOM and RELATIVE can only be used within the keyset of keyset-driven cursors.
10089 | SQLCRSFLAST EXPROGRAM | Fetch type LAST requires fully keyset-driven cursors.
10090 | SQLCRSRO EXPROGRAM | Data locking or modifications cannot be made in a READONLY cursor.
10091 | SQLCRSTAB EXPROGRAM | Table name must be determined in operations involving data locking or modifications.
10092 | SQLCRSUPDTAB EXPROGRAM | Update or insert operations using bind variables require single table cursors.
10093 | SQLCRSUPDNB EXPROGRAM | Update or insert operations cannot use bind variables when binding type is NOBIND.
10094 | SQLCRSVIIND EXPROGRAM | The view used in the cursor statement does not include all the unique index columns of the underlying tables.
10095 | SQLCRSNOUPD EXINFO | Update or delete operation did not affect any rows.
10096 | SQLCRSOS2 EXPROGRAM | Cursors are not supported for this server.
10097 | SQLEBCSA EXPROGRAM | The BCP hostfile %s contains only %ld rows. Skipping all of these rows is not allowed.
10098 | SQLCRSRO EXPROGRAM | Data locking or modifications cannot be made in a READONLY cursor.
10099 | SQLEBCNE EXPROGRAM | The table %s contains only %ld rows. Copying up to row %ld is not possible.
10100 | SQLEBCSK EXPROGRAM | The table %s contains only %ld rows. Skipping all of these rows is not allowed.
10101 | SQLEUVBF EXPROGRAM | Attempt to read unknown version of bcp format file.
10102 | SQLEBIHC EXPROGRAM | Incorrect host-column number found in bcp format file.
10103 | SQLEBWFF EXRESOURCE | I/O error while reading bcp format file.
10104 | SQLNUMVAL EXPROGRAM | The data stored in the DBNUMERIC/DBDECIMAL structure is invalid.
10105 | SQLEOLDVR EXPROGRAM | The SQL Server's TDS is obsolete with this version of DB-Library.


DB-Library Error Severities

The following table lists all error severities with their numerical equivalents and an explanation of the type of error. When an error occurs or when a message is sent, these numerical equivalents are passed to the currently installed, user-supplied error handler.

Error severity levels are defined in the Sqlfront.h header file. Your program must include Sqlfront.h if it refers to these severity levels.

Error severity | Severity number | Description
EXINFO | 1 | Informational, nonerror.
EXUSER | 2 | User error.
EXNONFATAL | 3 | Nonfatal error.
EXCONVERSION | 4 | Error in DB-Library data conversion.
EXSERVER | 5 | The server has returned an error flag.
EXTIME | 6 | Timeout period exceeded while waiting for a response from the server — the DBPROCESS is still alive.
EXPROGRAM | 7 | Coding error in user program.
EXRESOURCE | 8 | Running out of resources — the DBPROCESS may be dead.
EXCOMM | 9 | Failure in communication with server — the DBPROCESS is dead.
EXFATAL | 10 | Fatal error — the DBPROCESS is dead.
EXCONSISTENCY | 11 | Internal software error — notify your primary support provider.

See Also

Reporting Errors to Your Primary Support Provider


Error 10008 (DB-Library)

Severity Level 9
Message Text

Bad token from SQL Server: Datastream processing out of synchronization.

Explanation

This error occurs when DB-Library cannot interpret the Tabular Data Stream (TDS) sent from Microsoft® SQL Server™. A DB-Library application communicates with SQL Server over the network using a TDS. The TDS is a specification for the communication of data and other messages between SQL Server and the DB-Library client. The network libraries used by SQL Server and the DB-Library client provide the interface for the transmission of TDS over a particular network protocol. The network protocol used is independent from the TDS as long as there is an appropriate interface network library that supports the network protocol, whether it is a named pipe connection or a socket connection. Each DB-Library application parses this TDS automatically to extract useful information (for example, query result rows) or to generate requests of, or responses to, SQL Server in a format that is mutually understood.

There are two main causes for this error:

  • The data sent by SQL Server over the network named pipe or socket has been corrupted. This is usually caused by a network problem involving either network hardware or software.

  • The network can generate errors or messages unknown to DB-Library; therefore, this error can be generated.
Action

Inspect the Windows NT Event Viewer system and application logs. These logs may provide information that indicates if the problem is related to the server network protocol, the network card, or the system configuration. Review the SQL Server-specific entries in the application log or the SQL Server error log for relevant network-related errors that correspond in time with the occurrence of the 10008 error seen on the client. If this review does not provide enough information to resolve the problem, special network monitoring tools and a review of the client's configuration may be necessary.

If the problem persists, contact your primary network support provider for assistance.

Programmers using the SQL Server Programmer's Toolkit (for DB-Library) can handle error 10008 by adding conditional statements to test for the occurrence of this error. When error 10008 is seen in the DB-Library error handler, additional processing can include closing the current DBPROCESS connection, opening a new connection, and then resending the query.

See Also

Programming DB-Library for C

Reporting Errors to Your Primary Support Provider


Error 10024 (DB-Library)

Severity Level 6
Message Text

SQL Server connection timed out.

Explanation

This error message is returned from DB-Library when the query time-out setting for the application's connection to Microsoft® SQL Server™ is too low. The query is terminated when it takes longer to complete than the time allocated.

Action

Check the application for configuration settings, and increase the query time-out setting. If this is a custom application, you can adjust the query time-out setting by using the dbsettime() function.

See Also

Programming DB-Library for C


Error 10053 (DB-Library)

Severity Level 2
Message Text

Attempt to bulk copy a null value into a server column that does not accept null values.

Explanation

This error occurs when you attempt to bulk copy a null value into a table column that does not accept null values. This usually occurs when the column is changed from NULL to NOT NULL after previous bulk copies.

Action

If the source file being bulk copied is character data, the file can be edited and the column value changed to an appropriate value for the column definition. You can also change the current definition of the table or create a separate table with a column definition that allows null values.

See Also

Programming DB-Library for C


Error 10054 (DB-Library)

Severity Level 11
Message Text

Attempt to bulk copy an oversized row to SQL Server.

Explanation

This error occurs during a bulk copy operation when a row or rows in the source data file do not match the row as defined for the destination database table. It can occur due to a missing end-of-line marker. It can also occur if there are more column delimiters in the source data file than currently exist in the destination database table, or if the source data file is corrupt.

Action

Verify that the source data file matches the column definitions for the database table, or create a new table to match the current data file, bulk copy the data into the database, and then manipulate the data using Transact-SQL statements.

You can either manipulate the source data file or create a format file to facilitate the data transfer. You can manipulate character-based data files by using a text editing tool that accommodates the data file size and will not add special hidden characters during a save operation. The editing tool can then be used to manipulate the source data file by adding or deleting characters as necessary so that the source data file matches the table definition. You can also create a format file. The generated format file can be manipulated by a text editing tool and changed so that character positions/columns in the source data file are ignored. Native format files are more difficult to manipulate.

The alternatives to manipulating the native format source data file and/or a format file are limited due to the storage of data types other than character in a binary type format. It can be difficult to manipulate this file type with any editing tool, and it is more difficult to generate and manipulate a format file. You can use the -F or the -L command-line flags to specify the first and last row in the source data file that is to be bulk copied into SQL Server. If the source data file contains a few oversized rows, these flags can be used to bulk copy up to the oversized row followed by a bulk copy operation from the row following the oversized row to the end of the data file.

If you are unable to resolve this error, contact your primary support provider for assistance.

See Also

bcp Utility

Programming DB-Library for C

Reporting Errors to Your Primary Support Provider


Distributed Queries Error Messages

This topic discusses troubleshooting tips and techniques for distributed queries against various OLE DB providers. On an error condition against an OLE DB provider, Microsoft® SQL Server™ outputs these sets of error messages:

  • Provider error messages (indicated by one or more error messages surrounded by square brackets), which are returned by the OLE DB provider.

  • SQL Server error messages.

SQL Server uses the OLE DB provider's error object and its interfaces to return the provider's error messages. If the provider does not support the error object and its interfaces for the given error context, provider error messages are not available.

In addition to using these error message topics to resolve problems with distributed queries, use SQL Profiler to trace the OLE DB Errors event class. The OLE DB Errors event class outputs the OLE DB interface and method for the provider returning an error and the error code returned by the method invocation. The hexadecimal error code can be looked up in the Oledberr.h header file (located in the \DevTools\Include directory of the target SQL Server installation directory, by default, C:\Mssql) to determine the meaning of the error code, by default, the OLE DB Errors event class does not show up in SQL Profiler. For more information about seeing the OLE DB Errors event class and other advanced errors using SQL Profiler, see Creating and Managing Traces and Templates.

This table lists all distributed queries error messages.

Error | Severity | Description
7303 | 16 | Could not initialize data source object of OLE DB provider '%ls'. %ls.
7306 | 16 | Could not open table '%ls' from OLE DB provider '%ls'. %ls.
7314 | 16 | OLE DB provider '%ls' does not contain table '%ls'.
7321 | 16 | An error occurred while preparing a query for execution against OLE DB provider '%ls'. %ls.
7356 | 16 | OLE DB provider '%ls' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
7357 | 16 | Could not process object '%ls'. The OLE DB provider '%ls' indicates that the object has no columns.
7391 | 16 | The operation could not be performed because the OLE DB provider '%ls' does not support distributed transactions.
7392 | 16 | Could not start a transaction for OLE DB provider '%ls'.
7399 | 16 | OLE DB provider '%ls' reported an error. %ls.
7403 | 16 | Could not locate registry entry for OLE DB provider '%ls'.
7413 | 16 | Could not perform a Windows authenticated login because delegation is not available.
8114 | 16 | Error converting data type %ls to %ls.
8501 | 16 | MS DTC on server '%.*ls' is unavailable.


Embedded SQL for C Error Messages

When developing and running Embedded SQL for C (ESQL/C) programs, you will see different status and error messages. All message numbers that are returned by ESQL/C are negative numbers.

The messages in the following table are generated by ESQL/C. Because the messages are not generated by Microsoft® SQL Server™, they do not appear in the sysmessages table.

Message number | Run time/ compile time | Description
4998 | C | Attempt to connect to the specified database server failed.
19031 | C | Unable to open bindfile.
19051 | C | Too many sections.
19101 | R | Statement too long.
19103 | R | Illegal %s value %s. Non-numeric %s value %s. (Invalid number for the timeout value.)
19104 | R/C | Incorrect SQL statement syntax.
19199 | C | ESQL keyword(s) detected in PREPARE statement.
19306 | C | Host variable used but not declared.
19313 | R | Too few host variables.
19324 | C | Host variable may not be used in this context.
19408 | R | Invalid SQL data type for SQL_TYP_DECIMAL.
19413 | R | Data overflow occurred during decimal data conversion.
19422 | R | Unknown SQL Server data type.
19423 | R | Invalid destination data type.
19501 | R | No cursor declared.
19505 | C | Duplicate cursor name: %s.
19508 | R | Cursor is not positioned on a row.
19514 | R | Cursor is not prepared.
19517 | R | Cursor open attempted for non-SELECT prepared statement.
19521 | R | Open cursor failure for section %d of plans.
19523 | R | Failure to locate/close cursor. Section %d, plan %s.
19524 | R | Table for this cursor not updatable.
19525 | R | Attempt to fetch on unopened cursor.
19526 | R | No access plan for this cursor.
19527 | R | Could not get section for this cursor.
19528 | R | Connection for section %d of plan %s has NULL DBPROCESS.
19701 | R | NULL connection name.
 |  | Connection %s not found.
19702 | R | Connection name not found.
 |  | Attempt to close nonexistent connection.
19703 | R | Failed to get DBPROCESS. Autoconnect failure.
19706 | R | Login failure in section %d.
19707 | R | Duplicate connection name.
19822 | R | Improperly initialized user SQLDA.
19911 | C | The SQL data type specified for a host variable is invalid.
19913 | C | The token identifier has already been used.
19917 | C | Invalid or incorrect option to sqlainit().
19946 | C | Cursor %s not declared.
19953 | C | Invalid call type.
19955 | R | Text not found in %s section %u.
19956 | R | Access plan section or statement text not found.
19957 | R | Access plan or statement text not found.
19994 | R | Can't run next BEGIN DECLARE sections. Statement ignored.
19995 | R | END DECLARE encountered without preceding BEGIN DECLARE statement. Statement ignored.
19999 | C | An internal error occurred.

See Also

Programming Embedded SQL for C


SQL Server Enterprise Manager Error Messages

This section contains explanations and corrective actions for many of the error messages related to SQL Server Enterprise Manager.


<0s> is not supported.

Message Text

<0s> is not supported.

Explanation

The syntax you entered is valid but is not supported visually by SQL Server Enterprise Manager.

Action

Be sure to verify your syntax before saving.

See Also

Query Fundamentals


<0s> may not be used in this query type.

Message Text

<0s> may not be used in this query type.

Explanation

The action you are attempting is not permitted with the type of query you have selected.

Action

Verify the syntax in your query or change the query type.

See Also

Query Fundamentals


A relationship cannot contain more than '<0d>' columns.

Message Text

A relationship cannot contain more than '<0d>' columns.

Action

Select fewer than 16 columns when defining the foreign key relationship.

See Also

Creating and Modifying PRIMARY KEY Constraints

Primary Key Constraints


Cannot add this expression to the select list.

Message Text

Cannot add this expression to the select list.

Explanation

There are limitations to what expressions are allowed in the select list. The expression you are trying to add may be invalid.

Action

Verify that the syntax in the expression is correct. It is possible that the type of expression is invalid.

See Also

Expressions

Using Operators in Expressions


Error modifying column properties.

Appears when your constraint expression contains an error.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]The name '[column value]' is illegal in this context. Only constants, constant expressions, or variables allowed here. Column names are illegal.

Explanation

A default value defined for a character column is not enclosed in single quotation marks (').

Action

Enclose the value in single quotation marks in the database column's Default Value cell, and then save the table.

See Also

ALTER TABLE

Columns Property

Creating and Modifying DEFAULT Definitions

Modifying Column Properties


Illegal expression list usage.

Message Text

Illegal expression list usage.

Explanation

There is an error in the syntax of your query. SQL Server Enterprise Manager has attempted to locate the source of the error.

Action

Review your query syntax and correct the error before running your query.

See Also

Expressions

Filtering Rows with WHERE and HAVING

Query Fundamentals


Information models in the specified Meta Data Services repository database must be updated in order to save this DTS package version

Troubleshooting

Information models in the specified Meta Data Services repository database must be updated in order to save this DTS package version.

Message Text

Information models in the specified Meta Data Services repository database must be updated in order to save this DTS package version.

Explanation

Upgrading to Microsoft® SQL Server™ 2000 does not install the SQL Server 2000 Meta Data Services information models required by Data Transformation Services (DTS), which results in this error when you save to Meta Data Services. The error occurs after upgrading from SQL Server version 7.0 to SQL Server 2000. It does not occur if you perform a new installation, or if you store DTS packages in SQL Server, as a structured storage file, or as a Microsoft Visual Basic® file.

Action

You must upgrade the Meta Data Services information models to the versions expected by DTS. For more information and instructions for upgrading the information models, see DTS Information Model.


Object <0s> does not exist in the database.

Message Text

Object <0s> does not exist in the database.

Explanation

There is an error in the syntax of your query. SQL Server Enterprise Manager has attempted to locate the source of the error.

Action

Review your query syntax and correct the error before running your query.

See Also

Expressions

Filtering Rows with WHERE and HAVING

Query Fundamentals

Using the Select List


Only one ROWGUIDCOL column is allowed per table.

Message Text

Only one ROWGUIDCOL column is allowed per table.

Explanation

You have attempted to assign more than one ROWGUIDCOL. The ROWGUIDCOL is a special property similar to IDENTITY and only one ROWGUIDCOL is allowed per table.

See Also

Setting Column Properties

Database Designer


SQL Verification.

Message Text

SQL Verification.

Explanation

The SQL verified successfully.

See Also

Expressions

Filtering Rows with WHERE and HAVING

Query Fundamentals

Using the Select List


System errors.

Two system errors can appear in the Save Incomplete dialog box when you exceed Microsoft® SQL Server limitations that are not controlled by SQL Server Enterprise Manager.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Can't allocate space for object 'Syslogs' in database 'Guest' because the 'logsegment' segment is full. If you ran out of space in Syslogs, dump the transaction log. Otherwise, use ALTER DATABASE or sp_extendsegment to increase the size of the segment.

Explanation

This error occurs because there is insufficient log space to complete the transaction.

Action
  • Follow the recommendation in the message and delete the transaction log. (Typically this action will not entirely solve the problem.)

  • Increase the size of the database to accommodate the change. With large databases, changes that require the recreation of tables (for example, changing a column data type or size) may not be possible using SQL Server Enterprise Manager. You may need to use methods of transferring data that don't require transactions, such as bulk copying (bcp utility).
ODBC error text

[Microsoft][ODBC SQL Server Driver]Timeout expired.

Explanation

The timeout can occur when you're updating the database with any Transact-SQL changes.

Action
  • Try again later to save the diagram or selected tables.

  • Save a change script and apply it to the database at a later time.

  • Increase the SQL Query Time-out value and try to save the diagram or selected tables again.

To increase the SQL Query Time-out value

  1. From the Tools menu, choose Options.

  2. In the left pane, click Data Tools, and then click Data View.

  3. Type a new value in the SQL query time-out box.

See Also

ALTER DATABASE

Physical Database Files and Filegroups

remote query timeout Option

Saving a Change Script

sp_configure


The current version of the ODBC driver is not valid.

Message Text

The current version of the ODBC driver is not valid.

Explanation

Your ODBC driver is not current.

Action

For best results, use the ODBC driver provided with the Microsoft® SQL Server™ installation.

For more information, see the ODBC documentation.


The outer join operator (+) cannot be used in QBE.

Message Text

The outer join operator (+) cannot be used in QBE.

Explanation

There is an error in the syntax of your query. SQL Server Enterprise Manager has attempted to locate the source of the error.

Action

Review your query syntax and correct the error before running your query.

See Also

Join Fundamentals

Transact-SQL Joins


The Query Designer supports no more than one data source for this type of query.

Message Text

The Query Designer supports no more than one data source for this type of query.

Explanation

Only one data source can be used with this query type.

See Also

Query Fundamentals


There are not enough columns to match the subquery select list.

Message Text

There are not enough columns to match the subquery select list.

Explanation

The SELECT statement needs to include the same number of columns that the embedded subquery returns.

See Also

Expressions

Query Fundamentals

Subquery Fundamentals

Using the Select List


Unable to add constraint.

Appears when a new constraint has failed on existing data or your constraint expression contains an error. Compare the ODBC error text that appears in the Save Incomplete dialog box with the error text shown below to determine the appropriate solution.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Data exists in table '[table name]', database '[database name]', that violates CHECK constraint '[constraint name]' being added. ALTER command has been aborted.

[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.

Explanation

Existing data does not match the check constraint.

Action
  • Change the data (for example, by using SQL Server Enterprise Manager) to match the constraint.

  • Clear the Check existing data on creation check box in the Tables property page for the check constraint in question.

  • Change the constraint expression in the Tables property page for the check constraint in question.
ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column '[column name]' specified in constraint definition.

[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.

Explanation
  • The text value in the check constraint expression on the Tables property page is not enclosed in single quotation marks (').

  • A column that participates in the check constraint has been renamed. For example, if the original constraint had the expression (cityname = 'Paris') and you renamed the column to city, you would see the same error except that 'cityname' would be the invalid column shown in the error message.
Action

Correct the expression and save the table.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Line [line number]: Incorrect syntax near '[operator]'.

Explanation

The expression defined for the check constraint (in the Tables property page) or the default constraint (in the Default Value cell) is not valid Transact-SQL syntax. For example, the check constraint expression 'city equals Paris' was typed instead of 'city = Paris'.

Action

Correct the expression and save the table.

See Also

Database Designer

Filtering Rows with WHERE and HAVING

Query Fundamentals

Database Objects


Unable to create index.

Appears when a new index has failed on existing data.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Create unique index aborted on duplicate key. Primary key is '[primary key data]'

[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.

Explanation

A unique index was created in the Indexes/Keys property page but duplicate data exists in the database. The value after the phrase "Primary key is" is the first duplicate value that Microsoft® SQL Server™ found as it created the index.

Action
  • Remove duplicate data from the database (for example, by using SQL Server Enterprise Manager).

  • Change the option in the Indexes/Keys property page to allow duplicate rows in the index.

See Also

Creating SQL Server Indexes

Indexes

UNIQUE Constraints


Unable to create relationship.

Appears when a new constraint has failed on existing data.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Data exists in table '[table name]', database '[database name]', that violates FOREIGN KEY constraint '[constraint name]' being added. ALTER command has been aborted.

[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.

Explanation

Existing data fails the foreign key constraint.

Action
  • Change the data that fails the foreign key constraint by running a query to show all the foreign key values that do not match primary key values. For example, to find foreign key values in the job_id column of the employee table that do not match primary key values in the jobs table, run a query with this Transact-SQL syntax:
    SELECT employee.emp_id, employee.job_id
FROM employee LEFT OUTER JOIN jobs ON employee.job_id = jobs.job_id
WHERE (jobs.job_id IS NULL)
  • Clear the Check existing data on creation check box in the Relationships property page.

See Also

Constraints

Database Designer

Filtering Rows with WHERE and HAVING

Query Fundamentals


Unable to modify table.

Appears when a new constraint has failed on existing data. Compare the ODBC error text that appears in the Save Incomplete dialog box with the two ODBC errors shown below to determine the appropriate solution.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]The column [column name] in table Tmp_ [table name] may not be null.

Explanation

A new database column has been added that doesn't allow null values and doesn't provide a default value. The table name in question appears after "Tmp_".

Action

Change the column properties. Either select the Allow Nulls property or type a Default Value setting.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Attempt to insert the value NULL into column '[column name]', table '[database name] TMP_ [table name]'; column does not allow nulls. INSERT fails.

[Microsoft][ODBC SQL Server Driver][SQL Server]Command has been aborted.

Explanation

The Allow Nulls property on an existing database column has been cleared, but the column has existing null values in it. The table name in question appears after "TMP_".

Action

Go to the column and select the Allow Nulls property.

See Also

Modifying Column Properties


Unable to preserve trigger.

Appears when your trigger text references a column that has been renamed, deleted, or assigned a different data type.

ODBC error text

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '[column name]'.

- Unable to preserve trigger '[trigger name]'.

Explanation

A change to the table required the table to be re-created. When a table is re-created, the triggers attached to that table are automatically re-created as well.

Action

The recommended solution depends on the type of change made to the column referenced by the trigger.

To preserve a trigger that references a renamed column

  • Rename the column to its original name and then save the table. This action will allow the table to be re-created. You can now rename the column, save the table again, and then edit the trigger to fix the renamed columns.

To preserve a trigger that references a deleted column

  1. Expand the table that the trigger is attached to.

  2. Right-click the trigger you want to change and choose Open from the shortcut menu.

  3. Edit the trigger text and save the trigger.

  4. Save the table or database diagram.

To preserve a trigger that references a column whose data type changed

  1. In your database diagram, click the Save Change Script button in the Database Diagram toolbar.

  2. Open the change script.

  3. In Data View, expand the table that the incorrect trigger is attached to.

  4. Delete the incorrect trigger.

  5. Create a new trigger for the table.

  6. In the change script, select the trigger text. The set of statements that creates the trigger begins with a CREATE TRIGGER statement.

  7. Copy the selected text into the Trigger window.

  8. On the toolbar, click the Save button. This action saves the trigger in the database and adds the trigger to the table in the Tables folder.

  9. Repeat Steps 3 through 8 for each trigger you want to recreate.

See Also

Creating a Trigger

Trigger Object

Triggers


Unnecessary use of CONVERT function.

Message Text

Unneccesary use of CONVERT function.

Explanation

There is an error in the syntax of your query. SQL Server Enterprise Manager has attempted to locate the source of the error.

Action

Review your query syntax and correct the error before running your query.

See Also

Data Type Conversion

Expressions

Filtering Rows with WHERE and HAVING

Using the Select List


Unsupported SQL.

Message Text

Unsupported SQL.

Explanation

There is an error in the syntax of your query. SQL Server Enterprise Manager has attempted to locate the source of the error.

Action

Review your query syntax and correct the error before running your query.

See Also

Expressions

Filtering Rows with WHERE and HAVING

Using the Select List


XML Error Messages

The XML error messages are classified in the following categories:

  • Errors in annotated XDR schemas

  • Errors in XPath queries

  • MSXML errors detected during XPath processing


Errors in Annotated XDR Schemas

The XDR schema errors are classified in the following categories:

  • XDR schema errors detected during the schema processing

  • XDR schema errors detected by XPath
XDR Schema Errors Detected During the Processing of the Annotated XDR Schema.

"Schema: unable to load schema %1. An error occurred (%2)"

The annotated schema could not be loaded. Check that the schema file indicated is in the expected location and you have permission to access it. Verify that the schema is well-formed and valid XML.

"Schema: duplicate element definition (%1)"

"Schema: duplicate attribute definition (%1) on %2"

"Schema: duplicate attribute reference (%1) on %2"

"Schema: duplicate top-level attribute definition (%1)"

An attribute or element definition or reference appears more than once in the schema. Remove the offending duplicates.

"Schema: missing attribute definition (%1) on %2"

"Schema: missing element definition (%1)"

A required attribute or element is missing from the schema. Add the missing information.

"Schema: missing %1 on %2"

The annotation (%1) is missing from the schema. Add the missing annotation.

(For example, <sql:relationship key-relation="T" foreign-relation="T" /> is missing key and foreign-key. )

"Schema: value expected for %1 on %2"

The value of the annotation (%1) is empty. (E.g., sql:field=""). Add the missing value.

"Schema: invalid value for %1 on %2"

The value of the annotation (%1) is not valid. (For example, sql:key-fields=" "). Correct the value.

"Schema: nested element definition is not allowed"

An ElementType cannot contain an ElementType.

"Schema: content is not allowed in a relationship tag"

The relationship tag can only have attributes (<sql:relationship />).

"Schema: unknown attribute %1 on relationship tag"

The only attributes on relationship are: key, key-relation, foreign-key, and foreign-relation. XML names are case-sensitive.

"Schema: the key/foreign-key pair in a relationship on %1 do not have the same number of columns"

Check the value of the key and foreign-key attributes on the indicated relationship tag.

(For example, <sql:relationship key-relation="T" foreign-relation="T" key="a b" foreign-key="x" /> has two columns in key but only one column in foreign-key.) Column names that have embedded spaces must be wrapped with square brackets ([]). Refer to the topic in SQL Server Books Online that explains the relationship.

"Schema: '0' or '1' expected for %1 on %2"

The attribute indicated is Boolean-valued. Use "0" for false, "1" for true.

"Schema: unknown XDR type %1 on %2"

The indicated type is not a valid XDR type. See the XML Data Reduced specification for the complete list of available types.

"Schema: unknown SQL type %1 on %2"

The indicated data type is not a valid SQL Server data type. SQL Server data type is used to distinguish among the large object binary types, and so must be one of: binary, image, ntext, or text

"Schema: invalid name/type, string value expected"

The value of the name or type attribute is invalid.

"Schema: invalid schema URL (%1)"

The URL is not valid.

"Schema: unknown element %1"

The only recognized Schema elements are: group, attribute, element, AttributeType, or ElementType.

"Schema: content other than relationship is not allowed in an element/attribute/AttributeType"

These tags can have attributes or a relationship annotation, but no other content.

"Schema: cannot infer default mapping for %1. Neither it nor any of its ancestors defines a relation"

Refer to the doc sections on relation and default mappings. The relation mapping for an element or attribute could not be determined.

"Schema: reference to %1 not allowed. Schema element/attribute is only allowed inside an ElementType"

The element and attribute tags can be used only inside of an ElementType.

"Schema: the element/attribute name %1 is invalid"

The name is not a valid XML element or attribute name.

"Schema: 'type' attribute expected on element/attribute"

"Schema: 'name' attribute expected on ElementType/AttributeType"

A schema item is missing a type or name attribute. (For example, <ElementType type="Oops" /> will cause this error; the user should have used name, not type. Similarly for <element name="Oops" /> )

"Schema: invalid 'type' on element/attribute"

"Schema: invalid 'name' on ElementType/AttributeType"

The name is not a valid XML element/attribute name.

"Schema: mixed content is not allowed on element %1. Property elements cannot have subelements"

Mixed content on property elements is not supported. Refer to the topic in SQL Server Books Online that defines property elements. [A property element is one that maps to a column in SQL Server. The explicit mapping is given using the field annotation, or the default (implicit) mapping will occur with the content="textOnly" annotation (in which case the column name is the element name).]

"Schema: unresolved namespace prefix (%1)"

The namespace prefix was used but never defined (using xmlns:prefix="uri") in the current context.

"Schema: relationship expected on '%1' when specifying a limit field"

The limit-field annotation is used to qualify a join. It cannot be used except on an attribute or element with a relationship.

"Schema: %1 cannot be used on is-constant element (%2)"

Refer to the topic in SQL Server Books Online that explains the is-constant annotation. Is-constant elements cannot have fields or a relation.

"Schema: relationship expected on %1"

The element or attribute requires a relationship.

"Schema: unexpected relationship on %1"

The element or attribute cannot have a relationship.

"Schema: invalid relationship on %1"

Refer to the topic in SQL Server Books Online that defines the relationship annotation. Relationships can be invalid for any number of reasons. Common reasons include:

  • The first key-relation must be the mapped ancestor's table

  • The last foreign-relation must be the current node's table

  • The table and column names are always case-sensitive

"Schema: map-field is not allowed on %1. This annotation may be used only on attributes and property elements"

The map-field annotation can be used only on nodes that map to columns in SQL Server. These are elements or attributes annotated with field, or elements with textOnly content.

"Schema: a relationship from the same table to itself (self-join) is not supported on attribute %1"

The relationship is not supported in SQL Server 2000. Consider using is-constant or different relations.

"Schema: a base path is required to resolve external schema reference"

The external schema was referenced without a base path.

"Schema: the attribute %1 on an element is not supported"

"Schema: the attribute %1 on an attribute is not supported"

"Schema: the attribute %1 on an ElementType is not supported"

"Schema: the attribute %1 on an AttributeType is not supported"

An unrecognized attribute was used. Refer to the XML Data Reduced specification for the use of element, attribute, ElementType, and AttributeType.

XDR Schema Errors Detected by XPath

"Schema: the url-encode annotation requires one or more keys (specified in join relationships or the key-field annotation) in an ancestor or self"

The url-encode annotation causes a direct object query to be generated. Direct object queries must select a single column from a single row, so key information is required to select a single row from the table. Keys are described by key-fields and relationships. The url-encoded node or one of its ancestors has no keys.

"Schema: a join relationship is required between %1 and %2"

When an element and its child map to different tables, a relationship is required. Refer to the topic in SQL Server Books Online that explains the use of the relationship annotation.

"Schema: the join relationship between %1 and %2 is invalid"

Refer to the topic in SQL Server Books Online that explains the use of the relationship annotation.

"Schema: the annotations url-encode and use-cdata are mutually exclusive and may not be used with any of the types id/idref/idrefs/nmtoken/nmtokens"

Not all annotations can be used with each other. Remove one of the mutually exclusive annotations.

"Schema: the map-field annotation is not allowed on the root element (%1)"

The top-most element must be mapped, or else is-constant.

"Schema: a relation is expected on the element %1"

Refer to the topic in SQL Server Books Online that explains relation and default mappings. The relation mapping for the element could not be determined.

"Schema: recursive element containment is not supported"

Recursion is not supported in SQL Server 2000.

"Schema: the is-constant element %1 cannot have attributes"

Attributes are not allowed on is-constant elements. Attributes can be used only on elements with relation.


Errors in XPath Queries

These are the XPath errors detected during XPath processing

"XPath: an unexpected internal error occurred"

Not expected during typical processing.

"XPath: unable to instantiate MSXML class factories"

"XPath: the parsed XPath contains an unexpected value (%1). The version of MSXML2.DLL installed may be incompatible with SQLXMLX.DLL"

Not expected during typical processing. If one of these errors occurs, the most likely cause is an installation problem. Check that SQLXMLX.DLL and MSXML2.DLL are the versions that were installed with SQL Server.

"XPath: the %1 axis is not supported"

"XPath: the %1 nodetest is not supported"

"XPath: the %1 function is not supported"

"XPath: the %1 operator is not supported"

Refer to the topic in SQL Server Books Online that explains the functionality supported in SQL Server 2000.

"XPath: direct object access must select a column"

"XPath: only direct object access may select an attribute"

Refer to the topic in SQL Server Books Online that explains direct object access. Selecting an attribute is supported only in direct object access because the attribute's value is returned, and this is not valid XML. Conversely, direct object access must select a single column from a single row.

"XPath: the root selection (/) is not supported"

Refer to the topic in SQL Server Books Online that explains XPath Limitations.

"XPath: the attribute %1 cannot be selected from root. It must be selected from a containing element"

There can be no top-level attributes. Only elements can have attributes.

"XPath: ordinal (numeric) predicates are not supported"

Refer to the topic in SQL Server Books Online that explains XPath Limitations.

"XPath: the parameter %1 is undefined"

The parameter was used, but not defined anywhere.

"XPath: the type of the parameter %1 is not supported. XPath parameters must be of type WSTR"

Only string-valued parameters are supported in XPath queries.

"XPath: unable to find %1 in the schema"

The named element or attribute does not exist in the schema.

"XPath: conversion to type %1 cannot be performed"

Refer to the topic in SQL Server Books Online that explains XPath Data Types.

"XPath: unable to evaluate the text content of element %1"

"XPath: the use of idrefs/nmtokens %1 in the predicate is not supported"

Refer to the topic in SQL Server Books Online that explains XPath Limitations. The named element does not map to a single column in a single row of the database.

"XPath: uncorrelated query in predicate is not supported. Read the documentation for details"

Refer to the topic in SQL Server Books Online that explains XPath Limitations. XPath cross-products are not supported in SQL Server 2000.


MSXML Errors Detected During XPath Processing

"MSXML2: %1 is an invalid or unsupported XPath"

Either the XPath contains an error or it contains constructs that MSXML2 does not support.


ODBC Error Messages

SQLERROR returns SQLSTATE values as defined by the X/Open and SQL Access Group SQL CAE specification (1992). SQLSTATE values are strings that contain five characters. The following table lists SQLSTATE values that a driver can return for SQLError.

The character string value returned for SQLSTATE consists of a two-character class value followed by a three-character subclass value. A class value of 01 indicates a warning and is accompanied by a return code of SQL_SUCCESS_WITH_INFO. Class values other than 01, except for the class IM, indicate an error and are accompanied by a return code of SQL_ERROR. The class IM is specific to warnings and errors that derive from the implementation of ODBC. The subclass value 000 in any class is for implementation defined conditions within the given class. The assignment of class and subclass values is defined by SQL-92.

Note Although successful execution of a function is indicated typically by a return value of SQL_SUCCESS, the SQLSTATE 00000 also indicates success.

SQLSTATE | ODBC API (Driver Manager) error
00000 | Success
01000 | General warning
01002 | Disconnect error
01004 | Data truncated
01006 | Privilege not revoked
01S00 | Invalid connection string attribute
01S01 | Error in row
01S02 | Option value changed
01S03 | No rows updated or deleted
01S04 | More than one row updated or deleted
01S05 | Cancel treated as FreeStmt/Close
01S06 | Attempt to fetch before the result returned the first rowset
07001 | Wrong number of parameters
07006 | Restricted data type attribute violation
07S01 | Invalid use of default paramater
08001 | Unable to connect to data source
08002 | Connection in use
08003 | Connection not open
08004 | Data source rejected establishment of connection
08007 | Connection failure during transaction
08S01 | Communication link failure
21S01 | Insert value list does not match column list
21S02 | Degree of derived table does not match column list
22001 | String data right truncation
22002 | Indicator variable required but not supplied
22003 | Numeric value out of range
22005 | Error in assignment
22008 | Datetime field overflow
22012 | Division by zero
22026 | String data, length mismatch
23000 | Integrity constraint violation
24000* | Invalid cursor state
25000 | Invalid transaction state
28000 | Invalid authorization specification
34000 | Invalid cursor name
37000 | Syntax error or access violation
3C000 | Duplicate cursor name
40001 | Serialization failure
42000 | Syntax error or access violation
70100 | Operation aborted
IM001 | Driver does not support this function
IM002 | Data source name not found and no default driver specified
IM003 | Specified driver could not be loaded
IM004 | Driver's SQLAllocEnv failed
IM005 | Driver's SQLAllocConnect failed
IM006 | Driver's SQLSetConnectOption failed
IM007 | No data source or driver specified; dialog prohibited
IM008 | Dialog failed
IM009 | Unable to load translation DLL
IM010 | Data source name too long
IM011 | Driver name too long
IM012 | DRIVER keyword syntax error
IM013 | Trace file error
S0001 | Base table or view already exists
S0002 | Base table not found
S0011 | Index already exists
S0012 | Index not found
S0021 | Column already exists
S0022 | Column not found
S0023 | No default for column
S1000 | General error
S1001 | Memory allocation failure
S1002 | Invalid column number
S1003 | Program type out of range
S1004 | SQL data type out of range
S1008 | Operation canceled
S1009 | Invalid argument value
S1010 | Function sequence error
S1011 | Operation invalid at this time
S1012 | Invalid transaction operation code specified
S1015 | No cursor name available
S1090 | Invalid string or buffer length
S1091 | Descriptor type out of range
S1092 | Option type out of range
S1093 | Invalid parameter number
S1094 | Invalid scale value
S1095 | Function type out of range
S1096 | Information type out of range
S1097 | Column type out of range
S1098 | Scope type out of range
S1099 | Nullable type out of range
S1100 | Uniqueness option type out of range
S1101 | Accuracy option type out of range
S1103 | Direction option out of range
S1104 | Invalid precision value
S1105 | Invalid parameter type
S1106 | Fetch type out of range
S1107 | Row value out of range
S1108 | Concurrency option out of range
S1109 | Invalid cursor position
S1110 | Invalid driver completion
S1111 | Invalid bookmark value
S1C00 | Driver not capable
S1DE0 | No data at execution values pending
S1T00 | Timeout expired

* In SQL Server Enterprise Manager, you may receive the "Invalid cursor state" error message when Microsoft® SQL Server™ runs out of resources while attempting to save selected tables or a database diagram. This error is returned because of insufficient space in your database or transaction log to complete the save process. To correct this problem, check to see if the database or the transaction log is full. If so, increase the size of the database to accommodate the change. Check other system resources or contact your system administrator.

In addition to the standard ODBC error messages located in your ODBC programmer's reference documentation, the SQL Server ODBC driver can return error messages for certain SQLSTATE values, as shown in this table.

SQLSTATE | SQL SERVER DRIVER ERROR | Description
01000 | %ld rows sent to SQL Server. Total sent: %ld. | A batch size of rows have been sent to SQL Server using the BCP API.
01000 | %ld rows successfully bulk-copied to host-file. Total received: %ld. | A batch size of rows have been written to the host file using the BCP API.
01000 | Access to database configured in the DSN has been denied. Default used. | Either the database does not exist or the user does not have permission to access the database. The default database configured for the login ID was used.
01000 | An error has occurred during an attempt to access the log file, logging disabled. | The log file for driver statistics or long-running queries could not be used. The logging of driver statistics or long-running queries has been disabled.
01000 | Connected to backup server. | The SQL Server primary server was not available, so the connection was made to the fallback server.
01000 | Language configured in the DSN is not supported. Default used. | Either the language name is invalid or the language is not installed on the server. The default language configured for the login ID was used.
01000 | Null bit data forced to zero. | A bit field containing a NULL is being loaded to a server that does not support NULL bit data. The field was set to zero.
01000 | Procedure executed with 'EXEC'. No output parameters returned. | The procedure could not be executed as an RPC and output parameters were specified. Because the procedure had to be executed with EXEC, no output parameters will be stored.
01000 | SQL Debugging disabled. | SQL Debugging could not be enabled, probably because the SQL Server is not configured for SQL debugging.
01000 | The ODBC catalog stored procedures installed on server %s are version %s; version %02d.%02d.%4.4d or later is required to ensure proper operation. Please contact your system administrator. | Install the ODBC catalog stored procedures by executing \Msqql\Install\Instcat.sql.
01000 | Zero length data forced to length 1. | A zero-length binary or character field is being loaded, but zero-length data is not supported. The field was forced to a 1 byte blank or binary zero.
01S02 | Cursor concurrency changed. | The application requested a concurrency that could not be honored because of the type of request or query. A different concurrency was used instead.
01S02 | Cursor type changed. | The application requested a cursor type that could not be honored because of the type of request or query. A different cursor type was used instead.
01S02 | Packet size change not honored by server, server size used. | The application requested a nondefault packet size that could not be supported by SQL Server. The server default size was used instead.
01S02 | Packet size changed. | The application requested a nondefault packet size that was outside of the limits of allowable size. Either the smallest or largest packet size was used instead, depending if the requested size was too small or too large.
01S02 | Login timeout changed. | The application requested a login time-out that was too large. The maximum login time out was used instead.
07006 | Conversions not allowed using bcp_moretext. | The application using bcp_moretext must have the same field type as it does the column type.
08004 | Server rejected the connection; Access to selected database has been denied. | Either the database does not exist or the user does not have permission to access the database.
08004 | Server rejected the connection; Language specified is not supported. | Either the language name is invalid or the language is not installed on SQL Server.
HY024 | Database is invalid or cannot be accessed. | Either the database does not exist or the user does not have permission to access the database.
IM006 | Packet size change not supported by server, default used. | The application requested a nondefault packet size that SQL Server does not support. The client default size was used.
HY000 | All bound columns are read-only. | There must be an updatable column to use SQLSetPos or SQLBulkOperations to change or insert a row.
HY000 | An old netlib (%s) has been detected. Please delete it and restart the application. | The netlib that was being loaded was out of date. The driver requires a newer netlib. The problem could be a netlib in the current directory of the application, which is being loaded instead of the one in the system directory, or it could be that the netlib was not installed properly or is corrupted. If the netlib specified in the error text exists elsewhere than in the Windows system directory, delete it. If the netlib exists only in the system directory, install the client utilities on the client and restart the application.
HY000 | Attempt to bulk-copy a NULL value into a Server column which does not accept NULL values. | The field contains a NULL value, but the column does not allow NULL values.
HY000 | Attempt to bulk-copy an oversized column to the SQL Server. | The length supplied for a column is larger than the column definition in the table.
HY000 | Attempt to read unknown version of BCP format file. | The header line in the bcp format file was not a recognized version.
HY000 | Bad bulk-copy direction. Must be either IN or OUT. | The bcp_init call did not specify a valid direction for the eDirection parameter.
HY000 | Bad terminator. | The terminator string supplied in bcp_bind is invalid.
HY000 | Bcp host-files must contain at least one column. | No columns were selected to be loaded.
HY000 | Cannot generate SSPI context. | The driver could not obtain an SSPI context required for integrated security. The native error will contain the Win32 error code.
HY000 | Cannot initialize SSPI package. | The driver could not obtain an SSPI context required for integrated security. The native error will contain the Win32 error code.
HY000 | Communication module is not valid. Driver has not been correctly installed. | The network library .dll is corrupted. Install the client utilities on the client and restart the application.
HY000 | Connection is busy with results for another hstmt. | The SQL Server ODBC driver allows only one active hstmt. For more information, see Using Default Result Sets.
HY000 | Connection is not enabled for BCP. | The application using the BCP API must set the SQLSetConnectAttr or SQL_SS_COPT_BCP attribute before connecting.
HY000 | Failure during closing of connection. | The ConnectionClose function in the network library failed. This problem is typically caused by a network or SQL Server problem.
HY000 | For BCP, all variable-length data must have either a length-prefix or a terminator specified. | bcp_bind was called with SQL_VARYLEN_DATA, but neither a prefix length nor a terminator was specified.
HY000 | Host-file columns may be skipped only when copying into the server. | A bcp out format file specified that a column should be skipped. This is not allowed. Either create a view containing only the desired columns and bcp out from that view, or use the -Q flag to provide a SELECT statement selecting only the desired columns.
HY000 | Incorrect host-column number found in BCP format-file. | The format file contains a column number greater than the number of columns in the table.
HY000 | I/O error while reading bcp data-file. |
HY000 | I/O error while reading BCP format file. |
HY000 | I/O error while writing bcp data-file. |
HY000 | I/O error while writing bcp error-file. |
HY000 | Invalid option. | The eOption parameter to bcp_control was not valid.
HY000 | Non-default parameter not allowed after default parameter. | Parameters to a stored procedure cannot have a non-default value after any preceding parameter has been specified with the default value.
HY000 | Not enough columns bound. | For a bcp out, not all columns of the table were bound. Either create a view which contains only the desired columns and bcp out from that view or, use the -Q flag to provide a SELECT statement selecting only the desired columns.
HY000 | ODBC BCP/Driver version mismatch. | The Sqlsrv32.dll and Odbcbcp.dll .dlls do not have identical versions. Install the client utilities on the client and restart the application.
HY000 | Protocol error in TDS stream. | The TDS stream from the server is invalid. This problem is typically caused by a SQL Server problem. Check the SQL Server error log.
HY000 | Table contains less rows than first row count. | A starting row number was supplied, but the table on the server did not contain that number of rows. No rows were copied to the host-file.
HY000 | Table contains less rows than last row count. | An ending row number was supplied, but the table on the server did not contain that number of rows.
HY000 | Table has no text/image columns. | bcp_moretext was called, but the table does not contain any text or image columns.
HY000 | TDS buffer length too large. | The TDS stream from the server is invalid. This problem is typically caused by a SQL Server problem. Check the SQL Server error log.
HY000 | Text column data incomplete. | The summation of the lengths supplied by bcp_moretext did not match the length supplied in bcp_bind or bcp_collen.
HY000 | The BCP host-file contains less rows than first row count. | A starting row number was supplied, but the host-file did not contain that number of rows. No rows were loaded.
HY000 | The row length exceeds SQL Server's maximum allowable size. | The summation of the data lengths for a row is larger than the maximum row size.
HY000 | The stored procedure required to complete this operation could not be found on the server (they were supplied with SQL Server). Please contact your system administrator. | Install the ODBC catalog stored procedures by executing \Msqql\Install\Instcat.sql.
HY000 | Unable to load communication module. Driver has not been correctly installed. | The network library .dll specified for the connection does not exist on this client. Install the client utilities on the client and restart the application.
HY000 | Unable to open BCP host data-file. | The file name specified in the bcp_init call does not exist or is opened by another application.
HY000 | Unable to open BCP error-file. | The error file name specified in the bcp_init call does not exist or is opened by another application.
HY000 | Unable to read driver version. | The driver was unable to read the version block in its .DLL. Install the client utilities on the client and restart the application.
HY000 | Unexpected EOF encountered in BCP data-file. | During a bcp in operation, end-of-file was detected on the data file while in the middle of processing the last row. This is typically caused by having a different number of columns, types, nullability, or sizes between the original table and the table being loaded.
HY000 | Unicode conversion failed. | An error occurred during conversion to or from a Unicode string. The native error will contain the Win32 error code.
HY000 | Unicode conversion failed. The code page of the SQL server must be installed on the client system. | The server code page must exist on the client for proper operation. Either clear the Auto Translate check box for the DSN or install the code page of the server on the client. The server code page can be determined by running EXEC sp_server_info 18.
HY000 | Unknown token received from SQL Server. | The TDS stream from the server is invalid. This error is typically caused by a problem on the server. Check the SQL Server error log.
HY000 | Warning: Partial insert/update. The insert/update of a text or image column(s) did not succeed. | A failure during insertion or update of a text, image, or ntext column occurred. That column will not contain the proper data. Roll back the transaction, if possible.


Finding Supplemental Error Message Information

Over time, more information about Microsoft® SQL Server™ error messages, either documented or not documented in this section, may become available.


Adding User-Defined Error Messages

User-defined error messages can be added to the sysmessages table using the system stored procedure sp_addmessage. At a minimum, you can specify the message number, the severity level, and the message text using sp_addmessage.

Similar to specifying user-defined error messages with RAISERROR, use error message numbers greater than 50000 and severity levels from 0 through 18. Only system administrators can issue RAISERROR with a severity level from 19 through 25.

See Also

sp_addmessage