Hi,
I can create an Alias for a remote server fine using the Client Network
Utility (Alias tab, Add -> "Add Netwok Library Configuration" - TCP/IP,
Server name = IP Address, specify port number).
... how can I accomplish the same thing using TRANSACT-SQL so I can create a
script which will do this for my customer.
Thanks in advance, J
Jamie Clancy
Ulysses Systems, London
I don't think this is in TSQL's scope of functionality--it's a networking /
DNS configuration, not a SQL Server config. It seems to me you might try
changing the Hosts file on the client system--it can do about the same
thing...
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Jamie_C" <jclancy@.ulysses-systems.com.removethisbit> wrote in message
news:AD9F9920-B4CF-45D0-84CF-ECE22B0142B5@.microsoft.com...
> Hi,
> I can create an Alias for a remote server fine using the Client Network
> Utility (Alias tab, Add -> "Add Netwok Library Configuration" - TCP/IP,
> Server name = IP Address, specify port number).
> ... how can I accomplish the same thing using TRANSACT-SQL so I can create
> a
> script which will do this for my customer.
> Thanks in advance, J
> --
> Jamie Clancy
> Ulysses Systems, London
|||Thanks Bill.
I discovered that I can successfully connect directly using a connection
string which contains the IP address and port number instead, so I don't need
to create an alias after all.
Here's an example:
Provider=SQLOLEDB.1;Password=MyPass;User ID=MyUser;Initial
Catalog=MyDBName;Server=xxx.xxx.xxx.xxx,yyyy
where xxx.xxx.xxx.xxx is the server IP adress and yyyy is the port number
(e.g. 1433 usually for SQL Server)
Jamie Clancy
Ulysses Systems, London
"William (Bill) Vaughn" wrote:
> I don't think this is in TSQL's scope of functionality--it's a networking /
> DNS configuration, not a SQL Server config. It seems to me you might try
> changing the Hosts file on the client system--it can do about the same
> thing...
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "Jamie_C" <jclancy@.ulysses-systems.com.removethisbit> wrote in message
> news:AD9F9920-B4CF-45D0-84CF-ECE22B0142B5@.microsoft.com...
>
>
|||Yes but... connecting via the public web can be problematic. Most shops
don't want to expose the server to the relentless pounding they get from
hackers all over the world trying to break in. I hope this address begins
with 192.168... Of course 80% of hacking comes from within the firewall. I
hope you have a strong SA password.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Jamie_C" <jclancy@.ulysses-systems.com.removethisbit> wrote in message
news:D3FC3B27-9663-40B3-953F-B6F3E5644CE5@.microsoft.com...[vbcol=seagreen]
> Thanks Bill.
> I discovered that I can successfully connect directly using a connection
> string which contains the IP address and port number instead, so I don't
> need
> to create an alias after all.
> Here's an example:
> Provider=SQLOLEDB.1;Password=MyPass;User ID=MyUser;Initial
> Catalog=MyDBName;Server=xxx.xxx.xxx.xxx,yyyy
> where xxx.xxx.xxx.xxx is the server IP adress and yyyy is the port number
> (e.g. 1433 usually for SQL Server)
> --
> Jamie Clancy
> Ulysses Systems, London
>
> "William (Bill) Vaughn" wrote:
No comments:
Post a Comment