I have been searching for directions and steps to rename a named server instance of SQL Server 2012. I have a rare opportunity to rename both the computer name and instance of the SQL Server. I stepped into a situation where all of the naming conventions need to be revamped. I'm assuming because I have no linked jobs or connections that I should be worried about, this will be okay. I have read that this isn't possible and others who say to use the sp_dropserver, sp_addserver but that doesn't work. Syntax would be helpful. My names are as such:
{machinename}\{instancename}
{COLO-VSR=SQLDW}\{SQLBISERVER}
I want to change it to {COLO-VSR-SQLDW}{SQLDW}
The "safest" way to do this is to (this does assume that downtime is possible for you):
Take a backup of each database (or, if you're going to install exactly the same version of SQL Server, including Service Pack level, detaching the databases is probably safe
Take the old instance offline
Rename the machine, including rebooting as required
Install the new instance of SQL Server
Restore the databases to the new instance of SQL Server
Validate
7. Uninstall the old instance of SQL Server
SQL Server has never seemed to handle renaming of the server it's installed on particularly well, hence the suggestion of creating a new SQL Server instance after renaming the machine. This may be better with newer, e.g. SQL Server 2016, versions but I suspect that "rename machine" is a scenario that doesn't get a lot of engineering priority or resource.
Related
Does the change of the host name of the server impact the functioning of Microsoft SQL Server?
Yes, there are some additional steps that you need to perform after changing the host name.
I could not find the relevant documentation for SQL Server 2012 online any more, but here is the official document for SQL Server 2016-2019:
Rename a Computer that Hosts a Stand-Alone Instance of SQL Server
In a nutshell, you need to execute
sp_dropserver <old_name\instancename>;
GO
sp_addserver <new_name\instancename>, local;
GO
to update system metadata and then restart SQL Server.
Additional steps (see the linked document above) might be necessary if you use:
a failover cluster,
replication,
Reporting Services,
database mirroring,
Windows groups containing a hard-coded reference to the computer name,
remote logins,
linked server configurations or
named pipes.
Obviously, the connection strings of any clients connecting to your server will need to be updated as well.
We have an application called IpSwitch Whatsup and it's installed in a machine that I can connect to remotely as administrator. This is all in our intranet.
We need to connect to the sql server database being used by IpSwitch Whatsup, but this particular machine doesn't have sql server installed. On the other hand, in sql server configuration manager there is indeed a sql server installation for whatsup (the entry says SQL Server (WHATSUP)).
So, two questions:
How does one go about in connecting to this database? I'm pretty sure I know the name of the database and I already know the server name and instance, so I would like to connect to this DB from a sql server installation in another machine.
How does one configure a sql server installation to receive remote connections if it doesn't have sql server installed?
Thanks.
For the first question, you just type in (or browse) the appropriate instance name and authentication options using SSMS - which is the GUI tool used to manage sql server instances. Note - the term "sql server installation" can mean different things so it is not a useful reference.
As for the second question, review the information here. Note that any task you do in SSMS can be done via tsql - you can see the appropriate commands using the script button in the SSMS dialog windows.
And you can also (and probably should based on these questions) install SSMS on the same machine as your server instance so you can do "anything" "anywhere". Now would probably be a good time to review your disaster recovery options (and start backing up your databases regularly).
I need to uninstall SQL Server 2012 on computer with Windows Server 2008, but I need to leave all existing databases. In other words, I need to remove SQL Server, but without deleting all data. How could I manage that? Also, where should be all databases phisically(.mdf files)?
Unless you have or can take backups then you could:
Shut down your database instance using SQL Server Configuration
Manager.
Find where your database files are located and copy these safely
somewhere.
At this point you could try mounting these on an alternative (test) SQL
Server (using the SQL Server 'Attach Database'). This will give you
confidence that the re-install will work on whatever SQL Version you
are planning to move them to.
Then as others have stated, uninstall SQL Server
Reinstall
Re-attach
NOTE - this does not preserve instance level security, so you will need to script out any special security settings for these databases and then re-import it back in (See https://dba.stackexchange.com/questions/58772/how-to-export-all-the-security-related-information-from-a-sql-server-database).
Detach Databases ,keep Database files , run controlpanel program and feature and unistall it.
"The Resource database is a read-only database that contains all the system objects that are included with SQL Server" [1]
This sounds that one database from one instance (which one?) contains all information on the whole SQL Server, though I observe that each instance has its own Resource database copy.
Is this phrase "with SQL Server" incorrect and should be read as "with instance of SQL Server"?
"In earlier versions of SQL Server, upgrading required dropping and creating system objects. Because the Resource database file contains all system objects, an upgrade is now accomplished simply by copying the single Resource database file to the local server" [1]
Exactly which system objects were dropped when upgrading from SQL Server 2000 to 2005? Please give me a link describing it.
Where is the procedure describing simple copying of one Resource database (and which one?) in upgrading from SQL Server 2005 to 2008, or from 2008 to 2008 R2? Please give me a link.
How is the procedure Moving System Databases[2] to be understood?
[1]
Resource Database (SQL Server 2008 R2 Books Online)
http://msdn.microsoft.com/en-us/library/ms190940.aspx
[2]
Moving System Databases (SQL Server 2008 R2 Books Online)
http://msdn.microsoft.com/en-us/library/ms345408.aspx
http://msdn.microsoft.com/en-us/library/ms345408.aspx
You don't copy the resource database: it's an installable by service packs and hotfixes etc. It's not an actual database in the same concept as master or "MyDB". This is why you don't see it in SSMS.
Don't get hung up on it: it's of no relevance day to day. Really. Unless you are moving master which should be quite rare of course, especially if you have "standard" build. This is straightforward: if you don't understand, don't do it. There is not much we can add.
See these Kalen Delaney and Unnamed (although I disagree with some of that)
As for what system objects..
most "system tables" still work in SQL Server 2005 says MSDN.
what was discontinued
what will be removed/are deprecated
Very little of relevance. sys.segments goes back to SQL Server 6.5 for example.
This is a continuation of an earlier question I had about moving the databases for a MOSS 2007 installation from SQL 2000 to SQL 2005. Here's the URL for the original question: Migrating MOSS 2007 from SQL 2000 to SQL 2005
In my test environment, I've successfully moved the databases to the SQL 2005 test machine and things appear to be working fine. But, on the "Servers in Farm" page of the Central Admin | Operations, it still shows the old (i.e. SQL 2000) server as the Configuration Database Server. Also, it shows the old config database as being the Configuration Database. I know that the SQL2000 server and old config database (that are showing on this page) are NOT being used, because we've deactived the SQL instance in SQL2000.
I've tried "removing" the server, and get a message about "Uninstalling SharePoint products and technologies" being the better route. So, I disconnected from the test databases, uninstalled SharePoint from the test WFE server, and reinstalled it. That didn't do anything. Before uninstalling/reinstalling I also tried simply rerunning the SharePoint Configuration wizard, and that didn't do anything either.
Does anyone know how to update the Config Server and Config Database on the "Servers in Farm" page after having moved the Config and Content DBs? Is there something I'm missing or overlooking?
Thanks.
stsadm setconfigdb
?
stsadm -help setconfigdb
shows:
stsadm.exe -o setconfigdb
[-connect]
-databaseserver
[-databaseuser ]
[-databasepassword ]
[-databasename ]
[-hh]
[-adcreation]
[-addomain ]
[-adou ]
Also see Technet which says PSConfig has superseded stsadm.
Hey, I completely understand your issue. YOu have moved your configuration database from the previous sql server to the new sql server. Let me make one thing very clear on this post that a configuration database cannot be moved to another sql server.
Hence, you need to run psconfig and disconnect from the current farm. Run psconfig again and create a new server farm. Once that is done, create new web application/applications and then attach the site content database/databases back to them. This is the only way to get your farm restored properly with the new sql server.
The best way we have found to do this is to use a SQL client side or DNS alias for the SQL server so that you can easily move the SP databases to a new server and just update the alias to point to the new one. In your case you could try the steps below, server names have been changed to protect the innocent. In this scenario you will need to have the same instance name (or use default) and possibly the same port.
Turn off SharePoint services
Rename the old SQL server from SQL2000 to SQL2000OLD
Create a DNS CNAME record called SQL2000 that points to new server called SQL2005
Detach/attach or backup/restore all databases from SQL2000 to SQL2005
Ping SQL2000 on SharePoint server to make sure that it resolves to SQL2005 and if not then run "ipconfig /flushdns" and repeat test until it resolves to new server
Bring SharePoint services back up, should connect to new server using DNS alias