error:25 connection string is not valid

  • I am using SQL server 2012 with Visual Studio 2012 to run my codes. I got error when I try to communicate with the server. Error message is Error-25 connection string invalid.

    I tried to search the solution for fixing this. I have tried several resolutions but haven’t succeed yet.

    I have tried some workaround :

    -Set my application pool identity to Network Service.

    -ModifiedConnString (Here I changed to

    Server=SERVERNAME\\MSSQLSERVER;Database=UserAccounts;User Id=SA;

    Password=PASSWORD;

    (note: I can’t use single slash when giving Server name because it is giving me syntax error)

    -Enabled "SQL Server and Windows Authentication Mode" in SSMS

    -Enabled remote access of sql server property from SSMS

    -Enabled Name Pipes and TCP/IP(1433) form sql server configuration manager(SSCM) .

    -Set some Inbound rule in Firewall: for SQL 1433 , and

    for ReportServer(TCP on Port 80)

    -Restarted Server Instance Service in SSCM

    -Made Sure my UserAccounts Table Db exist.

    Still I am getting Error-25 connecting string invalid.

    Looks like my connection string is incorrect. I referred to connection to a SQL Server instance example from connection strings.com .

    references:

    http://stackoverflow.com/questions/16256533/a-network-related-or-instance-specific-error-occurred-while-establishing-a-conne /url]

    https://www.connectionstrings.com/sql-server-2012/

    Is there any other way I can fix it?

  • To connect to a default instance, you don't need to specify "MSSQLSERVER" as the instance name: instead of Server=SERVERNAME\\MSSQLSERVER use Server=SERVERNAME

    -- Gianluca Sartori

  • Thanks for your reply. Meanwhile my PDB is not loading properly and the methods including connecting with database seems not working.

    Rgds,

  • Are you sure you're using the right account?

    Many DBAs disable the SA account. If yours is disabled, then using that in your connection string is always going to end in failure.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Have already enabled Window Authentication and SQL Server and Window Authentication mode. I’ve resolved it. the problem is PDB file failure. After refreshing the file, it starts loading properly.

  • Glad you got it working.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 6 posts - 1 through 5 (of 5 total)

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