Showing posts with label named. Show all posts
Showing posts with label named. Show all posts

Wednesday, March 28, 2012

Renaming a named SQL Server 2000 instance

Guys
I am trying to rename a named SQL Server instance , please share any inputs
Thanks
SwamiNo can do. Install a new instance with desired name and transfer the data (b
ackup/restore,
detach/attach, DTS etc...).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Swami" <Swami@.discussions.microsoft.com> wrote in message
news:BD8C5C3D-15D0-447F-AB0D-78AB8B7D8F1B@.microsoft.com...
> Guys
> I am trying to rename a named SQL Server instance , please share any inpu
ts
> Thanks
> Swami|||Hi,
Only default instance of sql server can be renamed. As Tibor mentioned only
way to change the named instance is by doing new Named instance with
required name and then transfer all databases from old instance to new
installed instance.
Thanks
Hari
SQL Server MVP
"Swami" <Swami@.discussions.microsoft.com> wrote in message
news:BD8C5C3D-15D0-447F-AB0D-78AB8B7D8F1B@.microsoft.com...
> Guys
> I am trying to rename a named SQL Server instance , please share any
> inputs
> Thanks
> Swami

Renaming a named SQL Server 2000 instance

Guys
I am trying to rename a named SQL Server instance , please share any inputs
Thanks
Swami
No can do. Install a new instance with desired name and transfer the data (backup/restore,
detach/attach, DTS etc...).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Swami" <Swami@.discussions.microsoft.com> wrote in message
news:BD8C5C3D-15D0-447F-AB0D-78AB8B7D8F1B@.microsoft.com...
> Guys
> I am trying to rename a named SQL Server instance , please share any inputs
> Thanks
> Swami
|||Hi,
Only default instance of sql server can be renamed. As Tibor mentioned only
way to change the named instance is by doing new Named instance with
required name and then transfer all databases from old instance to new
installed instance.
Thanks
Hari
SQL Server MVP
"Swami" <Swami@.discussions.microsoft.com> wrote in message
news:BD8C5C3D-15D0-447F-AB0D-78AB8B7D8F1B@.microsoft.com...
> Guys
> I am trying to rename a named SQL Server instance , please share any
> inputs
> Thanks
> Swami
sql

Renaming a named SQL Server 2000 instance

Guys
I am trying to rename a named SQL Server instance , please share any inputs
Thanks
SwamiHi Swami,
Try something like this:
sp_dropserver <old_servername\instancename>
go
sp_addserver <new_servername\instancename> , local
go
Good luck
Regards,
Dilip|||No can do. Install a new instance with desired name and transfer the data (backup/restore,
detach/attach, DTS etc...).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Swami" <Swami@.discussions.microsoft.com> wrote in message
news:BD8C5C3D-15D0-447F-AB0D-78AB8B7D8F1B@.microsoft.com...
> Guys
> I am trying to rename a named SQL Server instance , please share any inputs
> Thanks
> Swami|||Hi,
Only default instance of sql server can be renamed. As Tibor mentioned only
way to change the named instance is by doing new Named instance with
required name and then transfer all databases from old instance to new
installed instance.
Thanks
Hari
SQL Server MVP
"Swami" <Swami@.discussions.microsoft.com> wrote in message
news:BD8C5C3D-15D0-447F-AB0D-78AB8B7D8F1B@.microsoft.com...
> Guys
> I am trying to rename a named SQL Server instance , please share any
> inputs
> Thanks
> Swami

Renaming a named instance of SQL Server 2005

