Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Thursday, March 8, 2012

Connecting to an external SQL 2000 Server from a Vista machine with SQL 2005 installed

hi there - I'm praying someone here can shed some light on this - after many google and web searches, I have found users with similar issues, but have yet to find a solution.

Problem:I have recently upgraded my desktop from Windows XP to Windows Vista Ultimate (clean install) and have migrated my local machine to SQL Server 2005. However I have a number of .Net projects that access databased on another server running SQL Server 2000 - prior to my upgrade to Vista, I was running SQL Server 2000 on my desktop as well. During the install, everything seemed to go well, and I also installed the SQL Server 2005 Service pack as instructed via the MSDN site. However, when attempting to test my .net projects on my desktop pc (ie visithttp://localhost), I encounter the error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

note that the server I am attempting to connectTO is the old SQL 2000 server - NOT 2005. I specify my connection info in the web.config - and it points to an external ip address on the web.

Can anyone shed some light on this? I've tried enabling remote access on my local SQL 2005 install, but I'm fairly sure thats for servers that want to connect to my desktop, rather than my desktop attempting to connect to external servers. Any help is greatly appreciated - I'm pulling my hair out over trying to figure this out! :)

To summarize my setup (if it helps)

Desktop PC:
Windows Vista (Ultimate)
SQL Server 2005
Visual Studio 2005
II 7.0
.Net 2.0 (ASP.Net Application)

External Server (co-located at a datacenter)
Windows Server 2003
SQL Server 2000
IIS 6.0
.Net 2.0 (ASP.Net Application)

Much appreciated,

Ted

http://forums.asp.net/thread/1476735.aspx|||

Hi Al - thanks for the reply!

I followed the instructions, but am still running into the error. To re-state, the server my code is trying to connect to is only running SQL Server 2000, not SQL Server 2005. Can you enlighten me as to why I'd be getting an error stating that it is trying to connect to a 2005 database?

Much appreciated!

|||Very confused, I believe there is a bug in the provider, I seen a post before with a msdn2 link. I'll try to find it and post it in this thread|||

Did anyone here got hold of this issue. Could someone shed some light ?

|||

I've just run into exactly the same issue as that described in the beginning of this thread. Is there a solution out there for this problem? I'm running Vista Ultimate and Visual Studio 2005, but only SQL Server Management Studio Express.

Connecting to a sql server from home.

Here is the problem, i'm sure there is quite a bit on google but i'mnot sure what to search for. I want to know how to connect to asql server from my home machine using the localhost for testing asp.netfiles out. At work the machines will connect fine usinglocalhost. The server we connect to is in another location. If someone could get me started on what to search for i wouldappreciate it.
Do you want to connect to the same SQL Server (which is at work), using 'Localhost'?
If so - you can't - localhost is used only for a Server which resides locally - on the computer where your web pages are residing.
(I'm not sure how you say it's using Localhost but, at the same time, you say it's in another location)
The SQL Server at work would become, by default, a 'remote' host - to do that, you'd need to use the IP address or the like, enter the username and password for it, and login that way - of course if it's using Windows Authentication, you'd need to work something else out...
Now - if you wanted to just work on pages, testing, etc...you could install SQL Server on your own computer and use localhost - but you'd need to have an identical database (you could do several things, like DTS, if the work computer is accessible outside the walls, along with other things)
|||Ok thanks for the reply.
This was what was throwing me off the computer i use at work doesn'thave sql server on it. The sql Server resides in Chicago and weare in TN. But when testing and using the local host it willconnect to the sql server fine. When i try the same thing at homei can not connect. I'll look more into remote hosting.
|||Is it possible your host has a firewall set up to only allow incoming connections from certain IP addresses (your work), and you need to ask someone to add your home IP address to those that are trusted by the firewall?

Tuesday, February 14, 2012

Connect using different Windows user name...?!?!

I've scoured Google searching for an answer that seems like it should be
easy but apparently isn't...when I open SSMS to connect to a SQL 2005
database and choose Windows authentication, it greys out the User Name
box...problem is, the server I need to connect to is in another domain...how
on earth are you supposed to specify a different Windows user name to
connect with other than the one currently logged into the machine?

-Ben

--
Posted via a free Usenet account from http://www.teranews.comOn Jul 6, 3:12 am, "Ben Hanson" <transparency...@.hotmail.comwrote:

Quote:

Originally Posted by

I've scoured Google searching for an answer that seems like it should be
easy but apparently isn't...when I open SSMS to connect to a SQL 2005
database and choose Windows authentication, it greys out the User Name
box...problem is, the server I need to connect to is in another domain...how
on earth are you supposed to specify a different Windows user name to
connect with other than the one currently logged into the machine?
>
-Ben
>
--
Posted via a free Usenet account fromhttp://www.teranews.com


Hi Ben,

If you need to connect to another machine within your own domain, or
in a domain with the appropriate trust relationship to your own
domain, then you can use the Run As feature when right clicking on the
shortcut that you're using to launch SSMS.

If, OTOH, it isn't possible for users from the target domain to log
onto machines on your local domain, then you need to find some other
way to do it - normal route to take in that case would be to get a
Terminal Services connection to a machine within the target domain and
then start SSMS normally (Or at least, that's what I've normally done
in the past).

The point behind this is - when SSMS offers to connect using Windows
Authentication, it's using Authentication that has already been
established. There's nothing built in to SSMS/SQL Server to perform
the authentication itself.

Damien

Sunday, February 12, 2012

Connect to SQLExpress via Internet with Windows Authentication?

I posted this message on Google but never received an answer so I thought I would try here.

Is it possible to connect to SQLExpress over the Internet (TCP/IP) using Windows Authentication? I can connect using SQL Authentication but the client would rather use Windows Authentication to avoid manageing another set of user names and passwords.

I have tried connecting with a workstation using cached credentials but I just receive an error "Cannot generate SSPI context".

Any assistance is appreciated.

By “Internet” do you mean the network around world, or just “across TCP/IP within your client’s intranet”?

Zlatko

|||Your client would need to open up 'windows' ports on their server in order to get windows auth to work. (i.e. SMB and other ports, including kerberos, etc.)

Typically, this is the WORST possible move to do on a web facing server, it effectively puts the server 'out' on the internet. Yes, Windows Authentication IS more secure than SQL Server auth, but when you put your server 'out' like that on the internet, then you're exposing it to hackers who may stumble across it and attempt to brute-force their way on to the box. Even if they don't succeeed, they may DOS the box with all of the traffic.

In other words, YES, you can use windows authentication on the "internet" but that requires your server to therefore be on the "internet" - i.e. it's no longer effectively behind a firewall and in your 'LAN' it's just 'out' and ready to be hacked.

If you really need more security than what SQL Server auth provides (which can be made pretty secure using pass phrases instead of passwords (like "When will the world end, I wonder?"), then maybe look at getting a VPN.

|||Internet as in worldwide.|||

I was afraid someone was going to say that but I appreciate the feedback. I know SQL authentication is not very secure and was hoping Windows authentication would be a better solution.

Ideally I would lik to find a way to have users connect to the SQL server using RPC over HTTP similar to how Outlook 2003 remotley connects to Exchange 2003 without VPN or openning ports on the firewall.

Does anyone happen to know how I might do this with SQL?

|||SQL Server 2005 natively supports SOAP over http.