Showing posts with label machine. Show all posts
Showing posts with label machine. Show all posts

Tuesday, 27 March 2012

connect to SQL 2005 fails

We have a test SQL 2005 (Developer Edition) machine on Windows2003 SP1
Standard Edition. After the reboot to install MS patches Tuesday AM, it qui
t
accepting any SQL Connections. Prior to the reboot it was accepting
connections and working as we expected it to. I've worked with the Surface
Area configuration tool to make sure it allows connections. We've backed ou
t
the patches. After doing this, we've rebooted the box. Yet, we still are
unable to connect.
The primary error message we are seeing is "A connection was successfully
established with the server, but then an error occurred during the pre-login
handshake. (provider: Shared Memory Provider, error: 0 - No process is on th
e
other end of the pipe.) (type SqlException)"
I am also seeing "A connection was successfully established with the server,
but then an error occurred during the pre-login handshake. (provider: Shared
Memory Provider, error: 0 - No process is on the other end of the pipe.)
(Microsoft SQL Server, Error: 233)"
In addition to SQL2005, we have TFS, Windows SharePointServices, and
Reporting Services running on the machine. They are all experiencing
variations on the same message and unable to connect.
Thanks for the assistance.
JeffSounds like the SQL Server service didn't restart after the reboot. Check
the log at:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG
to see if there is a problem with SQL restarting. If that doesn't work, try
using the SQL Server Configuration Manager tool to enable the TCP/IP
protocol on the client and server to see if the problem is isolated to named
pipes.
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
"Jeff in Alaska" <Jeff in Alaska@.discussions.microsoft.com> wrote in message
news:577AE98A-4170-4C15-859B-1FAA0D89A658@.microsoft.com...
> We have a test SQL 2005 (Developer Edition) machine on Windows2003 SP1
> Standard Edition. After the reboot to install MS patches Tuesday AM, it
> quit
> accepting any SQL Connections. Prior to the reboot it was accepting
> connections and working as we expected it to. I've worked with the
> Surface
> Area configuration tool to make sure it allows connections. We've backed
> out
> the patches. After doing this, we've rebooted the box. Yet, we still are
> unable to connect.
> The primary error message we are seeing is "A connection was successfully
> established with the server, but then an error occurred during the
> pre-login
> handshake. (provider: Shared Memory Provider, error: 0 - No process is on
> the
> other end of the pipe.) (type SqlException)"
> I am also seeing "A connection was successfully established with the
> server,
> but then an error occurred during the pre-login handshake. (provider:
> Shared
> Memory Provider, error: 0 - No process is on the other end of the pipe.)
> (Microsoft SQL Server, Error: 233)"
> In addition to SQL2005, we have TFS, Windows SharePointServices, and
> Reporting Services running on the machine. They are all experiencing
> variations on the same message and unable to connect.
> Thanks for the assistance.
> Jeff|||SQL Server successfully restarted. The SQLFT*.LOG and ERRORLOG files both
indicate a successful restart. On the SQL Server Confiruation Manager tool
"Shared Memory", "Named Pipes" and "TCP/IP" are all enabled. "TCP/IP" is
enabled to listen on all IP Addresses. The machine only has one IP that it
is listening to. The protocol order is Shared Memory, TCP/IP, and Named
Pipes.
When looking at the Process view and the "System Services" view, both
indicate SQL Server is up and operational. the only SQL related tool that
isn't operational is SQL Server Agent and it is failing due to same problems
that cause other apps trying to connect to the SQL Server to fail.
Jeff
"Roger Wolter[MSFT]" wrote:

