Showing posts with label drive. Show all posts
Showing posts with label drive. Show all posts

Friday, March 30, 2012

Moving catalog from one drive to another

I have asked (and had a reply - thanks!) this question before, but i'm in a
hurry and cant seem to find the solution even by googling myself.
I have a database which had a FT catalog on E: on one machine and i've moved
the database to a machine with only a C:
I remember the solution has something to do with accessing a system table
and changing the file path from E: to C: but I cant remember which one. I
cant just delete the catalog because it tells me to repopulate it which I
cant do because it doesnt exist.
Can someone point me in the right direction away from this chicken and egg
scenario
Many thanks,
Simon DBA Andy (because it is alphabetically superior, yet Aaaandy would be
pushing it I feel)
have a look at this kbarticle
http://support.microsoft.com/default...b;en-us;240867
The update you are looking for it towards the end of the article.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Andy Gilman" <andygilman2@.hotmail.com> wrote in message
news:OTmDI4faEHA.3352@.TK2MSFTNGP12.phx.gbl...

> I have asked (and had a reply - thanks!) this question before, but i'm in
a
> hurry and cant seem to find the solution even by googling myself.
> I have a database which had a FT catalog on E: on one machine and i've
moved
> the database to a machine with only a C:
> I remember the solution has something to do with accessing a system table
> and changing the file path from E: to C: but I cant remember which one. I
> cant just delete the catalog because it tells me to repopulate it which I
> cant do because it doesnt exist.
> Can someone point me in the right direction away from this chicken and egg
> scenario
> Many thanks,
> Simon DBA Andy (because it is alphabetically superior, yet Aaaandy would
be
> pushing it I feel)
>

Moving BD to new schema...

Good morning to everyone!

I have a 3Gig SQL database that currently has all Indexes, Logs, and Data on one drive. We have a new server that will be put in place on Wednesday and thankfully we will be putting the Indexes and TransLogs on different drives from the actual Data. Does anyone have a recommendation on his/her preferred way of doing this and what are some of the advantages/disadvantages some of you may have encountered? This isn't homework. I am finally getting the hang of manipulating and working with our database and will need to accomplish the server switch in about two weeks. Or if you have a recommended reading on this - please point me to it and I'll get to practicing!

Thanks to everyone!
Tiffanieput indices on different drives than the data. you can create seperate filegroups and put indices for one set of tables on one drive and data on the other and do the vice versa for another set of tales. put T-Logs on a completely seperate drive from the data and indices. I do not want to start the RAID debate.|||Thanks Sean,

We are putting everything on their own drives, but I was wondering how everyone goes about pointing the tables to the new locations of the I&Ts? No raid discussion from me - server is already built I just get to play with moving everything and making sure it works. Basically we're planning to fully backup on the old server and restore on the new. Somehow I need to adjust the paths though?

Tiffanie|||Monday... erased.|||tables that are frequently joined, you might to keep oon seperate filegroups.

I do not think you can use ALTER TABLE to change filegroups.

I am not sure you are going tobe able to do a backup and restore. You may have to script your whole database in the EM (easy to do). and adjust your create table statements with ON PRIMARY or SECONDARY etc... specified. Then you will have to move the data over without using a backup.

The indices are easy. Just drop and recreate. You can use the EM or write some code that writes some code against sysindexes to do the job.|||Thanks Sean - I'll play around with that.
Have a terrific day!
Tiffanie

Moving an SQL Server 2000 database

When I crated my first SQL Server 2000 database I overlooked the database
lcoation on the harddisk - which by default points to the C: drive. I need
to move it all over to the d: drive and place in the appropriate directory.
What is the best way to accomplish this? Can I use DTS for this or is there
a better way to do this?
Once moved, is there any thing else that I need to do manually to make sure
that everything related to the database did get moved propery and all the
privs are set etc... etc..
Thanks, Brad
If it is going to remain on the same SQL Instance then you have two very
easy options.
1. Detach the files, move them and reattach them
2. Restore a full backup using the WITH MOVE option to change the file
locations.
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://www.support.microsoft.com/?id=221465 Using WITH MOVE in a Restore
Andrew J. Kelly SQL MVP
"Brad Pears" <bradp@.truenorthloghomes.com> wrote in message
news:eCiaDuosHHA.4916@.TK2MSFTNGP04.phx.gbl...
> When I crated my first SQL Server 2000 database I overlooked the database
> lcoation on the harddisk - which by default points to the C: drive. I need
> to move it all over to the d: drive and place in the appropriate
> directory.
> What is the best way to accomplish this? Can I use DTS for this or is
> there a better way to do this?
> Once moved, is there any thing else that I need to do manually to make
> sure that everything related to the database did get moved propery and all
> the privs are set etc... etc..
> Thanks, Brad
>
|||Brad Pears (bradp@.truenorthloghomes.com) writes:
> When I crated my first SQL Server 2000 database I overlooked the
> database lcoation on the harddisk - which by default points to the C:
> drive. I need to move it all over to the d: drive and place in the
> appropriate directory.
> What is the best way to accomplish this? Can I use DTS for this or is
> there a better way to do this?
Definitely. Run sp_detach_db, use Explorer to move the file to the desired
location, and then use sp_attach_db to make SQL Server aware of the new
location. (When you detach it, the database is gone as far as SQL Server
is concerned).
See Books Online for exact details on parameters etc.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Thanks for the comments. I used the detach / attach and it worked like a
top. Although I did hear that using the detach/attach option can sometimes
corrup the DB? Have either of you ever had this problem?
Thanks, Brad
"Brad Pears" <bradp@.truenorthloghomes.com> wrote in message
news:eCiaDuosHHA.4916@.TK2MSFTNGP04.phx.gbl...
> When I crated my first SQL Server 2000 database I overlooked the database
> lcoation on the harddisk - which by default points to the C: drive. I need
> to move it all over to the d: drive and place in the appropriate
> directory.
> What is the best way to accomplish this? Can I use DTS for this or is
> there a better way to do this?
> Once moved, is there any thing else that I need to do manually to make
> sure that everything related to the database did get moved propery and all
> the privs are set etc... etc..
> Thanks, Brad
>
|||Not if you do it correctly. If you simply copy over the files without first
detaching them you can have issues.
Andrew J. Kelly SQL MVP
"Brad Pears" <bradp@.truenorthloghomes.com> wrote in message
news:O36bt81sHHA.3504@.TK2MSFTNGP05.phx.gbl...
> Thanks for the comments. I used the detach / attach and it worked like a
> top. Although I did hear that using the detach/attach option can sometimes
> corrup the DB? Have either of you ever had this problem?
> Thanks, Brad
> "Brad Pears" <bradp@.truenorthloghomes.com> wrote in message
> news:eCiaDuosHHA.4916@.TK2MSFTNGP04.phx.gbl...
>

