using Mount-SPContentDatabase to change from dbname to db alias
Frage
Is it possible to change the content database of a site from a machine name to a SQL alias in SharePoint 2013?
The SharePoint admin content database is correctly configured. But I have a site(s) that is incorrectly configured using a machine name instead of an SQL alias.
Is it as simple as "Remove Content Database" then add content database using the SQL alias?
Lösung
No actually. When you add an SQL Alias to your server hosting Central Admin, you need to move ALL the databases to the new storage (provided that they are using the same database server)
The SQL Alias has nothing to do with the SQL Sever. It is a server feature where you point all your application to a different SQL Server. Not just SharePoint. What yoo do is that you tell the Server OS that MyOldDBServer from now on is located at MyNewDBServer. You don't have to change anything within applications; SharePoint or any other. SharePoint and other apps, still belive that they are communicating with MyOldDBServer.
Try the following CMD command on your computer:
- Run CLICONFG (on windows 7)
- Start Screen type CLICONFG (on Windows 8)
And you see this dialogue:
And you add the alias on the Alias tab:
That's it!
Well almost, backup the databases and then you have to shut down SharePoint through the action of disable services and stop the ISS before adding your SQL Alias. But that part you already know. If not - follow Todds blgg Moving SharePoint to a different SQL server.
Andere Tipps
Yes, that is a valid way of 'migrating' the database to the alias. Config/Admin are the only databases that cannot have the connection string change.