> Sounds like the SQL Server service didn't restart after the reboot. Check
> the log at:
> C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG
> to see if there is a problem with SQL restarting. If that doesn't work, t
ry
> using the SQL Server Configuration Manager tool to enable the TCP/IP
> protocol on the client and server to see if the problem is isolated to nam
ed
> pipes.
> --
> 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
> "Jeff in Alaska" <Jeff in Alaska@.discussions.microsoft.com> wrote in messa
ge
> news:577AE98A-4170-4C15-859B-1FAA0D89A658@.microsoft.com...
>
>|||I can connect easily using C# & ADO.NET on standalone programs.
I am trying to connect from a web site program under .NET 1.1 VS 7 and
always get
Login failed for user 'LANDON\ASPNET'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information abou
t
the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'LANDON\ASPNET'.
Source Error:
Line 46: private void Page_Load(object sender, System.EventArgs e)
Line 47: {
Line 48: sqlConnection1.Open();
Line 49: ds = new DataSet();
Line 50: daAttendees = new SqlDataAdapter(
Source File: c:\inetpub\wwwroot\pcswebapp2\webform1.aspx.cs Line: 48
having signed in under IE6 using:
http://localhost/PCSWebApp2/WebForm1.aspx
I've tried everything to fix the problem;
"Jeff in Alaska" wrote:
[vbcol=seagreen]
> SQL Server successfully restarted. The SQLFT*.LOG and ERRORLOG files both
> indicate a successful restart. On the SQL Server Confiruation Manager too
l
> "Shared Memory", "Named Pipes" and "TCP/IP" are all enabled. "TCP/IP" is
> enabled to listen on all IP Addresses. The machine only has one IP that i
t
> is listening to. The protocol order is Shared Memory, TCP/IP, and Named
> Pipes.
> When looking at the Process view and the "System Services" view, both
> indicate SQL Server is up and operational. the only SQL related tool that
> isn't operational is SQL Server Agent and it is failing due to same proble
ms
> that cause other apps trying to connect to the SQL Server to fail.
> Jeff
> "Roger Wolter[MSFT]" wrote:
>|||"Landon Kelsey" <landonmkelsey@.hotmail.com> wrote in message
news:AC0C18EB-405E-4C5E-8148-FBAA18C12A46@.microsoft.com...[vbcol=seagreen]
>I can connect easily using C# & ADO.NET on standalone programs.
> I am trying to connect from a web site program under .NET 1.1 VS 7 and
> always get
> Login failed for user 'LANDON\ASPNET'.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about
> the error and where it originated in the code.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user
> 'LANDON\ASPNET'.
> Source Error:
>
> Line 46: private void Page_Load(object sender, System.EventArgs e)
> Line 47: {
> Line 48: sqlConnection1.Open();
> Line 49: ds = new DataSet();
> Line 50: daAttendees = new SqlDataAdapter(
>
> Source File: c:\inetpub\wwwroot\pcswebapp2\webform1.aspx.cs Line: 48
> having signed in under IE6 using:
> http://localhost/PCSWebApp2/WebForm1.aspx
> I've tried everything to fix the problem;
>
>
>
> "Jeff in Alaska" wrote:
>
Is there any reason you've hijacked several other OP's posts instead of
posting your own message?
Star Fleet Admiral Q @. your service!
Google is your friend!
http://www.google.com|||this problem appears in more than one post so why dilute the
knowledge/proliferate the problem by starting yet another post?
I've noticed that good answewrs have been given in one of the posts.
Do you expect the answerer to search for every post of the problem and
answer it?
"Admiral Q" wrote:

> "Landon Kelsey" <landonmkelsey@.hotmail.com> wrote in message
> news:AC0C18EB-405E-4C5E-8148-FBAA18C12A46@.microsoft.com...
>
> Is there any reason you've hijacked several other OP's posts instead of
> posting your own message?
> --
> Star Fleet Admiral Q @. your service!
> Google is your friend!
> http://www.google.com
>
>|||"Landon Kelsey" <landonmkelsey@.hotmail.com> wrote in message
news:8D5862C0-755A-4523-81B4-CBF7A69686D6@.microsoft.com...[vbcol=seagreen]
> this problem appears in more than one post so why dilute the
> knowledge/proliferate the problem by starting yet another post?
> I've noticed that good answewrs have been given in one of the posts.
> Do you expect the answerer to search for every post of the problem and
> answer it?
> "Admiral Q" wrote:
>
Guess you'll find out you won't get many of your own questions asked if you
keep hijacking other threads - as soon as you learn proper neticate, you'll
get the results you desire, but until then, you'll be living on other's
crumbs.
Star Fleet Admiral Q @. your service!
Google is your friend!
http://www.google.com|||Hey, u had a question and then u found your self arguing on some post
made by a person who got lost maybe (with the mind). I have the same
problem described pretty good in the first post. And I can't solve it.
I really don't want to reinstall my OS or even Sql Server 2005. If by
some miracle someone knows about the problem "give me a call".
Here's the problem described by sql server:
Code:
--
===================================
Cannot connect to NELUSAN\SQLSERVER2005.
===================================
A connection was successfully established with the server, but then an error
occurred during the pre-login handshake. (provider: Shared Memory Provider,
error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Dat
a Provider)
For help, click: http://go.microsoft.com/fwlink?Prod...33&LinkId=20476
Server Name: NELUSAN\SQLSERVER2005
Error Number: 233
Severity: 20
State: 0
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exceptio
n, Boolean breakConnection)
at System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
b
ject stateObj)
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt,
Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Bool
ean& failoverDemandDone, String host, String failoverPartner, String protoco
l, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt,
Boolean trustServerCert,
Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnect
ion owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIden
tity identity, SqlConnectionString connectionOptions, Object providerInfo, S
tring newPassword, SqlConnection owningObject, Boolean redirectedUserInstanc
e)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionO
ptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConne
ction owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(Db
Connection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection o
wningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection o
uterConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExpl
orer.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThrea
dUser()
--
nelusan
---
nelusan's Profile: http://www.dbtalk.net/m400
View this thread: http://www.dbtalk.net/t300721

connect to sql

Hi
I have two machine one is application server (asp) and one is database
server (sql 2000).
Between them, I use a crossover cable connect each other(1GB) and also they'
re all connect to internet use another network card(100 MB).
I test locally and the speed is good, but just found it's very slow after we
moved the machined to the collocation. How to trouble this? Please help.
just found out use name instead of ip and change from to SQLOLEDB
provider=SQLOLEDB.1 and it works fine.
why is that? please advice.
<js@.someone.com> wrote in message
news:eyKXm6r8GHA.4708@.TK2MSFTNGP05.phx.gbl...
> Hi
>
> I have two machine one is application server (asp) and one is database
> server (sql 2000).
> Between them, I use a crossover cable connect each other(1GB) and also
they'
> re all connect to internet use another network card(100 MB).
> I test locally and the speed is good, but just found it's very slow after
we
> moved the machined to the collocation. How to trouble this? Please help.
>
>
|||It affects things when you have more than two version on the
computer. If you use just SQLOLEDB, it will point to the
latest version of the provider. When you use SQLOLEDB.1, you
are specifying a specific version with the ProgID.
You may want to use the MDAC Component Checker to check your
MDAC installation. You can download it from:
http://msdn.microsoft.com/data/ref/mdac/downloads/
-Sue
On Wed, 18 Oct 2006 12:54:57 -0400, <js@.someone.com> wrote:

>just found out use name instead of ip and change from to SQLOLEDB
>provider=SQLOLEDB.1 and it works fine.
>why is that? please advice.
><js@.someone.com> wrote in message
>news:eyKXm6r8GHA.4708@.TK2MSFTNGP05.phx.gbl...
>they'
>we
>

Sunday, 25 March 2012

connect to sql

Hi
I have two machine one is application server (asp) and one is database
server (sql 2000).
Between them, I use a crossover cable connect each other(1GB) and also they'
re all connect to internet use another network card(100 MB).
I test locally and the speed is good, but just found it's very slow after we
moved the machined to the collocation. How to trouble this? Please help.just found out use name instead of ip and change from to SQLOLEDB
provider=SQLOLEDB.1 and it works fine.
why is that? please advice.
<js@.someone.com> wrote in message
news:eyKXm6r8GHA.4708@.TK2MSFTNGP05.phx.gbl...
> Hi
>
> I have two machine one is application server (asp) and one is database
> server (sql 2000).
> Between them, I use a crossover cable connect each other(1GB) and also
they'
> re all connect to internet use another network card(100 MB).
> I test locally and the speed is good, but just found it's very slow after
we
> moved the machined to the collocation. How to trouble this? Please help.
>
>|||It affects things when you have more than two version on the
computer. If you use just SQLOLEDB, it will point to the
latest version of the provider. When you use SQLOLEDB.1, you
are specifying a specific version with the ProgID.
You may want to use the MDAC Component Checker to check your
MDAC installation. You can download it from:
http://msdn.microsoft.com/data/ref/mdac/downloads/
-Sue
On Wed, 18 Oct 2006 12:54:57 -0400, <js@.someone.com> wrote:

>just found out use name instead of ip and change from to SQLOLEDB
>provider=SQLOLEDB.1 and it works fine.
>why is that? please advice.
><js@.someone.com> wrote in message
>news:eyKXm6r8GHA.4708@.TK2MSFTNGP05.phx.gbl...
>they'
>we
>

connect to server via intranet - how is it done (new to this)

Hi all!

I have msde2000 on one machine. want to connect to it from other machine. both machines are connected via a switch with integrated firewall.

Do I need to set up this firewall to enable connections? Like opening ports for msde in the virtual servers settings of the firewall?

If I do this, will that make my sql-server visible and accessible to the internet?

Or should I be able to find my sql server without such steps. And if so how?

networking is up and i can access folders of both machines via the intranet. Is that enough or do i need more settings here?

Let's say the machine and thus the server is called Alpha. What goes into my connectionstring from the other machine?

this wont be enough, right?
strconn = "Provider=SQLOLEDB;" & _
"Data Source="Alpha";"

Please shed some light on these questions.

tia

KumaFirst you will have to configure the ODBC settings in your machine. Make sure the datasource name is "alpha" , the same as the server name. You can then use "alpha" in the connection string. The code that is required is

'VB Code starts here

Set db = New ADODB.Connection

db.Properties("Data Source").Value = "alpha"
db.Properties("Initial Catalog").Value = "Northwind"
db.Properties("User ID").Value ="XXX"
db.Properties("Password").Value = "YYYYY"
db.Open

'ASP Code starts here
Set db = Server.CreateObject("ADODB.Connection")
db.Open "Provider=SQLOLEDB;Data Source=alpha;Initial Catalog=Northwind;User Id=XXX;Password=YYY"

'CODE ENDS HERE

Roshmi Choudhury

Connect to Remote Analysis Server

Hi,

How do I connect to a remote Analysis Server using SQL management studio on my local machine.

Thanks in advance..

Hi,

At the remote computer you want to connect, your nt domain username should be at least in the MSOLAPUser group. And if you want to have server-wide permissions your username should be added to the list displayed in the security tab of the olap server properties screen.

Eralper

http://www.kodyaz.com

|||Hi eralper,

Thanks for the reply. But how can my local SQL management studio detect Analysis Services of Network Servers? As of now, it can only detect Database Engines of other network server..

Thanks again...
|||

What is the name of the physical machine you want to connect to?

Also when it was installed was the instance given a name?

If the instance was not given a name then you can just put the machine name in the server edit control, if it has a name then it should be servername\instancename in the control.

|||

Maybe the Analysis Server is not configured to allow remote connections?

1. On the remote machine, start the SQL Server Surface Area Configuration tool and verify that remote connections are enabled.

2. On the remote machine, verify that the SQL Browser windows service is running.

3. If you have the Windows Firewall enabled on the local machine or remote machine, you will need to make sure you open TCP ports so Analysis Server can accept incoming connections. The port numbers Analysis Server listens to are following:
2383 – port default instance of Analysis Server listens to
2382 – port SQL Browser service listens to for Analysis Services requests.

Note: Named instance of Analysis Services will dynamically pick ports to listen on your machine. The easiest way to discover the TCP port the named instance is listening is to look at the configuration file for SQL Server Browser file. Open file located on the %Program files%\Microsoft SQL Server\90\Shared\ASConfig. Open msmdredir.ini file and look at the < Instances> section in it.
For example you might see following in it;
<Instances>
<Instance>
<Name>Inst1</Name>
<Port>56178</Port>
</Instance>
</Instances>

This means your machinename\Inst1 is listening on the port 56178.

In many situations you would like to ensure your named instance is not picking port by itself but listens on pre-defined port. For that, you can modify the Port – Analysis Server property. Make sure you restart Analysis Server and SQL Server Browser service after changing this property.

Hope this helps,

-- Robert

|||

Hi,

If you open the SQL Server Management Studio, open the Registered Servers screen and select Analysis Services.

If you try to add a new olap server, a list of available servers are listed in the dropdownlist. Or you can use the browse button. But I guess these are not coming from a network search process for available servers.

Sorry, I don't have an answer for that.

But I can suggest a tool which scans for sql servers within an IP range, SQLPing2 by C. Andrews from sqlsecurity.com

Unfortunately this tool does not search for the MS AS instances.

Eralper

http://www.kodyaz.com

Thursday, 22 March 2012

Connect to Network SQL2k5 Database - ERROR

Hi,
eh! Finally I installed SQL 2005 yesterday. I have SQL 2000 also installed
on the same machine. When I started Microsoft SQL Server Management Studio
and tried to connect to another database running SQL 2005 using Windows
Authentication, I got following error.
TITLE: Microsoft SQL Server Management Studio
--
Unable to cast COM object of type 'System.__ComObject' to interface type
'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed
because the QueryInterface call on the COM component for the interface with
IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following
error: No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
--
Although, this error does not affect connection to the database. It connects
successfully and I am able to perform other stuff too. Just curious, why
this error is coming.
Any ideas why am I getting this kind of error.
Regards,
AtulLooks like you have problem with Visual Studio. Try to connect your database
from visual studio. Might be your installation file is corrupt or improper
installation.
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"Atul" wrote:
> Hi,
> eh! Finally I installed SQL 2005 yesterday. I have SQL 2000 also installed
> on the same machine. When I started Microsoft SQL Server Management Studio
> and tried to connect to another database running SQL 2005 using Windows
> Authentication, I got following error.
> TITLE: Microsoft SQL Server Management Studio
> --
> Unable to cast COM object of type 'System.__ComObject' to interface type
> 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed
> because the QueryInterface call on the COM component for the interface with
> IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following
> error: No such interface supported (Exception from HRESULT: 0x80004002
> (E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
> --
> Although, this error does not affect connection to the database. It connects
> successfully and I am able to perform other stuff too. Just curious, why
> this error is coming.
> Any ideas why am I getting this kind of error.
> Regards,
> Atul
>
>|||While installing SQL 2005, I did not give DataBase Instance name. Now when I
try to connect to local SQL 2005 database (I dont know where the MDF files
have been created for the same), it fails to connect, instead it connects to
SQL 2000 Database server.
This is another problem I am facing.
"Sreejith G" <SreejithG@.discussions.microsoft.com> wrote in message
news:4F2D2233-BDDE-47FB-BB1C-7ED76E1D3359@.microsoft.com...
> Looks like you have problem with Visual Studio. Try to connect your
> database
> from visual studio. Might be your installation file is corrupt or improper
> installation.
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread and
> time
> asking back if its 2000 or 2005]
>
> "Atul" wrote:
>> Hi,
>> eh! Finally I installed SQL 2005 yesterday. I have SQL 2000 also
>> installed
>> on the same machine. When I started Microsoft SQL Server Management
>> Studio
>> and tried to connect to another database running SQL 2005 using Windows
>> Authentication, I got following error.
>> TITLE: Microsoft SQL Server Management Studio
>> --
>> Unable to cast COM object of type 'System.__ComObject' to interface type
>> 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation
>> failed
>> because the QueryInterface call on the COM component for the interface
>> with
>> IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following
>> error: No such interface supported (Exception from HRESULT: 0x80004002
>> (E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
>> --
>> Although, this error does not affect connection to the database. It
>> connects
>> successfully and I am able to perform other stuff too. Just curious, why
>> this error is coming.
>> Any ideas why am I getting this kind of error.
>> Regards,
>> Atul
>>

Connect to Network SQL2k5 Database - ERROR

Hi,
eh! Finally I installed SQL 2005 yesterday. I have SQL 2000 also installed
on the same machine. When I started Microsoft SQL Server Management Studio
and tried to connect to another database running SQL 2005 using Windows
Authentication, I got following error.
TITLE: Microsoft SQL Server Management Studio
Unable to cast COM object of type 'System.__ComObject' to interface type
'Microsoft.VisualStudio.OLE.Interop.IServiceProvid er'. This operation failed
because the QueryInterface call on the COM component for the interface with
IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following
error: No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
Although, this error does not affect connection to the database. It connects
successfully and I am able to perform other stuff too. Just curious, why
this error is coming.
Any ideas why am I getting this kind of error.
Regards,
Atul
Looks like you have problem with Visual Studio. Try to connect your database
from visual studio. Might be your installation file is corrupt or improper
installation.
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"Atul" wrote:

> Hi,
> eh! Finally I installed SQL 2005 yesterday. I have SQL 2000 also installed
> on the same machine. When I started Microsoft SQL Server Management Studio
> and tried to connect to another database running SQL 2005 using Windows
> Authentication, I got following error.
> TITLE: Microsoft SQL Server Management Studio
> --
> Unable to cast COM object of type 'System.__ComObject' to interface type
> 'Microsoft.VisualStudio.OLE.Interop.IServiceProvid er'. This operation failed
> because the QueryInterface call on the COM component for the interface with
> IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following
> error: No such interface supported (Exception from HRESULT: 0x80004002
> (E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
> --
> Although, this error does not affect connection to the database. It connects
> successfully and I am able to perform other stuff too. Just curious, why
> this error is coming.
> Any ideas why am I getting this kind of error.
> Regards,
> Atul
>
>
|||While installing SQL 2005, I did not give DataBase Instance name. Now when I
try to connect to local SQL 2005 database (I dont know where the MDF files
have been created for the same), it fails to connect, instead it connects to
SQL 2000 Database server.
This is another problem I am facing.
"Sreejith G" <SreejithG@.discussions.microsoft.com> wrote in message
news:4F2D2233-BDDE-47FB-BB1C-7ED76E1D3359@.microsoft.com...[vbcol=seagreen]
> Looks like you have problem with Visual Studio. Try to connect your
> database
> from visual studio. Might be your installation file is corrupt or improper
> installation.
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread and
> time
> asking back if its 2000 or 2005]
>
> "Atul" wrote:

Connect to Network SQL2k5 Database - ERROR

Hi,
eh! Finally I installed SQL 2005 yesterday. I have SQL 2000 also installed
on the same machine. When I started Microsoft SQL Server Management Studio
and tried to connect to another database running SQL 2005 using Windows
Authentication, I got following error.
TITLE: Microsoft SQL Server Management Studio
--
Unable to cast COM object of type 'System.__ComObject' to interface type
'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed
because the QueryInterface call on the COM component for the interface with
IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the followin
g
error: No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
Although, this error does not affect connection to the database. It connects
successfully and I am able to perform other stuff too. Just curious, why
this error is coming.
Any ideas why am I getting this kind of error.
Regards,
AtulLooks like you have problem with Visual Studio. Try to connect your database
from visual studio. Might be your installation file is corrupt or improper
installation.
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and
time
asking back if its 2000 or 2005]
"Atul" wrote:

> Hi,
> eh! Finally I installed SQL 2005 yesterday. I have SQL 2000 also installed
> on the same machine. When I started Microsoft SQL Server Management Studio
> and tried to connect to another database running SQL 2005 using Windows
> Authentication, I got following error.
> TITLE: Microsoft SQL Server Management Studio
> --
> Unable to cast COM object of type 'System.__ComObject' to interface type
> 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation fail
ed
> because the QueryInterface call on the COM component for the interface wit
h
> IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the follow
ing
> error: No such interface supported (Exception from HRESULT: 0x80004002
> (E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)
> --
> Although, this error does not affect connection to the database. It connec
ts
> successfully and I am able to perform other stuff too. Just curious, why
> this error is coming.
> Any ideas why am I getting this kind of error.
> Regards,
> Atul
>
>|||While installing SQL 2005, I did not give DataBase Instance name. Now when I
try to connect to local SQL 2005 database (I dont know where the MDF files
have been created for the same), it fails to connect, instead it connects to
SQL 2000 Database server.
This is another problem I am facing.
"Sreejith G" <SreejithG@.discussions.microsoft.com> wrote in message
news:4F2D2233-BDDE-47FB-BB1C-7ED76E1D3359@.microsoft.com...[vbcol=seagreen]
> Looks like you have problem with Visual Studio. Try to connect your
> database
> from visual studio. Might be your installation file is corrupt or improper
> installation.
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread an
d
> time
> asking back if its 2000 or 2005]
>
> "Atul" wrote:
>

Connect to named instance on different domain

I am having trouble connecting to a named instance on a different domain. For example, I am in the domain mydomain.com, the machine is in ops.mydomain.com.

In Query Analyzer I have tried to connect (without success) to:

machinename\instance

machinename

i.p. address

i.p. address\instance

Within the same domain I can successfully connect to

machinename\instance

Any ideas? Also, this machine is part of a cluster...not sure if that matters. I have full permissions to connect to this machine.

ThanksNever mind...the instance was setup to a port different than 1433. We changed it to 1433, rebooted the server, and now I can connect.

One issue though: I can only connect by specifying the i.p. address, i.e.

255.255.255.0\instancename

Using the server name or setting up an alias doesn't seem to work.

Originally posted by banderson
I am having trouble connecting to a named instance on a different domain. For example, I am in the domain mydomain.com, the machine is in ops.mydomain.com.

In Query Analyzer I have tried to connect (without success) to:

machinename\instance

machinename

i.p. address

i.p. address\instance

Within the same domain I can successfully connect to

machinename\instance

Any ideas? Also, this machine is part of a cluster...not sure if that matters. I have full permissions to connect to this machine.

Thanks

Connect to MSDE with Limited User (not using sql authentication)

I have an MSDE installation that I need to connect to within a C# .NET
project as a Limited User (from the same machine, not via the network)
The MSDE instance is not in sql authentication mode, only windows
authentication. Is this possible? I've used the
'Trusted_Connection=True;' in the connection string, but a login fails
for the user with an error like:
"Cannot open database in login 'testdatabase'. Login fails. Login
failed for wkstn\limiteduser"
Do I need to grant any (additional) rights to the database itself?
Thanks for your help,
Tom
You can=B4t mix up the keyword "USER ID" and Trusted_connection, if you
choose "User ID" (SQL Server auth.) SQL Server will use SQL Server
authentication regardless of the Trusted_connection settings, see more
details here:
http://msdn.microsoft.com/library/de...n-us/adminsql=
/ad_security_47u6.asp
But you can (as you are working with C#) create a impersonated context
and connect with this...
http://www.codeproject.com/csharp/cpimpersonation1.asp
..=2E.and connect with this.
HTH, jens Suessmeyer.

connect to ms sql from C# code

Hi all,

I am trying to connect to a ms sql database from C# code. The code is being executed on the machine where the ms sql server is installed.

Am getting this error:

System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParserStateObject.ReadSni Error(TdsParserStateObject stateObj, UInt32 error) at System.Data.SqlClient.TdsParserStateObject.ReadSni (DbAsyncResult asyncResult, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParserStateObject.ReadPac ket(Int32 bytesExpected) at System.Data.SqlClient.TdsParserStateObject.Re...

The connection string is as followed:

connString = "initial catalog=rolesdb;data source=LOCALHOST\\OFFICESERVERS;Integrated Security=sspi";

SqlConnection conn = new SqlConnection(connString);

conn.Open();

Any idea how to fix this error.

Regards,
bernadetIt seems that user/password information is missing from the connection string?|||

Quote:

Originally Posted by bernadet

Hi all,

I am trying to connect to a ms sql database from C# code. The code is being executed on the machine where the ms sql server is installed.

Am getting this error:

System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParserStateObject.ReadSni Error(TdsParserStateObject stateObj, UInt32 error) at System.Data.SqlClient.TdsParserStateObject.ReadSni (DbAsyncResult asyncResult, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParserStateObject.ReadPac ket(Int32 bytesExpected) at System.Data.SqlClient.TdsParserStateObject.Re...

The connection string is as followed:

connString = "initial catalog=rolesdb;data source=LOCALHOST\\OFFICESERVERS;Integrated Security=sspi";

SqlConnection conn = new SqlConnection(connString);

conn.Open();

Any idea how to fix this error.

Regards,
bernadet


MySQL provides a managed DLL to aid in connecting to a MySQL database using .NET.

Tuesday, 20 March 2012

Connect to database takes long for non-admins

Hi,

any idea why it might take longer to connect to a SQL Server for a non-administrative user than for a dbo? Same machine, just different logins...

Thanks,

Hi Thomas :-)

first thing for me would to be to have a look in the event logs, Maybe with full security logging (C2 audit) eventually also enabled you might see some more issues. But I assume that the none dbo logins will be redirected to another database than the one the "normal" users are redirected to. That might cause a delay if the other databases are closed for inactivity and have to be reopened first.

HTH, Jens SUessmeyer.

http:/www.sqlserver2005.de|||

Hi Jens,

well, we'll try full logging later... It has nothing to do with the database being closed for inactivity since if you logon twice it will take the same time...

Thanks,

Thomas

|||

Interesting... I'm trying to troubleshoot what may be a similar issue. Here are some specifics...

+ just set up a brand new 64bit server (Windows 2003 R2 64 bit O/S and SQL 2005 64 bit, Std Edition); SQL is the only thing running on this server.

+ installed this new server in the same AD domain as an existing SQL 2000 db

+ on my workstation using SQL Mgmt Studio, I am unable to connect to the new SQL2005 box (and I'm a member of the domain Administrators group), I get a "Timeout expired" dialog box. However, I *am* able to connect to our SQL 2k box.

+ again, on my workstation, I use RDP (remote desktop) to connect to both boxes just fine. So once I'm RDP'd into the SQL2005 box, I fire up SQL Mgmt Studio there... it takes well over a couple of minutes before it even finishes rendering the first screen to connect to any instances. Once it finally does come up, I can connect to the (local) db using Windows Auth.

I am completely baffled as to why it SQL Mgmt studio would take so long to open up... Any information on what it's trying to do might be helpful... It's almost like it's trying to authenticate or connect to something and timing out, although no errors are displayed and there's nothing in the event logs. It's odd to me though, as at that point (just opening up the application), it doesn't seem like it should be attempting anything like that.

-- Margo Noreen

|||

Interesting... I'm trying to troubleshoot what may be a similar issue. Here are some specifics...

+ just set up a brand new 64bit server (Windows 2003 R2 64 bit O/S and SQL 2005 64 bit, Std Edition); SQL is the only thing running on this server.

+ installed this new server in the same AD domain as an existing SQL 2000 db

+ on my workstation using SQL Mgmt Studio, I am unable to connect to the new SQL2005 box (and I'm a member of the domain Administrators group), I get a "Timeout expired" dialog box. However, I *am* able to connect to our SQL 2k box.

+ again, on my workstation, I use RDP (remote desktop) to connect to both boxes just fine. So once I'm RDP'd into the SQL2005 box, I fire up SQL Mgmt Studio there... it takes well over a couple of minutes before it even finishes rendering the first screen to connect to any instances. Once it finally does come up, I can connect to the (local) db using Windows Auth.

I am completely baffled as to why it SQL Mgmt studio would take so long to open up... Any information on what it's trying to do might be helpful... It's almost like it's trying to authenticate or connect to something and timing out, although no errors are displayed and there's nothing in the event logs. It's odd to me though, as at that point (just opening up the application), it doesn't seem like it should be attempting anything like that.

-- Margo Noreen

Connect to an NS instance on remote server

I have Sql Server 2005 and Notification Services on one machine and I am developing a web app on another machine that will be front-end to the NS instance. So far all the examples I've seen for connecting to an instance using NS API assume that Sql Server, Notification Services and the development environment are on the same machine. Is it possible to connect to an instance on a remote machine using NS API? If so, how can it be done?

On the machine hosting your web app, you'll need to register the NS instance. When you register instance, you specify the name of the database server hosting the NS instance and the sql username/password used to connect to it, if you're using sql auth. Once you've created the registration, you can then use the NS API just like you would if the sql server were local: you create an instance of the NSInstance class, passing the instance name. The NSInstance implementation will read the server/connection information from the registry.

To register the instance, you have two options:
- On the web server machine, run nscontrol register, passing the name of your SQL Server (not the local machine) to the -server parameter.
- On the web server machine, run SQL Server Management Studio, connect the Object Explorer to the SQL Server hosting your instance's databases, right click on the instance name in the Notification Services folder and choose "Register" from the context menu.

Whichever tool you choose (nscontrol or management studio), you must run it locally on the web server box.
Hope this helps.
-shyam

|||Shyam is right that you need to register the instance.

There is also a third option to do the registration:
- You can use the Microsoft.SqlServer.Management.Nmo.Instance.RegisterLocal method to do the registration at runtime. There are class and instance based overloads that you can choose from to meet your needs. As the name suggests, you have to execute it on the locally on the web server box.

Whether you choose to do your registration at runtime or as part of your deployment steps (using the options Shyam mentions) you have to do it before you initialize the NSInstance object.

Hope that helps.
Anand

Connect to a 2nd instance of SQL server while UDP 1434 is blocked

I have two instances of SQL 2000 on one of our servers. I can connect to the
first instance that has the machine name and port 1434 from anywhere I want.
But when I try to connect to the second instance on the same machine with
then name of machinename\G3 from a server on a second network where UDP 1434
port is blocked by the firewall, the connection fail and the second instance
is not available. I followed this article on Microsoft knowledge base
http://support.microsoft.com/kb/265808/ where I created an alias for the G3
server on the client machine using the IP address and the assigned port
number, but that didnâ't help and I still could not connect to the server. I
basically followed those steps:
2. Configure the server alias on the client computer.
SQL Server 2000a. Start the Client Network Utility.
b. On the General tab, verify that TCP/IP appears in the list under Enabled
protocols by order.
c. Click the Alias tab, and then click Add.
d. Under Network libraries, select TCP/IP.
e. In the Server name text box, type the IP address of the server that is
running SQL Server 2005.
Note The IP address that you type here is the one that is configured to use
the TCP/IP port number.
f. Click to clear the Dynamically determine port check box, and then type
the port number of the instance of SQL Server 2005 in the Port number text
box.
g. Type a name in the Server alias text box, and then click OK.
I asked the IT department to unblock the UDP 1434 temporarily to see if I
can connect to the G3 server, and I was able to connect with no problem.
Unfortunately, they are required to block UDP 1434 so I have to deal with
that.
Does anybody have any idea that could help? Please let me know.
ThanksHi Danny
A named instance will use a dynamic port by default and UDP 1434 is used to
transmit the name of the instance name back to the client. You will need to
make the port fixed on the server and the corresponding port configured on
the client.
Check out http://support.microsoft.com/kb/287932.
John
"Danny Mansour" wrote:
> I have two instances of SQL 2000 on one of our servers. I can connect to the
> first instance that has the machine name and port 1434 from anywhere I want.
> But when I try to connect to the second instance on the same machine with
> then name of machinename\G3 from a server on a second network where UDP 1434
> port is blocked by the firewall, the connection fail and the second instance
> is not available. I followed this article on Microsoft knowledge base
> http://support.microsoft.com/kb/265808/ where I created an alias for the G3
> server on the client machine using the IP address and the assigned port
> number, but that didnâ't help and I still could not connect to the server. I
> basically followed those steps:
> 2. Configure the server alias on the client computer.
> SQL Server 2000a. Start the Client Network Utility.
> b. On the General tab, verify that TCP/IP appears in the list under Enabled
> protocols by order.
> c. Click the Alias tab, and then click Add.
> d. Under Network libraries, select TCP/IP.
> e. In the Server name text box, type the IP address of the server that is
> running SQL Server 2005.
> Note The IP address that you type here is the one that is configured to use
> the TCP/IP port number.
> f. Click to clear the Dynamically determine port check box, and then type
> the port number of the instance of SQL Server 2005 in the Port number text
> box.
> g. Type a name in the Server alias text box, and then click OK.
>
> I asked the IT department to unblock the UDP 1434 temporarily to see if I
> can connect to the G3 server, and I was able to connect with no problem.
> Unfortunately, they are required to block UDP 1434 so I have to deal with
> that.
> Does anybody have any idea that could help? Please let me know.
> Thanks
>|||One way to avoid the dependency on UDP 1434 is to specify the port number
explicitly on the connection string. So assume that the server name is
ServerA, its IP address is A.B.C.D, and the instance listens on TCP port
1234, you connect to the instance as follows:
ServerA,1234
or
A.B.C.D,1234
When you connect to an instance using the ServerName\InstanceName
convention, the client needs to retrieve the port number first, and it talks
to UDP 1434 to get the port number.
Linchi
"Danny Mansour" wrote:
> I have two instances of SQL 2000 on one of our servers. I can connect to the
> first instance that has the machine name and port 1434 from anywhere I want.
> But when I try to connect to the second instance on the same machine with
> then name of machinename\G3 from a server on a second network where UDP 1434
> port is blocked by the firewall, the connection fail and the second instance
> is not available. I followed this article on Microsoft knowledge base
> http://support.microsoft.com/kb/265808/ where I created an alias for the G3
> server on the client machine using the IP address and the assigned port
> number, but that didnâ't help and I still could not connect to the server. I
> basically followed those steps:
> 2. Configure the server alias on the client computer.
> SQL Server 2000a. Start the Client Network Utility.
> b. On the General tab, verify that TCP/IP appears in the list under Enabled
> protocols by order.
> c. Click the Alias tab, and then click Add.
> d. Under Network libraries, select TCP/IP.
> e. In the Server name text box, type the IP address of the server that is
> running SQL Server 2005.
> Note The IP address that you type here is the one that is configured to use
> the TCP/IP port number.
> f. Click to clear the Dynamically determine port check box, and then type
> the port number of the instance of SQL Server 2005 in the Port number text
> box.
> g. Type a name in the Server alias text box, and then click OK.
>
> I asked the IT department to unblock the UDP 1434 temporarily to see if I
> can connect to the G3 server, and I was able to connect with no problem.
> Unfortunately, they are required to block UDP 1434 so I have to deal with
> that.
> Does anybody have any idea that could help? Please let me know.
> Thanks
>|||Thanks a bunch for the reply.
I followed the article you sent me and configured a static port and I
configured the client machine to point to the port. Somehow this still
didn't work for me. The article mentions to set a static Port before
configuring the firewall. I wonder if I need to open the new static port on
the firewall to make it work?
Please let me know what you think.
Thanks,
Danny
"John Bell" wrote:
> Hi Danny
> A named instance will use a dynamic port by default and UDP 1434 is used to
> transmit the name of the instance name back to the client. You will need to
> make the port fixed on the server and the corresponding port configured on
> the client.
> Check out http://support.microsoft.com/kb/287932.
> John
>
> "Danny Mansour" wrote:
> > I have two instances of SQL 2000 on one of our servers. I can connect to the
> > first instance that has the machine name and port 1434 from anywhere I want.
> > But when I try to connect to the second instance on the same machine with
> > then name of machinename\G3 from a server on a second network where UDP 1434
> > port is blocked by the firewall, the connection fail and the second instance
> > is not available. I followed this article on Microsoft knowledge base
> > http://support.microsoft.com/kb/265808/ where I created an alias for the G3
> > server on the client machine using the IP address and the assigned port
> > number, but that didnâ't help and I still could not connect to the server. I
> > basically followed those steps:
> >
> > 2. Configure the server alias on the client computer.
> >
> > SQL Server 2000a. Start the Client Network Utility.
> > b. On the General tab, verify that TCP/IP appears in the list under Enabled
> > protocols by order.
> > c. Click the Alias tab, and then click Add.
> > d. Under Network libraries, select TCP/IP.
> > e. In the Server name text box, type the IP address of the server that is
> > running SQL Server 2005.
> >
> > Note The IP address that you type here is the one that is configured to use
> > the TCP/IP port number.
> > f. Click to clear the Dynamically determine port check box, and then type
> > the port number of the instance of SQL Server 2005 in the Port number text
> > box.
> > g. Type a name in the Server alias text box, and then click OK.
> >
> >
> > I asked the IT department to unblock the UDP 1434 temporarily to see if I
> > can connect to the G3 server, and I was able to connect with no problem.
> > Unfortunately, they are required to block UDP 1434 so I have to deal with
> > that.
> >
> > Does anybody have any idea that could help? Please let me know.
> >
> > Thanks
> >|||thank you for your reply. The intersting thing is that I have been trying to
connect to the second instance through the Enterprise Manager using an alias
name through the Client Network Utility where I specified the IP address and
the static port number, but I was unable to make a connection. On the other
hand, trying to connect using OSQL by doing "OSQL /E servername,port as you
suggeted works fine and I'm able to query the server. I wonder what the
difference is in the way the Enterprise Manger tries to make the connection.
I'm trying to establish replication between servers thus I need the
Enterprise Manager to be able to connect.
Please let me know what you think.
Thanks a million.
Danny
"Linchi Shea" wrote:
> One way to avoid the dependency on UDP 1434 is to specify the port number
> explicitly on the connection string. So assume that the server name is
> ServerA, its IP address is A.B.C.D, and the instance listens on TCP port
> 1234, you connect to the instance as follows:
> ServerA,1234
> or
> A.B.C.D,1234
> When you connect to an instance using the ServerName\InstanceName
> convention, the client needs to retrieve the port number first, and it talks
> to UDP 1434 to get the port number.
> Linchi
> "Danny Mansour" wrote:
> > I have two instances of SQL 2000 on one of our servers. I can connect to the
> > first instance that has the machine name and port 1434 from anywhere I want.
> > But when I try to connect to the second instance on the same machine with
> > then name of machinename\G3 from a server on a second network where UDP 1434
> > port is blocked by the firewall, the connection fail and the second instance
> > is not available. I followed this article on Microsoft knowledge base
> > http://support.microsoft.com/kb/265808/ where I created an alias for the G3
> > server on the client machine using the IP address and the assigned port
> > number, but that didnâ't help and I still could not connect to the server. I
> > basically followed those steps:
> >
> > 2. Configure the server alias on the client computer.
> >
> > SQL Server 2000a. Start the Client Network Utility.
> > b. On the General tab, verify that TCP/IP appears in the list under Enabled
> > protocols by order.
> > c. Click the Alias tab, and then click Add.
> > d. Under Network libraries, select TCP/IP.
> > e. In the Server name text box, type the IP address of the server that is
> > running SQL Server 2005.
> >
> > Note The IP address that you type here is the one that is configured to use
> > the TCP/IP port number.
> > f. Click to clear the Dynamically determine port check box, and then type
> > the port number of the instance of SQL Server 2005 in the Port number text
> > box.
> > g. Type a name in the Server alias text box, and then click OK.
> >
> >
> > I asked the IT department to unblock the UDP 1434 temporarily to see if I
> > can connect to the G3 server, and I was able to connect with no problem.
> > Unfortunately, they are required to block UDP 1434 so I have to deal with
> > that.
> >
> > Does anybody have any idea that could help? Please let me know.
> >
> > Thanks
> >|||I wonder if I need to open the new static port on
> the firewall to make it work?
Yes, whatever port SQL Server is listening on must be open in order for
clients to connect over the network.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Danny Mansour" <DannyMansour@.discussions.microsoft.com> wrote in message
news:6F17AAA9-D82F-41CB-B1DA-2AD431FC86AA@.microsoft.com...
> Thanks a bunch for the reply.
> I followed the article you sent me and configured a static port and I
> configured the client machine to point to the port. Somehow this still
> didn't work for me. The article mentions to set a static Port before
> configuring the firewall. I wonder if I need to open the new static port
> on
> the firewall to make it work?
> Please let me know what you think.
> Thanks,
> Danny
> "John Bell" wrote:
>> Hi Danny
>> A named instance will use a dynamic port by default and UDP 1434 is used
>> to
>> transmit the name of the instance name back to the client. You will need
>> to
>> make the port fixed on the server and the corresponding port configured
>> on
>> the client.
>> Check out http://support.microsoft.com/kb/287932.
>> John
>>
>> "Danny Mansour" wrote:
>> > I have two instances of SQL 2000 on one of our servers. I can connect
>> > to the
>> > first instance that has the machine name and port 1434 from anywhere I
>> > want.
>> > But when I try to connect to the second instance on the same machine
>> > with
>> > then name of machinename\G3 from a server on a second network where UDP
>> > 1434
>> > port is blocked by the firewall, the connection fail and the second
>> > instance
>> > is not available. I followed this article on Microsoft knowledge base
>> > http://support.microsoft.com/kb/265808/ where I created an alias for
>> > the G3
>> > server on the client machine using the IP address and the assigned port
>> > number, but that didn't help and I still could not connect to the
>> > server. I
>> > basically followed those steps:
>> >
>> > 2. Configure the server alias on the client computer.
>> >
>> > SQL Server 2000a. Start the Client Network Utility.
>> > b. On the General tab, verify that TCP/IP appears in the list under
>> > Enabled
>> > protocols by order.
>> > c. Click the Alias tab, and then click Add.
>> > d. Under Network libraries, select TCP/IP.
>> > e. In the Server name text box, type the IP address of the server that
>> > is
>> > running SQL Server 2005.
>> >
>> > Note The IP address that you type here is the one that is configured to
>> > use
>> > the TCP/IP port number.
>> > f. Click to clear the Dynamically determine port check box, and then
>> > type
>> > the port number of the instance of SQL Server 2005 in the Port number
>> > text
>> > box.
>> > g. Type a name in the Server alias text box, and then click OK.
>> >
>> >
>> > I asked the IT department to unblock the UDP 1434 temporarily to see if
>> > I
>> > can connect to the G3 server, and I was able to connect with no
>> > problem.
>> > Unfortunately, they are required to block UDP 1434 so I have to deal
>> > with
>> > that.
>> >
>> > Does anybody have any idea that could help? Please let me know.
>> >
>> > Thanks
>> >

Monday, 19 March 2012

Connect to a 2nd instance of SQL server while UDP 1434 is blocked

I have two instances of SQL 2000 on one of our servers. I can connect to the
first instance that has the machine name and port 1434 from anywhere I want.
But when I try to connect to the second instance on the same machine with
then name of machinename\G3 from a server on a second network where UDP 1434
port is blocked by the firewall, the connection fail and the second instance
is not available. I followed this article on Microsoft knowledge base
http://support.microsoft.com/kb/265808/ where I created an alias for the G3
server on the client machine using the IP address and the assigned port
number, but that didn’t help and I still could not connect to the server.
I
basically followed those steps:
2. Configure the server alias on the client computer.
SQL Server 2000a. Start the Client Network Utility.
b. On the General tab, verify that TCP/IP appears in the list under Enabled
protocols by order.
c. Click the Alias tab, and then click Add.
d. Under Network libraries, select TCP/IP.
e. In the Server name text box, type the IP address of the server that is
running SQL Server 2005.
Note The IP address that you type here is the one that is configured to use
the TCP/IP port number.
f. Click to clear the Dynamically determine port check box, and then type
the port number of the instance of SQL Server 2005 in the Port number text
box.
g. Type a name in the Server alias text box, and then click OK.
I asked the IT department to unblock the UDP 1434 temporarily to see if I
can connect to the G3 server, and I was able to connect with no problem.
Unfortunately, they are required to block UDP 1434 so I have to deal with
that.
Does anybody have any idea that could help? Please let me know.
ThanksHi Danny
A named instance will use a dynamic port by default and UDP 1434 is used to
transmit the name of the instance name back to the client. You will need to
make the port fixed on the server and the corresponding port configured on
the client.
Check out http://support.microsoft.com/kb/287932.
John
"Danny Mansour" wrote:

> I have two instances of SQL 2000 on one of our servers. I can connect to t
he
> first instance that has the machine name and port 1434 from anywhere I wan
t.
> But when I try to connect to the second instance on the same machine with
> then name of machinename\G3 from a server on a second network where UDP 14
34
> port is blocked by the firewall, the connection fail and the second instan
ce
> is not available. I followed this article on Microsoft knowledge base
> http://support.microsoft.com/kb/265808/ where I created an alias for the G
3
> server on the client machine using the IP address and the assigned port
> number, but that didn’t help and I still could not connect to the server
. I
> basically followed those steps:
> 2. Configure the server alias on the client computer.
> SQL Server 2000a. Start the Client Network Utility.
> b. On the General tab, verify that TCP/IP appears in the list under Enabl
ed
> protocols by order.
> c. Click the Alias tab, and then click Add.
> d. Under Network libraries, select TCP/IP.
> e. In the Server name text box, type the IP address of the server that is
> running SQL Server 2005.
> Note The IP address that you type here is the one that is configured to us
e
> the TCP/IP port number.
> f. Click to clear the Dynamically determine port check box, and then type
> the port number of the instance of SQL Server 2005 in the Port number text
> box.
> g. Type a name in the Server alias text box, and then click OK.
>
> I asked the IT department to unblock the UDP 1434 temporarily to see if I
> can connect to the G3 server, and I was able to connect with no problem.
> Unfortunately, they are required to block UDP 1434 so I have to deal with
> that.
> Does anybody have any idea that could help? Please let me know.
> Thanks
>|||One way to avoid the dependency on UDP 1434 is to specify the port number
explicitly on the connection string. So assume that the server name is
ServerA, its IP address is A.B.C.D, and the instance listens on TCP port
1234, you connect to the instance as follows:
ServerA,1234
or
A.B.C.D,1234
When you connect to an instance using the ServerName\InstanceName
convention, the client needs to retrieve the port number first, and it talks
to UDP 1434 to get the port number.
Linchi
"Danny Mansour" wrote:

> I have two instances of SQL 2000 on one of our servers. I can connect to t
he
> first instance that has the machine name and port 1434 from anywhere I wan
t.
> But when I try to connect to the second instance on the same machine with
> then name of machinename\G3 from a server on a second network where UDP 14
34
> port is blocked by the firewall, the connection fail and the second instan
ce
> is not available. I followed this article on Microsoft knowledge base
> http://support.microsoft.com/kb/265808/ where I created an alias for the G
3
> server on the client machine using the IP address and the assigned port
> number, but that didn’t help and I still could not connect to the server
. I
> basically followed those steps:
> 2. Configure the server alias on the client computer.
> SQL Server 2000a. Start the Client Network Utility.
> b. On the General tab, verify that TCP/IP appears in the list under Enabl
ed
> protocols by order.
> c. Click the Alias tab, and then click Add.
> d. Under Network libraries, select TCP/IP.
> e. In the Server name text box, type the IP address of the server that is
> running SQL Server 2005.
> Note The IP address that you type here is the one that is configured to us
e
> the TCP/IP port number.
> f. Click to clear the Dynamically determine port check box, and then type
> the port number of the instance of SQL Server 2005 in the Port number text
> box.
> g. Type a name in the Server alias text box, and then click OK.
>
> I asked the IT department to unblock the UDP 1434 temporarily to see if I
> can connect to the G3 server, and I was able to connect with no problem.
> Unfortunately, they are required to block UDP 1434 so I have to deal with
> that.
> Does anybody have any idea that could help? Please let me know.
> Thanks
>

connect string problem

hello,

i use ms sql server 2005 evaluation version. i just want to get an asp
project to work. not to edit, just to work, on my local machine. for
that i use asp studio 2005. (which processes the asp files). i am
almost done, asp is processed, runs, even server connection is up.

but for hours, i cannot establish a working connection, i cannot login
to the ms sql server from the asp scripts. i try and try, nothing
works. i always get [note: this is my own translation from german, not
the actual english error msg] 'error when logging in user bla. this
user isn't assigned to any trusted sql connection.'

i am absolutely new to ms sql and asp. i myself actually develop in
php/apache/mysql. i don't have time to go deeper - i just want to run
this project, for viewing only. *please can anyone tell me what and
where exactly i have to set in ms sql server management studio 9.0*
?!!!

what i did so far:

- set the auth mode to "sql server and win";
(however the manager is connected through win auth because of that
very error)
- my conn string currently is
PROVIDER=SQLOLEDB;DATA SOURCE=DANIEL; Initial Catalog=dbo; User
ID=bla;Password=fasel; (dbo is the database name, DANIEL is the mssql
server name)
- in managemnet studio, in security>auth (?, anmeldungen), where sa
etc is, i created bla, with password=fasel; and in databases>dbo i
added bla to users (i hope so/it looks like).

i also tried integrated security =true or =sspi, instead of user and
pw, resulting in a different error: like "error while processing a
multistep ole db thing, check out the ole db status values. " i would
really like to do that - if I knew how and where! =)

sorry i dont understand all these options and dont want to - just
desperately wish to get this blo*** =) asp project to work. isnt there
any simple solution? any simple setting to do...??!! thanx such a
lot!!!!!!!

daniel

pps win xp pro sp2...perhaps I could get out if I knew where exactly to find really
exact error log?! =) ole db status and whatever... thanx again!!|||Daniel Loose (no@.reply.de) writes:

Quote:

Originally Posted by

but for hours, i cannot establish a working connection, i cannot login
to the ms sql server from the asp scripts. i try and try, nothing
works. i always get [note: this is my own translation from german, not
the actual english error msg] 'error when logging in user bla. this
user isn't assigned to any trusted sql connection.'
>
i am absolutely new to ms sql and asp. i myself actually develop in
php/apache/mysql. i don't have time to go deeper - i just want to run
this project, for viewing only. *please can anyone tell me what and
where exactly i have to set in ms sql server management studio 9.0*
?!!!
>
what i did so far:
>
- set the auth mode to "sql server and win";
(however the manager is connected through win auth because of that
very error)
- my conn string currently is
PROVIDER=SQLOLEDB;DATA SOURCE=DANIEL; Initial Catalog=dbo; User
ID=bla;Password=fasel; (dbo is the database name, DANIEL is the mssql
server name)
- in managemnet studio, in security>auth (?, anmeldungen), where sa
etc is, i created bla, with password=fasel; and in databases>dbo i
added bla to users (i hope so/it looks like).


In Management Studio, in the Object Explorer, right-click the server
itself, and select Properties. Find Security to the left. On the top
of this page, you have two choices for Server authentication. Select
SQL Server and Windows Authentication mode, the second option. You
need to restart the server for it to take effect.

Once you've done this, use the connect string with User ID and Password.

Windows authentication is usually the recommended means of authentication,
but I believe that for ASP and ASP .Net solutions, SQL authentication
is preferred.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx||||
|In Management Studio, in the Object Explorer, right-click the server
|itself, and select Properties. Find Security to the left. On the top
|of this page, you have two choices for Server authentication. Select
|SQL Server and Windows Authentication mode, the second option. You
|need to restart the server for it to take effect.
|
|Once you've done this, use the connect string with User ID and Password.
|

thank you. actually i had already done this. i now also added a login
name u1 with pass p1 to server>security>anmeldung (in english? login?
authent?), and somehow fortunately managed to let u1 appear in
server>dbo>security>users, i.e. below my database. my connstring now
is

PROVIDER=SQLOLEDB;DATA SOURCE=DANIEL;DATABASE=dbo;User
ID=u1;Password=p1

(DANIEL is the mssqlserver name, dbo the database name).

note that from the original project the connstring was

PROVIDER=SQLOLEDB;DATA SOURCE=xyz;UID=xxx;PWD=yyy;DATABASE=zzz

i also tried uid instead of user id and pwd instead of password, which
i assume are just aliases?, that is, i now use the same structure as
in the original project, the objects mentioned in the connstring seem
to exist, the sql auth seems to work since now the server manager
after restart logs in with sql auth, using u/p = u1/p1 -- but, it
still doesnt work. but, the problem appearance slightly differs now:
still, ie takes 5 minutes to "load" the page - but then, no error
message at all appears anymore, nor does the page itself - just a
blank screen. whats up??

i guess, only error logs could still help me out? where to find them?
where to get more details? thanx again!!!!|||Daniel Loose (no@.reply.de) writes:

Quote:

Originally Posted by

i also tried uid instead of user id and pwd instead of password, which
i assume are just aliases?, that is, i now use the same structure as
in the original project, the objects mentioned in the connstring seem
to exist, the sql auth seems to work since now the server manager
after restart logs in with sql auth, using u/p = u1/p1 -- but, it
still doesnt work. but, the problem appearance slightly differs now:
still, ie takes 5 minutes to "load" the page - but then, no error
message at all appears anymore, nor does the page itself - just a
blank screen. whats up??
>
i guess, only error logs could still help me out? where to find them?
where to get more details? thanx again!!!!


If you get blank page in your browser, I would suspect that there is a
problem with the HTML sent to the broweser. For help to debug that part,
you may be better of in an ASP forum.

If it takes five minutes before you get that far, I would guess this is
because it takes five minutes to run the query. You can verify in Mgmt
Studio that you are connected by running sp_who2. You should be able
to identify your process.

As for why it takes five minutes to run the query, that it's impossible
to tell with the meager information given.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||thanx again!

|If you get blank page in your browser, I would suspect that there is a
|problem with the HTML sent to the broweser. For help to debug that part,
|you may be better of in an ASP forum.

It's rather the five minutes, and *then* blank screen. the asp is
simply the 3 connect lines.

|
|If it takes five minutes before you get that far, I would guess this is
|because it takes five minutes to run the query. You can verify in Mgmt
|Studio that you are connected by running sp_who2.

sorry for my stupid question: *where* to run sp_who2 and how? =)

But apparently a connection is not established.

You should be able
|to identify your process.
|

Please also see my new posting where I just discovered that all user
status sql server auth are disabled, and I dont know why - since for
the server , sql server auth *is* enabled ("sql server auth and win
auth")

thanx again for you efforts!|||Daniel Loose (no@.reply.de) writes:

Quote:

Originally Posted by

It's rather the five minutes, and *then* blank screen. the asp is
simply the 3 connect lines.


Not that I know much ASP, but if all you do is to connect, I would
not expect much output...

In any case, since you have not posted any code, and have given a very
vague description of what you are doing, don't execpt very accurate
guesses.

Quote:

Originally Posted by

sorry for my stupid question: *where* to run sp_who2 and how? =)


From a query window in Management Studio.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Connect Sql server Mobile with VS2005

I have a default SQL server 2005 setup on my machine.

There is a large database to whom i can connect.

I made my own data by Sql server Mobile on my local machine and then try to connect it

to the the application in visual studio 2005.

But it each time it gives that the port cannot be open.

I am a native client for SQL server.

Do we have any idea how wil i connect to database local to machine with the

application in Visual studio 2005 with C# language.

thanks

Prashant Gupta

The actual message i am getting

Microsoft SQL Native Client Version 09.00.2047

Running connectivity tests...

Attempting connection
[Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
[Microsoft][SQL Native Client]Login timeout expired
[Microsoft][SQL Native Client]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.

TESTS FAILED!

Sorry, but your question is off topic here, since this is the forum with smart device development. Move to Sql Server 2005 forum.

Hint: it seems like the connection string is not correct.

Thanks!

|||Please post your connection string. Make sure that you enabled remote connections (see the screencast on my site for more information how to do this)

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||Do you need more help, or did you solve the problem ?
Jens K. Suessmeyer.

http://www.sqlserver2005.de

Connect Sql server Mobile with VS2005

I have a default SQL server 2005 setup on my machine.

There is a large database to whom i can connect.

I made my own data by Sql server Mobile on my local machine and then try to connect it

to the the application in visual studio 2005.

But it each time it gives that the port cannot be open.

I am a native client for SQL server.

Do we have any idea how wil i connect to database local to machine with the

application in Visual studio 2005 with C# language.

thanks

Prashant Gupta

The actual message i am getting

Microsoft SQL Native Client Version 09.00.2047

Running connectivity tests...

Attempting connection
[Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
[Microsoft][SQL Native Client]Login timeout expired
[Microsoft][SQL Native Client]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.

TESTS FAILED!

Sorry, but your question is off topic here, since this is the forum with smart device development. Move to Sql Server 2005 forum.

Hint: it seems like the connection string is not correct.

Thanks!

|||Please post your connection string. Make sure that you enabled remote connections (see the screencast on my site for more information how to do this)

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||Do you need more help, or did you solve the problem ?
Jens K. Suessmeyer.

http://www.sqlserver2005.de

Connect SQL database through ASP

I have SQL Server 2000 installed on my machine and tried
to develop asp script to connect to the server database
(localhost). But I got invalid authorization error
message, any help will be greatly appreciated. Following
is my script:
<%Option Explicit%>
<html>
<head>
<title>Testing Connection1</title>
</head>
<body>
<%
Dim strConnectionString
strConnectionString = "Provider=SQLOLEDB.1;Data
Source=C:\Program Files\Microsoft SQL
Server\MSSQL\Data\Master.mdf"
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open strConnectionString
strSQL = "SELECT First_Name, Last_Name FROM
Member_Master"
objRS.Open strSQL, objConn
Set objFirstName = objRS("First_Name")
Set objLastName = objRS("Last_Name")
Do Until objRS.EOF
Response.Write objFirstName & " " & objLastName
& "<BR>"
objRS.MoveNext
Loop
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
%>
</body>
</html>
Thanks,
Sheridan
You have to set the DataSource in the connection string to the Server name,
not the operating system file name.
Dim strConnectionString
strConnectionString = "Provider=SQLOLEDB.1;Data Source=(local)"
Should work, although it is better to replace (local) with the actual name
of the SQL Server (which should be the same as your computername if you have
a default installation).
Jacco Schalkwijk
SQL Server MVP
"Sheridan" <anonymous@.discussions.microsoft.com> wrote in message
news:25c0b01c46111$a9a8d950$a401280a@.phx.gbl...
> I have SQL Server 2000 installed on my machine and tried
> to develop asp script to connect to the server database
> (localhost). But I got invalid authorization error
> message, any help will be greatly appreciated. Following
> is my script:
> <%Option Explicit%>
> <html>
> <head>
> <title>Testing Connection1</title>
> </head>
> <body>
> <%
> Dim strConnectionString
> strConnectionString = "Provider=SQLOLEDB.1;Data
> Source=C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Master.mdf"
> Dim objConn, objRS
> Set objConn = Server.CreateObject("ADODB.Connection")
> Set objRS = Server.CreateObject("ADODB.Recordset")
> objConn.Open strConnectionString
> strSQL = "SELECT First_Name, Last_Name FROM
> Member_Master"
> objRS.Open strSQL, objConn
> Set objFirstName = objRS("First_Name")
> Set objLastName = objRS("Last_Name")
> Do Until objRS.EOF
> Response.Write objFirstName & " " & objLastName
> & "<BR>"
> objRS.MoveNext
> Loop
> objRS.Close
> objConn.Close
> Set objRS = Nothing
> Set objConn = Nothing
> %>
> </body>
> </html>
> --
> Thanks,
> Sheridan

Connect SQL database through ASP

I have SQL Server 2000 installed on my machine and tried
to develop asp script to connect to the server database
(localhost). But I got invalid authorization error
message, any help will be greatly appreciated. Following
is my script:
<%Option Explicit%>
<html>
<head>
<title>Testing Connection1</title>
</head>
<body>
<%
Dim strConnectionString
strConnectionString = "Provider=SQLOLEDB.1;Data
Source=C:\Program Files\Microsoft SQL
Server\MSSQL\Data\Master.mdf"
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open strConnectionString
strSQL = "SELECT First_Name, Last_Name FROM
Member_Master"
objRS.Open strSQL, objConn
Set objFirstName = objRS("First_Name")
Set objLastName = objRS("Last_Name")
Do Until objRS.EOF
Response.Write objFirstName & " " & objLastName
& "<BR>"
objRS.MoveNext
Loop
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
%>
</body>
</html>
--
Thanks,
SheridanYou have to set the DataSource in the connection string to the Server name,
not the operating system file name.
Dim strConnectionString
strConnectionString = "Provider=SQLOLEDB.1;Data Source=(local)"
Should work, although it is better to replace (local) with the actual name
of the SQL Server (which should be the same as your computername if you have
a default installation).
Jacco Schalkwijk
SQL Server MVP
"Sheridan" <anonymous@.discussions.microsoft.com> wrote in message
news:25c0b01c46111$a9a8d950$a401280a@.phx
.gbl...
> I have SQL Server 2000 installed on my machine and tried
> to develop asp script to connect to the server database
> (localhost). But I got invalid authorization error
> message, any help will be greatly appreciated. Following
> is my script:
> <%Option Explicit%>
> <html>
> <head>
> <title>Testing Connection1</title>
> </head>
> <body>
> <%
> Dim strConnectionString
> strConnectionString = "Provider=SQLOLEDB.1;Data
> Source=C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Master.mdf"
> Dim objConn, objRS
> Set objConn = Server.CreateObject("ADODB.Connection")
> Set objRS = Server.CreateObject("ADODB.Recordset")
> objConn.Open strConnectionString
> strSQL = "SELECT First_Name, Last_Name FROM
> Member_Master"
> objRS.Open strSQL, objConn
> Set objFirstName = objRS("First_Name")
> Set objLastName = objRS("Last_Name")
> Do Until objRS.EOF
> Response.Write objFirstName & " " & objLastName
> & "<BR>"
> objRS.MoveNext
> Loop
> objRS.Close
> objConn.Close
> Set objRS = Nothing
> Set objConn = Nothing
> %>
> </body>
> </html>
> --
> Thanks,
> Sheridan