Connection String worked with SQL2005 but not with SQL2012

  • I have an application for document management that when we index documents, we retrieve some info from SQL2012 tables.

    My connection string is:

    Driver={SQL Server};Server=SERVER8;Database=Live2012;Uid=Intact_Select;Pwd=1234;

    When I retrieve info from database to index a document I get error "the connection cannot be used to perform this operation. it is either closed or invalid in this context"

    Same connection string format works with SQL2005. I appreciate your help asap.

    Thanks and happy new year!

  • Hello,

    Please, could you provide more information about your problem ? For example :

    - the OS on which the SQL Server is installed and the OS for the computer on which you are executing your task

    if it is a Windows Server 2003 , I would suggest you to have a look at :

    http://support.microsoft.com/kb/839428 ( MDAC not updated )

    - the provider you are using to connect ( ADODB,...)

    if ADODB, I would suggest you to have a look at

    http://forums.aspfree.com/asp-development-5/adodb-recordset-error-800a0e7d-connection-cannot-used-perform-opera-514972.html

    - if it is inside in an application , the code related to the connection should be useful

    Have a nice day and happy new year

  • Hello and happy new year

    I am executing task from remote desktop on Server2008 Standard edition. On this server I have installed Document management

    that uses this connection string to access SQL2012 database that is on another server with Windows 2012

    As I noted before we had following string previously that worked and only difference was that the server that run database was

    Windows 2003 and database was SQL2005. So the only difference is the server that is hosting database and datbase version.

    Previouly I had this connection string:

    Driver={SQL Server};Server=SERVER7;Database=AXDB;Uid=Intact_Select;Pwd=1234;

    And now new script that pointing to new server with Windows2012 and SQL2012 is:

    Driver={SQL Server};Server=SERVER8;Database=Live2012;Uid=Intact_Select;Pwd=1234;

    This string is configurable inside Document management system and not in the code. Not sure about any database provider

    Hope this gives any idea for any possible solutions to try

  • Hello,

    I have done some research about Document Management but I am annoyed because I don't know the company which provided it , so it is difficult to find the good connection string even in http://www.connectionstrings.com/

    Thru http://search.yahoo.com/search;_ylt=Ap9Do80WtjKtHmn4lZ7nwp2vulI6?p=Document+Management&type=2button&fr=ush-mailn_02 , I found SharePoint 2013 and other products not Microsoft that I have never used.

    We need more information to try to help you more efficiently.

    Have a nice day

  • Have you checked with the application provider to a) confirm the application is SQL 2012 compatible and b) verified connection string changes for SQL 2012 that they recommend?

    Based on the database name, it appears the software you are looking at configuring is either Axapta or it is Dynamics AX. Unless you are using the latest version of Dynamics AX, it is not SQL 2012 compatible. And looking at the versions of Axapta that were available in SQL 2005, I would say that app is also not compatible.

    But these are just wild guesses at your application.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • You may need to install the new ODBC drivers for SQL 2012 from http://www.microsoft.com/en-gb/download/details.aspx?id=36434

    It will install a new ODBC driver called "ODBC Driver 11 For SQL Server" which you could try in place of "SQL Server" as the "Driver=" part of your connection string.

    I don't guarantee this is the solution, and it is your responsibility to read all about it first 😉

    Introducing the new Microsoft ODBC Drivers for SQL Server

    EDIT: This is a client install, not a server install.

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • Big change is probably the OS Win 2003 -> Win 2012 (change of SQL Server may have compatibility issues but they are more likely to show after connect because error you are getting is saying it ca't connect so at that point the application won't even know what server version it is.

    My guess is it may be something simple like the Win 2012 firewall blocking connections or the protocol not enabled on with new SQL server - make sure you can connect to the new server and db from chosen client with ISQL using the same credentials etc.

  • I have turned off windows firewall on the machine that is Windows 2012 and host SQL2012 that I am trying to access it but still same error 'The connection cannot be used to perform this operation. It is either closed or invalid in this context'.

    You mentioned other protocol may need to be enabled on SQL2012. Can you be more specific so I can try that as well.

  • Are you able to connect using ISQL or equivalent from the same client machine? As for protocol make sure TCP/IP is enabled in the SQL Server configuration manager, server network configuration

  • Now is working and not getting error. I restarted this document management application and is working. However now even after enabling firewall is working so need to see more what is happening but looks that I am close. Thanks all for your help

  • You might see something in the event logs (esp Application & Security logs) on the SQL server that hints at why it failed ... as for restart of firewall did you exit the doc management application and restart after reenabling the firewall? If not it may be that it blocked the new connection but did not block existing connections

  • Viewing 11 posts - 1 through 10 (of 10 total)

    You must be logged in to reply to this topic. Login to reply