I installed a named instance of SQL Server 2005 on a machine...let's
say I called it VAIO4. I want to rename it to BTSERVER. I'd rather not
have to uninstall and reinstall, but will do that if I have to. Is
there a way to rename the named instance without uninstall/reinstall?Unfortunately, you'll have to do the de-install/reinstall thing.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
<broy@.omegasoftwareinc.com> wrote in message
news:1150329868.510319.124590@.p79g2000cwp.googlegroups.com...
I installed a named instance of SQL Server 2005 on a machine...let's
say I called it VAIO4. I want to rename it to BTSERVER. I'd rather not
have to uninstall and reinstall, but will do that if I have to. Is
there a way to rename the named instance without uninstall/reinstall?|||Thanks Tom...
Just FMI, wasn't this something that could be done in SQL Server 2000
without uninstall/reinstall? Did the capability disappear with SQL
Server 2005 or was it never there even in 2000?|||I don't recall it being a possibility with 2000. However, it's been on my
wish list for a good long time. Don't get me started... ;-)
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
<broy@.omegasoftwareinc.com> wrote in message
news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
Thanks Tom...
Just FMI, wasn't this something that could be done in SQL Server 2000
without uninstall/reinstall? Did the capability disappear with SQL
Server 2005 or was it never there even in 2000?|||OK, OK, won't get you started (or did I already?!). Just another quick
question for you, though. What if want another named instance of SQL
Server 2005 on the machine. Do I need to go through another install to
do that or is there another way to "spawn" another named instance on
the machine without getting rid of the current one?|||Nope, you gotta do one install per instance. Kinda makes sense, since each
instance could be a different version or different Service Pack level.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
<broy@.omegasoftwareinc.com> wrote in message
news:1150336619.432501.214330@.h76g2000cwa.googlegroups.com...
OK, OK, won't get you started (or did I already?!). Just another quick
question for you, though. What if want another named instance of SQL
Server 2005 on the machine. Do I need to go through another install to
do that or is there another way to "spawn" another named instance on
the machine without getting rid of the current one?|||it's actually possible. (WARNING: do at your own perils!)
1. drop current instname (sp_dropserver)
2. add new instance name (sp_addserver 'new name','local')
3. stop sqlserver
4. modify hklm\software\microsoft\microsoft sql server\
5. modify hklm\system\mssql$<instance>
6. use "sc create" to add new mssql$<inst>
7. start up with new inst_name - voila!
-oj
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23eYqXqBkGHA.2200@.TK2MSFTNGP05.phx.gbl...
>I don't recall it being a possibility with 2000. However, it's been on my
> wish list for a good long time. Don't get me started... ;-)
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> <broy@.omegasoftwareinc.com> wrote in message
> news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
> Thanks Tom...
> Just FMI, wasn't this something that could be done in SQL Server 2000
> without uninstall/reinstall? Did the capability disappear with SQL
> Server 2005 or was it never there even in 2000?
>|||oops. #5 should be "modify
hklm\system\currentcontrolset\services\mssql$inst"
--
-oj
"oj" <nospam_ojngo@.home.com> wrote in message
news:elptQuCkGHA.1276@.TK2MSFTNGP03.phx.gbl...
> it's actually possible. (WARNING: do at your own perils!)
> 1. drop current instname (sp_dropserver)
> 2. add new instance name (sp_addserver 'new name','local')
> 3. stop sqlserver
> 4. modify hklm\software\microsoft\microsoft sql server\
> 5. modify hklm\system\mssql$<instance>
> 6. use "sc create" to add new mssql$<inst>
> 7. start up with new inst_name - voila!
>
> --
> -oj
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23eYqXqBkGHA.2200@.TK2MSFTNGP05.phx.gbl...
>>I don't recall it being a possibility with 2000. However, it's been on my
>> wish list for a good long time. Don't get me started... ;-)
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Toronto, ON Canada
>> .
>> <broy@.omegasoftwareinc.com> wrote in message
>> news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
>> Thanks Tom...
>> Just FMI, wasn't this something that could be done in SQL Server 2000
>> without uninstall/reinstall? Did the capability disappear with SQL
>> Server 2005 or was it never there even in 2000?
>|||The problem is that 'do at your own perils!' How does one know that all the
references to the old instance name have been changed everywhere?
Linchi
"oj" wrote:
> it's actually possible. (WARNING: do at your own perils!)
> 1. drop current instname (sp_dropserver)
> 2. add new instance name (sp_addserver 'new name','local')
> 3. stop sqlserver
> 4. modify hklm\software\microsoft\microsoft sql server\
> 5. modify hklm\system\mssql$<instance>
> 6. use "sc create" to add new mssql$<inst>
> 7. start up with new inst_name - voila!
>
> --
> -oj
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23eYqXqBkGHA.2200@.TK2MSFTNGP05.phx.gbl...
> >I don't recall it being a possibility with 2000. However, it's been on my
> > wish list for a good long time. Don't get me started... ;-)
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > SQL Server MVP
> > Toronto, ON Canada
> > .
> > <broy@.omegasoftwareinc.com> wrote in message
> > news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
> > Thanks Tom...
> >
> > Just FMI, wasn't this something that could be done in SQL Server 2000
> > without uninstall/reinstall? Did the capability disappear with SQL
> > Server 2005 or was it never there even in 2000?
> >
>
>|||"do at your own perils" is just my blanket disclaimer when it comes to
system configuration. Actually, you can do all this very safely. Instead of
modifying the existing keys, you can create a new set. Modify this new set
with appropriate changes (I'll see about putting an article together
documenting it all). Register a new service for the new instance and then
start it.
Your original configuration/data is _never_ touched, so, if need to, you can
always start up the old instance.
--
-oj
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:97130750-F0A3-483C-8693-BAD70E02F5CF@.microsoft.com...
> The problem is that 'do at your own perils!' How does one know that all
> the
> references to the old instance name have been changed everywhere?
> Linchi
> "oj" wrote:
>> it's actually possible. (WARNING: do at your own perils!)
>> 1. drop current instname (sp_dropserver)
>> 2. add new instance name (sp_addserver 'new name','local')
>> 3. stop sqlserver
>> 4. modify hklm\software\microsoft\microsoft sql server\
>> 5. modify hklm\system\mssql$<instance>
>> 6. use "sc create" to add new mssql$<inst>
>> 7. start up with new inst_name - voila!
>>
>> --
>> -oj
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23eYqXqBkGHA.2200@.TK2MSFTNGP05.phx.gbl...
>> >I don't recall it being a possibility with 2000. However, it's been on
>> >my
>> > wish list for a good long time. Don't get me started... ;-)
>> >
>> > --
>> > Tom
>> >
>> > ----
>> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> > SQL Server MVP
>> > Toronto, ON Canada
>> > .
>> > <broy@.omegasoftwareinc.com> wrote in message
>> > news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
>> > Thanks Tom...
>> >
>> > Just FMI, wasn't this something that could be done in SQL Server 2000
>> > without uninstall/reinstall? Did the capability disappear with SQL
>> > Server 2005 or was it never there even in 2000?
>> >
>>|||Makes you wonder why MS doesn't have a tool to do this - without the risk or
disclaimer. I think many folks would sure love to have it.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"oj" <nospam_ojngo@.home.com> wrote in message
news:O%23dBhbKkGHA.3484@.TK2MSFTNGP03.phx.gbl...
"do at your own perils" is just my blanket disclaimer when it comes to
system configuration. Actually, you can do all this very safely. Instead of
modifying the existing keys, you can create a new set. Modify this new set
with appropriate changes (I'll see about putting an article together
documenting it all). Register a new service for the new instance and then
start it.
Your original configuration/data is _never_ touched, so, if need to, you can
always start up the old instance.
--
-oj
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:97130750-F0A3-483C-8693-BAD70E02F5CF@.microsoft.com...
> The problem is that 'do at your own perils!' How does one know that all
> the
> references to the old instance name have been changed everywhere?
> Linchi
> "oj" wrote:
>> it's actually possible. (WARNING: do at your own perils!)
>> 1. drop current instname (sp_dropserver)
>> 2. add new instance name (sp_addserver 'new name','local')
>> 3. stop sqlserver
>> 4. modify hklm\software\microsoft\microsoft sql server\
>> 5. modify hklm\system\mssql$<instance>
>> 6. use "sc create" to add new mssql$<inst>
>> 7. start up with new inst_name - voila!
>>
>> --
>> -oj
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23eYqXqBkGHA.2200@.TK2MSFTNGP05.phx.gbl...
>> >I don't recall it being a possibility with 2000. However, it's been on
>> >my
>> > wish list for a good long time. Don't get me started... ;-)
>> >
>> > --
>> > Tom
>> >
>> > ----
>> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> > SQL Server MVP
>> > Toronto, ON Canada
>> > .
>> > <broy@.omegasoftwareinc.com> wrote in message
>> > news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
>> > Thanks Tom...
>> >
>> > Just FMI, wasn't this something that could be done in SQL Server 2000
>> > without uninstall/reinstall? Did the capability disappear with SQL
>> > Server 2005 or was it never there even in 2000?
>> >
>>|||well, it's not that simple. ;-)
you can't easily change instance name if you have replication, loopback
linked server, etc. which depends on the old instance name. also, it would
be more support call for them because the new instance name does not
reference the normal instance path (i.e. physical location/pointer still
point to the old instance). this can be very confusing for _regular_ users.
uninstall/reinstall is the recommended route because it ensures everything
is right where it should be. of course this requires some work on the dba
(i.e. move data from old instance to new instance) but that's not of their
concern.
-oj
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OY4F5FNkGHA.456@.TK2MSFTNGP05.phx.gbl...
> Makes you wonder why MS doesn't have a tool to do this - without the risk
> or
> disclaimer. I think many folks would sure love to have it.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> "oj" <nospam_ojngo@.home.com> wrote in message
> news:O%23dBhbKkGHA.3484@.TK2MSFTNGP03.phx.gbl...
> "do at your own perils" is just my blanket disclaimer when it comes to
> system configuration. Actually, you can do all this very safely. Instead
> of
> modifying the existing keys, you can create a new set. Modify this new set
> with appropriate changes (I'll see about putting an article together
> documenting it all). Register a new service for the new instance and then
> start it.
> Your original configuration/data is _never_ touched, so, if need to, you
> can
> always start up the old instance.
> --
> -oj
>
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
> news:97130750-F0A3-483C-8693-BAD70E02F5CF@.microsoft.com...
>> The problem is that 'do at your own perils!' How does one know that all
>> the
>> references to the old instance name have been changed everywhere?
>> Linchi
>> "oj" wrote:
>> it's actually possible. (WARNING: do at your own perils!)
>> 1. drop current instname (sp_dropserver)
>> 2. add new instance name (sp_addserver 'new name','local')
>> 3. stop sqlserver
>> 4. modify hklm\software\microsoft\microsoft sql server\
>> 5. modify hklm\system\mssql$<instance>
>> 6. use "sc create" to add new mssql$<inst>
>> 7. start up with new inst_name - voila!
>>
>> --
>> -oj
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23eYqXqBkGHA.2200@.TK2MSFTNGP05.phx.gbl...
>> >I don't recall it being a possibility with 2000. However, it's been on
>> >my
>> > wish list for a good long time. Don't get me started... ;-)
>> >
>> > --
>> > Tom
>> >
>> > ----
>> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> > SQL Server MVP
>> > Toronto, ON Canada
>> > .
>> > <broy@.omegasoftwareinc.com> wrote in message
>> > news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
>> > Thanks Tom...
>> >
>> > Just FMI, wasn't this something that could be done in SQL Server 2000
>> > without uninstall/reinstall? Did the capability disappear with SQL
>> > Server 2005 or was it never there even in 2000?
>> >
>>
>