Wednesday, March 28, 2012

Moving a SQL DB to New Drive

I'm not a DBA, so if this question seems basic, I appologize. I am capable
of opening a command window and typing commands, without totally
understanding them, so I guess you could say I'm a DB Operator of sorts.
We recently had a SQL database installed on a new server. No other apps live
there. The Server has two logical drive arrays. C: is a mirrored pair and D:
is a RAID 5 three disk array.
The database was installed on the C: drive along with the SQL app itself.
The D: drive has 130 Gb free space with less than 5% already in use while
the primary drive is at 60% useage, and growing, with a max size of 20 Gb.
What we'd like to do is move the SQL database only to the D: drive.
1) How is this best accomplished?
2) Will the SQL app itself need to be reinstalled? (I don't think so, but
I'm not a DBA)
3) Will our clients' ODBC connection need to be redone to "map" to the new
home or will the
ODBC object autoupdate if the name is kept the same?
Thanks for the help!
1) http://support.microsoft.com/default...;en-us;Q224071
2) No
3) The actual location of the database files is irrelevant to ODBC, so you
don't have to change anything.
Jacco Schalkwijk
SQL Server MVP
"emanon" <NoSpam@.NoSpam.org> wrote in message
news:eV0XcLN9EHA.824@.TK2MSFTNGP11.phx.gbl...
> I'm not a DBA, so if this question seems basic, I appologize. I am capable
> of opening a command window and typing commands, without totally
> understanding them, so I guess you could say I'm a DB Operator of sorts.
> We recently had a SQL database installed on a new server. No other apps
> live
> there. The Server has two logical drive arrays. C: is a mirrored pair and
> D:
> is a RAID 5 three disk array.
> The database was installed on the C: drive along with the SQL app itself.
> The D: drive has 130 Gb free space with less than 5% already in use while
> the primary drive is at 60% useage, and growing, with a max size of 20
> Gb.
> What we'd like to do is move the SQL database only to the D: drive.
> 1) How is this best accomplished?
> 2) Will the SQL app itself need to be reinstalled? (I don't think so, but
> I'm not a DBA)
> 3) Will our clients' ODBC connection need to be redone to "map" to the
> new
> home or will the
> ODBC object autoupdate if the name is kept the same?
> Thanks for the help!
>
|||Thank you!
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid > wrote
in message news:eAQZdPN9EHA.3828@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> 1) http://support.microsoft.com/default...;en-us;Q224071
> 2) No
> 3) The actual location of the database files is irrelevant to ODBC, so you
> don't have to change anything.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "emanon" <NoSpam@.NoSpam.org> wrote in message
> news:eV0XcLN9EHA.824@.TK2MSFTNGP11.phx.gbl...
capable[vbcol=seagreen]
and[vbcol=seagreen]
itself.[vbcol=seagreen]
while[vbcol=seagreen]
but
>
sql

Moving a SQL DB to New Drive

I'm not a DBA, so if this question seems basic, I appologize. I am capable
of opening a command window and typing commands, without totally
understanding them, so I guess you could say I'm a DB Operator of sorts.
We recently had a SQL database installed on a new server. No other apps live
there. The Server has two logical drive arrays. C: is a mirrored pair and D:
is a RAID 5 three disk array.
The database was installed on the C: drive along with the SQL app itself.
The D: drive has 130 Gb free space with less than 5% already in use while
the primary drive is at 60% useage, and growing, with a max size of 20 Gb.
What we'd like to do is move the SQL database only to the D: drive.
1) How is this best accomplished?
2) Will the SQL app itself need to be reinstalled? (I don't think so, but
I'm not a DBA)
3) Will our clients' ODBC connection need to be redone to "map" to the new
home or will the
ODBC object autoupdate if the name is kept the same?
Thanks for the help!1) http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224071
2) No
3) The actual location of the database files is irrelevant to ODBC, so you
don't have to change anything.
--
Jacco Schalkwijk
SQL Server MVP
"emanon" <NoSpam@.NoSpam.org> wrote in message
news:eV0XcLN9EHA.824@.TK2MSFTNGP11.phx.gbl...
> I'm not a DBA, so if this question seems basic, I appologize. I am capable
> of opening a command window and typing commands, without totally
> understanding them, so I guess you could say I'm a DB Operator of sorts.
> We recently had a SQL database installed on a new server. No other apps
> live
> there. The Server has two logical drive arrays. C: is a mirrored pair and
> D:
> is a RAID 5 three disk array.
> The database was installed on the C: drive along with the SQL app itself.
> The D: drive has 130 Gb free space with less than 5% already in use while
> the primary drive is at 60% useage, and growing, with a max size of 20
> Gb.
> What we'd like to do is move the SQL database only to the D: drive.
> 1) How is this best accomplished?
> 2) Will the SQL app itself need to be reinstalled? (I don't think so, but
> I'm not a DBA)
> 3) Will our clients' ODBC connection need to be redone to "map" to the
> new
> home or will the
> ODBC object autoupdate if the name is kept the same?
> Thanks for the help!
>|||Thank you!
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:eAQZdPN9EHA.3828@.TK2MSFTNGP09.phx.gbl...
> 1) http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224071
> 2) No
> 3) The actual location of the database files is irrelevant to ODBC, so you
> don't have to change anything.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "emanon" <NoSpam@.NoSpam.org> wrote in message
> news:eV0XcLN9EHA.824@.TK2MSFTNGP11.phx.gbl...
> > I'm not a DBA, so if this question seems basic, I appologize. I am
capable
> > of opening a command window and typing commands, without totally
> > understanding them, so I guess you could say I'm a DB Operator of sorts.
> >
> > We recently had a SQL database installed on a new server. No other apps
> > live
> > there. The Server has two logical drive arrays. C: is a mirrored pair
and
> > D:
> > is a RAID 5 three disk array.
> >
> > The database was installed on the C: drive along with the SQL app
itself.
> > The D: drive has 130 Gb free space with less than 5% already in use
while
> > the primary drive is at 60% useage, and growing, with a max size of 20
> > Gb.
> >
> > What we'd like to do is move the SQL database only to the D: drive.
> >
> > 1) How is this best accomplished?
> >
> > 2) Will the SQL app itself need to be reinstalled? (I don't think so,
but
> > I'm not a DBA)
> >
> > 3) Will our clients' ODBC connection need to be redone to "map" to the
> > new
> > home or will the
> > ODBC object autoupdate if the name is kept the same?
> >
> > Thanks for the help!
> >
> >
>

