[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 846
  • Last Modified:

Moved Sharepoint databases, need to update connection string

I split a single Team Foundation Server into 2 tiers and put the SQL data on its own server.  This works fine except Sharepoint (WSS 3.0) is filling up the event logs with the following error when SQL services are stopped on the old server, we'll call OLDSERVER:

Cannot connect to SQL Server. OLDSERVER not found. Additional error information from SQL Server is included below.

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

But I don't want it to connect to OLDSERVER, I want it to connect to the new SQL server.  I ran the Sharepoint Products and Technologies Configuration Wizard and it says it's getting WSS_Config and content from NEWSERVER, not OLDSERVER.

If I start SQL services on OLDSERVER I get an "access denied" error when connection to SQL in the event log.

So if Sharepoint config wizard says it's pointing to NEWSERVER, and the content database from Central Administration says it's pointing to NEWSERVER, then why is it still trying to connect to OLDSERVER?
  • 3
  • 3
1 Solution
bigbigpigAuthor Commented:
To add... if SQL services are stopped on OLDSERVER then the Sharepoint content pulls up just fine, but Central Administration doesn't work... database error.
On point is, if you have moved all databases to a new server, to set an Alias Name für your SQL Server on the new SQL Server machine for the SQL Native Client Configuration.

To do so
Open the SQL Server Configuration Manager, expand SQL Native Client Configuration, right click Alias and then new Alias..., set the old SQL as new Alias Name.

The problem will be, that the database name is stored in the Sharepoint database.

for the whole procedure....
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

bigbigpigAuthor Commented:
In the next few weeks I plan to replace this server completely, so I don't need anything pointing to the old server name.  If I set up an alias then it'll break again when I shut down the old server, right?
I know, setting the alias does not break anything, but it will stay there until the death...
Splitting with alias names may not work, because you can not take the same alias on different SQL Servers.

The setting for the Database server is in the SharePoint Config Database in the table "Objects".
You can not edit this value, because it is overwritten again.

You can try to use the stsadm command from the second link to dettach / reattach the config database.

The other option would be to export all content on the old Sharepoint and reimport it on a new one. As Sharepoint 2007 allows only a complete export / import, you may have a look here for a partitial export / import.
These tools extend the stsadm
bigbigpigAuthor Commented:
I ended up doing this alias to make it work for now.  Some time in the near future I'll look to kill the old server entirely but this is working good for now.

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now