Renaming a named instance of SQL Server 2005

I installed a named instance of SQL Server 2005 on a machine...let's
say I called it VAIO4. I want to rename it to BTSERVER. I'd rather not
have to uninstall and reinstall, but will do that if I have to. Is
there a way to rename the named instance without uninstall/reinstall?Unfortunately, you'll have to do the de-install/reinstall thing.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
<broy@.omegasoftwareinc.com> wrote in message
news:1150329868.510319.124590@.p79g2000cwp.googlegroups.com...
I installed a named instance of SQL Server 2005 on a machine...let's
say I called it VAIO4. I want to rename it to BTSERVER. I'd rather not
have to uninstall and reinstall, but will do that if I have to. Is
there a way to rename the named instance without uninstall/reinstall?|||Thanks Tom...
Just FMI, wasn't this something that could be done in SQL Server 2000
without uninstall/reinstall? Did the capability disappear with SQL
Server 2005 or was it never there even in 2000?|||I don't recall it being a possibility with 2000. However, it's been on my
wish list for a good long time. Don't get me started... ;-)
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
<broy@.omegasoftwareinc.com> wrote in message
news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
Thanks Tom...
Just FMI, wasn't this something that could be done in SQL Server 2000
without uninstall/reinstall? Did the capability disappear with SQL
Server 2005 or was it never there even in 2000?|||OK, OK, won't get you started (or did I already?!). Just another quick
question for you, though. What if want another named instance of SQL
Server 2005 on the machine. Do I need to go through another install to
do that or is there another way to "spawn" another named instance on
the machine without getting rid of the current one?|||Nope, you gotta do one install per instance. Kinda makes sense, since each
instance could be a different version or different Service Pack level.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
<broy@.omegasoftwareinc.com> wrote in message
news:1150336619.432501.214330@.h76g2000cwa.googlegroups.com...
OK, OK, won't get you started (or did I already?!). Just another quick
question for you, though. What if want another named instance of SQL
Server 2005 on the machine. Do I need to go through another install to
do that or is there another way to "spawn" another named instance on
the machine without getting rid of the current one?|||it's actually possible. (WARNING: do at your own perils!)
1. drop current instname (sp_dropserver)
2. add new instance name (sp_addserver 'new name','local')
3. stop sqlserver
4. modify hklm\software\microsoft\microsoft sql server\
5. modify hklm\system\mssql$<instance>
6. use "sc create" to add new mssql$<inst>
7. start up with new inst_name - voila!
-oj
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23eYqXqBkGHA.2200@.TK2MSFTNGP05.phx.gbl...
>I don't recall it being a possibility with 2000. However, it's been on my
> wish list for a good long time. Don't get me started... ;-)
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> <broy@.omegasoftwareinc.com> wrote in message
> news:1150334059.199056.4380@.h76g2000cwa.googlegroups.com...
> Thanks Tom...
> Just FMI, wasn't this something that could be done in SQL Server 2000
> without uninstall/reinstall? Did the capability disappear with SQL
> Server 2005 or was it never there even in 2000?
>|||oops. #5 should be "modify
hklm\system\currentcontrolset\services\m
ssql$inst"
-oj
"oj" <nospam_ojngo@.home.com> wrote in message
news:elptQuCkGHA.1276@.TK2MSFTNGP03.phx.gbl...
> it's actually possible. (WARNING: do at your own perils!)
> 1. drop current instname (sp_dropserver)
> 2. add new instance name (sp_addserver 'new name','local')
> 3. stop sqlserver
> 4. modify hklm\software\microsoft\microsoft sql server\
> 5. modify hklm\system\mssql$<instance>
> 6. use "sc create" to add new mssql$<inst>
> 7. start up with new inst_name - voila!
>
> --
> -oj
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23eYqXqBkGHA.2200@.TK2MSFTNGP05.phx.gbl...
>|||Unfortunately, you'll have to do the de-install/reinstall thing.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
<broy@.omegasoftwareinc.com> wrote in message
news:1150329868.510319.124590@.p79g2000cwp.googlegroups.com...
I installed a named instance of SQL Server 2005 on a machine...let's
say I called it VAIO4. I want to rename it to BTSERVER. I'd rather not
have to uninstall and reinstall, but will do that if I have to. Is
there a way to rename the named instance without uninstall/reinstall?|||Thanks Tom...
Just FMI, wasn't this something that could be done in SQL Server 2000
without uninstall/reinstall? Did the capability disappear with SQL
Server 2005 or was it never there even in 2000?

Renaming a database

I've renamed a database using the sp_rename but now I
notice that the mdf file is still named oldDBname.mdf.
Is there a way to rename that file to newDBname.mdf?Renaming the database does not change the physical name of the file. To do that you will have to
use system stored procedure sp_detach_db and sp_attach_db.
An approximate sequence of the steps to be taken would be something like this:
detach the db using sp_detach_db
rename the physical files.
use sp_attach_db stored procedure to attach these rename files.
See more help on this in BOL.
--
- Vishal
"mark" <mhoyt@.affiliatedhealth.org> wrote in message news:02c601c38dc5$c37c8fe0$a301280a@.phx.gbl...
> I've renamed a database using the sp_rename but now I
> notice that the mdf file is still named oldDBname.mdf.
> Is there a way to rename that file to newDBname.mdf?|||Try backup and restore.
/Stefan
"mark" <mhoyt@.affiliatedhealth.org> skrev i meddelandet
news:02c601c38dc5$c37c8fe0$a301280a@.phx.gbl...
> I've renamed a database using the sp_rename but now I
> notice that the mdf file is still named oldDBname.mdf.
> Is there a way to rename that file to newDBname.mdf?|||Vishal:
How about if I want to change the logical name also?
Thanks
"Vishal Parkar" <_vgparkar@.hotmail.com> wrote in message
news:uyhhcdcjDHA.2364@.TK2MSFTNGP11.phx.gbl...
> Renaming the database does not change the physical name of the file. To do
that you will have to
> use system stored procedure sp_detach_db and sp_attach_db.
> An approximate sequence of the steps to be taken would be something like
this:
> detach the db using sp_detach_db
> rename the physical files.
> use sp_attach_db stored procedure to attach these rename files.
> See more help on this in BOL.
> --
> - Vishal
> "mark" <mhoyt@.affiliatedhealth.org> wrote in message
news:02c601c38dc5$c37c8fe0$a301280a@.phx.gbl...
> > I've renamed a database using the sp_rename but now I
> > notice that the mdf file is still named oldDBname.mdf.
> >
> > Is there a way to rename that file to newDBname.mdf?
>|||In SQL 2000, you can use ALTER DATABASE command to change the logical name of the file.
Ex:
alter database northwind modify file
(name = 'northwind', newname = 'northwind_new')
- Vishal|||great.
"Vishal Parkar" <_vgparkar@.hotmail.com> wrote in message
news:%23mbcjrcjDHA.2268@.TK2MSFTNGP12.phx.gbl...
> In SQL 2000, you can use ALTER DATABASE command to change the logical
name of the file.
> Ex:
> alter database northwind modify file
> (name = 'northwind', newname = 'northwind_new')
>
> --
> - Vishal
>|||and how we do this using Enterprise Manager. I openend the properties of
databse but I didn't find any option to rename the logical filename ?
"Vishal Parkar" <_vgparkar@.hotmail.com> wrote in message
news:%23mbcjrcjDHA.2268@.TK2MSFTNGP12.phx.gbl...
> In SQL 2000, you can use ALTER DATABASE command to change the logical
name of the file.
> Ex:
> alter database northwind modify file
> (name = 'northwind', newname = 'northwind_new')
>
> --
> - Vishal
>|||you cant do this through enterprise manager.
--
- Vishal
"Sender" <user@.domain.com> wrote in message news:OcNl6ycjDHA.2268@.TK2MSFTNGP12.phx.gbl...
> and how we do this using Enterprise Manager. I openend the properties of
> databse but I didn't find any option to rename the logical filename ?
>
> "Vishal Parkar" <_vgparkar@.hotmail.com> wrote in message
> news:%23mbcjrcjDHA.2268@.TK2MSFTNGP12.phx.gbl...
> > In SQL 2000, you can use ALTER DATABASE command to change the logical
> name of the file.
> > Ex:
> > alter database northwind modify file
> > (name = 'northwind', newname = 'northwind_new')
> >
> >
> > --
> > - Vishal
> >
> >
>

