Native Error 5701
and 5703 that show in the DEXSQL.LOG? ★★★★★★★★★★★★★★★ David Musgrave11 August 20093 Share 0 0 If you have looked a DEXSQL.LOG file to see the communication between SQL Server and the Microsoft Dynamics GP application, you might have noticed messages with errors 5701 and 5703 being reported. See the example below: /*/* Date: 08/10/2009 Time: 20:09:49 SQLSTATE:(01000) Native Err:(5701) stmt(0):*/[Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to ‘master'.*//*/* Date: 08/10/2009 Time: 20:09:49 SQLSTATE:(01000) Native Err:(5703) stmt(0):*/[Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to us_english.*//* You mightwonder if these errors signify a problem. Well, you can relax as they are purely informational and can be ignored. The following comes from Microsoft Knowledge Base (KB) article 143339 (link below): SQL Server always issues at least two informational messages on a successful connection from any ODBC or DB-library client: A 5701 message, indicating which database on the server the user has been logged into, and a 5703 message, indicating what language the server is using. Applications can simply ignore these 5701 and 5703 messages, they are purely informational. The default database and language settings are controlled by the Login Properties for the user. From Microsoft SQL Server Management Studio, select the [Server] >> Security >> Logins >> [User], right click and select Properties. In the General page, you will find the Default database and Default language settings. The default database can be overridden using the ODBC (Open DataBase Connectivity) DSN (Data Source Name) setting for Default Database. If a default database is defined at the ODBC level it must be either the DYNAMICS or master database. Using any other database can cause issues, especially if the user does not have access to the database. For more information, please see the following Knowledge Base article: INF: ODBC Messages on SQL Server Connections (KB 143339) David
Tags Application SQL Comments (3) Cancel reply Name * Email * Website Janakiram M.Pfiles Error: "Changed database context to 'master'" Daniel SUN04-17-2006, 11:10 PMIn installation package, there are two SQL scripts to create and initialize 2 databases. But the installer would throw a error "Changed database context to 'master'" sometimes. The issue does not always happen. And the SQL Scripts can be executed in SQL Query Analyzer successfully every time. How to resolve or avoid the problem? The database software is MSDE-SP4. Thanks~! hidenori04-27-2006, 02:50 AMWould it be possible for you to email me a sample project with https://blogs.msdn.microsoft.com/developingfordynamicsgp/2009/08/11/what-are-errors-5701-and-5703-that-show-in-the-dexsql-log/ which this can be reproduced at hidenoriy@macrovision.com? I will look into it to see what is causing the problem. Thank you. koen0105-15-2006, 04:53 AMHi, I also have the SQL script error: Error 27506. Error executing SQL script Axxium60Inst.sql line 13. Changed database context to 'master' (5701) This only happens when I reinstall my product after it was uninstalled. Is https://community.flexerasoftware.com/archive/index.php?t-158356.html there already a solution for this ? hidenori05-15-2006, 02:33 PMkoen01, Would it be possible for you to email me a sample script with which this can be reproduced at hidenoriy@macrovision.com? I will look into it to see what is causing the problem. Thank you. koen0105-17-2006, 02:01 AMBy looking at the logging, I found the problem. The error in the messagebox is not the real cause of the abort. There's another error in the SQL script and this one is the cause of the problem. It's confusing that not the real error is displayed. By solving that other problem, the install runs ok. Here, an extract of the logging: 1: Start executing SQL script file: 'D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\~10.tmp' 1: ADO Error: Number: 0 Description: Changed database context to 'master'. Source: Microsoft OLE DB Provider for SQL Server SQL State: 01000 Native Error: 5701 1: ADO Error: Number: -2147217900 Description: There is already an object named 'xp_EncryptVmPwd' in the database. Source: Microsoft OLE DB Provider for SQL Server SQL State: 42S01 Native Error: 2714 1: There was a SQL scripting error
completed successfully, possibly with a nonfatal error (warning). The Client will sometimes suppress such warnings http://docs.attachmate.com/databridge/6.2/errors/20769.htm if they are expected; in all other cases, these warnings are displayed. SQL_ERROR indicates that the call encountered an error. In case of errors, the Client will interrogate ODBC to get the details of the error it displays. Diagnostic messages may include several error messages. native error Each of these errors includes an SQLSTATE that provides detailed information about the cause of a warning or error and a diagnostic message that includes a native error code (generated by SQL Server). An example of such an error is: RetCode = SQL_SUCCESS_WITH_INFO, SQLState = 01000; native error 5701 native_error = 5701, error = [Microsoft][SQL Native Client][SQL Server]Changed database context to 'TESTDB'. This message is generated when the Client connects to the database. The native error of 5701 is generated by SQL Server. The following example illustrates an error that typically occurs during the fixup phase. The client suppresses such messages during the fixup phase, but displays them during the change tracking phase. RetCode = SQL_ERROR, SQLState = 23000; native_error = 2601, error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'customer' with unique index 'customer_set'. In some situations you may get multiple error messages caused by the same event. These kinds of error messages are generated at different levels of the ODBC interface. The Client uses the native_error code in all cases that involve errors generated by the database.