Showing posts with label tempdb. Show all posts
Showing posts with label tempdb. Show all posts

Wednesday, March 21, 2012

Move tempdb logfiles between partitions?

I am wondering if there's any issues associated with moving the tempdb
logfiles from one partition to another? If not, then what would you
recommend the best way to do this?http://support.microsoft.com/defaul...kb;en-us;224071
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
<mikenospam72@.hotmail.com> wrote in message
news:1119212587.406860.87850@.f14g2000cwb.googlegroups.com...
>I am wondering if there's any issues associated with moving the tempdb
> logfiles from one partition to another? If not, then what would you
> recommend the best way to do this?
>

Move tempdb logfiles between partitions?

I am wondering if there's any issues associated with moving the tempdb
logfiles from one partition to another? If not, then what would you
recommend the best way to do this?
http://support.microsoft.com/default...b;en-us;224071
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
<mikenospam72@.hotmail.com> wrote in message
news:1119212587.406860.87850@.f14g2000cwb.googlegro ups.com...
>I am wondering if there's any issues associated with moving the tempdb
> logfiles from one partition to another? If not, then what would you
> recommend the best way to do this?
>

Move tempdb logfiles between partitions?

I am wondering if there's any issues associated with moving the tempdb
logfiles from one partition to another? If not, then what would you
recommend the best way to do this?http://support.microsoft.com/default.aspx?scid=kb;en-us;224071
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
<mikenospam72@.hotmail.com> wrote in message
news:1119212587.406860.87850@.f14g2000cwb.googlegroups.com...
>I am wondering if there's any issues associated with moving the tempdb
> logfiles from one partition to another? If not, then what would you
> recommend the best way to do this?
>

Move tempdb from T: to G:

How do I move the tempdb file from T: to G: drive?
Thank You,
StevenUse ALTER DATABASE. See Books Online for syntax.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Steven" <anonymous@.discussions.microsoft.com> wrote in message
news:153201c3aea4$d218b510$a601280a@.phx.gbl...
> How do I move the tempdb file from T: to G: drive?
> Thank You,
> Steven|||Hi,
Please use the below steps:
How to Move TEMPDB from one location to another
---
USE master
go
ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME ='G:\mssql\data\tempdb.mdf')
go
ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME ='G::\mssql\log\templog.ldf')
go
where NAME refers to the logical name of the tempdb database and
log files, and where FILENAME refers to the new location of the
tempdb files. Once this command has run, you must restart the
mssqlserver service before it takes affect.
This steps are common for SQL Server 7.0 and 2000.
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:eUeOrUqrDHA.2340@.TK2MSFTNGP12.phx.gbl...
> Use ALTER DATABASE. See Books Online for syntax.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Steven" <anonymous@.discussions.microsoft.com> wrote in message
> news:153201c3aea4$d218b510$a601280a@.phx.gbl...
> >
> > How do I move the tempdb file from T: to G: drive?
> >
> > Thank You,
> >
> > Steven
>

Move TempDB from F: to J: drive

I would like to move my server TempDB file from F: to J:
drive. What are the steps to complete this tasks?
Thank You,
TimSee "Moving Tempdb" in this article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;224071
--
David Portas
SQL Server MVP
--|||Hi,
USE master
go
ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME ='J:\tempdb.mdf')
go
ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME ='J:\templog.ldf')
go
where NAME refers to the logical name of the tempdb database and
log files, and where FILENAME refers to the new location of the
tempdb files. Once this command has run, you must restart the
mssqlserver service before it takes affect.
Thanks
Hari
MCDBA
"Tim" <anonymous@.discussions.microsoft.com> wrote in message
news:116c201c3f4ac$1e7d8280$a501280a@.phx.gbl...
>
> I would like to move my server TempDB file from F: to J:
> drive. What are the steps to complete this tasks?
> Thank You,
> Timsql

Move TempDB from F: to J: drive