renaming .mdf to .ldf

While moving tempdb, I have accidentally named templog file templog.mdf.
Now my SQL wouldn't start, it's throwing me this:
"The SQL Server (MSSQLSERVER) service terminated with service-specific error
1814 (0x716)."
Please help...
Rename it back to *.ldf.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...
|||SQL Server should just create the templog.ldf file if it's not there, and
comes up online. I'd double check whether the error was due to a renamed
templog.ldf file.
Linchi
"Leon Shargorodsky" wrote:

> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific error
> 1814 (0x716)."
> Please help...
|||Rename it back to *.ldf.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...
|||tempdb is recreated every time you start the database so you should be able
to just delete the ldf and mdf files and start it. If this doesn't work
then chances are the SQL service account doesn't have permissions to write
in the new location.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...
sql

renaming .mdf to .ldf

While moving tempdb, I have accidentally named templog file templog.mdf.
Now my SQL wouldn't start, it's throwing me this:
"The SQL Server (MSSQLSERVER) service terminated with service-specific error
1814 (0x716)."
Please help...Rename it back to *.ldf.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...|||SQL Server should just create the templog.ldf file if it's not there, and
comes up online. I'd double check whether the error was due to a renamed
templog.ldf file.
Linchi
"Leon Shargorodsky" wrote:
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific error
> 1814 (0x716)."
> Please help...|||Rename it back to *.ldf.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...|||tempdb is recreated every time you start the database so you should be able
to just delete the ldf and mdf files and start it. If this doesn't work
then chances are the SQL service account doesn't have permissions to write
in the new location.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...

renaming .mdf to .ldf

While moving tempdb, I have accidentally named templog file templog.mdf.
Now my SQL wouldn't start, it's throwing me this:
"The SQL Server (MSSQLSERVER) service terminated with service-specific error
1814 (0x716)."
Please help...Rename it back to *.ldf.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...|||SQL Server should just create the templog.ldf file if it's not there, and
comes up online. I'd double check whether the error was due to a renamed
templog.ldf file.
Linchi
"Leon Shargorodsky" wrote:

> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific err
or
> 1814 (0x716)."
> Please help...|||Rename it back to *.ldf.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...|||tempdb is recreated every time you start the database so you should be able
to just delete the ldf and mdf files and start it. If this doesn't work
then chances are the SQL service account doesn't have permissions to write
in the new location.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:DB670DBE-AAE2-4C17-802B-9E119E5962DC@.microsoft.com...
> While moving tempdb, I have accidentally named templog file templog.mdf.
> Now my SQL wouldn't start, it's throwing me this:
> "The SQL Server (MSSQLSERVER) service terminated with service-specific
> error
> 1814 (0x716)."
> Please help...

Monday, March 26, 2012

Rename named instance to default instance?

Is it possible to change a named instance of Sql Server 2005 to the default
instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
I've seen only mention default to default or named to named renaming. I do
not need to rename the physical server.
TIA,
Eric Hall
No, I believe you would need to reinstall SQL Server for that type of
change.
Aaron Bertrand
SQL Server MVP
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall
|||Eric
No, you have to uninstall SQL Server and then install SQL Server 2005 as a
default instance
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall
|||Eric,
Sorry, but it is not possible to change an instance (MyServer\SecondInstall)
to the default (MyServer). This is set at installation time and is embedded
all throughout the registry, etc. You have to install an unnamed instance
and move the databases to the new instance.
As an aside: If you just want to have some older client tools be able to
connect without using an instance name, you should check out this KB on
server aliases: http://support.microsoft.com/kb/265808/
RLF
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall
|||That's what I figured. Thanks to all who replied and Russell for the KB
article pointer.
Eric
"Eric Hall" wrote:

> Is it possible to change a named instance of Sql Server 2005 to the default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall
sql

Rename named instance to default instance?

Is it possible to change a named instance of Sql Server 2005 to the default
instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
I've seen only mention default to default or named to named renaming. I do
not need to rename the physical server.
TIA,
Eric HallNo, I believe you would need to reinstall SQL Server for that type of
change.
--
Aaron Bertrand
SQL Server MVP
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall|||Eric
No, you have to uninstall SQL Server and then install SQL Server 2005 as a
default instance
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall|||Eric,
Sorry, but it is not possible to change an instance (MyServer\SecondInstall)
to the default (MyServer). This is set at installation time and is embedded
all throughout the registry, etc. You have to install an unnamed instance
and move the databases to the new instance.
As an aside: If you just want to have some older client tools be able to
connect without using an instance name, you should check out this KB on
server aliases: http://support.microsoft.com/kb/265808/
RLF
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall|||That's what I figured. Thanks to all who replied and Russell for the KB
article pointer.
Eric
"Eric Hall" wrote:
> Is it possible to change a named instance of Sql Server 2005 to the default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall

Rename named instance to default instance?

Is it possible to change a named instance of Sql Server 2005 to the default
instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
I've seen only mention default to default or named to named renaming. I do
not need to rename the physical server.
TIA,
Eric HallNo, I believe you would need to reinstall SQL Server for that type of
change.
Aaron Bertrand
SQL Server MVP
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall|||Eric
No, you have to uninstall SQL Server and then install SQL Server 2005 as a
default instance
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall|||Eric,
Sorry, but it is not possible to change an instance (MyServer\SecondInstall)
to the default (MyServer). This is set at installation time and is embedded
all throughout the registry, etc. You have to install an unnamed instance
and move the databases to the new instance.
As an aside: If you just want to have some older client tools be able to
connect without using an instance name, you should check out this KB on
server aliases: http://support.microsoft.com/kb/265808/
RLF
"Eric Hall" <ransomhall@.nospam_gmail.com> wrote in message
news:3974C01A-FEAA-4682-B260-EE12030D4E3F@.microsoft.com...
> Is it possible to change a named instance of Sql Server 2005 to the
> default
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall|||That's what I figured. Thanks to all who replied and Russell for the KB
article pointer.
Eric
"Eric Hall" wrote:

> Is it possible to change a named instance of Sql Server 2005 to the defaul
t
> instance? I'm familiar with sp_dropserver/sp_addserver, but all examples
> I've seen only mention default to default or named to named renaming. I do
> not need to rename the physical server.
> TIA,
> Eric Hall

Friday, March 23, 2012

rename logical file

Hi,
I have 3 databases running on Production server. All the databases have
names like AA, BB and CC with their Logical Data Files and Log files named as
AA_Data and AA_Log, BB_Data and BB_Log except for the third one. I want to
rename it as CC_Data and CC_Log to make it consistent. Would this renaming
affect anything on the server?
You can change the logical file names, using ALTER DATABASE, without taking
the DB's offline.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:E0134C03-9EF7-44D3-A9E9-452C315CA1AA@.microsoft.com...
Hi,
I have 3 databases running on Production server. All the databases have
names like AA, BB and CC with their Logical Data Files and Log files named
as
AA_Data and AA_Log, BB_Data and BB_Log except for the third one. I want to
rename it as CC_Data and CC_Log to make it consistent. Would this renaming
affect anything on the server?
|||Hi,
Would it affect anything / any process on the production server?
"Tom Moreau" wrote:

> You can change the logical file names, using ALTER DATABASE, without taking
> the DB's offline.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:E0134C03-9EF7-44D3-A9E9-452C315CA1AA@.microsoft.com...
> Hi,
> I have 3 databases running on Production server. All the databases have
> names like AA, BB and CC with their Logical Data Files and Log files named
> as
> AA_Data and AA_Log, BB_Data and BB_Log except for the third one. I want to
> rename it as CC_Data and CC_Log to make it consistent. Would this renaming
> affect anything on the server?
>
|||No. It goes quickly.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:F5688817-57C3-40CD-88ED-B401B2E5438F@.microsoft.com...
Hi,
Would it affect anything / any process on the production server?
"Tom Moreau" wrote:

> You can change the logical file names, using ALTER DATABASE, without
> taking
> the DB's offline.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:E0134C03-9EF7-44D3-A9E9-452C315CA1AA@.microsoft.com...
> Hi,
> I have 3 databases running on Production server. All the databases have
> names like AA, BB and CC with their Logical Data Files and Log files named
> as
> AA_Data and AA_Log, BB_Data and BB_Log except for the third one. I want to
> rename it as CC_Data and CC_Log to make it consistent. Would this renaming
> affect anything on the server?
>
|||Hi Tom,
Can you please explain to me what exactly is the purpose of a logical
Filename? When we have more than one databases on one SQL Server, can we have
the same logical name for all the databases? Thanks in advance.
"Tom Moreau" wrote:

> No. It goes quickly.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:F5688817-57C3-40CD-88ED-B401B2E5438F@.microsoft.com...
> Hi,
> Would it affect anything / any process on the production server?
> "Tom Moreau" wrote:
>
>
|||The logical filename is just an easy way to refer to it when using ALTER
DATABASE. They are unique to the DB - not the server - so you can have a
number of DB's with the same logical filenames, but with different physical
filenames. This is convenient is a scenario where you have one DB per
client and what all of your DB maintenance scripts to do the same thing to
each customer DB.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:82F4AE24-BD99-4CD4-8411-CCFCB79882E5@.microsoft.com...
Hi Tom,
Can you please explain to me what exactly is the purpose of a logical
Filename? When we have more than one databases on one SQL Server, can we
have
the same logical name for all the databases? Thanks in advance.
"Tom Moreau" wrote:

> No. It goes quickly.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:F5688817-57C3-40CD-88ED-B401B2E5438F@.microsoft.com...
> Hi,
> Would it affect anything / any process on the production server?
> "Tom Moreau" wrote:
>
>
|||Does changing the logical name also change the physical (file) name? If not,
is there a method of doing that too?
"Tom Moreau" wrote:

> The logical filename is just an easy way to refer to it when using ALTER
> DATABASE. They are unique to the DB - not the server - so you can have a
> number of DB's with the same logical filenames, but with different physical
> filenames. This is convenient is a scenario where you have one DB per
> client and what all of your DB maintenance scripts to do the same thing to
> each customer DB.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:82F4AE24-BD99-4CD4-8411-CCFCB79882E5@.microsoft.com...
> Hi Tom,
> Can you please explain to me what exactly is the purpose of a logical
> Filename? When we have more than one databases on one SQL Server, can we
> have
> the same logical name for all the databases? Thanks in advance.
> "Tom Moreau" wrote:
>
>
|||> Does changing the logical name also change the physical (file) name?
No.

> If not,
> is there a method of doing that too?
Yes. Easiest, IMO, is detach and attach the database. In 2005, you can use ALTER DATABASE to change
the physical name, stop SQL Server, copy the file, and then start SQL Server. I don't find this very
useful, so I prefer detach and attach better in 2005 as well.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Yabe" <Yabe@.discussions.microsoft.com> wrote in message
news:85B0F865-7ABB-44FC-8690-145907510A05@.microsoft.com...[vbcol=seagreen]
> Does changing the logical name also change the physical (file) name? If not,
> is there a method of doing that too?
>
> "Tom Moreau" wrote:
|||Thank you.
"Tibor Karaszi" wrote:

> No.
>
> Yes. Easiest, IMO, is detach and attach the database. In 2005, you can use ALTER DATABASE to change
> the physical name, stop SQL Server, copy the file, and then start SQL Server. I don't find this very
> useful, so I prefer detach and attach better in 2005 as well.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
|||"Tibor Karaszi" wrote:

> No.
>
> Yes. Easiest, IMO, is detach and attach the database. In 2005, you can use ALTER DATABASE to change
> the physical name, stop SQL Server, copy the file, and then start SQL Server. I don't find this very
> useful, so I prefer detach and attach better in 2005 as well.
Hi Tibor,
I've been experimenting with detach/attach and I can't (for the life of me)
figure out how to change the name on the fly -- in MSS 2005 (or earlier
release for that matter). Maybe I'm going about this all wrong ... all on
the same server ... Here's my situation ... I have a database that I want to
clone and rename on the same server.
I have one database named "Database1" (c:\data1\d1.mdf, c:\data1\d1.ldf).
I detach the original database and copy both files to a new directory
x:\data2\d1.mdf, x:\data2\d1.ldf).
I re-attach the original database Database1 using MSS Management Studio.
Then I attempt to attach the 2nd database, I'll browse to the new directory
and select the duplicate d1.mdf, but it won't let me change the database
name, so I abort.
Then I manually rename both the (copied) database and the log files from d1
to d2 (x:\data2\d2.mdf and x:\data2\d2.ldf) and try to attach again.
When I attach the newly renamed files, MSS remembers both the original file
names and the original database name "Database1" and will complain if I click
OK to try and save the 2nd database to the host/instance. I don't see how to
1) change the original database name when attaching or 2) force the MSS
system to let me change the new database name on the fly as I attach it.
Sorry if the answer is looking me in the face

> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi

rename logical file

Hi,
I have 3 databases running on Production server. All the databases have
names like AA, BB and CC with their Logical Data Files and Log files named a
s
AA_Data and AA_Log, BB_Data and BB_Log except for the third one. I want to
rename it as CC_Data and CC_Log to make it consistent. Would this renaming
affect anything on the server?You can change the logical file names, using ALTER DATABASE, without taking
the DB's offline.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:E0134C03-9EF7-44D3-A9E9-452C315CA1AA@.microsoft.com...
Hi,
I have 3 databases running on Production server. All the databases have
names like AA, BB and CC with their Logical Data Files and Log files named
as
AA_Data and AA_Log, BB_Data and BB_Log except for the third one. I want to
rename it as CC_Data and CC_Log to make it consistent. Would this renaming
affect anything on the server?|||Hi,
Would it affect anything / any process on the production server?
"Tom Moreau" wrote:

> You can change the logical file names, using ALTER DATABASE, without takin
g
> the DB's offline.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:E0134C03-9EF7-44D3-A9E9-452C315CA1AA@.microsoft.com...
> Hi,
> I have 3 databases running on Production server. All the databases have
> names like AA, BB and CC with their Logical Data Files and Log files named
> as
> AA_Data and AA_Log, BB_Data and BB_Log except for the third one. I want to
> rename it as CC_Data and CC_Log to make it consistent. Would this renaming
> affect anything on the server?
>|||No. It goes quickly.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:F5688817-57C3-40CD-88ED-B401B2E5438F@.microsoft.com...
Hi,
Would it affect anything / any process on the production server?
"Tom Moreau" wrote:

> You can change the logical file names, using ALTER DATABASE, without
> taking
> the DB's offline.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:E0134C03-9EF7-44D3-A9E9-452C315CA1AA@.microsoft.com...
> Hi,
> I have 3 databases running on Production server. All the databases have
> names like AA, BB and CC with their Logical Data Files and Log files named
> as
> AA_Data and AA_Log, BB_Data and BB_Log except for the third one. I want to
> rename it as CC_Data and CC_Log to make it consistent. Would this renaming
> affect anything on the server?
>|||Hi Tom,
Can you please explain to me what exactly is the purpose of a logical
Filename? When we have more than one databases on one SQL Server, can we hav
e
the same logical name for all the databases? Thanks in advance.
"Tom Moreau" wrote:

> No. It goes quickly.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:F5688817-57C3-40CD-88ED-B401B2E5438F@.microsoft.com...
> Hi,
> Would it affect anything / any process on the production server?
> "Tom Moreau" wrote:
>
>|||The logical filename is just an easy way to refer to it when using ALTER
DATABASE. They are unique to the DB - not the server - so you can have a
number of DB's with the same logical filenames, but with different physical
filenames. This is convenient is a scenario where you have one DB per
client and what all of your DB maintenance scripts to do the same thing to
each customer DB.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:82F4AE24-BD99-4CD4-8411-CCFCB79882E5@.microsoft.com...
Hi Tom,
Can you please explain to me what exactly is the purpose of a logical
Filename? When we have more than one databases on one SQL Server, can we
have
the same logical name for all the databases? Thanks in advance.
"Tom Moreau" wrote:

> No. It goes quickly.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:F5688817-57C3-40CD-88ED-B401B2E5438F@.microsoft.com...
> Hi,
> Would it affect anything / any process on the production server?
> "Tom Moreau" wrote:
>
>|||Does changing the logical name also change the physical (file) name? If not
,
is there a method of doing that too?
"Tom Moreau" wrote:

> The logical filename is just an easy way to refer to it when using ALTER
> DATABASE. They are unique to the DB - not the server - so you can have a
> number of DB's with the same logical filenames, but with different physica
l
> filenames. This is convenient is a scenario where you have one DB per
> client and what all of your DB maintenance scripts to do the same thing to
> each customer DB.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:82F4AE24-BD99-4CD4-8411-CCFCB79882E5@.microsoft.com...
> Hi Tom,
> Can you please explain to me what exactly is the purpose of a logical
> Filename? When we have more than one databases on one SQL Server, can we
> have
> the same logical name for all the databases? Thanks in advance.
> "Tom Moreau" wrote:
>
>|||> Does changing the logical name also change the physical (file) name?
No.

> If not,
> is there a method of doing that too?
Yes. Easiest, IMO, is detach and attach the database. In 2005, you can use A
LTER DATABASE to change
the physical name, stop SQL Server, copy the file, and then start SQL Server
. I don't find this very
useful, so I prefer detach and attach better in 2005 as well.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Yabe" <Yabe@.discussions.microsoft.com> wrote in message
news:85B0F865-7ABB-44FC-8690-145907510A05@.microsoft.com...[vbcol=seagreen]
> Does changing the logical name also change the physical (file) name? If n
ot,
> is there a method of doing that too?
>
> "Tom Moreau" wrote:
>|||Thank you.
"Tibor Karaszi" wrote:

> No.
>
> Yes. Easiest, IMO, is detach and attach the database. In 2005, you can use
ALTER DATABASE to change
> the physical name, stop SQL Server, copy the file, and then start SQL Serv
er. I don't find this very
> useful, so I prefer detach and attach better in 2005 as well.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi|||"Tibor Karaszi" wrote:

> No.
>
> Yes. Easiest, IMO, is detach and attach the database. In 2005, you can use
ALTER DATABASE to change
> the physical name, stop SQL Server, copy the file, and then start SQL Serv
er. I don't find this very
> useful, so I prefer detach and attach better in 2005 as well.
Hi Tibor,
I've been experimenting with detach/attach and I can't (for the life of me)
figure out how to change the name on the fly -- in MSS 2005 (or earlier
release for that matter). Maybe I'm going about this all wrong ... all on
the same server ... Here's my situation ... I have a database that I want to
clone and rename on the same server.
I have one database named "Database1" (c:\data1\d1.mdf, c:\data1\d1.ldf).
I detach the original database and copy both files to a new directory
x:\data2\d1.mdf, x:\data2\d1.ldf).
I re-attach the original database Database1 using MSS Management Studio.
Then I attempt to attach the 2nd database, I'll browse to the new directory
and select the duplicate d1.mdf, but it won't let me change the database
name, so I abort.
Then I manually rename both the (copied) database and the log files from d1
to d2 (x:\data2\d2.mdf and x:\data2\d2.ldf) and try to attach again.
When I attach the newly renamed files, MSS remembers both the original file
names and the original database name "Database1" and will complain if I clic
k
OK to try and save the 2nd database to the host/instance. I don't see how t
o
1) change the original database name when attaching or 2) force the MSS
system to let me change the new database name on the fly as I attach it.
Sorry if the answer is looking me in the face

> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi

Wednesday, March 21, 2012

Rename a SQL2005 Istance

I've installed a SQL2005 with named instance: SERVER\SQL2005
Because some software does'nt recognize this instance, i'd like to rename it
to default instance.
Is it possibile ?
How ?
Mauro
Mauro Miotello wrote:
> I've installed a SQL2005 with named instance: SERVER\SQL2005
> Because some software does'nt recognize this instance, i'd like to rename it
> to default instance.
> Is it possibile ?
> How ?
> Mauro
>
You'll have to uninstall the named instance and the run the install
again. In the new install you can install it as a default instance.
Regards
Steen
|||"Steen Persson (DK)" <spe@.REMOVEdatea.dk> ha scritto nel messaggio
news:eNXySxTSGHA.4440@.TK2MSFTNGP11.phx.gbl...
> You'll have to uninstall the named instance and the run the install again.
> In the new install you can install it as a default instance.

Rename a SQL2005 Istance

I've installed a SQL2005 with named instance: SERVER\SQL2005
Because some software does'nt recognize this instance, i'd like to rename it
to default instance.
Is it possibile ?
How ?
MauroMauro Miotello wrote:
> I've installed a SQL2005 with named instance: SERVER\SQL2005
> Because some software does'nt recognize this instance, i'd like to rename
it
> to default instance.
> Is it possibile ?
> How ?
> Mauro
>
You'll have to uninstall the named instance and the run the install
again. In the new install you can install it as a default instance.
Regards
Steen|||"Steen Persson (DK)" <spe@.REMOVEdatea.dk> ha scritto nel messaggio
news:eNXySxTSGHA.4440@.TK2MSFTNGP11.phx.gbl...
> You'll have to uninstall the named instance and the run the install again.
> In the new install you can install it as a default instance.

