Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

take a database from system databse place

Status
Not open for further replies.

baran121

Programmer
Sep 8, 2005
337
0
0
TR
Hi everyone,
I have a database in system database place. I dont know how i put it there, but this database is not a system database. how can i change it's place.
thanks.
databseplaceproblem_cthwth.png
 
Any program must be stopped to move item
Locate MDF and LDF Database

Files:
Database_name_Data.mdf - for .MDF
Database_name_log.ldf - for .LDF

Run this SQL script
ALTER DATABASE AnimalWorks
MODIFY FILE ( NAME = AnimalWorks_Data,
FILENAME = 'E:\New_location\AdventureWorks2014_Data.mdf');
GO

ALTER DATABASE AnimalWorks
MODIFY FILE ( NAME = AdventureWorks2014_Log,
FILENAME = 'E:\New_location\AdventureWorks2014_Log.ldf');
GO

This creates a separate drive with suffiecient disk space to store the file.

Did I solve your question or was that useless? Sorry, new to SQL.
 
Otherwise I don't know. I think the only way you can get it there is to create a new drive and transmit it through there?

Sincerely,
Bob Space
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top