Showing posts with label locate. Show all posts
Showing posts with label locate. Show all posts

Friday, March 9, 2012

problem creating view on table from linked server DB using IP

>>create a simply-named alias using Client Network Utility
This sounds like a great idea. May I ask where I locate the Client Network
Utility and how to create the simply-named alias?
"Aaron Bertrand [SQL Server MVP]" wrote:

> Another thing to reduce the complexity here, of having IP addresses
> hard-coded into your query, is to create a simply-named alias using Client
> Network Utility, and then refer to the alias instead of the IP address. N
ot
> that this makes it okay to use the view designer, but I think it is a bett
er
> approach overall. In addition to alleviating problems with 4-dot naming,
it
> also makes it much easier to update the system should that IP address
> change - you just change the alias definition instead of all the places yo
u
> manually referred to it in code.
>
>> This sounds like a great idea. May I ask where I locate the Client
> Network
> Utility
Start > Programs > Microsoft SQL Server >|||Thank you. So I went to the utility. I clicked on the Alias tab. Then I
clicked Add. In the Server alias box I entered the alias name which was
simultaneously showing up in the Connection Parameters Server Name. I
changed that to the IP address of the remote server. Then I selected TCP/IP
in the Network Libaries and clicked OK.
In the Linked Server (from Enterprise Manager), I added the Aliased remote
server using the same context as the link using the IP address. I was not
able to link to the Alias server. Do I need to remove the linked server tha
t
is using the IP address first? I am a little afraid of doing that because
I
already have my client app (VB.Net) working and can retrieve data from the
views (which use the IP address of the remote server).
Well, if anything, it is an interesting exercise.
Thanks for the help.
Rich
"Aaron Bertrand [SQL Server MVP]" wrote:

> Start > Programs > Microsoft SQL Server >
>
>|||Server alias: should be "myserver"
Server name: should "a.b.c.d"
When you add the linked server, use the name "myserver"
What does "not able to" mean? Did you get an error message? If so, what
was it?
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:B2E4C610-E3DB-4229-93BD-D0B277868000@.microsoft.com...
> Thank you. So I went to the utility. I clicked on the Alias tab. Then I
> clicked Add. In the Server alias box I entered the alias name which was
> simultaneously showing up in the Connection Parameters Server Name. I
> changed that to the IP address of the remote server. Then I selected
> TCP/IP
> in the Network Libaries and clicked OK.
> In the Linked Server (from Enterprise Manager), I added the Aliased remote
> server using the same context as the link using the IP address. I was not
> able to link to the Alias server. Do I need to remove the linked server
> that
> is using the IP address first? I am a little afraid of doing that
> because I
> already have my client app (VB.Net) working and can retrieve data from the
> views (which use the IP address of the remote server).
> Well, if anything, it is an interesting exercise.
> Thanks for the help.
> Rich
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>|||When I add the Aliased server I use the Alias name "myServer"
I use the same security context as the original linked server - the UID,
impersonate, and the password, then apply. The new linked server shows up i
n
Enterprise manager, but when I click on tables - about 30 seconds later I ge
t
the error message that either the server "myServer" does not exist or Access
denied. In Query analyzer I try select * from myserver.remotedb.dbo.table1
I get the error message the same error message
"Server does not exist or Access denied"
when I look in sysservers, however
Use Master
select * from sysservers
I can see "myServer" in the list of servers. My question now is if the
Alias is correct - correctly referring to my remote server, and am I using
the correct security context.
"Aaron Bertrand [SQL Server MVP]" wrote:

> Server alias: should be "myserver"
> Server name: should "a.b.c.d"
> When you add the linked server, use the name "myserver"
> What does "not able to" mean? Did you get an error message? If so, what
> was it?
>
>
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:B2E4C610-E3DB-4229-93BD-D0B277868000@.microsoft.com...
>
>|||Not sure, but you may have to restart the SQL Server service for the alias
to be picked up and routable? Also, have you tried any other authentication
methods (e.g. not defining a local login and checking "be made using this
security context" and putting the remote uid/password in that dialog)?
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:CC0FF896-33EF-4F9E-B881-1867D785255C@.microsoft.com...
> When I add the Aliased server I use the Alias name "myServer"
> I use the same security context as the original linked server - the UID,
> impersonate, and the password, then apply. The new linked server shows up
> in
> Enterprise manager, but when I click on tables - about 30 seconds later I
> get
> the error message that either the server "myServer" does not exist or
> Access
> denied. In Query analyzer I try select * from
> myserver.remotedb.dbo.table1
> I get the error message the same error message
> "Server does not exist or Access denied"
> when I look in sysservers, however
> Use Master
> select * from sysservers
> I can see "myServer" in the list of servers. My question now is if the
> Alias is correct - correctly referring to my remote server, and am I using
> the correct security context.
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>

Monday, February 20, 2012

Problem consuming SQL Server SSL Endpoint

I try to consume a SSL Endpoint that is locate in localhost, but i get the follow error msg:

The underlying connection was closed: An unexpected error occurred on a receive.

m_safeCertContext is an invalid handle.

I do not know what gone wrong with my VS2005, i tried in IE with https://localhost/test?wsdl, and it was okay and display the wsdl document successfully. Beside i also tried with CLEAR port, everything is ok and i managed to consume the web service too.

any suggestion would be appreciated. Thank q

You might have more luck asking in the Visual Studio Forum for this. Seems to be a VS issue. However, looking at some of the forums, I was able to find http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=232760&SiteID=1.

HTH

Riyaz

|||

I would also recommend specifying the machine name in the URL in your VS2005 application. I would imagine that the SSL certificate installed on the SQL Server machine is issued to the machine name and not "localhost". One possibility is that since you specified "localhost" in the URL, Visual Studio may be trying to validate the SSL certificate info (machine name) against "localhost" which do not match; thus causing the error.

Jimmy