Rename a SQL2005 Istance

I've installed a SQL2005 with named instance: SERVER\SQL2005
Because some software does'nt recognize this instance, i'd like to rename it
to default instance.
Is it possibile ?
How ?
MauroMauro Miotello wrote:
> I've installed a SQL2005 with named instance: SERVER\SQL2005
> Because some software does'nt recognize this instance, i'd like to rename it
> to default instance.
> Is it possibile ?
> How ?
> Mauro
>
You'll have to uninstall the named instance and the run the install
again. In the new install you can install it as a default instance.
Regards
Steen|||"Steen Persson (DK)" <spe@.REMOVEdatea.dk> ha scritto nel messaggio
news:eNXySxTSGHA.4440@.TK2MSFTNGP11.phx.gbl...
> You'll have to uninstall the named instance and the run the install again.
> In the new install you can install it as a default instance.
:(

Tuesday, March 20, 2012

Re-name a Column in an Anonymous Merge Publication

Upsized an Access .MDB and Published successfully, EXCEPT forgot to make
visible the sysobjects, so two Tables each have four Columns named: Expr1,
Expr2, Expr3, Expr4. When I try to rename them with SSEM in the SQL Database,
I get errors like this:
'tblNoteAdmit' table
- Unable to rename column from 'Expr1' to 'Pump'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot rename the
table because it is published for replication.
It looks like time to Create a Script, that the Snapshot Agent can
understand ...
Sometime back, I blundered through that process to Add a Table
(Successfully) but am having trouble finding the SP_ to trick Column Names.
Aubrey Kelley
How do I Rename a Column in an Active Replicated Database?
24 hr update: Got this far: (SP is sp_rename, but still blocked by
Replication.)
USE CareData
GO
EXEC sp_rename 'tblNoteAdmit.Expr1', 'Pump', 'COLUMN'
Server: Msg 15051, Level 11, State 1, Procedure sp_rename, Line 172
Cannot rename the table because it is published for replication.
Aubrey Kelley
"Aubrey" wrote:

> Upsized an Access .MDB and Published successfully, EXCEPT forgot to make
> visible the sysobjects, so two Tables each have four Columns named: Expr1,
> Expr2, Expr3, Expr4. When I try to rename them with SSEM in the SQL Database,
> I get errors like this:
> 'tblNoteAdmit' table
> - Unable to rename column from 'Expr1' to 'Pump'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot rename the
> table because it is published for replication.
> It looks like time to Create a Script, that the Snapshot Agent can
> understand ...
> Sometime back, I blundered through that process to Add a Table
> (Successfully) but am having trouble finding the SP_ to trick Column Names.
> --
> Aubrey Kelley
|||You will have to do sp_repladdcolumn to add a dummy column with the same
data type as the column you wish to rename. Then update this temp column
with the values in the column you are wishing to rename. Then drop the
column you wish to rename using sp_repldropcolumn. Then readd the column
with the new name using sp_repladdcolumn. Then update this column with the
values in the temp column. Then drop the temp column using
sp_repldropcolumn.
Alternatively you may wish to create a temp table with the values in the
column you wish to rename along with the PK. Then drop the column you wish
to rename using sp_repldropcolumn, and then add it back with the new name
using sp_repladdcolumn. Update this new column with the values in the temp
table.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Aubrey" <miscuates@.online.nospam> wrote in message
news:51D04366-E78F-463C-A7C0-17E2CE461867@.microsoft.com...[vbcol=seagreen]
> How do I Rename a Column in an Active Replicated Database?
> 24 hr update: Got this far: (SP is sp_rename, but still blocked by
> Replication.)
> USE CareData
> GO
> EXEC sp_rename 'tblNoteAdmit.Expr1', 'Pump', 'COLUMN'
> Server: Msg 15051, Level 11, State 1, Procedure sp_rename, Line 172
> Cannot rename the table because it is published for replication.
> --
> Aubrey Kelley
>
> "Aubrey" wrote:
Expr1,[vbcol=seagreen]
Database,[vbcol=seagreen]
the[vbcol=seagreen]
Names.[vbcol=seagreen]
|||Thanks, Hilary! and only 43 minutes after my updated post, Sunday early AM?
That was what it looked like in your SS2K T&SR Book. Was not sure it applied
to Anonymous Merge. Will try it Real-Soon-Now ...
Aubrey Kelley
"Hilary Cotter" wrote:

> You will have to do sp_repladdcolumn to add a dummy column with the same
> data type as the column you wish to rename. Then update this temp column
> with the values in the column you are wishing to rename. Then drop the
> column you wish to rename using sp_repldropcolumn. Then readd the column
> with the new name using sp_repladdcolumn. Then update this column with the
> values in the temp column. Then drop the temp column using
> sp_repldropcolumn.
> Alternatively you may wish to create a temp table with the values in the
> column you wish to rename along with the PK. Then drop the column you wish
> to rename using sp_repldropcolumn, and then add it back with the new name
> using sp_repladdcolumn. Update this new column with the values in the temp
> table.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Aubrey" <miscuates@.online.nospam> wrote in message
> news:51D04366-E78F-463C-A7C0-17E2CE461867@.microsoft.com...
> Expr1,
> Database,
> the
> Names.
>
>
|||What I did: Opened Query Analyzer
USE CareData
GO
EXEC sp_repladdcolumn N'Orders', N'IsSaved', 'bit', N'CareData'
[RUN]
Results:
Warning: only Subscribers running SQL Server 2000 can synchronize with
publication 'CareData' because schema replication is performed.
Cannot add rows to sysdepends for the current stored procedure because it
depends on the missing object 'sp_sel_B469A5B2466148AC3170B37FE7C24426_pal'.
The stored procedure will still be created.
Updated Values and Tested from Remote Client. Voila! Worked like a charm.
Why did you suggest a Temp column? Seemed superfluous to Copy from OldColumn
to Temp, then copy Temp to NewColumn, when OldColumn directly to NewColumn
works great.
Aubrey Kelley
"Aubrey" wrote:
[vbcol=seagreen]
> Thanks, Hilary! and only 43 minutes after my updated post, Sunday early AM?
> That was what it looked like in your SS2K T&SR Book. Was not sure it applied
> to Anonymous Merge. Will try it Real-Soon-Now ...
> --
> Aubrey Kelley
>
> "Hilary Cotter" wrote:
|||I'm glad it worked.
The temp table solution works great if you are able to kick your users off
while you do it. If not and the table was huge, the temp table could take
come time to populate and will get progressively out of sync if people are
banging away at it. So you would loose consistency as you do it.
However, my approach will "break" the table as you are making the changes so
the app which is using this column will fail as you do your renaming.
So neither solutions are perfect - mine takes longer but might guarantee
better consistency than yours. Your method is shorter, but your method is
preferred if you can kick all of your users off your system.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Aubrey" <miscuates@.online.nospam> wrote in message
news:A9C71B7B-F1AF-4DAD-A202-6CF3DD2703FB@.microsoft.com...
> What I did: Opened Query Analyzer
> USE CareData
> GO
> EXEC sp_repladdcolumn N'Orders', N'IsSaved', 'bit', N'CareData'
> [RUN]
> Results:
> Warning: only Subscribers running SQL Server 2000 can synchronize with
> publication 'CareData' because schema replication is performed.
> Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object
'sp_sel_B469A5B2466148AC3170B37FE7C24426_pal'.
> The stored procedure will still be created.
> Updated Values and Tested from Remote Client. Voila! Worked like a charm.
> Why did you suggest a Temp column? Seemed superfluous to Copy from
OldColumn[vbcol=seagreen]
> to Temp, then copy Temp to NewColumn, when OldColumn directly to NewColumn
> works great.
> --
> Aubrey Kelley
>
> "Aubrey" wrote:
AM?[vbcol=seagreen]
applied[vbcol=seagreen]
same[vbcol=seagreen]
column[vbcol=seagreen]
column[vbcol=seagreen]
the[vbcol=seagreen]
the[vbcol=seagreen]
wish[vbcol=seagreen]
name[vbcol=seagreen]
temp[vbcol=seagreen]
to make[vbcol=seagreen]
named:[vbcol=seagreen]
SQL[vbcol=seagreen]
rename[vbcol=seagreen]
Column[vbcol=seagreen]
|||Correct; I was fortunate that ALL Users are Merge Clients, No ONE is directly
updating the Publisher Database.
Just to Test, I added a couple of Rows while all this was running, and they
were missing the Values in the New Columns. Fortunately I had WHERE Clauses
in the Data Copy Form, Event Procedures just in case the Project Locked Up or
Aborted.
Now, onward and upward ... Have a Great Week!
Aubrey Kelley
"Hilary Cotter" wrote:

> I'm glad it worked.
> The temp table solution works great if you are able to kick your users off
> while you do it. If not and the table was huge, the temp table could take
> come time to populate and will get progressively out of sync if people are
> banging away at it. So you would loose consistency as you do it.
> However, my approach will "break" the table as you are making the changes so
> the app which is using this column will fail as you do your renaming.
> So neither solutions are perfect - mine takes longer but might guarantee
> better consistency than yours. Your method is shorter, but your method is
> preferred if you can kick all of your users off your system.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Aubrey" <miscuates@.online.nospam> wrote in message
> news:A9C71B7B-F1AF-4DAD-A202-6CF3DD2703FB@.microsoft.com...
> 'sp_sel_B469A5B2466148AC3170B37FE7C24426_pal'.
> OldColumn
> AM?
> applied
> same
> column
> column
> the
> the
> wish
> name
> temp
> to make
> named:
> SQL
> rename
> Column
>
>

Friday, March 9, 2012

Removing Named Instance

We want to rename our instance and I understand there isn't a straightforward way to do so. I'm prepared to run SQLEXPR again to create the new named instance. However, I'm not clear on how to remove the other named instance once the data files have been moved over. I do not want the old service "SQL Server (<old_named_instance>)" to be running. I would also like the files "C:\Program Files\Microsoft SQL Server\MSSQL.1" removed along with the registry entries for this instance.

I tried running SQLEXPR with a /? option but that invoked the installer and did not give me the command line options. Is there a simple way to remove a specific named instance? Thanks.

Go to Add/Remove Programs and look for the entry for Microsoft SQL Server 2005 and click the Remove button. The dialog that opens will show you two lists, the top is list of the installed instances for any instance aware components. (For SQL Express this includes the database engine and reporting services if you installed SSE Advanced) The bottom is any common components that are shared across instances.

You will want to select the named instance for the services you want to remove. Since it sounds like you only have one instance of SQL Express, you'll likely see just the single entrie that reads "SQLEXPRES: Database Engine" in the list. Since you're planning on re-installing another instance, there is no need to remove the shared components unless you really don't want them anymore. Since they are shared, the existing components will continue to work with the new instance you install.

Having selected the items to remove, click Next and walk through the rest of the wizard. Once completed you will have removed the database engine for the named instance SQLEXPRESS. Go ahead and install a fresh copy to your desired instance name and you should be up and running.

For those who care to know, there are some components that are not removed via this uninstall path. They are not removed because they are technically independent programs that we can install automatically, but can't remove automatically without risking breaking things. If you were interested in doing a complete uninstall (which is not the case here) you would need to remove those programs separately from the ARP dialog. These additional components include Management Studio Express and the SQL Server Setup Support Files.

Mike

|||Thanks Mike, this is very helpful. I currently have two named instances and they both appear in the list after clicking Remove, just as you said. Is there any way to peform this function via a command script? We have a Beta version of our product installed in a few remote locations and would prefer having them run a single command file to uninstall the old instance, reinstall the new, etc.|||

The command line interface for the installer (which is also used to remove things) is documented in Books Online. You should check out the REMOVE statement. I also suggest you ask this question in the SQl Setup forum as they may have other/better ideas.

Mike

Monday, February 20, 2012

Removing an instance

I have SQL Server 2000 running on my development machine and I have installed
a named instance of MSDE. The named instance shows up in Services and is set
to start automatically. The problem... It does not show up in the Service
Manager or Enterprise Manager. I can access it in the Enterprise Manager by
specifically naming the instance when registering a new Server. I now want to
uninstall it. There is no entry in the Add/Remove program files. Any idea how
to remove the instance. I can't release my product until I resolve this issue.
Jim
hi Jim,
"Jim" <Jim@.discussions.microsoft.com> ha scritto nel messaggio
news:F62FD912-20AF-459B-A53B-28640B533F73@.microsoft.com
> I have SQL Server 2000 running on my development machine and I have
> installed a named instance of MSDE. The named instance shows up in
> Services and is set to start automatically. The problem... It does
> not show up in the Service Manager or Enterprise Manager. I can
> access it in the Enterprise Manager by specifically naming the
> instance when registering a new Server. I now want to uninstall it.
> There is no entry in the Add/Remove program files. Any idea how to
> remove the instance. I can't release my product until I resolve this
> issue.
the named instance probably does not show in the Service Manager becouse of
disabled network protocols (default setting for MSDE installations), as
reported in http://support.microsoft.com/default...b;EN-US;814132
you can manually uninstall the MSDE named instance, if you really wanto to,
following http://support.microsoft.com/default...;EN-US;Q290991 KB
article
hints... I was succesfull when I did a mess on a test PC... the only problem
with this method is that it does not clear the Windows Installer entries in
the registry.. the only way to clear it is using Msizap.exe tool form the
Platform SDK as
http://support.microsoft.com/default...b;en-us;320873 reports..
please remind that, from a public known point of view, it's not mandatory to
remove that instance, but I do not know your actual needs about it...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks, it would have taken me a month to figure it out.
"Andrea Montanari" wrote:

> hi Jim,
> "Jim" <Jim@.discussions.microsoft.com> ha scritto nel messaggio
> news:F62FD912-20AF-459B-A53B-28640B533F73@.microsoft.com
> the named instance probably does not show in the Service Manager becouse of
> disabled network protocols (default setting for MSDE installations), as
> reported in http://support.microsoft.com/default...b;EN-US;814132
> you can manually uninstall the MSDE named instance, if you really wanto to,
> following http://support.microsoft.com/default...;EN-US;Q290991 KB
> article
> hints... I was succesfull when I did a mess on a test PC... the only problem
> with this method is that it does not clear the Windows Installer entries in
> the registry.. the only way to clear it is using Msizap.exe tool form the
> Platform SDK as
> http://support.microsoft.com/default...b;en-us;320873 reports..
> please remind that, from a public known point of view, it's not mandatory to
> remove that instance, but I do not know your actual needs about it...
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>