I have a server W2K (and MSDE) with 2 partitions one for
system (3GB) and one for data (37GB).
An application creates ALL SQL databases, in the default
folder for MSDE 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data' in the system partition.
It intended to move the databases for the data partition?
Hi,
Login to SQL Server using OSQL -Usa -Ppassword -Sservername (Enter)
This will allow you to go to a SQL prompt there type the below command to
detach the database (Only for User databases)
1>sp_detach_db <dbname>
2>go
Now you can move the MDF and LDF files to new partition say D:\MSSQL\DATA
After that use the below command in the SQL prompt:-
1>sp_attach_db
'dbname','d:\mssql\data\dbname.mdf',''d:\mssql\dat a\dbname.ldf'
2>go
The above command will attach the database back to SQl Server but in new
partition.
Note: Do the above steps for all the other user databases as well as
Pubs,Northwind.
If you need to do the same for system databases (Master, model , tempdb,
msdb), follow the below link. The link also details movement of user
databases.
http://support.microsoft.com/default...224071&sd=tech
Thanks
Hari
MCDBA
"Batista" <carlos.batista@.cmz.pt> wrote in message
news:ac3b01c43692$bc1bf350$a501280a@.phx.gbl...
> I have a server W2K (and MSDE) with 2 partitions one for
> system (3GB) and one for data (37GB).
> An application creates ALL SQL databases, in the default
> folder for MSDE 'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data' in the system partition.
> It intended to move the databases for the data partition?
>
Showing posts with label forsystem. Show all posts
Showing posts with label forsystem. Show all posts
Monday, March 19, 2012
Move SQL Databse (in MSDE) to another path
I have a server W2K (and MSDE) with 2 partitions one for
system (3GB) and one for data (37GB).
An application creates ALL SQL databases, in the default
folder for MSDE 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data' in the system partition.
It intended to move the databases for the data partition?Hi,
Login to SQL Server using OSQL -Usa -Ppassword -Sservername (Enter)
This will allow you to go to a SQL prompt there type the below command to
detach the database (Only for User databases)
1>sp_detach_db <dbname>
2>go
Now you can move the MDF and LDF files to new partition say D:\MSSQL\DATA
After that use the below command in the SQL prompt:-
1>sp_attach_db
'dbname','d:\mssql\data\dbname.mdf',''d:\mssql\data\dbname.ldf'
2>go
The above command will attach the database back to SQl Server but in new
partition.
Note: Do the above steps for all the other user databases as well as
Pubs,Northwind.
If you need to do the same for system databases (Master, model , tempdb,
msdb), follow the below link. The link also details movement of user
databases.
http://support.microsoft.com/defaul...;224071&sd=tech
Thanks
Hari
MCDBA
"Batista" <carlos.batista@.cmz.pt> wrote in message
news:ac3b01c43692$bc1bf350$a501280a@.phx.gbl...
> I have a server W2K (and MSDE) with 2 partitions one for
> system (3GB) and one for data (37GB).
> An application creates ALL SQL databases, in the default
> folder for MSDE 'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data' in the system partition.
> It intended to move the databases for the data partition?
>
system (3GB) and one for data (37GB).
An application creates ALL SQL databases, in the default
folder for MSDE 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data' in the system partition.
It intended to move the databases for the data partition?Hi,
Login to SQL Server using OSQL -Usa -Ppassword -Sservername (Enter)
This will allow you to go to a SQL prompt there type the below command to
detach the database (Only for User databases)
1>sp_detach_db <dbname>
2>go
Now you can move the MDF and LDF files to new partition say D:\MSSQL\DATA
After that use the below command in the SQL prompt:-
1>sp_attach_db
'dbname','d:\mssql\data\dbname.mdf',''d:\mssql\data\dbname.ldf'
2>go
The above command will attach the database back to SQl Server but in new
partition.
Note: Do the above steps for all the other user databases as well as
Pubs,Northwind.
If you need to do the same for system databases (Master, model , tempdb,
msdb), follow the below link. The link also details movement of user
databases.
http://support.microsoft.com/defaul...;224071&sd=tech
Thanks
Hari
MCDBA
"Batista" <carlos.batista@.cmz.pt> wrote in message
news:ac3b01c43692$bc1bf350$a501280a@.phx.gbl...
> I have a server W2K (and MSDE) with 2 partitions one for
> system (3GB) and one for data (37GB).
> An application creates ALL SQL databases, in the default
> folder for MSDE 'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data' in the system partition.
> It intended to move the databases for the data partition?
>
Subscribe to:
Posts (Atom)