Moving a SQL DB to New Drive

I'm not a DBA, so if this question seems basic, I appologize. I am capable
of opening a command window and typing commands, without totally
understanding them, so I guess you could say I'm a DB Operator of sorts.
We recently had a SQL database installed on a new server. No other apps live
there. The Server has two logical drive arrays. C: is a mirrored pair and D:
is a RAID 5 three disk array.
The database was installed on the C: drive along with the SQL app itself.
The D: drive has 130 Gb free space with less than 5% already in use while
the primary drive is at 60% useage, and growing, with a max size of 20 Gb.
What we'd like to do is move the SQL database only to the D: drive.
1) How is this best accomplished?
2) Will the SQL app itself need to be reinstalled? (I don't think so, but
I'm not a DBA)
3) Will our clients' ODBC connection need to be redone to "map" to the new
home or will the
ODBC object autoupdate if the name is kept the same?
Thanks for the help!1) http://support.microsoft.com/defaul...b;en-us;Q224071
2) No
3) The actual location of the database files is irrelevant to ODBC, so you
don't have to change anything.
Jacco Schalkwijk
SQL Server MVP
"emanon" <NoSpam@.NoSpam.org> wrote in message
news:eV0XcLN9EHA.824@.TK2MSFTNGP11.phx.gbl...
> I'm not a DBA, so if this question seems basic, I appologize. I am capable
> of opening a command window and typing commands, without totally
> understanding them, so I guess you could say I'm a DB Operator of sorts.
> We recently had a SQL database installed on a new server. No other apps
> live
> there. The Server has two logical drive arrays. C: is a mirrored pair and
> D:
> is a RAID 5 three disk array.
> The database was installed on the C: drive along with the SQL app itself.
> The D: drive has 130 Gb free space with less than 5% already in use while
> the primary drive is at 60% useage, and growing, with a max size of 20
> Gb.
> What we'd like to do is move the SQL database only to the D: drive.
> 1) How is this best accomplished?
> 2) Will the SQL app itself need to be reinstalled? (I don't think so, but
> I'm not a DBA)
> 3) Will our clients' ODBC connection need to be redone to "map" to the
> new
> home or will the
> ODBC object autoupdate if the name is kept the same?
> Thanks for the help!
>|||Thank you!
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:eAQZdPN9EHA.3828@.TK2MSFTNGP09.phx.gbl...
> 1) http://support.microsoft.com/defaul...b;en-us;Q224071
> 2) No
> 3) The actual location of the database files is irrelevant to ODBC, so you
> don't have to change anything.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "emanon" <NoSpam@.NoSpam.org> wrote in message
> news:eV0XcLN9EHA.824@.TK2MSFTNGP11.phx.gbl...
capable[vbcol=seagreen]
and[vbcol=seagreen]
itself.[vbcol=seagreen]
while[vbcol=seagreen]
but[vbcol=seagreen]
>

moving a SQl 2005 log file

I do you move the log file to a different drive and leave the database
in its current location with SQL 2005?
Thanks for your help,
Mark
Mark,
See "alter database ... modify file ..." in BOL.
AMB
"Mark" wrote:

> I do you move the log file to a different drive and leave the database
> in its current location with SQL 2005?
> Thanks for your help,
> Mark
>
|||In addition to the ALTER DATABASE topic, the topic Moving User Databases
http://msdn2.microsoft.com/en-us/library/ms345483.aspx provides step-by-step
instructions for moving files.
Regards,
Gail
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...[vbcol=seagreen]
> Mark,
> See "alter database ... modify file ..." in BOL.
>
> AMB
> "Mark" wrote:
|||Gail Erickson [MS]" ,
I have to get use to look more closely into the BOL. The SQL Server
Documentation Team is doing a great job.
Thanks,
AMB
"Gail Erickson [MS]" wrote:

> In addition to the ALTER DATABASE topic, the topic Moving User Databases
> http://msdn2.microsoft.com/en-us/library/ms345483.aspx provides step-by-step
> instructions for moving files.
> Regards,
> Gail
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
> news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...
>
>
|||> I have to get use to look more closely into the BOL. The SQL Server
> Documentation Team is doing a great job.
Thanks!
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:32E9A595-9FA3-42E1-892C-951FF36FF095@.microsoft.com...[vbcol=seagreen]
> Gail Erickson [MS]" ,
> I have to get use to look more closely into the BOL. The SQL Server
> Documentation Team is doing a great job.
> Thanks,
> AMB
>
> "Gail Erickson [MS]" wrote:
|||Hello,
You could use ALTER DATABASE...MODIFYFILE. THis will change the LDF path in
the system table. Once you restart the SQL Server
automatically this will come into effect.
You can also use SP_DETACH_DB and SP_ATTACH_DB
Thanks
Hari
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...[vbcol=seagreen]
> Mark,
> See "alter database ... modify file ..." in BOL.
>
> AMB
> "Mark" wrote:
sql