I would like to move my server TempDB file from F: to J:
drive. What are the steps to complete this tasks?
Thank You,
TimSee "Moving Tempdb" in this article:
http://support.microsoft.com/defaul...kb;en-us;224071
David Portas
SQL Server MVP
--|||Hi,
USE master
go
ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME =
'J:\tempdb.mdf')
go
ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME =
'J:\templog.ldf')
go
where NAME refers to the logical name of the tempdb database and
log files, and where FILENAME refers to the new location of the
tempdb files. Once this command has run, you must restart the
mssqlserver service before it takes affect.
Thanks
Hari
MCDBA
"Tim" <anonymous@.discussions.microsoft.com> wrote in message
news:116c201c3f4ac$1e7d8280$a501280a@.phx
.gbl...
>
> I would like to move my server TempDB file from F: to J:
> drive. What are the steps to complete this tasks?
> Thank You,
> Tim

Move tempdb files to a new disk

I have done a new installation which is up and running.
However the disk on which the tempdb mdf and ldf files are
is giving a problem. Is there a way to move the files to a
different disk? I know we can't detach and attach it.
Alter database does not allow the primary data file to be
deleted.
I can create a new data file on the other disk and stop
the existing datafile from growing. This will effectively
move all tempdb activity to the new disk. But is there no
better way to move the mdf and ldf files to the new disk?
TIA,
JackINF: Moving SQL Server Databases to a New Location with Detach/Attach
http://support.microsoft.com/defaul...1&Product=sql2k
Scroll down to the bottom and find the section titled 'Moving Tempdb'
You are correct in that Detach/Attach doesn't work on TempDB. This KB
article does explain the proper way to move TempDB.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Jack" <jacka8@.excite.com> wrote in message
news:e4a401c40ba6$b1358d50$a301280a@.phx.gbl...
> I have done a new installation which is up and running.
> However the disk on which the tempdb mdf and ldf files are
> is giving a problem. Is there a way to move the files to a
> different disk? I know we can't detach and attach it.
> Alter database does not allow the primary data file to be
> deleted.
> I can create a new data file on the other disk and stop
> the existing datafile from growing. This will effectively
> move all tempdb activity to the new disk. But is there no
> better way to move the mdf and ldf files to the new disk?
> TIA,
> Jack|||You do this using ALTER DATABASE. See KB 224071 for more info.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jack" <jacka8@.excite.com> wrote in message
news:e4a401c40ba6$b1358d50$a301280a@.phx.gbl...
> I have done a new installation which is up and running.
> However the disk on which the tempdb mdf and ldf files are
> is giving a problem. Is there a way to move the files to a
> different disk? I know we can't detach and attach it.
> Alter database does not allow the primary data file to be
> deleted.
> I can create a new data file on the other disk and stop
> the existing datafile from growing. This will effectively
> move all tempdb activity to the new disk. But is there no
> better way to move the mdf and ldf files to the new disk?
> TIA,
> Jack|||Hi,
How to Move TEMPDB from one location to another
---
USE master
go
ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME =
'E:\tempdb.mdf')
go
ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME =
'E:\templog.ldf')
go
where NAME refers to the logical name of the tempdb database and
log files, and where FILENAME refers to the new location of the
tempdb files. Once this command has run, you must restart the
mssqlserver service before it takes affect.
This steps are common for SQL Server 7.0 and 2000.
Thanks
Hari
MCDBA
"Jack" <jacka8@.excite.com> wrote in message
news:e4a401c40ba6$b1358d50$a301280a@.phx.gbl...
> I have done a new installation which is up and running.
> However the disk on which the tempdb mdf and ldf files are
> is giving a problem. Is there a way to move the files to a
> different disk? I know we can't detach and attach it.
> Alter database does not allow the primary data file to be
> deleted.
> I can create a new data file on the other disk and stop
> the existing datafile from growing. This will effectively
> move all tempdb activity to the new disk. But is there no
> better way to move the mdf and ldf files to the new disk?
> TIA,
> Jack

Move TempDB Database off of the SAN

