Error 2812

Severity

16

Message text

Stored procedure '%.*s' not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

Explanation

This error occurs when you attempt to execute a stored procedure that does not exist. If the procedure actually does exist, that is, it appears when sp_help is run with no parameters, error 2812 can occur if the procedure name was not fully qualified.

Adaptive Server’s naming convention for database objects is:

<database>.<owner>.<object_name>.<column_name>

The default value for <database> is the current database and the default value for <owner> is the current user. Remember that the owner is part of the object, so two different users can have two different procedures with the same <object_name> in the same database, for example user1.proc1 and user2.proc1.

If the procedure is not owned by the user attempting to execute it, and the procedure is not owned by the database owner (“dbo”), then all references to it must include the owner name. For example, user1 creates a procedure called proc1. Any users other than user1 must prefix the procedure name with the owner name when executing it; that is, exec user1.proc1.

System stored procedures are an exception to the naming convention. These procedures reside in the sybsystemprocs database, are owned by the Sybase system administrator, and have names starting with “sp_”. You can execute system stored procedures from any database and they will reference the system catalog of the current database. The search path for all system stored procedures (sp_*) is the:

  1. Current database

  2. sybsystemprocs database

  3. master database

If error 2812 occurs when you run the installmaster script, the sp_configure procedure was not found. You can ignore this.

If error 2812 occurs when you try to dump or load a database, you may be trying to dump to an Adaptive Server rather than to a Backup Server.

Action


System stored procedures

If error 2812 occurs on system stored procedures, it may be resolved by running the installmaster script, which installs all system procedures and initializes various other Adaptive Server structures.


Backup Server

If error 2812 occurs when you perform a dump or load, you may be trying to dump to an Adaptive Server rather than to a Backup Server. Check your Backup Server assignment:

1> sp_helpserver SYB_BACKUP
2> go

The network_name column is the interfaces file that contains the entry for this server. Check the status of the server:

1> exec SYB_BACKUP...sp_ps
2> go

Open Server applications use the stored procedure sp_ps while Adaptive Servers do not. Therefore, if sp_ps fails because it is not found, most likely the server defined for syb_backup is an Adaptive Server and not a Backup Server. In that case:

  1. Find out how the Backup Server should be defined.

  2. Drop the syb_backup entry using sp_dropserver.

  3. Add the correct entry using sp_addserver.

Additional information

Refer to the Transact-SQL User's Guide for information about naming conventions.

Refer to the Reference Manual: Procedures for information about using sp_dropserver and sp_addserver.

Versions in which this error is raised

All versions