dbTalk Databases Forums  

Do not want to show computer name in SQL server 2008 instance name

microsoft.public.sqlserver.setup microsoft.public.sqlserver.setup


Discuss Do not want to show computer name in SQL server 2008 instance name in the microsoft.public.sqlserver.setup forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kashif Saeed
 
Posts: n/a

Default Do not want to show computer name in SQL server 2008 instance name - 07-21-2009 , 10:12 PM






Hi

Name of my server is ABC, i am going to install SQL Server 2008 Enterpirse
on it.
I dont want the default instance name "MSSQLSERVER"
Even for named instance "KASHIF" after installation it will show it as
ABC\KASHIF.How can i keep the instance name just "KASHIF" only or just the
servername "ABC" only.

Reply With Quote
  #2  
Old   
Linchi Shea
 
Posts: n/a

Default RE: Do not want to show computer name in SQL server 2008 instance name - 07-22-2009 , 07:20 AM






If you install the default instance on ABC, yes, your instance name will be
MSSQLSERVER. But your client will only need to use ABC (without any mention
of MSSQLSERVER). I guess effectively that's what you want.

Linchi

"Kashif Saeed" wrote:

Quote:
Hi

Name of my server is ABC, i am going to install SQL Server 2008 Enterpirse
on it.
I dont want the default instance name "MSSQLSERVER"
Even for named instance "KASHIF" after installation it will show it as
ABC\KASHIF.How can i keep the instance name just "KASHIF" only or just the
servername "ABC" only.



Reply With Quote
  #3  
Old   
Kashif Saeed
 
Posts: n/a

Default Re: Do not want to show computer name in SQL server 2008 instance name - 07-22-2009 , 07:47 AM



Thanks for this & it is exact response to my one query. But can you or
anybody help me with if i want to install SQL server with named instance but
don't want it to be [SERVERNAME]\[NAMED_INSTANCE]
But only NAMED_INSTANCE

"Linchi Shea" <LinchiShea (AT) discussions (DOT) microsoft.com> wrote

Quote:
If you install the default instance on ABC, yes, your instance name will
be
MSSQLSERVER. But your client will only need to use ABC (without any
mention
of MSSQLSERVER). I guess effectively that's what you want.

Linchi

"Kashif Saeed" wrote:

Hi

Name of my server is ABC, i am going to install SQL Server 2008
Enterpirse
on it.
I dont want the default instance name "MSSQLSERVER"
Even for named instance "KASHIF" after installation it will show it as
ABC\KASHIF.How can i keep the instance name just "KASHIF" only or just
the
servername "ABC" only.



Reply With Quote
  #4  
Old   
Rick Byham, MSFT
 
Posts: n/a

Default Re: Do not want to show computer name in SQL server 2008 instance name - 07-22-2009 , 10:44 AM



No, you cannot install a named instance as KASHIF. It will always be
ABC\KASHIF.
On clients you could create an alias named KASHIF that resolves to
ABC\KASHIF. Then the client application would not need to know the compound
name. But then you have to create the alias on all clients which can be a
pain.
Why do you want to avoid the computer name? If we knew that, we might have
more suggestions. For instance, you could connect to the IP address and
instance name, or the IP address and the TCP port number.
--
Rick Byham, MSFT
(Implies no warranty or rights)


"Kashif Saeed" <abc (AT) mail (DOT) com> wrote

Quote:
Thanks for this & it is exact response to my one query. But can you or
anybody help me with if i want to install SQL server with named instance
but don't want it to be [SERVERNAME]\[NAMED_INSTANCE]
But only NAMED_INSTANCE

"Linchi Shea" <LinchiShea (AT) discussions (DOT) microsoft.com> wrote in message
news:665DCF32-BE34-4D55-9353-1EB6B2FAD241 (AT) microsoft (DOT) com...
If you install the default instance on ABC, yes, your instance name will
be
MSSQLSERVER. But your client will only need to use ABC (without any
mention
of MSSQLSERVER). I guess effectively that's what you want.

Linchi

"Kashif Saeed" wrote:

Hi

Name of my server is ABC, i am going to install SQL Server 2008
Enterpirse
on it.
I dont want the default instance name "MSSQLSERVER"
Even for named instance "KASHIF" after installation it will show it as
ABC\KASHIF.How can i keep the instance name just "KASHIF" only or just
the
servername "ABC" only.




Reply With Quote
  #5  
Old   
Richard Mueller [MVP]
 
Posts: n/a

Default Re: Do not want to show computer name in SQL server 2008 instance name - 07-22-2009 , 10:52 AM



Without the server name, an application cannot find the instance, except by
exhaustive search of all computers (and even then assuming the instance name
is unique). Are you trying to hide the server name, or not have it hard
coded in the app?

If you have Active Directory, perhaps it would help to publish the instance
in Active Directory. This creates a ServiceConnectionPoint object (in the
server computer object). Then the application can do an efficient query for
the ServiceConnectionPoint object that has your name and retrieve the
ServerName\InstanceName information from this object. This way the
application only needs to know the name of your application. And, the
instance can actually be moved to another machine and the application can
still find it (assuming the old ServiceConnectionPoint object is removed and
the new one created). I use stored procedure sp_ActiveDirectory_SCP to
publish the instance. You can also use sp_ActiveDirectory_Obj to publish the
database.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"Kashif Saeed" <abc (AT) mail (DOT) com> wrote

Quote:
Thanks for this & it is exact response to my one query. But can you or
anybody help me with if i want to install SQL server with named instance
but don't want it to be [SERVERNAME]\[NAMED_INSTANCE]
But only NAMED_INSTANCE

"Linchi Shea" <LinchiShea (AT) discussions (DOT) microsoft.com> wrote in message
news:665DCF32-BE34-4D55-9353-1EB6B2FAD241 (AT) microsoft (DOT) com...
If you install the default instance on ABC, yes, your instance name will
be
MSSQLSERVER. But your client will only need to use ABC (without any
mention
of MSSQLSERVER). I guess effectively that's what you want.

Linchi

"Kashif Saeed" wrote:

Hi

Name of my server is ABC, i am going to install SQL Server 2008
Enterpirse
on it.
I dont want the default instance name "MSSQLSERVER"
Even for named instance "KASHIF" after installation it will show it as
ABC\KASHIF.How can i keep the instance name just "KASHIF" only or just
the
servername "ABC" only.




Reply With Quote
  #6  
Old   
Kashif Saeed
 
Posts: n/a

Default Re: Do not want to show computer name in SQL server 2008 instance name - 07-22-2009 , 07:00 PM



Thanks Mr. Richard Mueller. sp_ActiveDirectory_Obj is going to work for me.


"Richard Mueller [MVP]" <rlmueller-nospam (AT) ameritech (DOT) nospam.net> wrote in
message news:OFvqyRuCKHA.1488 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Quote:
Without the server name, an application cannot find the instance, except
by exhaustive search of all computers (and even then assuming the instance
name is unique). Are you trying to hide the server name, or not have it
hard coded in the app?

If you have Active Directory, perhaps it would help to publish the
instance in Active Directory. This creates a ServiceConnectionPoint object
(in the server computer object). Then the application can do an efficient
query for the ServiceConnectionPoint object that has your name and
retrieve the ServerName\InstanceName information from this object. This
way the application only needs to know the name of your application. And,
the instance can actually be moved to another machine and the application
can still find it (assuming the old ServiceConnectionPoint object is
removed and the new one created). I use stored procedure
sp_ActiveDirectory_SCP to publish the instance. You can also use
sp_ActiveDirectory_Obj to publish the database.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"Kashif Saeed" <abc (AT) mail (DOT) com> wrote in message
news:ewuunqsCKHA.5040 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
Thanks for this & it is exact response to my one query. But can you or
anybody help me with if i want to install SQL server with named instance
but don't want it to be [SERVERNAME]\[NAMED_INSTANCE]
But only NAMED_INSTANCE

"Linchi Shea" <LinchiShea (AT) discussions (DOT) microsoft.com> wrote in message
news:665DCF32-BE34-4D55-9353-1EB6B2FAD241 (AT) microsoft (DOT) com...
If you install the default instance on ABC, yes, your instance name will
be
MSSQLSERVER. But your client will only need to use ABC (without any
mention
of MSSQLSERVER). I guess effectively that's what you want.

Linchi

"Kashif Saeed" wrote:

Hi

Name of my server is ABC, i am going to install SQL Server 2008
Enterpirse
on it.
I dont want the default instance name "MSSQLSERVER"
Even for named instance "KASHIF" after installation it will show it as
ABC\KASHIF.How can i keep the instance name just "KASHIF" only or just
the
servername "ABC" only.






Reply With Quote
  #7  
Old   
Mike
 
Posts: n/a

Default Re: Do not want to show computer name in SQL server 2008 instance name - 08-06-2009 , 06:40 PM



So now that the DataBase is registered in active directory how do you
use this information in you VB.NET application?

I wrote a function to search the Active Directory:
Imports System.DirectoryServices

Public Function GetDataBaseRegistrations(ByVal SearchStr As String)
As SearchResultCollection
Dim de As New DirectoryEntry
de.Path = "LDAP://DC=my-domain,DC=com"
de.AuthenticationType = AuthenticationTypes.Secure

Dim deSearch As DirectorySearcher = New DirectorySearcher()
deSearch.SearchRoot = de
deSearch.Filter = "(&(objectClass=mS-SQL-SQLDatabase) (cn=" &
SearchStr & "))"
Dim results As SearchResultCollection = deSearch.FindAll()

Return results
End Function

This returns a collection of search results. Then I have to look
through the properties collection for each of the returned
SearchResults.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim results As SearchResultCollection =
GetDataBaseRegistrations("Traffic")
For cnt = 0 To results.Count - 1
Dim propertyList = From RS In results.Item(cnt).Properties
For Each prop In propertyList
TextBox2.Text = prop.Key.ToString + " " +
prop.Value(0).ToString + vbCrLf + TextBox2.Text
Next
TextBox2.Text = vbCrLf + TextBox2.Text
TextBox2.Text = vbCrLf + TextBox2.Text
TextBox2.Text = vbCrLf + TextBox2.Text
Next
End Sub

And search the properties collection for the key "distinguishedname" and
parse the associated value for the name of the server.

distinguishedname =
CN=Traffic,CN=MSSQLSERVER,CN=MYSQLSvr,CN=Computers ,DC=my-domain,DC=com

My Question: Is this what you guys are doing? Is there a simpler way?

If this is what is (recommended) is seems a little round about way to
get there but doable.

Problem: I have several Databases that are replicated to multiple
different SQL servers. Of course the DataBase name on the replicated
server is the same and so I get multiple items from the active directory
query. My problem is one of the master replication is used for updating
data and the copies are used for extensive queries. (Replications are
replicated nightly and it doesn't matter in the queries if the data is a
day old).

It would be nice if I could use an attribute in the AD entry to specify
that a particular instance of the database is readonly or readwrite and
base my selection on this when building my connection string.

What are you guys doing? I haven't found a lot of information on using
the active directory to store information for building connections
strings dynamically. I really like this idea so if a particular server
goes down I can connect to a different server on the fly without having
to touch every workstation or recompile code. Currently we store the
connection string in the registery so it can be changed without having
tot recompile the code. I also like the idea of being able to move a
database from a high load server to a server with a lower load and
dynamically redirect all the clients without having to touch the
clients.

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.