I have a system configured with Windows 2000 and SQL Server 2000
Clustering (active/passive). Both SQL Servers have a local E:\ drive
with the same directory structure. I would like to move the tempdb
off of the shared SAN and on to the E:\ drive. I don't foresee any
issues with this but wanted to know if anyone else has encountered
problems with this.
Conceivable it should work but would not be a supported configuration.
Rand
This posting is provided "as is" with no warranties and confers no rights.
|||If you would like to put tempdb on a different disk (for performance reasons)
you'd be better to create a new disk on a different disk pool on your SAN.
That way, you'd keep your support options open.
|||> I have a system configured with Windows 2000 and SQL Server 2000
> Clustering (active/passive). Both SQL Servers have a local E:\ drive
> with the same directory structure. I would like to move the tempdb
> off of the shared SAN and on to the E:\ drive. I don't foresee any
> issues with this but wanted to know if anyone else has encountered
> problems with this.
I am vaguely trying to do the same. But how do you plan to make your local
disk visible as a resource of the cluster ? If you cannot make it a
resource of the cluster, you cannot make it recognized...
I am trying to add it as a disk share resource, but it is not accepted by
SQL Server in cluster, even with trace flag 1807.
Did someone manage do do it ?
thanks in advance,
rudi

Move TempDB Database off of the SAN

I have a system configured with Windows 2000 and SQL Server 2000
Clustering (active/passive). Both SQL Servers have a local E:\ drive
with the same directory structure. I would like to move the tempdb
off of the shared SAN and on to the E:\ drive. I don't foresee any
issues with this but wanted to know if anyone else has encountered
problems with this."Douglara" <renee.douglas@.ps.net> wrote in message
news:afc82404.0408231344.1f60247d@.posting.google.c om...
> I have a system configured with Windows 2000 and SQL Server 2000
> Clustering (active/passive). Both SQL Servers have a local E:\ drive
> with the same directory structure. I would like to move the tempdb
> off of the shared SAN and on to the E:\ drive. I don't foresee any
> issues with this but wanted to know if anyone else has encountered
> problems with this.

In theory it should work since the tempdb is recreated at startup.

But I'd ask why? I'm assuming you're looking for a performance improvement?

And suggest asking over in the microsoft.public.sqlserver.clustering group
to be sure.

Move TempDB data/trans From C: to E:

