web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Problem connecting to database after backup/restore to another server

(0) ShareShare
ReportReport
Posted on by

Hi all,

CRM 2013 (6.0.2.51)
SQL 2012 SP1

I recently moved the CRM database out of a cluster setup into a stand alone SQL server. It's actually one of the SQL server cluster nodes, so it's the same server, just with SQL re-installed and a backup/restore of the CRM database and permissions.

CRM can no longer connect to the database, and I can't even connect to the SQL server from Deployment Manager to try re-importing the organization. From Deployment Manager, when I put in the shortname of the SQL server (which is an A record in DNS that points to a secondary IP on the servers only NIC), it fails with the following error:

"The Import Organization Wizard cannot connect to the SQL Server or cannot find an organization database on SQLNAME. Verify that the server name in the SQL Server box is correct and that the computer is running Microsoft SQL Server where an organization database is stored.

The service account I'm running Deployment Manager as, is an admin on the CRM server and the SQL server. SysAdmin on the SQL instance. I've also added it to the SQLAccessGroup AD group. I have no internal firewalls in place and Windows firewall is disabled.

The only difference between this setup and the previous clustered setup is this; When I installed the standalone instance (same default instance name MSSQLSERVER), I bound it to listen only on the secondary IP of the SQL server. I did this because I have multiple IP's listening both on the default SQL port, but their own IP address, so you don't have to specify an instance name when connecting. Before this, it was the same setup but the DNS name resolved to the SQL cluster IP address.

From Deployment Manager, some things I've noticed are;

When I put in the DNS shortname, and attempt to view the databases available, it errors out with the "cannot connect" message.

When I put in the DNS fqdn, it let's me browse the database and see the existing Organization database. I select it, and run through the wizard, but at the end it errors out again when verifying the SQL connection. I'm assuming it's using the short name again when checking.

In regards to the changes that I mentioned I've made, is there something that would cause CRM to not be able to browse an instance using the DNS shortname, where on the SQL side it's listening on a secondary IP address?

FYI, this is the error message in the logs when I attempted to enter in the shortname\MSSQLSERVER in Deployment Manager.

13:03:27|  Error| HResult=80004005 The Import Organization Wizard cannot connect to the SQL Server or cannot find an organization database on SQLNAME\MSSQLSERVER. Verify that the server name in the SQL Server box is correct and that the computer is running Microsoft SQL Server where an organization database is stored.System.Data.SqlClient.SqlException (0x80131904): 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: SQL Network Interfaces, error: 25 - Connection string is not valid) ---> System.ComponentModel.Win32Exception (0x80004005): The parameter is incorrect

I've also tested by backing up/restoring the org database to a different instance on the same server and granting the service account sysadmin permissions. When I open deployment manager and specify that instance, it's able to enumerate the databases in the list using the DNS shortname.

Only difference between that instance and the other one, is that the DNS record for that one points to the servers primary IP address, and it was the first SQL instance that was installed. (I installed the named instance first, and the default instance second when I was migrating stuff over).

That's everything I can think of to describe what's happening, but I'm pretty much stumped right now. Any help would be much appreciated.

Thanks,

Jared

*This post is locked for comments

I have the same question (0)
  • Royal King Profile Picture
    27,686 on at

    Are you able to ping the Sql server from the CRM server and also try to access your sql server remotely?

  • Community Member Profile Picture
    on at

    Hi Chitrarasan,

    Thanks for the reply. I can ping the server successfully. I just tried testing the connection with a .UDL file. While logged in as the service account, I was able to connect (using the short name) and see all the databases on the server.

    Thanks,

    Jared

  • Suggested answer
    Community Member Profile Picture
    on at

    Just wanted to follow-up on this. It appears this may be the issue. Since I'm really trying to deal with the DB move I dealt with those particular steps instead. Move the DB, and repoint through the registry and the config DB if necessary.

    As for the import issue failing using the DNS name, I found this:

    blogs.msdn.com/.../installing-crm-using-sql-server-dns-alias.aspx

    I didn't actually go through the import process to try it out, as I don't think I need to at this point, but it was able to at least enumerate the DB's when I used just the server name. I'm assuming that it would complete the checks successfully, and then like the blog says, I'd just have to change it after the fact. Sounds like what is needed to do when using SQL Availability Groups as well.

    I may test it later just to confirm.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans