Blog
Gallery
Projects
About
Backtrack:
Blog
›
Change the logical names of MS…
Comments
Change the logical names of MS-SQL databases
posted on March 8th 2011, at 10:24
by
lunarg
It's possible to rename the logical names of MS-SQL databases through the SQL-prompt (osql.exe).
Log in to your database using osql:
> osql -S SERVERINSTANCE -d MyDB -U sa
First, query the current logical names; you will need them in order to rename them.
1> SELECT * FROM sysfiles2> GOfileid groupid size maxsize growth status perf name filename1 1 106224 -1 10 1048578 0 OldName_Data D:\SQL2000\Data\MyDB_Data.mdf2 0 128 -1 10 1048642 0 OldName_Log D:\SQL2000\Data\MyDB_Log.ldf
The name column specifies the logical names. Use the following SQL statement to rename them.
1>
...
read more
add a comment
Tags
computer
windows
software
linux
news
home
hardware
soaring
events
mac
network
msoffice
myhw
virtualization
internet
review
mail
fun
server
multimedia
gentoo
games
terminalserver
exchange
howto
site
vmware
sbs
antivirus
travel
Archive
«
‹
May 2012
›
»
Sun
Mon
Tue
Wed
Thu
Fri
Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Links
-
Soaring Club Albatros (BE)
-
Soaring stage 2010 (BE)
-
Wil's Photos
-
Heidi's Blog
-
ElectroMarket
Quote
«
I needed a password with eight characters so I picked Snow White and the Seven Dwarves.
»
Contact
© 2009 Black Manticore – all rights reserved
code by Jelle Hillen, design by Evelynn Verdyck, hosted at Cats&Dogs