Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Application stopped working after backup and restoring the Database with another name

Application stopped working after backup and restoring the Database with another name

Scheduled Pinned Locked Moved Database
databasesysadminhelpsql-server
3 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    Hi, I have taken a backup of Database A from Server A1 then I restored this Database with name B on Server B1, now the application is working fine with Database A on Server A1 but not working with Database B on Server B1, I have checked the users, I have the users and I have given access to the users when it didn't work I have dropped the User which is connecting from Web application and recreated that user and granted the same permissions it had previously on this Database but still I am not able to use the application. Here is the error that I am getting:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    Any help would be greatly helpful thanks in advance. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

    Richard DeemingR 1 Reply Last reply
    0
    • I indian143

      Hi, I have taken a backup of Database A from Server A1 then I restored this Database with name B on Server B1, now the application is working fine with Database A on Server A1 but not working with Database B on Server B1, I have checked the users, I have the users and I have given access to the users when it didn't work I have dropped the User which is connecting from Web application and recreated that user and granted the same permissions it had previously on this Database but still I am not able to use the application. Here is the error that I am getting:

      A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

      Any help would be greatly helpful thanks in advance. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      indian143 wrote:

      Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

      It's nothing to do with the database - your code can't connect to SQL Server.

      • Check the name and instance name in your connection string.
      • Check that SQL Server on server B1 is configured to allow remote connections.
      • If you're using the Express version, check that the SQL Browser service is running on server B1.
      • Using the SQL Server Configuration Manager on server B1, check under "SQL Server Network Configuration" that there is at least one enabled protocol;
      • Using the SQL Server Configuration Manager on the client, check under "SQL Native Client Configuration" (both 64- and 32-bit) that at least one of the server protocols from B1 is enabled;
      • Check any firewalls between the client and the server;

      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      I 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        indian143 wrote:

        Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

        It's nothing to do with the database - your code can't connect to SQL Server.

        • Check the name and instance name in your connection string.
        • Check that SQL Server on server B1 is configured to allow remote connections.
        • If you're using the Express version, check that the SQL Browser service is running on server B1.
        • Using the SQL Server Configuration Manager on server B1, check under "SQL Server Network Configuration" that there is at least one enabled protocol;
        • Using the SQL Server Configuration Manager on the client, check under "SQL Native Client Configuration" (both 64- and 32-bit) that at least one of the server protocols from B1 is enabled;
        • Check any firewalls between the client and the server;

        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        I Offline
        I Offline
        indian143
        wrote on last edited by
        #3

        Yeah that's true I messed up connection string, thanks my friend. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups