Wednesday, March 28, 2012
moving a SQl 2005 log file
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
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
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 log file while still "attached"
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"
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
Moving a log file
Hi,
I am trying to move a log file in SQL2005.
I have tried unattaching a DB, then reattaching it and giving it a path to a new log file but it refuses to mount the database and simply reconnects to the old log file.
if i delete the old log file then it recreats it in the old path.
Any one know what i am doing worng.
There are several ways to handle this.
When you attach the database, the server looks in the db file to determine where the transaction log file is located. It will then display the log file and location -you can change the log file location at this step BEFORE you confirm the ATTACH.
You can also use T-SQL, DETACH and ATTACH, taking care to specify where to find the log file. See Books Online for syntax specifics.
You could do a BACKUP and RESTORE, using the WITH MOVE options for RESTORE. Again, check Books Online for syntax specifics.
|||Check Create database with ATTACH_REBUILD_LOG option...
Check BOL for more details.
http://msdn2.microsoft.com/en-us/library/ms176061.aspx
|||Follow as Arnie suggested tomove the file before using SP_ATTACH_DB, you could use SP_ATTACH_SINGLE_FILE_DB in this case that will recreate fresh log file.
The ATTACH_REBUILD_LOG clause enables attaching a database without requiring all of the log files. For example, when detaching a database from a production server for use as a read-only database on a reporting server, the read-only environment will not require all of the log files used in production. ATTACH_REBUILD_LOG lets you copy the database to the reporting server without having to copy over all of the production log files.
|||Thanks guys
that worked, I dettached the DB moved the Log file then re-attached it using the create command and the ATTACH_REBUILD_LOG and specifed teh location of the log file and it worked.
Moving a log file
I know that I can detach a database, move the log file(s) and then
re-attach, but what is the
syntax to do it with Alter Database (or is it even possible)? I have
searched high and low and only found examples
that use sp_detach_db
Thanks,
Dan
For 2000, no syntax using ALTER DATABASE except for tempdb.
For 2005, you can use ALTER DATABASE. See below 2005 BOL URL:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/89f01b10-5fae-4ed8-b0fb-a4b9f540fd28.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"dan artuso" <dartuso@.NOSPAMpagepearls.com> wrote in message
news:%2328kfSc%23FHA.600@.tk2msftngp13.phx.gbl...
> Hi,
> I know that I can detach a database, move the log file(s) and then re-attach, but what is the
> syntax to do it with Alter Database (or is it even possible)? I have searched high and low and
> only found examples
> that use sp_detach_db
> Thanks,
> Dan
>
>
|||Thanks Tibor,
I know I had used it for tempdb and thought maybe I could use it for
'regular' db's.
Dan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ODXUvfc%23FHA.4012@.TK2MSFTNGP10.phx.gbl...
> For 2000, no syntax using ALTER DATABASE except for tempdb.
> For 2005, you can use ALTER DATABASE. See below 2005 BOL URL:
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/89f01b10-5fae-4ed8-b0fb-a4b9f540fd28.htm
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "dan artuso" <dartuso@.NOSPAMpagepearls.com> wrote in message
> news:%2328kfSc%23FHA.600@.tk2msftngp13.phx.gbl...
>
Moving a log file
I know that I can detach a database, move the log file(s) and then
re-attach, but what is the
syntax to do it with Alter Database (or is it even possible)? I have
searched high and low and only found examples
that use sp_detach_db
Thanks,
DanFor 2000, no syntax using ALTER DATABASE except for tempdb.
For 2005, you can use ALTER DATABASE. See below 2005 BOL URL:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/89f01b10-5fae-4ed8-b0fb-a4b9f540fd28.htm
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"dan artuso" <dartuso@.NOSPAMpagepearls.com> wrote in message
news:%2328kfSc%23FHA.600@.tk2msftngp13.phx.gbl...
> Hi,
> I know that I can detach a database, move the log file(s) and then re-attach, but what is the
> syntax to do it with Alter Database (or is it even possible)? I have searched high and low and
> only found examples
> that use sp_detach_db
> Thanks,
> Dan
>
>|||Thanks Tibor,
I know I had used it for tempdb and thought maybe I could use it for
'regular' db's.
Dan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ODXUvfc%23FHA.4012@.TK2MSFTNGP10.phx.gbl...
> For 2000, no syntax using ALTER DATABASE except for tempdb.
> For 2005, you can use ALTER DATABASE. See below 2005 BOL URL:
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/89f01b10-5fae-4ed8-b0fb-a4b9f540fd28.htm
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "dan artuso" <dartuso@.NOSPAMpagepearls.com> wrote in message
> news:%2328kfSc%23FHA.600@.tk2msftngp13.phx.gbl...
>> Hi,
>> I know that I can detach a database, move the log file(s) and then
>> re-attach, but what is the
>> syntax to do it with Alter Database (or is it even possible)? I have
>> searched high and low and only found examples
>> that use sp_detach_db
>> Thanks,
>> Dan
>>
>|||Hi Dan
You can only use it for tempdb because tempdb is rebuilt every time you
restart your SQL Server. And in fact, when you use it for tempdb, it doesn't
take effect until you stop and restart.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"dan artuso" <dartuso@.NOSPAMpagepearls.com> wrote in message
news:%23rjulyc%23FHA.2816@.tk2msftngp13.phx.gbl...
> Thanks Tibor,
> I know I had used it for tempdb and thought maybe I could use it for
> 'regular' db's.
>
> Dan
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:ODXUvfc%23FHA.4012@.TK2MSFTNGP10.phx.gbl...
>> For 2000, no syntax using ALTER DATABASE except for tempdb.
>> For 2005, you can use ALTER DATABASE. See below 2005 BOL URL:
>> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/89f01b10-5fae-4ed8-b0fb-a4b9f540fd28.htm
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "dan artuso" <dartuso@.NOSPAMpagepearls.com> wrote in message
>> news:%2328kfSc%23FHA.600@.tk2msftngp13.phx.gbl...
>> Hi,
>> I know that I can detach a database, move the log file(s) and then
>> re-attach, but what is the
>> syntax to do it with Alter Database (or is it even possible)? I have
>> searched high and low and only found examples
>> that use sp_detach_db
>> Thanks,
>> Dan
>>
>>
>
>
Moving a log file
I know that I can detach a database, move the log file(s) and then
re-attach, but what is the
syntax to do it with Alter Database (or is it even possible)? I have
searched high and low and only found examples
that use sp_detach_db
Thanks,
DanFor 2000, no syntax using ALTER DATABASE except for tempdb.
For 2005, you can use ALTER DATABASE. See below 2005 BOL URL:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/89f01b10-5fae-4ed8-b0fb-a4b9
f540fd28.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"dan artuso" <dartuso@.NOSPAMpagepearls.com> wrote in message
news:%2328kfSc%23FHA.600@.tk2msftngp13.phx.gbl...
> Hi,
> I know that I can detach a database, move the log file(s) and then re-atta
ch, but what is the
> syntax to do it with Alter Database (or is it even possible)? I have searc
hed high and low and
> only found examples
> that use sp_detach_db
> Thanks,
> Dan
>
>|||Thanks Tibor,
I know I had used it for tempdb and thought maybe I could use it for
'regular' db's.
Dan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ODXUvfc%23FHA.4012@.TK2MSFTNGP10.phx.gbl...
> For 2000, no syntax using ALTER DATABASE except for tempdb.
> For 2005, you can use ALTER DATABASE. See below 2005 BOL URL:
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/89f01b10-5fae-4ed8-b0fb-a4
b9f540fd28.htm
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "dan artuso" <dartuso@.NOSPAMpagepearls.com> wrote in message
> news:%2328kfSc%23FHA.600@.tk2msftngp13.phx.gbl...
>
Monday, March 26, 2012
Moving a database to a new drive
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
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
>
Friday, March 23, 2012
moving a 80GB sql data from one drive to another
We have a 80GB SQL database that has 6 files, including the transaction log.
The data files size range from 6GB to 53GB. We are trying to move it from
one drive to another. Tried two methods, but either does not work.
1. Detach the database, and copy the data files to the destination drive.
There was a Windows message saying that there was not enough resource (our
computer server has 2GB of Ram).
2. Create a new database in the destination drive. Then run SQL import
utility to import the objects and data to the new drive. It failed, but the
error message was not clear enough to point out what the problem is. It
seems most of the data was copied however, as the destination database size
is about 80GB.
Any idea?
Thanks,
QThe detach and attach should have worked fine. I don't know where the
resource error came from. Are you ruining anything else on the server at
that time? Did you try to copy the files one at a time?
Andrew J. Kelly SQL MVP
"Q" <Q@.discussions.microsoft.com> wrote in message
news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction
> log.
> The data files size range from 6GB to 53GB. We are trying to move it from
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but
> the
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database
> size
> is about 80GB.
> Any idea?
> Thanks,
> Q|||Hi,
The 2 best approaches are:-
1. detach the database , copy the MDF, NDF, LDF to destination drive, Attach
the datbase. This method is not at all resouce intencive. So possibility of
memory utilization is not at all possible. CHeck if other process is
utilizing the memory.
2. Backup the database (BACKUP DATABASE), Copy the BAK file to destination,
restore the database (RESTORE DATABASE. This is actually a online operation
.
Thanks
Hari
SQL Server MVP
"Q" wrote:
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction lo
g.
> The data files size range from 6GB to 53GB. We are trying to move it fro
m
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but t
he
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database siz
e
> is about 80GB.
> Any idea?
> Thanks,
> Q|||I tend to use ESEFILE to copy large files as the speed is much better than
xcopy/robocopy etc and you're less likely to hit system resource issues. You
can find it on an Exchange CD if you have one
http://support.microsoft.com/kb/248406/EN-US/
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
"Q" <Q@.discussions.microsoft.com> wrote in message
news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction
> log.
> The data files size range from 6GB to 53GB. We are trying to move it from
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but
> the
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database
> size
> is about 80GB.
> Any idea?
> Thanks,
> Q|||Andrew:
Thanks for your reply. We were not running anything particular at that
time. Our server is mainly for SQL server. Perhaps I shall try to shut it
down before copying/moving the data file. I may have selected to copy all
the data files at the same time. That may have something to do with the
resource warning.
I will give it another try.
Thanks again!
Q
"Andrew J. Kelly" wrote:
> The detach and attach should have worked fine. I don't know where the
> resource error came from. Are you ruining anything else on the server at
> that time? Did you try to copy the files one at a time?
> --
> Andrew J. Kelly SQL MVP
>
> "Q" <Q@.discussions.microsoft.com> wrote in message
> news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
>
>|||Thanks Hari!
Q
"Hari Prasad" wrote:
[vbcol=seagreen]
> Hi,
> The 2 best approaches are:-
> 1. detach the database , copy the MDF, NDF, LDF to destination drive, Atta
ch
> the datbase. This method is not at all resouce intencive. So possibility o
f
> memory utilization is not at all possible. CHeck if other process is
> utilizing the memory.
> 2. Backup the database (BACKUP DATABASE), Copy the BAK file to destination
,
> restore the database (RESTORE DATABASE. This is actually a online operati
on.
> Thanks
> Hari
> SQL Server MVP
>
> "Q" wrote:
>|||Hello Jasper:
Thanks for your idea. Not sure if we have the exchance CD. I was thinking
about using a third party software from Western Digital. When I bought a
disk from them, it came with a software for copying files.
Thanks again for your ideas!
Q
"Jasper Smith" wrote:
> I tend to use ESEFILE to copy large files as the speed is much better than
> xcopy/robocopy etc and you're less likely to hit system resource issues. Y
ou
> can find it on an Exchange CD if you have one
> http://support.microsoft.com/kb/248406/EN-US/
> --
> 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
> "Q" <Q@.discussions.microsoft.com> wrote in message
> news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
>
>
moving a 80GB sql data from one drive to another
We have a 80GB SQL database that has 6 files, including the transaction log.
The data files size range from 6GB to 53GB. We are trying to move it from
one drive to another. Tried two methods, but either does not work.
1. Detach the database, and copy the data files to the destination drive.
There was a Windows message saying that there was not enough resource (our
computer server has 2GB of Ram).
2. Create a new database in the destination drive. Then run SQL import
utility to import the objects and data to the new drive. It failed, but the
error message was not clear enough to point out what the problem is. It
seems most of the data was copied however, as the destination database size
is about 80GB.
Any idea?
Thanks,
QThe detach and attach should have worked fine. I don't know where the
resource error came from. Are you ruining anything else on the server at
that time? Did you try to copy the files one at a time?
--
Andrew J. Kelly SQL MVP
"Q" <Q@.discussions.microsoft.com> wrote in message
news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction
> log.
> The data files size range from 6GB to 53GB. We are trying to move it from
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but
> the
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database
> size
> is about 80GB.
> Any idea?
> Thanks,
> Q|||Hi,
The 2 best approaches are:-
1. detach the database , copy the MDF, NDF, LDF to destination drive, Attach
the datbase. This method is not at all resouce intencive. So possibility of
memory utilization is not at all possible. CHeck if other process is
utilizing the memory.
2. Backup the database (BACKUP DATABASE), Copy the BAK file to destination,
restore the database (RESTORE DATABASE. This is actually a online operation.
Thanks
Hari
SQL Server MVP
"Q" wrote:
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction log.
> The data files size range from 6GB to 53GB. We are trying to move it from
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but the
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database size
> is about 80GB.
> Any idea?
> Thanks,
> Q|||I tend to use ESEFILE to copy large files as the speed is much better than
xcopy/robocopy etc and you're less likely to hit system resource issues. You
can find it on an Exchange CD if you have one
http://support.microsoft.com/kb/248406/EN-US/
--
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
"Q" <Q@.discussions.microsoft.com> wrote in message
news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction
> log.
> The data files size range from 6GB to 53GB. We are trying to move it from
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but
> the
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database
> size
> is about 80GB.
> Any idea?
> Thanks,
> Q|||Andrew:
Thanks for your reply. We were not running anything particular at that
time. Our server is mainly for SQL server. Perhaps I shall try to shut it
down before copying/moving the data file. I may have selected to copy all
the data files at the same time. That may have something to do with the
resource warning.
I will give it another try.
Thanks again!
Q
"Andrew J. Kelly" wrote:
> The detach and attach should have worked fine. I don't know where the
> resource error came from. Are you ruining anything else on the server at
> that time? Did you try to copy the files one at a time?
> --
> Andrew J. Kelly SQL MVP
>
> "Q" <Q@.discussions.microsoft.com> wrote in message
> news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
> > Hello:
> >
> > We have a 80GB SQL database that has 6 files, including the transaction
> > log.
> > The data files size range from 6GB to 53GB. We are trying to move it from
> > one drive to another. Tried two methods, but either does not work.
> >
> > 1. Detach the database, and copy the data files to the destination drive.
> > There was a Windows message saying that there was not enough resource (our
> > computer server has 2GB of Ram).
> > 2. Create a new database in the destination drive. Then run SQL import
> > utility to import the objects and data to the new drive. It failed, but
> > the
> > error message was not clear enough to point out what the problem is. It
> > seems most of the data was copied however, as the destination database
> > size
> > is about 80GB.
> >
> > Any idea?
> >
> > Thanks,
> >
> > Q
>
>|||Thanks Hari!
Q
"Hari Prasad" wrote:
> Hi,
> The 2 best approaches are:-
> 1. detach the database , copy the MDF, NDF, LDF to destination drive, Attach
> the datbase. This method is not at all resouce intencive. So possibility of
> memory utilization is not at all possible. CHeck if other process is
> utilizing the memory.
> 2. Backup the database (BACKUP DATABASE), Copy the BAK file to destination,
> restore the database (RESTORE DATABASE. This is actually a online operation.
> Thanks
> Hari
> SQL Server MVP
>
> "Q" wrote:
> > Hello:
> >
> > We have a 80GB SQL database that has 6 files, including the transaction log.
> > The data files size range from 6GB to 53GB. We are trying to move it from
> > one drive to another. Tried two methods, but either does not work.
> >
> > 1. Detach the database, and copy the data files to the destination drive.
> > There was a Windows message saying that there was not enough resource (our
> > computer server has 2GB of Ram).
> > 2. Create a new database in the destination drive. Then run SQL import
> > utility to import the objects and data to the new drive. It failed, but the
> > error message was not clear enough to point out what the problem is. It
> > seems most of the data was copied however, as the destination database size
> > is about 80GB.
> >
> > Any idea?
> >
> > Thanks,
> >
> > Q|||Hello Jasper:
Thanks for your idea. Not sure if we have the exchance CD. I was thinking
about using a third party software from Western Digital. When I bought a
disk from them, it came with a software for copying files.
Thanks again for your ideas!
Q
"Jasper Smith" wrote:
> I tend to use ESEFILE to copy large files as the speed is much better than
> xcopy/robocopy etc and you're less likely to hit system resource issues. You
> can find it on an Exchange CD if you have one
> http://support.microsoft.com/kb/248406/EN-US/
> --
> 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
> "Q" <Q@.discussions.microsoft.com> wrote in message
> news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
> > Hello:
> >
> > We have a 80GB SQL database that has 6 files, including the transaction
> > log.
> > The data files size range from 6GB to 53GB. We are trying to move it from
> > one drive to another. Tried two methods, but either does not work.
> >
> > 1. Detach the database, and copy the data files to the destination drive.
> > There was a Windows message saying that there was not enough resource (our
> > computer server has 2GB of Ram).
> > 2. Create a new database in the destination drive. Then run SQL import
> > utility to import the objects and data to the new drive. It failed, but
> > the
> > error message was not clear enough to point out what the problem is. It
> > seems most of the data was copied however, as the destination database
> > size
> > is about 80GB.
> >
> > Any idea?
> >
> > Thanks,
> >
> > Q
>
>sql
moving a 80GB sql data from one drive to another
We have a 80GB SQL database that has 6 files, including the transaction log.
The data files size range from 6GB to 53GB. We are trying to move it from
one drive to another. Tried two methods, but either does not work.
1. Detach the database, and copy the data files to the destination drive.
There was a Windows message saying that there was not enough resource (our
computer server has 2GB of Ram).
2. Create a new database in the destination drive. Then run SQL import
utility to import the objects and data to the new drive. It failed, but the
error message was not clear enough to point out what the problem is. It
seems most of the data was copied however, as the destination database size
is about 80GB.
Any idea?
Thanks,
Q
The detach and attach should have worked fine. I don't know where the
resource error came from. Are you ruining anything else on the server at
that time? Did you try to copy the files one at a time?
Andrew J. Kelly SQL MVP
"Q" <Q@.discussions.microsoft.com> wrote in message
news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction
> log.
> The data files size range from 6GB to 53GB. We are trying to move it from
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but
> the
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database
> size
> is about 80GB.
> Any idea?
> Thanks,
> Q
|||Hi,
The 2 best approaches are:-
1. detach the database , copy the MDF, NDF, LDF to destination drive, Attach
the datbase. This method is not at all resouce intencive. So possibility of
memory utilization is not at all possible. CHeck if other process is
utilizing the memory.
2. Backup the database (BACKUP DATABASE), Copy the BAK file to destination,
restore the database (RESTORE DATABASE. This is actually a online operation.
Thanks
Hari
SQL Server MVP
"Q" wrote:
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction log.
> The data files size range from 6GB to 53GB. We are trying to move it from
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but the
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database size
> is about 80GB.
> Any idea?
> Thanks,
> Q
|||I tend to use ESEFILE to copy large files as the speed is much better than
xcopy/robocopy etc and you're less likely to hit system resource issues. You
can find it on an Exchange CD if you have one
http://support.microsoft.com/kb/248406/EN-US/
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
"Q" <Q@.discussions.microsoft.com> wrote in message
news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
> Hello:
> We have a 80GB SQL database that has 6 files, including the transaction
> log.
> The data files size range from 6GB to 53GB. We are trying to move it from
> one drive to another. Tried two methods, but either does not work.
> 1. Detach the database, and copy the data files to the destination drive.
> There was a Windows message saying that there was not enough resource (our
> computer server has 2GB of Ram).
> 2. Create a new database in the destination drive. Then run SQL import
> utility to import the objects and data to the new drive. It failed, but
> the
> error message was not clear enough to point out what the problem is. It
> seems most of the data was copied however, as the destination database
> size
> is about 80GB.
> Any idea?
> Thanks,
> Q
|||Andrew:
Thanks for your reply. We were not running anything particular at that
time. Our server is mainly for SQL server. Perhaps I shall try to shut it
down before copying/moving the data file. I may have selected to copy all
the data files at the same time. That may have something to do with the
resource warning.
I will give it another try.
Thanks again!
Q
"Andrew J. Kelly" wrote:
> The detach and attach should have worked fine. I don't know where the
> resource error came from. Are you ruining anything else on the server at
> that time? Did you try to copy the files one at a time?
> --
> Andrew J. Kelly SQL MVP
>
> "Q" <Q@.discussions.microsoft.com> wrote in message
> news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
>
>
|||Thanks Hari!
Q
"Hari Prasad" wrote:
[vbcol=seagreen]
> Hi,
> The 2 best approaches are:-
> 1. detach the database , copy the MDF, NDF, LDF to destination drive, Attach
> the datbase. This method is not at all resouce intencive. So possibility of
> memory utilization is not at all possible. CHeck if other process is
> utilizing the memory.
> 2. Backup the database (BACKUP DATABASE), Copy the BAK file to destination,
> restore the database (RESTORE DATABASE. This is actually a online operation.
> Thanks
> Hari
> SQL Server MVP
>
> "Q" wrote:
|||Hello Jasper:
Thanks for your idea. Not sure if we have the exchance CD. I was thinking
about using a third party software from Western Digital. When I bought a
disk from them, it came with a software for copying files.
Thanks again for your ideas!
Q
"Jasper Smith" wrote:
> I tend to use ESEFILE to copy large files as the speed is much better than
> xcopy/robocopy etc and you're less likely to hit system resource issues. You
> can find it on an Exchange CD if you have one
> http://support.microsoft.com/kb/248406/EN-US/
> --
> 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
> "Q" <Q@.discussions.microsoft.com> wrote in message
> news:E9D6F236-F79A-45D9-A36A-1C8F8F2557AB@.microsoft.com...
>
>
Moving .ldf to new drive, doesn't work gives "Cannot associate files with different datab
the database and made a copy of the .ldf file. I have taken this copy
of the .ldf file and placed it where I want it to be. I would like to
keep the .mdf file where it is located on the RAID drive, but for some
reason I can only reattach if the .ldf file is in the same location as
the .mdf file.
I have then run:
USE MASTER
GO
EXEC sp_attach_db @.dbname = N'Corporate',
@.filename1 = N'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
@.filename2 = N'E:\Web\Corporate\Corporate_Log.ldf'
And it returns:
Server: Msg 5173, Level 16, State 2, Line 1
Cannot associate files with different databases.
Is this possible?The procedure you described should work fine. But I suspect your .ldf file is
not really from that database.
Linchi
"caperneus@.gmail.com" wrote:
> I am trying to move a log file to a non-RAID drive. I have detached
> the database and made a copy of the .ldf file. I have taken this copy
> of the .ldf file and placed it where I want it to be. I would like to
> keep the .mdf file where it is located on the RAID drive, but for some
> reason I can only reattach if the .ldf file is in the same location as
> the .mdf file.
> I have then run:
> USE MASTER
> GO
> EXEC sp_attach_db @.dbname = N'Corporate',
> @.filename1 = N'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
> @.filename2 = N'E:\Web\Corporate\Corporate_Log.ldf'
> And it returns:
> Server: Msg 5173, Level 16, State 2, Line 1
> Cannot associate files with different databases.
> Is this possible?
>|||On Jun 14, 2:44 pm, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> The procedure you described should work fine. But I suspect your .ldf file is
> not really from that database.
> Linchi
> "capern...@.gmail.com" wrote:
> > I am trying to move a log file to a non-RAID drive. I have detached
> > the database and made a copy of the .ldf file. I have taken this copy
> > of the .ldf file and placed it where I want it to be. I would like to
> > keep the .mdf file where it is located on the RAID drive, but for some
> > reason I can only reattach if the .ldf file is in the same location as
> > the .mdf file.
> > I have then run:
> > USE MASTER
> > GO
> > EXEC sp_attach_db @.dbname = N'Corporate',
> > @.filename1 = N'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
> > @.filename2 = N'E:\Web\Corporate\Corporate_Log.ldf'
> > And it returns:
> > Server: Msg 5173, Level 16, State 2, Line 1
> > Cannot associate files with different databases.
> > Is this possible?
It is really from that database. I can attach it back with no problems
if the files are in the same directory.|||Instead of detached and attached try backup and restore ...
BACKUP DATABASE Corporate
TO DISK = 'E:\backup_corporate.bak'
WITH INIT
Drop the database, and delete the mdf and ldf file (or just back it up)
Then the Restore:
RESTORE DATABASE Corporate
FROM DISK = 'E:\backup_corporate.bak'
WITH RECOVERY,
MOVE '[datafilelogicalname]' TO 'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
MOVE '[loglogicalname]' TO 'E:\Web\Corporate\Corporate_Log.ldf'
Hope that works.
Lucas
<caperneus@.gmail.com> wrote in message
news:1181852163.020692.243720@.a26g2000pre.googlegroups.com...
> On Jun 14, 2:44 pm, Linchi Shea <LinchiS...@.discussions.microsoft.com>
> wrote:
>> The procedure you described should work fine. But I suspect your .ldf
>> file is
>> not really from that database.
>> Linchi
>> "capern...@.gmail.com" wrote:
>> > I am trying to move a log file to a non-RAID drive. I have detached
>> > the database and made a copy of the .ldf file. I have taken this copy
>> > of the .ldf file and placed it where I want it to be. I would like to
>> > keep the .mdf file where it is located on the RAID drive, but for some
>> > reason I can only reattach if the .ldf file is in the same location as
>> > the .mdf file.
>> > I have then run:
>> > USE MASTER
>> > GO
>> > EXEC sp_attach_db @.dbname = N'Corporate',
>> > @.filename1 = N'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
>> > @.filename2 = N'E:\Web\Corporate\Corporate_Log.ldf'
>> > And it returns:
>> > Server: Msg 5173, Level 16, State 2, Line 1
>> > Cannot associate files with different databases.
>> > Is this possible?
> It is really from that database. I can attach it back with no problems
> if the files are in the same directory.
>
Moved master db and now cannot start SQL
to start SQL. The error message we are getting in the application log is
that the initconfig: (error 5) access denied to g:\sqldata.
HI,
How u moved the database and what parameter u have changed.
from
killer
Ray Skweres wrote:
> After changing the startup parameters and moving the database we are unable
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.
|||Hi
This article descibes how to move your master database
http://support.microsoft.com/kb/224071/EN-US/
You may want to try starting SQL Server from the command prompt
http://msdn.microsoft.com/library/de...servr_4apa.asp
with the correct parameters (possibly with -f also!) and also making sure
that the permissions for the directories being used are correct.
You can not use a mapped network drive for your database files.
John
"Ray Skweres" wrote:
> After changing the startup parameters and moving the database we are unable
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.
|||Error 5 is access denied. Make sure that the SQL Server service account has permissions to the file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Ray Skweres" <RaySkweres@.discussions.microsoft.com> wrote in message
news:2053CEEC-32D3-4840-9898-D59433C29617@.microsoft.com...
> After changing the startup parameters and moving the database we are unable
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.
|||Moved it based on Microsoft articel changed startup parameters and only moved
the master.mdf so I only changed that parameter.
"doller" wrote:
> HI,
> How u moved the database and what parameter u have changed.
> from
> killer
>
> Ray Skweres wrote:
>
|||Used this article to move the database also tried to start it from a command
prompt and would not start. Also tried to change the startup parameters back
though command prompt and did not work. I am not using a mapped network
drive. Permissions are fine on the file. Even went into registry and tried
to change and then start sql still did not start and then when I went back
into the registry and it was back to the old setting.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> This article descibes how to move your master database
> http://support.microsoft.com/kb/224071/EN-US/
> You may want to try starting SQL Server from the command prompt
> http://msdn.microsoft.com/library/de...servr_4apa.asp
> with the correct parameters (possibly with -f also!) and also making sure
> that the permissions for the directories being used are correct.
> You can not use a mapped network drive for your database files.
> John
> "Ray Skweres" wrote:
|||Hi
Are you using the -d and -l parameters when starting on the command prompt?
Is there any privacy or anti-virus software running?
You may want to try reverting back to the previous location and see if it
starts.
If have backed up all your databases then you may want to try un-installing
and re-installing. You should be able to attach the databases from the
mdf/ldf files, but you will need to re-instate logins and jobs.
John
"Ray Skweres" wrote:
[vbcol=seagreen]
> Used this article to move the database also tried to start it from a command
> prompt and would not start. Also tried to change the startup parameters back
> though command prompt and did not work. I am not using a mapped network
> drive. Permissions are fine on the file. Even went into registry and tried
> to change and then start sql still did not start and then when I went back
> into the registry and it was back to the old setting.
> "John Bell" wrote:
|||Whether your the service account you are starting has access to the
g:\sqldata.
Thanks
Ajay Rengunthwar
MCDBA, MCAD
"Ray Skweres" <RaySkweres@.discussions.microsoft.com> wrote in message
news:19FD3DAA-35C5-482E-B0CD-FA8068B7FA71@.microsoft.com...
> Moved it based on Microsoft articel changed startup parameters and only
moved[vbcol=seagreen]
> the master.mdf so I only changed that parameter.
> "doller" wrote:
unable[vbcol=seagreen]
log is[vbcol=seagreen]
|||Hi
Another thought, have you checked for disc corruption?
John
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BFC7ACBD-19F4-4714-919B-C7774A17FFC7@.microsoft.com...[vbcol=seagreen]
> Hi
> Are you using the -d and -l parameters when starting on the command
> prompt?
> Is there any privacy or anti-virus software running?
> You may want to try reverting back to the previous location and see if it
> starts.
> If have backed up all your databases then you may want to try
> un-installing
> and re-installing. You should be able to attach the databases from the
> mdf/ldf files, but you will need to re-instate logins and jobs.
>
> John
> "Ray Skweres" wrote:
Moved master db and now cannot start SQL
to start SQL. The error message we are getting in the application log is
that the initconfig: (error 5) access denied to g:\sqldata.HI,
How u moved the database and what parameter u have changed.
from
killer
Ray Skweres wrote:
> After changing the startup parameters and moving the database we are unabl
e
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.|||Hi
This article descibes how to move your master database
http://support.microsoft.com/kb/224071/EN-US/
You may want to try starting SQL Server from the command prompt
http://msdn.microsoft.com/library/d...>
rvr_4apa.asp
with the correct parameters (possibly with -f also!) and also making sure
that the permissions for the directories being used are correct.
You can not use a mapped network drive for your database files.
John
"Ray Skweres" wrote:
> After changing the startup parameters and moving the database we are unabl
e
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.|||Error 5 is access denied. Make sure that the SQL Server service account has
permissions to the file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Ray Skweres" <RaySkweres@.discussions.microsoft.com> wrote in message
news:2053CEEC-32D3-4840-9898-D59433C29617@.microsoft.com...
> After changing the startup parameters and moving the database we are unabl
e
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.|||Moved it based on Microsoft articel changed startup parameters and only move
d
the master.mdf so I only changed that parameter.
"doller" wrote:
> HI,
> How u moved the database and what parameter u have changed.
> from
> killer
>
> Ray Skweres wrote:
>|||Used this article to move the database also tried to start it from a command
prompt and would not start. Also tried to change the startup parameters bac
k
though command prompt and did not work. I am not using a mapped network
drive. Permissions are fine on the file. Even went into registry and tried
to change and then start sql still did not start and then when I went back
into the registry and it was back to the old setting.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> This article descibes how to move your master database
> http://support.microsoft.com/kb/224071/EN-US/
> You may want to try starting SQL Server from the command prompt
> http://msdn.microsoft.com/library/d...
servr_4apa.asp
> with the correct parameters (possibly with -f also!) and also making sure
> that the permissions for the directories being used are correct.
> You can not use a mapped network drive for your database files.
> John
> "Ray Skweres" wrote:
>|||Hi
Are you using the -d and -l parameters when starting on the command prompt?
Is there any privacy or anti-virus software running?
You may want to try reverting back to the previous location and see if it
starts.
If have backed up all your databases then you may want to try un-installing
and re-installing. You should be able to attach the databases from the
mdf/ldf files, but you will need to re-instate logins and jobs.
John
"Ray Skweres" wrote:
[vbcol=seagreen]
> Used this article to move the database also tried to start it from a comma
nd
> prompt and would not start. Also tried to change the startup parameters b
ack
> though command prompt and did not work. I am not using a mapped network
> drive. Permissions are fine on the file. Even went into registry and trie
d
> to change and then start sql still did not start and then when I went back
> into the registry and it was back to the old setting.
> "John Bell" wrote:
>|||Whether your the service account you are starting has access to the
g:\sqldata.
Thanks
Ajay Rengunthwar
MCDBA, MCAD
"Ray Skweres" <RaySkweres@.discussions.microsoft.com> wrote in message
news:19FD3DAA-35C5-482E-B0CD-FA8068B7FA71@.microsoft.com...
> Moved it based on Microsoft articel changed startup parameters and only
moved[vbcol=seagreen]
> the master.mdf so I only changed that parameter.
> "doller" wrote:
>
unable[vbcol=seagreen]
log is[vbcol=seagreen]|||Hi
Another thought, have you checked for disc corruption?
John
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BFC7ACBD-19F4-4714-919B-C7774A17FFC7@.microsoft.com...[vbcol=seagreen]
> Hi
> Are you using the -d and -l parameters when starting on the command
> prompt?
> Is there any privacy or anti-virus software running?
> You may want to try reverting back to the previous location and see if it
> starts.
> If have backed up all your databases then you may want to try
> un-installing
> and re-installing. You should be able to attach the databases from the
> mdf/ldf files, but you will need to re-instate logins and jobs.
>
> John
> "Ray Skweres" wrote:
>
Moved master db and now cannot start SQL
to start SQL. The error message we are getting in the application log is
that the initconfig: (error 5) access denied to g:\sqldata.HI,
How u moved the database and what parameter u have changed.
from
killer
Ray Skweres wrote:
> After changing the startup parameters and moving the database we are unable
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.|||Hi
This article descibes how to move your master database
http://support.microsoft.com/kb/224071/EN-US/
You may want to try starting SQL Server from the command prompt
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_sqlservr_4apa.asp
with the correct parameters (possibly with -f also!) and also making sure
that the permissions for the directories being used are correct.
You can not use a mapped network drive for your database files.
John
"Ray Skweres" wrote:
> After changing the startup parameters and moving the database we are unable
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.|||Error 5 is access denied. Make sure that the SQL Server service account has permissions to the file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Ray Skweres" <RaySkweres@.discussions.microsoft.com> wrote in message
news:2053CEEC-32D3-4840-9898-D59433C29617@.microsoft.com...
> After changing the startup parameters and moving the database we are unable
> to start SQL. The error message we are getting in the application log is
> that the initconfig: (error 5) access denied to g:\sqldata.|||Moved it based on Microsoft articel changed startup parameters and only moved
the master.mdf so I only changed that parameter.
"doller" wrote:
> HI,
> How u moved the database and what parameter u have changed.
> from
> killer
>
> Ray Skweres wrote:
> > After changing the startup parameters and moving the database we are unable
> > to start SQL. The error message we are getting in the application log is
> > that the initconfig: (error 5) access denied to g:\sqldata.
>|||Used this article to move the database also tried to start it from a command
prompt and would not start. Also tried to change the startup parameters back
though command prompt and did not work. I am not using a mapped network
drive. Permissions are fine on the file. Even went into registry and tried
to change and then start sql still did not start and then when I went back
into the registry and it was back to the old setting.
"John Bell" wrote:
> Hi
> This article descibes how to move your master database
> http://support.microsoft.com/kb/224071/EN-US/
> You may want to try starting SQL Server from the command prompt
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_sqlservr_4apa.asp
> with the correct parameters (possibly with -f also!) and also making sure
> that the permissions for the directories being used are correct.
> You can not use a mapped network drive for your database files.
> John
> "Ray Skweres" wrote:
> > After changing the startup parameters and moving the database we are unable
> > to start SQL. The error message we are getting in the application log is
> > that the initconfig: (error 5) access denied to g:\sqldata.|||Hi
Are you using the -d and -l parameters when starting on the command prompt?
Is there any privacy or anti-virus software running?
You may want to try reverting back to the previous location and see if it
starts.
If have backed up all your databases then you may want to try un-installing
and re-installing. You should be able to attach the databases from the
mdf/ldf files, but you will need to re-instate logins and jobs.
John
"Ray Skweres" wrote:
> Used this article to move the database also tried to start it from a command
> prompt and would not start. Also tried to change the startup parameters back
> though command prompt and did not work. I am not using a mapped network
> drive. Permissions are fine on the file. Even went into registry and tried
> to change and then start sql still did not start and then when I went back
> into the registry and it was back to the old setting.
> "John Bell" wrote:
> > Hi
> >
> > This article descibes how to move your master database
> > http://support.microsoft.com/kb/224071/EN-US/
> >
> > You may want to try starting SQL Server from the command prompt
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_sqlservr_4apa.asp
> > with the correct parameters (possibly with -f also!) and also making sure
> > that the permissions for the directories being used are correct.
> >
> > You can not use a mapped network drive for your database files.
> >
> > John
> >
> > "Ray Skweres" wrote:
> >
> > > After changing the startup parameters and moving the database we are unable
> > > to start SQL. The error message we are getting in the application log is
> > > that the initconfig: (error 5) access denied to g:\sqldata.|||Whether your the service account you are starting has access to the
g:\sqldata.
Thanks
Ajay Rengunthwar
MCDBA, MCAD
"Ray Skweres" <RaySkweres@.discussions.microsoft.com> wrote in message
news:19FD3DAA-35C5-482E-B0CD-FA8068B7FA71@.microsoft.com...
> Moved it based on Microsoft articel changed startup parameters and only
moved
> the master.mdf so I only changed that parameter.
> "doller" wrote:
> > HI,
> > How u moved the database and what parameter u have changed.
> >
> > from
> > killer
> >
> >
> > Ray Skweres wrote:
> > > After changing the startup parameters and moving the database we are
unable
> > > to start SQL. The error message we are getting in the application
log is
> > > that the initconfig: (error 5) access denied to g:\sqldata.
> >
> >|||Hi
Another thought, have you checked for disc corruption?
John
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BFC7ACBD-19F4-4714-919B-C7774A17FFC7@.microsoft.com...
> Hi
> Are you using the -d and -l parameters when starting on the command
> prompt?
> Is there any privacy or anti-virus software running?
> You may want to try reverting back to the previous location and see if it
> starts.
> If have backed up all your databases then you may want to try
> un-installing
> and re-installing. You should be able to attach the databases from the
> mdf/ldf files, but you will need to re-instate logins and jobs.
>
> John
> "Ray Skweres" wrote:
>> Used this article to move the database also tried to start it from a
>> command
>> prompt and would not start. Also tried to change the startup parameters
>> back
>> though command prompt and did not work. I am not using a mapped network
>> drive. Permissions are fine on the file. Even went into registry and
>> tried
>> to change and then start sql still did not start and then when I went
>> back
>> into the registry and it was back to the old setting.
>> "John Bell" wrote:
>> > Hi
>> >
>> > This article descibes how to move your master database
>> > http://support.microsoft.com/kb/224071/EN-US/
>> >
>> > You may want to try starting SQL Server from the command prompt
>> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_sqlservr_4apa.asp
>> > with the correct parameters (possibly with -f also!) and also making
>> > sure
>> > that the permissions for the directories being used are correct.
>> >
>> > You can not use a mapped network drive for your database files.
>> >
>> > John
>> >
>> > "Ray Skweres" wrote:
>> >
>> > > After changing the startup parameters and moving the database we are
>> > > unable
>> > > to start SQL. The error message we are getting in the application
>> > > log is
>> > > that the initconfig: (error 5) access denied to g:\sqldata.
Wednesday, March 21, 2012
Move Transaction Log
location (same as the databases) to a different drive for
performance reasons. How do I do that?
Check out sp_detach_db and sp_attach_db in the BOL.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Keith" <dkcamc@.yahoo.com> wrote in message
news:1d4301c49b5e$504e5b00$3a01280a@.phx.gbl...
I want to move the transaction log from its current
location (same as the databases) to a different drive for
performance reasons. How do I do that?
|||http://www.support.microsoft.com/?id=224071
Andrew J. Kelly SQL MVP
"Keith" <dkcamc@.yahoo.com> wrote in message
news:1d4301c49b5e$504e5b00$3a01280a@.phx.gbl...
> I want to move the transaction log from its current
> location (same as the databases) to a different drive for
> performance reasons. How do I do that?
|||Sorry if I'm dragging an old thread up, but I need to do this also. I've
tried using the SP_Detatch command, but it refuses to move the log, due to
having replications attached. Is there anyway I can move the TNS log without
deleting the replications and starting again?
Cheers
Steve
"Keith" wrote:
> I want to move the transaction log from its current
> location (same as the databases) to a different drive for
> performance reasons. How do I do that?
>
Move Transaction Log
location (same as the databases) to a different drive for
performance reasons. How do I do that?Check out sp_detach_db and sp_attach_db in the BOL.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Keith" <dkcamc@.yahoo.com> wrote in message
news:1d4301c49b5e$504e5b00$3a01280a@.phx.gbl...
I want to move the transaction log from its current
location (same as the databases) to a different drive for
performance reasons. How do I do that?|||http://www.support.microsoft.com/?id=224071
Andrew J. Kelly SQL MVP
"Keith" <dkcamc@.yahoo.com> wrote in message
news:1d4301c49b5e$504e5b00$3a01280a@.phx.gbl...
> I want to move the transaction log from its current
> location (same as the databases) to a different drive for
> performance reasons. How do I do that?|||Sorry if I'm dragging an old thread up, but I need to do this also. I've
tried using the SP_Detatch command, but it refuses to move the log, due to
having replications attached. Is there anyway I can move the TNS log without
deleting the replications and starting again?
Cheers
Steve
"Keith" wrote:
> I want to move the transaction log from its current
> location (same as the databases) to a different drive for
> performance reasons. How do I do that?
>