moving a SQl 2005 log file

I do you move the log file to a different drive and leave the database
in its current location with SQL 2005?
Thanks for your help,
MarkMark,
See "alter database ... modify file ..." in BOL.
AMB
"Mark" wrote:

> I do you move the log file to a different drive and leave the database
> in its current location with SQL 2005?
> Thanks for your help,
> Mark
>|||In addition to the ALTER DATABASE topic, the topic Moving User Databases
http://msdn2.microsoft.com/en-us/library/ms345483.aspx provides step-by-step
instructions for moving files.
Regards,
Gail
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/pr...oads/books.mspx
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...[vbcol=seagreen]
> Mark,
> See "alter database ... modify file ..." in BOL.
>
> AMB
> "Mark" wrote:
>|||Gail Erickson [MS]" ,
I have to get use to look more closely into the BOL. The SQL Server
Documentation Team is doing a great job.
Thanks,
AMB
"Gail Erickson [MS]" wrote:

> In addition to the ALTER DATABASE topic, the topic Moving User Databases
> http://msdn2.microsoft.com/en-us/library/ms345483.aspx provides step-by-st
ep
> instructions for moving files.
> Regards,
> Gail
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://www.microsoft.com/technet/pr...oads/books.mspx
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in messag
e
> news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...
>
>|||> I have to get use to look more closely into the BOL. The SQL Server
> Documentation Team is doing a great job.
Thanks!
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/pr...oads/books.mspx
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:32E9A595-9FA3-42E1-892C-951FF36FF095@.microsoft.com...[vbcol=seagreen]
> Gail Erickson [MS]" ,
> I have to get use to look more closely into the BOL. The SQL Server
> Documentation Team is doing a great job.
> Thanks,
> AMB
>
> "Gail Erickson [MS]" wrote:
>|||Hello,
You could use ALTER DATABASE...MODIFYFILE. THis will change the LDF path in
the system table. Once you restart the SQL Server
automatically this will come into effect.
You can also use SP_DETACH_DB and SP_ATTACH_DB
Thanks
Hari
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...[vbcol=seagreen]
> Mark,
> See "alter database ... modify file ..." in BOL.
>
> AMB
> "Mark" wrote:
>

moving a SQl 2005 log file

I do you move the log file to a different drive and leave the database
in its current location with SQL 2005?
Thanks for your help,
MarkMark,
See "alter database ... modify file ..." in BOL.
AMB
"Mark" wrote:
> I do you move the log file to a different drive and leave the database
> in its current location with SQL 2005?
> Thanks for your help,
> Mark
>|||In addition to the ALTER DATABASE topic, the topic Moving User Databases
http://msdn2.microsoft.com/en-us/library/ms345483.aspx provides step-by-step
instructions for moving files.
Regards,
Gail
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...
> Mark,
> See "alter database ... modify file ..." in BOL.
>
> AMB
> "Mark" wrote:
>> I do you move the log file to a different drive and leave the database
>> in its current location with SQL 2005?
>> Thanks for your help,
>> Mark|||Gail Erickson [MS]" ,
I have to get use to look more closely into the BOL. The SQL Server
Documentation Team is doing a great job.
Thanks,
AMB
"Gail Erickson [MS]" wrote:
> In addition to the ALTER DATABASE topic, the topic Moving User Databases
> http://msdn2.microsoft.com/en-us/library/ms345483.aspx provides step-by-step
> instructions for moving files.
> Regards,
> Gail
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
> news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...
> > Mark,
> >
> > See "alter database ... modify file ..." in BOL.
> >
> >
> > AMB
> >
> > "Mark" wrote:
> >
> >> I do you move the log file to a different drive and leave the database
> >> in its current location with SQL 2005?
> >>
> >> Thanks for your help,
> >> Mark
> >>
>
>|||> I have to get use to look more closely into the BOL. The SQL Server
> Documentation Team is doing a great job.
Thanks!
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:32E9A595-9FA3-42E1-892C-951FF36FF095@.microsoft.com...
> Gail Erickson [MS]" ,
> I have to get use to look more closely into the BOL. The SQL Server
> Documentation Team is doing a great job.
> Thanks,
> AMB
>
> "Gail Erickson [MS]" wrote:
>> In addition to the ALTER DATABASE topic, the topic Moving User Databases
>> http://msdn2.microsoft.com/en-us/library/ms345483.aspx provides
>> step-by-step
>> instructions for moving files.
>> Regards,
>> Gail
>> --
>> Gail Erickson [MS]
>> SQL Server Documentation Team
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights
>> Download the latest version of Books Online from
>> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
>> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
>> message
>> news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...
>> > Mark,
>> >
>> > See "alter database ... modify file ..." in BOL.
>> >
>> >
>> > AMB
>> >
>> > "Mark" wrote:
>> >
>> >> I do you move the log file to a different drive and leave the database
>> >> in its current location with SQL 2005?
>> >>
>> >> Thanks for your help,
>> >> Mark
>> >>
>>|||Hello,
You could use ALTER DATABASE...MODIFYFILE. THis will change the LDF path in
the system table. Once you restart the SQL Server
automatically this will come into effect.
You can also use SP_DETACH_DB and SP_ATTACH_DB
Thanks
Hari
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:78B38875-979A-4973-A97F-7C7669A7F1A2@.microsoft.com...
> Mark,
> See "alter database ... modify file ..." in BOL.
>
> AMB
> "Mark" wrote:
>> I do you move the log file to a different drive and leave the database
>> in its current location with SQL 2005?
>> Thanks for your help,
>> Mark

Moving a SQL 2000 Database

What are the steps I need to take to move a SQL 2000
database from one physical drive to another on the same
machine?Look up sp_detatch_db and sp_attach_db in BOL... Or use All Tasks -> Detach
Database and All Tasks -> Attach Database in Enterprise Manager.
You'll basically just need to detach the database files, move them, then
re-attach them. Generally a fairly painless process... YMMV, so back up
first if possible!
"jeffs" <jeffs@.bumbleandbumble.com> wrote in message
news:02ef01c3a3cd$72a7d250$a301280a@.phx.gbl...
> What are the steps I need to take to move a SQL 2000
> database from one physical drive to another on the same
> machine?|||In addition to Adam's post:
Check out KB 224071.
--
Tibor Karaszi
"jeffs" <jeffs@.bumbleandbumble.com> wrote in message
news:02ef01c3a3cd$72a7d250$a301280a@.phx.gbl...
> What are the steps I need to take to move a SQL 2000
> database from one physical drive to another on the same
> machine?|||Have a look at KB article Q224071
--
RajiA
"jeffs" <jeffs@.bumbleandbumble.com> wrote in message
news:02ef01c3a3cd$72a7d250$a301280a@.phx.gbl...
> What are the steps I need to take to move a SQL 2000
> database from one physical drive to another on the same
> machine?

Moving a log file while still "attached"

Is there a way to move a log file to another drive while it is still
attached ?
Reason I am asking... I have run into cases where after detaching a
database, I was unable to re-attach it.No, you cant move the primary log file while your DB is up and running. You
can however create a second log file while the DB is still attached (and you
may be running out of space in the primary log file)
Would I create a second log - no unless absolutley necessary.
Next time you try moving the log file via detach and attach - make sure you
run dbcc checkdb before detaching - when no problems are reported - copy the
original log file to its new location - dont move it. This way in case attac
h
shouldnt work (e.g the log file got damaged on its way to the new volume) yo
u
can reattach with minimal further loss of time - to your original log file.
Hope this helped.
"Rob" wrote:

> Is there a way to move a log file to another drive while it is still
> attached ?
> Reason I am asking... I have run into cases where after detaching a
> database, I was unable to re-attach it.
>
>|||No, you cant move the primary log file while your DB is up and running. You
can however create a second log file while the DB is still attached (and you
may be running out of space in the primary log file)
Would I create a second log - no unless absolutley necessary.
Next time you try moving the log file via detach and attach - make sure you
run dbcc checkdb before detaching - when no problems are reported - copy the
original log file to its new location - dont move it. This way in case attac
h
shouldnt work (e.g the log file got damaged on its way to the new volume) yo
u
can reattach with minimal further loss of time - to your original log file.
Hope this helped.
"Rob" wrote:

> Is there a way to move a log file to another drive while it is still
> attached ?
> Reason I am asking... I have run into cases where after detaching a
> database, I was unable to re-attach it.
>
>|||Rob wrote:
> Is there a way to move a log file to another drive while it is still
> attached ?
> Reason I am asking... I have run into cases where after detaching a
> database, I was unable to re-attach it.
>
>
Instead of using attach, you can use RESTORE WITH MOVE. This is a much
safer way to do it since your source db will still be up and running and
operational. This means that if you backup for some reason doesnt work,
you can just make a new backup.
Regards
Steen Schlter Persson
DBA|||> Reason I am asking... I have run into cases where after detaching a database, I was unable
to
> re-attach it.
That should not happen. If you detach a database, then you should be able to
attach it, assuming you
*really* detached it first and you have all the files. If you fulfill those
criteria and still
cannot attach it, you have a bug in the product.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rob" <rwchome@.comcast.net> wrote in message news:77-dncoBVcN_VhPZnZ2dnUVZ_qqdnZ2d@.comcast.c
om...
> Is there a way to move a log file to another drive while it is still attac
hed ?
> Reason I am asking... I have run into cases where after detaching a databa
se, I was unable to
> re-attach it.
>
>|||Rob wrote:
> Is there a way to move a log file to another drive while it is still
> attached ?
> Reason I am asking... I have run into cases where after detaching a
> database, I was unable to re-attach it.
>
>
Instead of using attach, you can use RESTORE WITH MOVE. This is a much
safer way to do it since your source db will still be up and running and
operational. This means that if you backup for some reason doesnt work,
you can just make a new backup.
Regards
Steen Schlter Persson
DBA|||> Reason I am asking... I have run into cases where after detaching a database, I was unable
to
> re-attach it.
That should not happen. If you detach a database, then you should be able to
attach it, assuming you
*really* detached it first and you have all the files. If you fulfill those
criteria and still
cannot attach it, you have a bug in the product.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rob" <rwchome@.comcast.net> wrote in message news:77-dncoBVcN_VhPZnZ2dnUVZ_qqdnZ2d@.comcast.c
om...
> Is there a way to move a log file to another drive while it is still attac
hed ?
> Reason I am asking... I have run into cases where after detaching a databa
se, I was unable to
> re-attach it.
>
>

Moving a log file while still "attached"

Is there a way to move a log file to another drive while it is still
attached ?
Reason I am asking... I have run into cases where after detaching a
database, I was unable to re-attach it.No, you cant move the primary log file while your DB is up and running. You
can however create a second log file while the DB is still attached (and you
may be running out of space in the primary log file)
Would I create a second log - no unless absolutley necessary.
Next time you try moving the log file via detach and attach - make sure you
run dbcc checkdb before detaching - when no problems are reported - copy the
original log file to its new location - dont move it. This way in case attach
shouldnt work (e.g the log file got damaged on its way to the new volume) you
can reattach with minimal further loss of time - to your original log file.
Hope this helped.
"Rob" wrote:
> Is there a way to move a log file to another drive while it is still
> attached ?
> Reason I am asking... I have run into cases where after detaching a
> database, I was unable to re-attach it.
>
>|||Rob wrote:
> Is there a way to move a log file to another drive while it is still
> attached ?
> Reason I am asking... I have run into cases where after detaching a
> database, I was unable to re-attach it.
>
>
Instead of using attach, you can use RESTORE WITH MOVE. This is a much
safer way to do it since your source db will still be up and running and
operational. This means that if you backup for some reason doesnt work,
you can just make a new backup.
--
Regards
Steen Schlüter Persson
DBA|||> Reason I am asking... I have run into cases where after detaching a database, I was unable to
> re-attach it.
That should not happen. If you detach a database, then you should be able to attach it, assuming you
*really* detached it first and you have all the files. If you fulfill those criteria and still
cannot attach it, you have a bug in the product.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rob" <rwchome@.comcast.net> wrote in message news:77-dncoBVcN_VhPZnZ2dnUVZ_qqdnZ2d@.comcast.com...
> Is there a way to move a log file to another drive while it is still attached ?
> Reason I am asking... I have run into cases where after detaching a database, I was unable to
> re-attach it.
>
>sql

Monday, March 26, 2012

Moving a database to a new drive

I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
2005. I need to move the database and log file to a different drive from the
current location. It is currently on C: which is the system partion. I need
to move the log file and data file to H and I respectively.
The database has one filegroup, Primary. It has one datafile in the primary
filegroup, and one log file. I need to move these files to drives H and I
respectively.
Will someone be able to point me in the right direction on how to move this
files?
Thanks in advance.
ODINF: Moving SQL Server Databases to a New Location with Detach/Attach
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q224071
--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"OD" <oludan@.hotmail.com> wrote in message
news:%238v5kKd0GHA.1252@.TK2MSFTNGP04.phx.gbl...
>I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
>2005. I need to move the database and log file to a different drive from
>the current location. It is currently on C: which is the system partion. I
>need to move the log file and data file to H and I respectively.
> The database has one filegroup, Primary. It has one datafile in the
> primary filegroup, and one log file. I need to move these files to drives
> H and I respectively.
> Will someone be able to point me in the right direction on how to move
> this files?
> Thanks in advance.
> OD
>|||See reply in sqlserver.tools
--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"OD" <oludan@.hotmail.com> wrote in message
news:%238v5kKd0GHA.1252@.TK2MSFTNGP04.phx.gbl...
>I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
>2005. I need to move the database and log file to a different drive from
>the current location. It is currently on C: which is the system partion. I
>need to move the log file and data file to H and I respectively.
> The database has one filegroup, Primary. It has one datafile in the
> primary filegroup, and one log file. I need to move these files to drives
> H and I respectively.
> Will someone be able to point me in the right direction on how to move
> this files?
> Thanks in advance.
> OD
>|||Thanks Jasper. You have provided the exact information that I am searching.
For some reason I couldn't find it on microsoft's Web site.
Thanks again,
OD
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:e7LOZPd0GHA.720@.TK2MSFTNGP02.phx.gbl...
> See reply in sqlserver.tools
> --
> HTH,
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
>
> "OD" <oludan@.hotmail.com> wrote in message
> news:%238v5kKd0GHA.1252@.TK2MSFTNGP04.phx.gbl...
>>I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
>>2005. I need to move the database and log file to a different drive from
>>the current location. It is currently on C: which is the system partion. I
>>need to move the log file and data file to H and I respectively.
>> The database has one filegroup, Primary. It has one datafile in the
>> primary filegroup, and one log file. I need to move these files to drives
>> H and I respectively.
>> Will someone be able to point me in the right direction on how to move
>> this files?
>> Thanks in advance.
>> OD
>|||You could take a look at KBArticle
http://msdn2.microsoft.com/en-us/library/ms187858.aspx
--
Thanks
Sethu Srinivasan, Software Design Engineer, SQL Server Manageability
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"OD" <oludan@.hotmail.com> wrote in message
news:%238v5kKd0GHA.1252@.TK2MSFTNGP04.phx.gbl...
>I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
>2005. I need to move the database and log file to a different drive from
>the current location. It is currently on C: which is the system partion. I
>need to move the log file and data file to H and I respectively.
> The database has one filegroup, Primary. It has one datafile in the
> primary filegroup, and one log file. I need to move these files to drives
> H and I respectively.
> Will someone be able to point me in the right direction on how to move
> this files?
> Thanks in advance.
> OD
>

Moving a database to a new drive

I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
2005. I need to move the database and log file to a different drive from the
current location. It is currently on C: which is the system partion. I need
to move the log file and data file to H and I respectively.
The database has one filegroup, Primary. It has one datafile in the primary
filegroup, and one log file. I need to move these files to drives H and I
respectively.
Will someone be able to point me in the right direction on how to move this
files?
Thanks in advance.
ODINF: Moving SQL Server Databases to a New Location with Detach/Attach
http://support.microsoft.com/defaul...b;EN-US;q224071
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"OD" <oludan@.hotmail.com> wrote in message
news:%238v5kKd0GHA.1252@.TK2MSFTNGP04.phx.gbl...
>I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
>2005. I need to move the database and log file to a different drive from
>the current location. It is currently on C: which is the system partion. I
>need to move the log file and data file to H and I respectively.
> The database has one filegroup, Primary. It has one datafile in the
> primary filegroup, and one log file. I need to move these files to drives
> H and I respectively.
> Will someone be able to point me in the right direction on how to move
> this files?
> Thanks in advance.
> OD
>|||See reply in sqlserver.tools
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"OD" <oludan@.hotmail.com> wrote in message
news:%238v5kKd0GHA.1252@.TK2MSFTNGP04.phx.gbl...
>I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
>2005. I need to move the database and log file to a different drive from
>the current location. It is currently on C: which is the system partion. I
>need to move the log file and data file to H and I respectively.
> The database has one filegroup, Primary. It has one datafile in the
> primary filegroup, and one log file. I need to move these files to drives
> H and I respectively.
> Will someone be able to point me in the right direction on how to move
> this files?
> Thanks in advance.
> OD
>|||Thanks Jasper. You have provided the exact information that I am searching.
For some reason I couldn't find it on microsoft's Web site.
Thanks again,
OD
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:e7LOZPd0GHA.720@.TK2MSFTNGP02.phx.gbl...
> See reply in sqlserver.tools
> --
> HTH,
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
>
> "OD" <oludan@.hotmail.com> wrote in message
> news:%238v5kKd0GHA.1252@.TK2MSFTNGP04.phx.gbl...
>|||You could take a look at KBArticle
http://msdn2.microsoft.com/en-us/library/ms187858.aspx
Thanks
Sethu Srinivasan, Software Design Engineer, SQL Server Manageability
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"OD" <oludan@.hotmail.com> wrote in message
news:%238v5kKd0GHA.1252@.TK2MSFTNGP04.phx.gbl...
>I have a CRM 3.0 application running on a Windows server 2003 R2 and SQL
>2005. I need to move the database and log file to a different drive from
>the current location. It is currently on C: which is the system partion. I
>need to move the log file and data file to H and I respectively.
> The database has one filegroup, Primary. It has one datafile in the
> primary filegroup, and one log file. I need to move these files to drives
> H and I respectively.
> Will someone be able to point me in the right direction on how to move
> this files?
> Thanks in advance.
> OD
>

