2005-2-22 Development Diary: My stored procedure is located as follows: CREATE Procedure P_Job_scanMomessage AS
--- Step1: reading from an Oracle database records written up table: T_DWS_MO_Message INSERT INTO T_DWS_MO_Message (MO_Mobile, SMSContent, LinkID) Select MOMobile, Content, LinkID From openquery (hnoracle, 'Select * From MOMessage8') --- Step2 : Deleting uplink records on the Oracle database Delete from OpenQuery (HNoracle, 'Select * from master ") ..... Note: Two statements of the blue font part are operating Oracle Databases. Editing in SQLServer2000 Enterprise Manager The stored procedure always appears: SQL-DMO (ODBC SQLState: 42000) Error: 7405 异 异 要求 Requires ANSI_NULLS and ANSI_WARNINGS ........... solutions are as follows: Please create this in the query analyzer. The stored procedure will be modified in the enterprise management and query analyzer. For stored procedures, SQL Server uses the set ANSI_NULLS setting value when the stored procedure is originally created. Regardless of when the stored procedure is then performed, the settings of SET ANSI_NULLS are reduced to their original values and take effect. When you call SET ANSI_NULLS in the stored procedure, its settings do not change. When performing a distributed query, set ANSI_NULLS should be set to ON. The ANSI_WARNINGS should be set to ON when performing a distributed query. The ANSI_NULLS and ANSI_WARNINGS options in business management are not correct, but there is no way to change. In the query analyzer, you can set the ANSI_NULLS and ANSI_WARNINGS options, and the default value is right. So you can create such stored procedures in the query analyzer without creating such stored procedures at the Enterprise Manager.