SQL2008 New Database

SQL2008 - Fresh Install

I have a current SQL2008 server on a Windows 2003 Sever.
I have now installoed a new SQL2008 Server on a Windows Server 2008.

My plan is to move several of the old server SQL Database from the old to the new.

I have opened up my "MS SQL Server Managment Studio" and it has asked me to login in.

There is currently no SQL Server Name and in the drop down there is just local and nothing else.

SQL1
Do I just need to create a new one and if so how?
LVL 3
Bransby-ITAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
AnujConnect With a Mentor SQL Server DBACommented:
Before moving the database, Run SQL Server upgrade Adviser 2008 on your old server to check the compatibility issues, this gives you a report about potential issues after migration, Once you are good to start, then...

When you installed SQL Server 2008, it must have asked you to specify password for "sa" account. Type the server name there, or browse the server name and type sa password in password box.

Once you connected, If the MDF and LDF (they are database files) of your old SQL Server Instance are located remote location then copy them to the new server. If the SQL service is running on your Old server system will not allow you to move the files, so stop the SQL Server service of your old server and move. Once you moved use attach method to attach the database to your new server
http://msdn.microsoft.com/en-us/library/ms190209.aspx
http://support.microsoft.com/kb/224071

Once you attached all your user database, you need to recreate\transfer logins, Jobs and other SQL Server objects from your old server to new server. Also, There are few maintenance task to be performed after moving your databases like DBCC CHECKDB, Index defragment, UPDATE STATISTICS etc.
0
 
Bransby-ITAuthor Commented:
When I say do I, I want to create a New Database Engine and place it in the drive I created for this.
0
 
sognoctCommented:
if you are running sql management studio on the same machine of the db, just click on server name, then browse for more, and local server.

If you have choosen mixed authentication can authenticate with windows authentication
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
sognoctCommented:
You have to connect to the sql server engine, so you have to enter the machine where the sql server engine has been installed and the name of instance of the sql server.

is sql server 2008 express or the  sql server 2008 ?
0
 
Bransby-ITAuthor Commented:
OK but it has not setup a new Server Engine.   I thought the install would of.

So on the drop down there is just local, and this is on the C Drive I want a new Engine named "SQL_XXX01" stored on my D:\SQL2008_DATA" which is what I setup on the install.
0
 
Bransby-ITAuthor Commented:
The Server is SQL 2008 Standard SP3
0
 
Bransby-ITAuthor Commented:
The DB will be on the same Server as the Studio Manager.
I just want to create a New Server Engine instance.
0
 
sognoctCommented:
Just to understand ... you need 2 instances of sql server or just need to move db from C: to D: to save space on C: ?

2 instances of sql server uses twice ram ... twice system resources ... etc

are you really sure that you want this ?
0
 
Bransby-ITAuthor Commented:
Sognoct

No I had 1 SQL Server which has 1 "SQL Server Engine" this has around 20 Database on it.

Now I have a second SQL Server

I want to keep the first SQL Server for some time, keep it running along side the new one.

After I have created the SQL Engine on the new server my plan is to move a couple of the database from the old to the new server.   Not all of them.

So I will end up with 2 x SQL Servers running 1 SQL Engine on each server.
0
 
Bransby-ITAuthor Commented:
Anujnb - I can move one database at a time yes?
0
 
sognoctConnect With a Mentor Commented:
Bransby-IT yes you can move one a time , but as anujnb told first stop the old sql server

or detach the database that you want to move before copying it (in this case you don't have to stop service)
0
 
Bransby-ITAuthor Commented:
I will be detaching one at a time.
Got that bit just not to sure of the initial SQL Engine?
0
 
sognoctCommented:
if it is on the same machine (so you followed the standard sql server installation)

click server name -> browse for more -> database engine -> "server\instancename"
0
 
Bransby-ITAuthor Commented:
The Browse for Servers is empty?

sql
0
 
Bransby-ITAuthor Commented:
0
 
sognoctCommented:
open
control panel->administrative tools->services
check if service
SQL server is installed and running ...
0
 
Bransby-ITAuthor Commented:
Yep running.
0
 
Bransby-ITAuthor Commented:
Is there a way I can create a new server engine and place it in the data folder I setup on the install?
0
 
sognoctCommented:
put in servername:localhost\SQL_XXX01
0
 
Bransby-ITAuthor Commented:
OK this has created the Database Engine but the location is on the C Drive.   How can I now move this to the D drive?

Thanks for your assistance.
0
 
sognoctCommented:
for having the same data folder and engine folder douring install you have to choose
"data root directory" equal to "user database directory"  ... but now you have to uninstall and re-install ... .. ....

if it is essential ... do it, but if you think it is not to crucial for you, it will work great also with different folders. Engine does not eat space, and if you format C: and reinstall everything you have to install engine the same, also if it is on the D: drive
0
 
Bransby-ITAuthor Commented:
please see screenshots of my install.

SQL
and

SQL
0
 
Bransby-ITAuthor Commented:
OK was it the "Data root directory" I should of changed too?

When I move the database will they go into my D drive?

What would you do?
0
 
sognoctCommented:
set instance root directory to "D:\SQL2008_DATA\"
0
 
Bransby-ITAuthor Commented:
OK as this is a long term server should I uninstall and reinstall?
0
 
sognoctCommented:
also data root directory to d:\sq2008_data
0
 
Bransby-ITAuthor Commented:
Or does this not really matter?   I would like to set it up correctly.
0
 
sognoctCommented:
first uninstall then reinstall everything ... then if the instance name is the same just have to put in servername:localhost\SQL_XXX01
for accessing the db

in the other machine detach db and copy them one by one on the
 d:\sq2008_data

then attach them
0
 
sognoctCommented:
no, it does not matter ... as much as I know ...
0
 
Bransby-ITAuthor Commented:
Thanks for the  advise, so in a SQL new installs would it always be better to set the both so the database enginee and the database are located in the same directory?
0
 
sognoctCommented:
according to me no ... (that's why I always asked why you need them on the same dir)

it does not matter. This are the best configurations according to microsoft for sql 2008 :

C:\      Engine, Windows, Backups, Batch Processing, Full Text Catalogs
D:\      System Databases (TempDB), Transaction Logs
E:\      Large User Defined Database

I've read somewhere that there were better performances using dbf file and ldf file on different drives so I use ldf in c:\database and mdf in d:\database ... but never noticed so much differences.
0
 
Bransby-ITAuthor Commented:
ldf? Logs?
0
 
Bransby-ITAuthor Commented:
System Database and Large Database?

Are we talking like BES as System and inhouse ones as user?

Thanks for your advise its been great.
0
 
sognoctCommented:
by  System Databases it means :
master
model
msdb
tempd

they are the databases of the engine

Large database are the ldf / mdf files
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.