moving a database to a different drive

what is the reccomended method for moving a database to a different drive on
the same computer? Just a backup and restore?
Have a look at
INF: Moving SQL Server Databases to a New Location with Detach/Attach
http://support.microsoft.com/default...;EN-US;q224071
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"djc" <noone@.nowhere.com> wrote in message
news:elhbGfwUEHA.484@.TK2MSFTNGP10.phx.gbl...
> what is the reccomended method for moving a database to a different drive
on
> the same computer? Just a backup and restore?
>
|||Thanks. I will.
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:eC3pXbxUEHA.2844@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Have a look at
> INF: Moving SQL Server Databases to a New Location with Detach/Attach
> http://support.microsoft.com/default...;EN-US;q224071
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "djc" <noone@.nowhere.com> wrote in message
> news:elhbGfwUEHA.484@.TK2MSFTNGP10.phx.gbl...
drive
> on
>

moving a database to a different drive

Hi,
You could do a backup and restore using the 'WITH MOVE'
OPTION or you could (better use) detach the database, copy
the datafile to new location and attach the database files.
You can look at sp_detach_db and sp_attach_db procedures
in BOL.
hth
DeeJay
>--Original Message--
>what is the reccomended method for moving a database to a
different drive on
>the same computer? Just a backup and restore?
>
>.
>
ok. I'll check out those procedures in Books Online. Thanks for the input.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...[vbcol=seagreen]
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> different drive on
|||Hi,
I will use the detatch/attatch method to move but your reply brings another
question to me. I did not see an option to restore 'WITH MOVE' in enterprise
manager GUI restore... is it only available when using TSQL? The reason I
ask is I had previously done a backup and restore to new database name and
new location in order to quickly create a 'staging' or 'testing' version of
a production database and want to be sure that was ok... meaning I wanted to
verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
was a default option. Because, in that case, I wanted the database to be
different... not a move of the real database..
If I actually got a clear question out of that (doubtful ;) ) any info would
be appreciated... I think I'm just being overly paranoid.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...[vbcol=seagreen]
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> different drive on
|||The move option is exposed on the right-most tab, where EM specifies the physical file names. In the right
part, just type the desired file name.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"djc" <noone@.nowhere.com> wrote in message news:%23Cj8oj5UEHA.2668@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I will use the detatch/attatch method to move but your reply brings another
> question to me. I did not see an option to restore 'WITH MOVE' in enterprise
> manager GUI restore... is it only available when using TSQL? The reason I
> ask is I had previously done a backup and restore to new database name and
> new location in order to quickly create a 'staging' or 'testing' version of
> a production database and want to be sure that was ok... meaning I wanted to
> verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
> was a default option. Because, in that case, I wanted the database to be
> different... not a move of the real database..
> If I actually got a clear question out of that (doubtful ;) ) any info would
> be appreciated... I think I'm just being overly paranoid.
>
> "DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
> news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...
>

moving a database to a different drive

Hi,
You could do a backup and restore using the 'WITH MOVE'
OPTION or you could (better use) detach the database, copy
the datafile to new location and attach the database files.
You can look at sp_detach_db and sp_attach_db procedures
in BOL.
hth
DeeJay
>--Original Message--
>what is the reccomended method for moving a database to a
different drive on
>the same computer? Just a backup and restore?
>
>.
>ok. I'll check out those procedures in Books Online. Thanks for the input.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx
.gbl...[vbcol=seagreen]
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> different drive on|||Hi,
I will use the detatch/attatch method to move but your reply brings another
question to me. I did not see an option to restore 'WITH MOVE' in enterprise
manager GUI restore... is it only available when using TSQL? The reason I
ask is I had previously done a backup and restore to new database name and
new location in order to quickly create a 'staging' or 'testing' version of
a production database and want to be sure that was ok... meaning I wanted to
verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
was a default option. Because, in that case, I wanted the database to be
different... not a move of the real database..
If I actually got a clear question out of that (doubtful ;) ) any info would
be appreciated... I think I'm just being overly paranoid.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx
.gbl...[vbcol=seagreen]
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> different drive on|||The move option is exposed on the right-most tab, where EM specifies the phy
sical file names. In the right
part, just type the desired file name.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"djc" <noone@.nowhere.com> wrote in message news:%23Cj8oj5UEHA.2668@.TK2MSFTNGP10.phx.gbl...[v
bcol=seagreen]
> Hi,
> I will use the detatch/attatch method to move but your reply brings anothe
r
> question to me. I did not see an option to restore 'WITH MOVE' in enterpri
se
> manager GUI restore... is it only available when using TSQL? The reason I
> ask is I had previously done a backup and restore to new database name and
> new location in order to quickly create a 'staging' or 'testing' version
of
> a production database and want to be sure that was ok... meaning I wanted
to
> verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
> was a default option. Because, in that case, I wanted the database to be
> different... not a move of the real database..
> If I actually got a clear question out of that (doubtful ;) ) any info wou
ld
> be appreciated... I think I'm just being overly paranoid.
>
> "DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
> news:1cc9b01c45309$967fde70$a101280a@.phx
.gbl...
>[/vbcol]sql

moving a database to a different drive

