ACC: Unexpected Stored Procedures Found in SysObjects TableID: Q96898
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
Unexpected stored procedures with the general format ODBC#<login ID>nnnnnnn
are found when you query the SysObjects table in SQL Server. For example,
if you issue the following query from SQL Administrator Facility (SAF)
SELECT * FROM SysObjects WHERE Name LIKE "ODBC%"
ODBC#sa24518
ODBC#sa2334
ODBC#sa17854
When Microsoft Access runs a parameter query, it calls the ODBC function
SQLPrepare(), which creates and compiles stored procedures. These stored
procedures pass the proper parameter arguments to ensure proper execution
of the query.
These stored procedures are normally deleted once the ODBC connection is
closed. However, if any action, including the following, causes the ODBC
connection to be dropped abnormally, the stored procedures may not be
deleted:
DROP PROCedure [owner.]procedure_name[, [owner.]procedure_name...]
DROP PROC ODBC#sa24518, ODBC#sa2334
use <dbname>
go
select char(13) + char(10) + "go" +
char(13) + char(10)+ "drop procedure " + name +
char(13) + char(10) + "go" +
char(13) + char(10)
from sysobjects
where name like "ODBC%"
go
1> 2> 1> 2> 3> 4> 5> 6> 7>
----------------------------
go
drop procedure odbc#JOE61375
go
go
drop procedure odbc#JOE65224
go
go
drop procedure odbc#JOE67088
go
go
drop procedure odbc#JOE69907
go
Keywords : kbusage OdbcOthr
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: March 20, 1999