Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 How to decommission and SQL server

Author  Topic 

dbutch1976
Starting Member

7 Posts

Posted - 2009-09-08 : 15:15:35
Hello,

I'm new to working with SQL and I would like to decommsion one of my SQL 2005 server's so that I can use the physical box for other purposes. How do I go about determining what databases the server is hosting?

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-08 : 15:23:02
Open up SQL Server Management Studio, connect to the server, check out the databases.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dbutch1976
Starting Member

7 Posts

Posted - 2009-09-08 : 15:37:50
But how can I tell that these databases are still active? I believe that many of them have already been migrated off. I would like to somehow monitor the incoming connections that are being made so that I can be sure I'm only working with live databases and not moving un-used info.


For example,

I believe that our sharepoint server is using a database that is being hosted by this server, but how can I know for sure?

Many thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-08 : 17:10:29
You can check out "Activity Monitor" in SSMS via the Management section. You could also use sysprocesses/sp_who/sp_who2 or SQL Profiler.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dbutch1976
Starting Member

7 Posts

Posted - 2009-09-09 : 10:50:16
Thanks so much for that. I've got that up and I can see that multiple databases are open, however I can't really tell if any of them are actually being used by sharepoint.

Perhaps I'm making this harder than it should be. Wouldn't it be easier do the following:

1. detach ALL the databases
2. copy them to the new server
3. attach the databases
4. turn the old server off
5. Create an alias record in DNS which resolves the old servername to the new servername
6. add the old server's IP address as a 2nd IP in the properties of the network card.

Wouldn't this result in a seemless migration regardless of how the hosts are connecting to the databases?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-09 : 13:11:26
SQL Profiler will tell you what is happening on the databases.

How big are the databases, how much downtime can they afford? We have very high SLA requirements, so we'd be unable to use your approach but it should work. I'd even consider reusing the same server name and IP to avoid the DNS/IP issue.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

dbutch1976
Starting Member

7 Posts

Posted - 2009-09-09 : 16:41:28
The biggest database is almost 7 gigs, so I'd assume that's the live sharepoint server database. I can start the migration at 6pm and the server sharepoint server will need to be fully functional by 9:00am the following day.

Reusing the servername and IP address is not possible because the goal is to consolidate all SQL server instances onto a single SQL 2005 server, that server has already been configured and is hosting other databases.

My concern with detaching and then re-attaching the databases is that how can I know what credentials the sharepoint server is using to connect to the databases? I'm worried that I will decommission the old box and there will be authentication issues from the sharepoint server.

Any thoughts on that?

Thanks again for your help thus far.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-09-09 : 17:42:55
To ensure you get the exact credentials copied from the old server to the new server, you can use this script: http://www.sqlmag.com/Articles/ArticleID/16090/16090.html

And if you have lots of accounts to move, then I'd suggest a custom script that I wrote and use regularly: http://weblogs.sqlteam.com/tarad/archive/2008/06/24/How-to-transfer-SQL-logins-between-SQL-Server-2005-instances.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Sitka
Aged Yak Warrior

571 Posts

Posted - 2009-09-10 : 08:41:28
When working with Sharepoint be sure you identify the product and features correctly.
Basic Sharepoint is often called WSS (ver2, ver3)
it can have as few as two databases (sharepoint, STS_Servername1 are common).

Office Sharepoint Server is often called MOSS it has many differently layers of functionality and its rollout is targeted into what is called a "farm". A recent simple rollout I did involved 10 separate domain accounts. It is a complex product. Once you can find out what you actually have, there is often a Microsoft document and written procedures in blogs to describe how to move the databases to a different physical machine. Unfortunately the "lingo" of Sharepoint is such a vast and evolving dialect it is tough to get it correct.

If your sharepoint deployment is a relatively busy informational hub for your users and of small size (~250 users) it would be good to use caution as downtime in that information flow is much more costly than a piece of server hardware you want to retask.

If you could drop a few hints of your environment I maybe able to help you find some useful info.

"it's definitely useless and maybe harmful".
Go to Top of Page

dbutch1976
Starting Member

7 Posts

Posted - 2009-09-10 : 10:02:11
Sharepoint services 2.0
Less than 250 users
Database names: Database sizes
STS_%servername%_855251 8,256kb
STS%companyname% 2,688kb
STSDATA%companyname% 6,797,888kb

Is there a way to confirm which of these databases are actually in use?

Current database store is on an SQL 2005 server
Target database store is also a SQL 2005 server

This server is important but is not used out of our business hours of 8am-6pm. It is my belief that if I detach the databases, move the databases to the new server, decommission the old server, then create and CNAME (alias) DNS record for the new server everything should pretty much just work when I turn the sharepoint server back on.

Additionally – to roll back in the event of failure, I would simply have to remove the alias record, power the old server back on, and reattach the databases.

Go to Top of Page

Sitka
Aged Yak Warrior

571 Posts

Posted - 2009-09-10 : 16:22:27
They are all in use.
the big one is the content
others are config and usagetracking(?)

You can see how it is set up (and which accounts are going to be orphaned) by going to

Windows SharePoint Services Central Administration (some http://IP:port combination)/
configdb.aspx and
defaultcontentdb.aspx
(navigate directly to those server wide pages above)
and then down into the each virtual servers
Windows SharePoint Services ->
Manage Content Database Settings

http://technet.microsoft.com/en-us/library/cc288639.aspx

http://technet.microsoft.com/en-us/library/cc512725.aspx


"it's definitely useless and maybe harmful".
Go to Top of Page
   

- Advertisement -