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!

split database into two databases 1

Status
Not open for further replies.

mmaddox

IS-IT--Management
May 22, 2002
53
US
I have a single Server with a single database with multiple tables. I want to split off some of the the tables into a seperate database on the same server. I have been able to do that by various methods - attach, copy, restore and giving the new database a new MDF and LDF name. Then just deleting the tables, views and diagrams I don't want in the new database. However, the new database still uses a file name from the old database. Looking at the Database files tab on Properties it shows File Name is the same as from the original database, and Location reflects the new MDF file Name I gave it. If I delete the old database entirely, the new one still works, but still has that name reference.

Does anyone know if it is possible to change that File Name to something else? or does it even matter? both databases seem to work ok. Maybe it has something to do with the Master database. I just don't know.
 
I think you are talking about the logical file name?

alter database myb
modify file (name = oldname, newname = newname)


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top