what is the reccomended method for moving a database to a different drive on
the same computer? Just a backup and restore?Have a look at
INF: Moving SQL Server Databases to a New Location with Detach/Attach
http://support.microsoft.com/defaul...b;EN-US;q224071
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"djc" <noone@.nowhere.com> wrote in message
news:elhbGfwUEHA.484@.TK2MSFTNGP10.phx.gbl...
> what is the reccomended method for moving a database to a different drive
on
> the same computer? Just a backup and restore?
>|||Thanks. I will.
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:eC3pXbxUEHA.2844@.TK2MSFTNGP12.phx.gbl...
> Have a look at
> INF: Moving SQL Server Databases to a New Location with Detach/Attach
> http://support.microsoft.com/defaul...b;EN-US;q224071
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "djc" <noone@.nowhere.com> wrote in message
> news:elhbGfwUEHA.484@.TK2MSFTNGP10.phx.gbl...
drive[vbcol=seagreen]
> on
>

moving a database to a different drive

what is the reccomended method for moving a database to a different drive on
the same computer? Just a backup and restore?Hi,
You could do a backup and restore using the 'WITH MOVE'
OPTION or you could (better use) detach the database, copy
the datafile to new location and attach the database files.
You can look at sp_detach_db and sp_attach_db procedures
in BOL.
hth
DeeJay
>--Original Message--
>what is the reccomended method for moving a database to a
different drive on
>the same computer? Just a backup and restore?
>
>.
>|||ok. I'll check out those procedures in Books Online. Thanks for the input.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> >--Original Message--
> >what is the reccomended method for moving a database to a
> different drive on
> >the same computer? Just a backup and restore?
> >
> >
> >.
> >|||Have a look at
INF: Moving SQL Server Databases to a New Location with Detach/Attach
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q224071
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"djc" <noone@.nowhere.com> wrote in message
news:elhbGfwUEHA.484@.TK2MSFTNGP10.phx.gbl...
> what is the reccomended method for moving a database to a different drive
on
> the same computer? Just a backup and restore?
>|||Thanks. I will.
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:eC3pXbxUEHA.2844@.TK2MSFTNGP12.phx.gbl...
> Have a look at
> INF: Moving SQL Server Databases to a New Location with Detach/Attach
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;q224071
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "djc" <noone@.nowhere.com> wrote in message
> news:elhbGfwUEHA.484@.TK2MSFTNGP10.phx.gbl...
> > what is the reccomended method for moving a database to a different
drive
> on
> > the same computer? Just a backup and restore?
> >
> >
>|||Hi,
I will use the detatch/attatch method to move but your reply brings another
question to me. I did not see an option to restore 'WITH MOVE' in enterprise
manager GUI restore... is it only available when using TSQL? The reason I
ask is I had previously done a backup and restore to new database name and
new location in order to quickly create a 'staging' or 'testing' version of
a production database and want to be sure that was ok... meaning I wanted to
verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
was a default option. Because, in that case, I wanted the database to be
different... not a move of the real database..
If I actually got a clear question out of that (doubtful ;) ) any info would
be appreciated... I think I'm just being overly paranoid.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> >--Original Message--
> >what is the reccomended method for moving a database to a
> different drive on
> >the same computer? Just a backup and restore?
> >
> >
> >.
> >|||The move option is exposed on the right-most tab, where EM specifies the physical file names. In the right
part, just type the desired file name.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"djc" <noone@.nowhere.com> wrote in message news:%23Cj8oj5UEHA.2668@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I will use the detatch/attatch method to move but your reply brings another
> question to me. I did not see an option to restore 'WITH MOVE' in enterprise
> manager GUI restore... is it only available when using TSQL? The reason I
> ask is I had previously done a backup and restore to new database name and
> new location in order to quickly create a 'staging' or 'testing' version of
> a production database and want to be sure that was ok... meaning I wanted to
> verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
> was a default option. Because, in that case, I wanted the database to be
> different... not a move of the real database..
> If I actually got a clear question out of that (doubtful ;) ) any info would
> be appreciated... I think I'm just being overly paranoid.
>
> "DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
> news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...
> > Hi,
> >
> > You could do a backup and restore using the 'WITH MOVE'
> > OPTION or you could (better use) detach the database, copy
> > the datafile to new location and attach the database files.
> >
> > You can look at sp_detach_db and sp_attach_db procedures
> > in BOL.
> >
> > hth
> >
> > DeeJay
> > >--Original Message--
> > >what is the reccomended method for moving a database to a
> > different drive on
> > >the same computer? Just a backup and restore?
> > >
> > >
> > >.
> > >
>

Moving a Database

I have a few databases that is clogging up my C drive and I would like to
move them to my D: drive.
What is the easiest and safest way to do that?Hi,
just
-detach them from drive c:
-copy over to drive d:
-attach on drive d:
You can either use thhe GUi for attach /detach or use the sp_detach /
sp_attach statement / procedure for that, more details can be found in
the BOL.
HTH, jens Suessmeyer.
http://www.sqlserver2005.de
--|||Cool, thank you.
But where is the GUI located for that?
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1145564475.673288.28790@.g10g2000cwb.googlegroups.com...
> Hi,
> just
> -detach them from drive c:
> -copy over to drive d:
> -attach on drive d:
> You can either use thhe GUi for attach /detach or use the sp_detach /
> sp_attach statement / procedure for that, more details can be found in
> the BOL.
> HTH, jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>|||Hi,
depends on which version of SQL Server you are using. If you use the
client tools for SQL 2000 you lopen the enterprise manager, navigate to
the database you want to detach, right click, select detach, copy the
files, right click on the Server, select attach, browse to the
destination and you are done.
It is nearly the same for SQl Server Management Studio and SQl Server
2005.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||How or where do I find teh GUI?
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1145564475.673288.28790@.g10g2000cwb.googlegroups.com...
> Hi,
> just
> -detach them from drive c:
> -copy over to drive d:
> -attach on drive d:
> You can either use thhe GUi for attach /detach or use the sp_detach /
> sp_attach statement / procedure for that, more details can be found in
> the BOL.
> HTH, jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>|||You didn=B4t say yet which version of SQL Server you are using.sql