Microsoft KB Archive/873234

= You receive a &quot;Server: Msg 7212, Level 17, State 1, Line 1&quot; error message when you run an Oracle procedure from a computer that is running SQL Server 2000 =

Article ID: 873234

Article Last Modified on 3/23/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



SYMPTOMS
You run an Oracle procedure in an Oracle database. When you do this from a computer that is running Microsoft SQL Server 2000 by using a linked server to an Oracle database, you receive the following error message:

Server: Msg 7212, Level 17, State 1, Line 1 Could not execute procedure ' ' on remote server ' '.

[OLE/DB provider returned message: One or more errors occurred during processing of command.]

[OLE/DB provider returned message: Syntax error in {call...} ODBC Escape.]

The problem occurs if the linked server uses the Microsoft OLE DB Provider for Oracle (MSDAORA).

Note  is a placeholder for the name of the Oracle procedure that is in the Oracle database. is a placeholder for the name of the linked server that is present in the instance of SQL Server 2000 that links to the Oracle database server.



Steps to reproduce the behavior
  Create an Oracle procedure in an Oracle database server by using the following script: CREATE OR REPLACE PROCEDURE SP_EMP is m_count number; begin select count(*) into m_count from emp; dbms_output.put_line(m_count); end;  Create a linked server to the Oracle database server in SQL Server 2000.  Click Start, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager. In the left pane, expand Microsoft SQL Servers, expand SQL Server Group, expand the server where you want to create a linked server, and then expand Security. Right-click Linked Servers, and then click New Linked Server. The Linked Server Properties - New Linked Server dialog box appears. On the General tab, type in the Linked server box.

Note  is a placeholder for the name of the linked server that is present in the instance of SQL Server 2000 that links to the Oracle database server. Under Server type, click Other data source.</li> In the Provider name list, click Microsoft OLE DB Provider for Oracle.</li> In the Product name box, type Oracle .</li> In the Data source box, type the name of the Oracle database server that you want to connect to.</li> In the Provider string box, type the provider string for the Oracle database server.</li> On the Security tab, click Be made using this security context under For a login not defined in the list above.</li> Type in the Remote login box, and then type  in the With password box.

Note  is a placeholder for the user name that you use to log on to the Oracle database server. is a placeholder for the password that is you use to log on to the Oracle database server.</li> On the Server Options tab, click to select the RPC Out check box under Option Name, and then click OK.</li> Quit Enterprise Manager.</li></ol> </li> Run the Oracle procedure. <ol style="list-style-type: lower-alpha;"> Start SQL Query Analyzer.</li> In the query window, type the following:

exec .. .sp_emp;

</li> On the Query menu, click Execute. You notice the error message that is mentioned in the &quot;Symptoms&quot; section.</li></ol> </li></ol>

<div class="references_section">