I have a SQL Server 2000 database server on Windows 2000 Advanced Server.
What is the best way to move the TempDB data and transaction log files from
the C: to E: drive?
Thank You,I'm very interested in this as well. We were planning on doing this first
thing Saturday morning.
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:D7969E35-E4D2-4D22-A9BB-DD7B52EA6E2D@.microsoft.com...
> I have a SQL Server 2000 database server on Windows 2000 Advanced Server.
> What is the best way to move the TempDB data and transaction log files
> from
> the C: to E: drive?
> Thank You,|||Here ya go....BOL...just tried it and it worked great.
1. stop sql server
2. copy to your desired location
3. start sql server
4. run the alter statements below
5. restart sql server
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');
GO
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:uPtIzWxaGHA.2124@.TK2MSFTNGP03.phx.gbl...
> I'm very interested in this as well. We were planning on doing this first
> thing Saturday morning.
>
> "Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
> news:D7969E35-E4D2-4D22-A9BB-DD7B52EA6E2D@.microsoft.com...
>> I have a SQL Server 2000 database server on Windows 2000 Advanced Server.
>> What is the best way to move the TempDB data and transaction log files
>> from
>> the C: to E: drive?
>> Thank You,
>|||Hi Tim
What exactly are you doing in step 2? You shouldn't have to move anything,
since the tempdb files are recreated upon system startup. To move tempdb you
just need to run ALTER DATABASE and then restart your SQL Server.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:uRzZ4dxaGHA.3408@.TK2MSFTNGP04.phx.gbl...
> Here ya go....BOL...just tried it and it worked great.
> 1. stop sql server
> 2. copy to your desired location
> 3. start sql server
> 4. run the alter statements below
> 5. restart sql server
> USE master;
> GO
> ALTER DATABASE tempdb
> MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
> GO
> ALTER DATABASE tempdb
> MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');
> GO
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:uPtIzWxaGHA.2124@.TK2MSFTNGP03.phx.gbl...
>> I'm very interested in this as well. We were planning on doing this
>> first thing Saturday morning.
>>
>> "Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
>> news:D7969E35-E4D2-4D22-A9BB-DD7B52EA6E2D@.microsoft.com...
>> I have a SQL Server 2000 database server on Windows 2000 Advanced
>> Server.
>> What is the best way to move the TempDB data and transaction log files
>> from
>> the C: to E: drive?
>> Thank You,
>>
>|||I was doing the steps as outlined in BOL...and I quote from BOL
G. Moving tempdb to a new location
The following example moves tempdb from its current location on disk to
another disk location.
1.. Determine the logical file names of the tempdb database and their
current location on disk.
SELECT name, physical_name
FROM sys.master_files
WHERE database_id = DB_ID('tempdb');
GO
2.. Physically move these files to the new location E:\SQLData.
In this example the new location specified for the tempdb files is
E:\SQLData. If you move the files to different location, modify the example
to point to that location.
3.. Change the location of each file by using ALTER DATABASE.
4.. Stop and restart the instance of SQL Server.
5.. Verify the file change.
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:uG0CSzxaGHA.1192@.TK2MSFTNGP03.phx.gbl...
> Hi Tim
> What exactly are you doing in step 2? You shouldn't have to move anything,
> since the tempdb files are recreated upon system startup. To move tempdb
> you just need to run ALTER DATABASE and then restart your SQL Server.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:uRzZ4dxaGHA.3408@.TK2MSFTNGP04.phx.gbl...
>> Here ya go....BOL...just tried it and it worked great.
>> 1. stop sql server
>> 2. copy to your desired location
>> 3. start sql server
>> 4. run the alter statements below
>> 5. restart sql server
>> USE master;
>> GO
>> ALTER DATABASE tempdb
>> MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
>> GO
>> ALTER DATABASE tempdb
>> MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');
>> GO
>> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
>> news:uPtIzWxaGHA.2124@.TK2MSFTNGP03.phx.gbl...
>> I'm very interested in this as well. We were planning on doing this
>> first thing Saturday morning.
>>
>> "Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
>> news:D7969E35-E4D2-4D22-A9BB-DD7B52EA6E2D@.microsoft.com...
>> I have a SQL Server 2000 database server on Windows 2000 Advanced
>> Server.
>> What is the best way to move the TempDB data and transaction log files
>> from
>> the C: to E: drive?
>> Thank You,
>>
>>
>|||This is a multi-part message in MIME format.
--=_NextPart_000_0368_01C66B08.B9F88460
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Tim
Just FYI, you do not have to move any files to move tempdb, because =tempdb is rebuilt every time SQL Server starts.
Do you have the latest BOL? There was a refresh just a week ago.
G. Moving tempdb to a new location
The following example moves tempdb from its current location on the disk =to another disk location. Because tempdb is re-created each time the =MSSQLSERVER service is started, you do not have to physically move the =data and log files. The files are created when the service is restarted =in step 3. Until the service is restarted, tempdb continues to function =in its existing location.
1.. Determine the logical file names of the tempdb database and their =current location on disk.
SELECT name, physical_name
FROM sys.master_files
WHERE database_id =3D DB_ID('tempdb');
GO
2.. Change the location of each file by using ALTER DATABASE.
USE master;
GO
ALTER DATABASE tempdb MODIFY FILE (NAME =3D tempdev, FILENAME =3D 'E:\SQLData\tempdb.mdf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME =3D templog, FILENAME =3D 'E:\SQLData\templog.ldf');
GO
3.. Stop and restart the instance of SQL Server.
4.. Verify the file change.
SELECT name, physical_name
FROM sys.master_files
WHERE database_id =3D DB_ID('tempdb');
5.. Delete the tempdb.mdf and templog.ldf files from their original =location.
-- HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message =news:%23TTfa5zaGHA.1196@.TK2MSFTNGP03.phx.gbl...
>I was doing the steps as outlined in BOL...and I quote from BOL
> > G. Moving tempdb to a new location
> The following example moves tempdb from its current location on disk =to > another disk location.
> > 1.. Determine the logical file names of the tempdb database and their =
> current location on disk.
> > > > SELECT name, physical_name
> FROM sys.master_files
> WHERE database_id =3D DB_ID('tempdb');
> GO
> > 2.. Physically move these files to the new location E:\SQLData.
> > > > In this example the new location specified for the tempdb files =is > E:\SQLData. If you move the files to different location, modify the =example > to point to that location.
> > > > 3.. Change the location of each file by using ALTER DATABASE.
> > 4.. Stop and restart the instance of SQL Server.
> > > 5.. Verify the file change.
> > > > > "Kalen Delaney" <replies@.public_newsgroups.com> wrote in message > news:uG0CSzxaGHA.1192@.TK2MSFTNGP03.phx.gbl...
>> Hi Tim
>> What exactly are you doing in step 2? You shouldn't have to move =anything, >> since the tempdb files are recreated upon system startup. To move =tempdb >> you just need to run ALTER DATABASE and then restart your SQL Server.
>> -- >> HTH
>> Kalen Delaney, SQL Server MVP
>> www.solidqualitylearning.com
>>
>> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message >> news:uRzZ4dxaGHA.3408@.TK2MSFTNGP04.phx.gbl...
>> Here ya go....BOL...just tried it and it worked great.
>> 1. stop sql server
>> 2. copy to your desired location
>> 3. start sql server
>> 4. run the alter statements below
>> 5. restart sql server
>> USE master;
>> GO
>> ALTER DATABASE tempdb
>> MODIFY FILE (NAME =3D tempdev, FILENAME =3D ='E:\SQLData\tempdb.mdf');
>> GO
>> ALTER DATABASE tempdb
>> MODIFY FILE (NAME =3D templog, FILENAME =3D ='E:\SQLData\templog.ldf');
>> GO
>> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message =
>> news:uPtIzWxaGHA.2124@.TK2MSFTNGP03.phx.gbl...
>> I'm very interested in this as well. We were planning on doing =this >> first thing Saturday morning.
>>
>> "Joe K." <Joe K.@.discussions.microsoft.com> wrote in message >> news:D7969E35-E4D2-4D22-A9BB-DD7B52EA6E2D@.microsoft.com...
>> I have a SQL Server 2000 database server on Windows 2000 Advanced >> Server.
>> What is the best way to move the TempDB data and transaction log =files >> from
>> the C: to E: drive?
>> Thank You,
>>
>>
>> > >
--=_NextPart_000_0368_01C66B08.B9F88460
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Hi Tim
Just FYI, you do not have to move any =files to move tempdb, because tempdb is rebuilt every time SQL Server =starts.
Do you have the latest BOL? There was a =refresh just a week ago.
G. Moving =tempdb to a new location
http://ddue.schemas.microsoft.com/authoring/2003/5">
The following example moves =tempdb from its current location on the disk to another disk location. Because tempdb is re-created each time the MSSQLSERVER =service is started, you do not have to physically move the data and log =files. The files are created when the service is restarted in step 3. Until the =service is restarted, tempdb continues to function in its existing =location.
Determine the logical file names of =the tempdb database and their current location on disk.
SELECT name, =physical_name
FROM sys.master_files
WHERE database_id =3D DB_ID('tempdb');
GO
Change the location of each file by =using ALTER DATABASE.
USE master;
GO
ALTER DATABASE tempdb MODIFY FILE (NAME =3D tempdev, FILENAME =3D 'E:\SQLData\tempdb.mdf');
GO
ALTER DATABASE tempdb MODIFY FILE (NAME =3D templog, FILENAME =3D 'E:\SQLData\templog.ldf');
GO
Stop and restart the instance of SQL =Server.
Verify the file change.
SELECT name, =physical_name
FROM sys.master_files
WHERE database_id =3D =DB_ID('tempdb');
Delete the tempdb.mdf and templog.ldf =files from their original location.
-- HTHKalen Delaney, SQL =Server MVPwww.solidqualitylearning.com
"Tim Greenwood" wrote in message news:%23TTfa5zaGHA.1196@.TK2MSFTNGP03.phx.gbl...>I was doing the =steps as outlined in BOL...and I quote from BOL> > G. Moving =tempdb to a new location> The following example moves tempdb from its current =location on disk to > another disk location.> => 1.. Determine the logical file names of the tempdb database and their => current location on disk.> > > > SELECT =name, physical_name> FROM sys.master_files> WHERE database_id ==3D DB_ID('tempdb');> GO> > 2.. Physically move =these files to the new location E:\SQLData.> > > > In this example the =new location specified for the tempdb files is > E:\SQLData. If you =move the files to different location, modify the example > to point to =that location.> > > > 3.. Change the =location of each file by using ALTER DATABASE.> > 4.. Stop and =restart the instance of SQL Server.> > > 5.. Verify =the file change.> > > > > "Kalen Delaney" wrote in message > news:uG0CSzxaGHA.1192@.TK2MSFTNGP03.phx.gbl...> Hi Tim>> What exactly are =you doing in step 2? You shouldn't have to move anything, > since the =tempdb files are recreated upon system startup. To move tempdb > you =just need to run ALTER DATABASE and then restart your SQL Server.>> -- > HTH> Kalen =Delaney, SQL Server MVP>www.solidqualitylearning.com>>> "Tim Greenwood" = wrote in message > news:uRzZ4dxaGHA.3408@.TK2MSFTNGP04.phx.gbl...> Here ya go....BOL...just tried it and it =worked great.> 1. stop sql server> 2. copy to =your desired location> 3. start sql server> 4. =run the alter statements below> 5. restart sql server>> USE master;> GO> ALTER DATABASE tempdb> MODIFY FILE =(NAME =3D tempdev, FILENAME =3D 'E:\SQLData\tempdb.mdf');> =GO> ALTER DATABASE tempdb> MODIFY FILE (NAME =3D =templog, FILENAME =3D 'E:\SQLData\templog.ldf');> GO>> "Tim Greenwood" wrote in message > news:uPtIzWxaGHA.2124@.TK2MSFTNGP03.phx.gbl...> I'm very interested in this as =well. We were planning on doing this > first thing Saturday morning.>>>&=gt;>> "Joe K." wrote in message > news:D7969E35-E4D2-4D22-A9BB-DD7B52EA6E2D@.microsoft.com...>> I have a SQL Server 2000 database server on Windows 2000 Advanced > =Server.>> What is the best way to move the TempDB data and transaction log files > from> the C: to E: drive?>> Thank You,>>>>&=gt;>> > >

--=_NextPart_000_0368_01C66B08.B9F88460--sql

Move TempDB data/trans From C: to E:

I have a SQL Server 2000 database server on Windows 2000 Advanced Server.
What is the best way to move the TempDB data and transaction log files from
the C: to E: drive?
Thank You,I'm very interested in this as well. We were planning on doing this first
thing Saturday morning.
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:D7969E35-E4D2-4D22-A9BB-DD7B52EA6E2D@.microsoft.com...
> I have a SQL Server 2000 database server on Windows 2000 Advanced Server.
> What is the best way to move the TempDB data and transaction log files
> from
> the C: to E: drive?
> Thank You,|||Here ya go....BOL...just tried it and it worked great.
1. stop sql server
2. copy to your desired location
3. start sql server
4. run the alter statements below
5. restart sql server
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');
GO
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:uPtIzWxaGHA.2124@.TK2MSFTNGP03.phx.gbl...
> I'm very interested in this as well. We were planning on doing this first
> thing Saturday morning.
>
> "Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
> news:D7969E35-E4D2-4D22-A9BB-DD7B52EA6E2D@.microsoft.com...
>|||Hi Tim
What exactly are you doing in step 2? You shouldn't have to move anything,
since the tempdb files are recreated upon system startup. To move tempdb you
just need to run ALTER DATABASE and then restart your SQL Server.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:uRzZ4dxaGHA.3408@.TK2MSFTNGP04.phx.gbl...
> Here ya go....BOL...just tried it and it worked great.
> 1. stop sql server
> 2. copy to your desired location
> 3. start sql server
> 4. run the alter statements below
> 5. restart sql server
> USE master;
> GO
> ALTER DATABASE tempdb
> MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
> GO
> ALTER DATABASE tempdb
> MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');
> GO
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:uPtIzWxaGHA.2124@.TK2MSFTNGP03.phx.gbl...
>|||I was doing the steps as outlined in BOL...and I quote from BOL
G. Moving tempdb to a new location
The following example moves tempdb from its current location on disk to
another disk location.
1.. Determine the logical file names of the tempdb database and their
current location on disk.
SELECT name, physical_name
FROM sys.master_files
WHERE database_id = DB_ID('tempdb');
GO
2.. Physically move these files to the new location E:\SQLData.
In this example the new location specified for the tempdb files is
E:\SQLData. If you move the files to different location, modify the example
to point to that location.
3.. Change the location of each file by using ALTER DATABASE.
4.. Stop and restart the instance of SQL Server.
5.. Verify the file change.
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:uG0CSzxaGHA.1192@.TK2MSFTNGP03.phx.gbl...
> Hi Tim
> What exactly are you doing in step 2? You shouldn't have to move anything,
> since the tempdb files are recreated upon system startup. To move tempdb
> you just need to run ALTER DATABASE and then restart your SQL Server.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:uRzZ4dxaGHA.3408@.TK2MSFTNGP04.phx.gbl...
>|||Hi Tim
Just FYI, you do not have to move any files to move tempdb, because tempdb i
s rebuilt every time SQL Server starts.
Do you have the latest BOL? There was a refresh just a week ago.
G. Moving tempdb to a new location
The following example moves tempdb from its current location on the disk to
another disk location. Because tempdb is re-created each time the MSSQLSERVE
R service is started, you do not have to physically move the data and log fi
les. The files are created when the service is restarted in step 3. Until th
e service is restarted, tempdb continues to function in its existing locatio
n.
1.. Determine the logical file names of the tempdb database and their curren
t location on disk.
SELECT name, physical_name
FROM sys.master_files
WHERE database_id = DB_ID('tempdb');
GO
2.. Change the location of each file by using ALTER DATABASE.
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');
GO
3.. Stop and restart the instance of SQL Server.
4.. Verify the file change.
SELECT name, physical_name
FROM sys.master_files
WHERE database_id = DB_ID('tempdb');
5.. Delete the tempdb.mdf and templog.ldf files from their original location
.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message news:%23TTfa5zaGHA.1196
@.TK2MSFTNGP03.phx.gbl...
>I was doing the steps as outlined in BOL...and I quote from BOL
>
> G. Moving tempdb to a new location
> The following example moves tempdb from its current location on disk to
> another disk location.
>
> 1.. Determine the logical file names of the tempdb database and their
> current location on disk.
>
>
>
> SELECT name, physical_name
> FROM sys.master_files
> WHERE database_id = DB_ID('tempdb');
> GO
>
> 2.. Physically move these files to the new location E:\SQLData.
>
>
>
> In this example the new location specified for the tempdb files is
> E:\SQLData. If you move the files to different location, modify the exampl
e
> to point to that location.
>
>
>
> 3.. Change the location of each file by using ALTER DATABASE.
>
> 4.. Stop and restart the instance of SQL Server.
>
>
> 5.. Verify the file change.
>
>
>
>
> "Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
> news:uG0CSzxaGHA.1192@.TK2MSFTNGP03.phx.gbl...
>
>

Wednesday, March 7, 2012

Move Filegroup another disk

I can move filegroup of tempdb another disk
Actually is c:\. I need move to e
ThankYou use the ALTER DATABASE command. See Books Online for syntax.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Jorge" <anonymous@.discussions.microsoft.com> wrote in message
news:DDDE61FC-2A05-4548-92CD-086E3C1705E2@.microsoft.com...
> I can move filegroup of tempdb another disk?
> Actually is c:\. I need move to e:
> Thanks
>