Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Sunday, March 25, 2012

Can't start a cloned connection while in manual transaction mode.

I got this error recently using SQL Server, and I found a microsoft site
which gives a solution by setting the SelectMethod property to Cursor but I
don't understand why. We've run this app before with no problems, yet now all
of a sudden we need to customize the URL string of the driver connection.
Can anyone explain what this means exactly and why this might have become a
problem now but was not before?
Most appreciated,
ol,
add "SelectMethod=cursor" your URL connection
ex:
Connection conn =
DriverManager.getConnection("jdbc:microsoft:sqlser ver://localhost:1433;SelectMethod=cursor");
newton
Posted via http://www.webservertalk.com
View this thread: http://www.webservertalk.com/message1022266.html
|||| Thread-Topic: Can't start a cloned connection while in manual transaction
mode.
| thread-index: AcVBMGMZaFbT7Q3cQUeyebz5WmA8JQ==
| X-WBNR-Posting-Host: 66.114.64.114
| From: "=?Utf-8?B?TXJOb2JvZHk=?=" <MrNobody@.discussions.microsoft.com>
| Subject: Can't start a cloned connection while in manual transaction mode.
| Date: Thu, 14 Apr 2005 13:27:32 -0700
| Lines: 11
| Message-ID: <120F0C3C-9AAD-4B6A-B7F4-3F966E95E4DD@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6826
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| I got this error recently using SQL Server, and I found a microsoft site
| which gives a solution by setting the SelectMethod property to Cursor but
I
| don't understand why. We've run this app before with no problems, yet now
all
| of a sudden we need to customize the URL string of the driver connection.
|
| Can anyone explain what this means exactly and why this might have become
a
| problem now but was not before?
|
| Most appreciated,
|
|
|
Hello,
You will definitely need to use cursor mode to allow cloned connections to
be spawned on your behalf in a transaction. The behavior of SelectMethod
has been the same for the last several years.
If your code always used SelectMethod=direct, then the only thing I can
think of is that your app never entered the codepath that required a new
connection to be spawned.
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

Thursday, March 22, 2012

Can't seem to get ASP and SQL2000 to recognize the User IUSR_MachineName

Here is the connection string as in a ASP:
strConnect =3D "Provider=3DSQLOLEDB.1;User = ID=3DIUSER_MachineName;Trusted_Connection=3Dyes;Initial = Catalog=3Dmy_logon;" & _
"Network Library=3Ddbmssocn;Data Source=3DMyServer"
I have IUSR_MachineName as a User in the database and in Security for = Logins for the SQL 2000 SP3 server.
Since I don't know what the password is for the IUSR_MachineName account = I am assuming I could use TrustedConnection=3D"yes"
But this is not working. I keep getting:
Microsoft OLE DB Provider for SQL Server (0x80040E09)
SELECT permission denied on object 'Users', database 'my_logon', owner = 'dbo'.
In fact if I just use:
strConnect =3D "Provider=3DSQLOLEDB.1;Trusted_Connection=3Dyes;Initial = Catalog=3Dmy_logon;" & _
"Network Library=3Ddbmssocn;Data Source=3DMyServer"
I get the same error. The only way I can connect using ASP is using the = sa account or my Administrator account with the password. What am I = doing wrong and how can I get the account to be used to be the = IUSR_MachineName account given that IIS 5 (Windows 2000 Server SP3) = controls the password and I know not what it is? Thanks.
-- George Hester
__________________________________>>
Since I don't know what the password is for the IUSR_MachineName account I
am assuming I could use TrustedConnection="yes"
No, this won't work... you can't have a trusted connection *and* specify the
userid. You will need to do one of the following things:
(a) use a SQL Server user in your connection string.
(b) if you want to use a trusted connection, you will need to set up the
passwords correctly. The IUSR account on your web server is *only* on your
web server. The SQL Server machine has no idea who IUSR_webserver is, so
even if you add that user to SQL Server, the passwords won't synchronize.
In Windows 2000, I believe there was a setting in IIS to disable automatic
password synchronization for the IUSR account, and override the password.
Otherwise, you will have to change the password in password in
Administrative Tools / Computer Management / Local Users and Groups / Users.
Once the web server has a password for IUSR_webserver that you know, you can
do one of two things:
(i) use a connection string with *only* trusted connection=yes (no userid
information - see a sample at http://www.aspfaq.com/2126) and make sure that
windows authentication is disabled
(ii) add the same username/password as a SQL Server user, and include the
user id and password in the connection string (and remove the trusted
connection bit).
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||Hi Aaron. Ok I see it won't work as I was hoping. Too bad I can't just =send the IIS generated password to SQL. That would make life so much =easier.
But one thing I am noticing. If I add my Windows logon account =MyDomain\Administrator to the logons for the SQL Server and for the =databases then I have for the logon of a database say Northwind =MyDomain\Administrator. I also have BUILTIN\Administrators for logon to =the SQL Server and in the databases.
If I go to Query Analyzer and choose SQL Authentication and type in =MyDomain\Administrator and my Windows 2000 SP3 Administrator password I =cannot connect. But if I choose Windows authentication then the account =which is used to logon to the SQL Server is MyDomain\Administrator.
This is confusing to me. Why when I try to login using Query Analyzer =using SQL authentication and the Login name MyDomain\Administrator I =cannot connect? But if I use Windows authentication the login name =shows as MyDomain\Administrator? This doesn't make sense to me.
It seems to me that all the Users that I have in my Users in Windows =2000 SP3 if I add them to SQL Server as it gives me the capability to, =then I cannot use those accounts to login to SQL 2000 SP3 Server. =Unless I have signed into Windows 2000 using one of those accounts. If =I have not signed into Windows 2000 SP3 using one of those accounts then =they are worthless to sign into SQL 2000 SP3. Thanks.
-- George Hester
__________________________________
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message =news:#57kO8dwDHA.1764@.TK2MSFTNGP10.phx.gbl...
> >>
> Since I don't know what the password is for the IUSR_MachineName =account I
> am assuming I could use TrustedConnection=3D"yes"
> >>
> > No, this won't work... you can't have a trusted connection *and* =specify the
> userid. You will need to do one of the following things:
> > (a) use a SQL Server user in your connection string.
> > (b) if you want to use a trusted connection, you will need to set up =the
> passwords correctly. The IUSR account on your web server is *only* on =your
> web server. The SQL Server machine has no idea who IUSR_webserver is, =so
> even if you add that user to SQL Server, the passwords won't =synchronize.
> In Windows 2000, I believe there was a setting in IIS to disable =automatic
> password synchronization for the IUSR account, and override the =password.
> Otherwise, you will have to change the password in password in
> Administrative Tools / Computer Management / Local Users and Groups / =Users.
> > Once the web server has a password for IUSR_webserver that you know, =you can
> do one of two things:
> > (i) use a connection string with *only* trusted connection=3Dyes (no =userid
> information - see a sample at http://www.aspfaq.com/2126) and make =sure that
> windows authentication is disabled
> > (ii) add the same username/password as a SQL Server user, and include =the
> user id and password in the connection string (and remove the trusted
> connection bit).
> > -- > Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
> >|||On Sat, 13 Dec 2003 20:35:04 -0500, "George Hester"
<hesterloli@.hotmail.com> wrote:
>Hi Aaron. Ok I see it won't work as I was hoping. Too bad I can't just send the IIS generated password to SQL. That would make life so much easier.
>But one thing I am noticing. If I add my Windows logon account MyDomain\Administrator to the logons for the SQL Server and for the databases then I have for the logon of a database say Northwind MyDomain\Administrator. I also have BUILTIN\Administrators for logon to the SQL Server and in the databases.
>If I go to Query Analyzer and choose SQL Authentication and type in MyDomain\Administrator and my Windows 2000 SP3 Administrator password I cannot connect. But if I choose Windows authentication then the account which is used to logon to the SQL Server is MyDomain\Administrator.
>This is confusing to me. Why when I try to login using Query Analyzer using SQL authentication and the Login name MyDomain\Administrator I cannot connect? But if I use Windows authentication the login name shows as MyDomain\Administrator? This doesn't make sense to me.
>It seems to me that all the Users that I have in my Users in Windows 2000 SP3 if I add them to SQL Server as it gives me the capability to, then I cannot use those accounts to login to SQL 2000 SP3 Server. Unless I have signed into Windows 2000 using one of those accounts. If I have not signed into Windows 2000 SP3 using one of those accounts then they are worthless to sign into SQL 2000 SP3. Thanks.
Hi George,
You can achieve what you want if you change the security attributes on
your website to disallow Everyone and the anonymous user, and allow a
specific domain group, where that domain group includes the people you
have given access to SQL Server.
This will make IIS prompt the browser for authentication information. If
your users are using Internet Explorer and are logged into the domain,
then authentication will be transparent, otherwise they will be prompted
to enter their username and password.
They will then be authenticated in IIS as themselves, instead of the
anonymous user, and the secure connection to SQL Server will also be as
themselves.
cheers,
Ross.
--
Ross McKay, WebAware Pty Ltd
"Words can only hurt if you try to read them. Don't play their game" - Zoolander|||>> This is confusing to me. Why when I try to login using Query Analyzer
using SQL authentication and the Login name MyDomain\Administrator I cannot
connect?
Because this is not a SQL user! This is a Windows user! If you are logged
in as MyDomain\Administrator, use Windows Authentication. Otherwise, use a
SQL user account.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||> You can achieve what you want if you change the security attributes on
> your website to disallow Everyone and the anonymous user, and allow a
> specific domain group, where that domain group includes the people you
> have given access to SQL Server.
> This will make IIS prompt the browser for authentication information. If
> your users are using Internet Explorer and are logged into the domain,
> then authentication will be transparent, otherwise they will be prompted
> to enter their username and password.
> They will then be authenticated in IIS as themselves, instead of the
> anonymous user, and the secure connection to SQL Server will also be as
> themselves.
Great addition Ross.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||Aha finally. I got it from here:
http://support.microsoft.com/default.aspx?scid=3Dkb;en-us;247931&Product=3D=
sql
To use the IUSR_MachineName account and SQLOLEDB (note the missing .1) =I have to have "Integrated Security=3DSSPI" in the connection string. I =also have to have in SQL 2000 SP3 MyDomain\IUSR_MachineName have =db_datareader and db_datawriter access to the my_logon database. The =account must also have db_datareader and db_datawriter permissions to =the tempdb database. Also the account must be set up with Windows =Authentication which makes sense.
So the connection string is:
strConnect =3D "Provider=3DSQLOLEDB;Integrated Security=3DSSPI;Initial =Catalog=3Dmy_logon;" & _
"Network Library=3Ddbmssocn;Data Source=3DMySQLServer"
Now this article says "You must use one of the following two IIS =authentication methods:"
Actually I wanted to use the first method. Looks easier. But it was =not correct. I removed the Anonymous access and left only Basic =Authentication as the article suggests. I was returned a Domain logon =when I tried to access the web application. That I did not want. Also =the error was the AddHeader was insufficient information. Well that was =easy to fix. Just put back in the Anonymous account whose password is =handled by IIS.
That seems to have done it.
I can connect. Now to just finish with this article:
http://support.microsoft.com/?scid=3Dkb;en-us;299987
whew!!
-- George Hester
__________________________________
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message =news:#57kO8dwDHA.1764@.TK2MSFTNGP10.phx.gbl...
> >>
> Since I don't know what the password is for the IUSR_MachineName =account I
> am assuming I could use TrustedConnection=3D"yes"
> >>
> > No, this won't work... you can't have a trusted connection *and* =specify the
> userid. You will need to do one of the following things:
> > (a) use a SQL Server user in your connection string.
> > (b) if you want to use a trusted connection, you will need to set up =the
> passwords correctly. The IUSR account on your web server is *only* on =your
> web server. The SQL Server machine has no idea who IUSR_webserver is, =so
> even if you add that user to SQL Server, the passwords won't =synchronize.
> In Windows 2000, I believe there was a setting in IIS to disable =automatic
> password synchronization for the IUSR account, and override the =password.
> Otherwise, you will have to change the password in password in
> Administrative Tools / Computer Management / Local Users and Groups / =Users.
> > Once the web server has a password for IUSR_webserver that you know, =you can
> do one of two things:
> > (i) use a connection string with *only* trusted connection=3Dyes (no =userid
> information - see a sample at http://www.aspfaq.com/2126) and make =sure that
> windows authentication is disabled
> > (ii) add the same username/password as a SQL Server user, and include =the
> user id and password in the connection string (and remove the trusted
> connection bit).
> > -- > Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
> >|||Well I don't see why. SQL Manager clearly shows that =MyDomain\Administrator has login permissions. Well never mind. I got =it fixed. Thanks anyway.
-- George Hester
__________________________________
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message =news:ezC#ycewDHA.1756@.TK2MSFTNGP09.phx.gbl...
> >> This is confusing to me. Why when I try to login using Query =Analyzer
> using SQL authentication and the Login name MyDomain\Administrator I =cannot
> connect?
> > Because this is not a SQL user! This is a Windows user! If you are =logged
> in as MyDomain\Administrator, use Windows Authentication. Otherwise, =use a
> SQL user account.
> > -- > Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
> >|||>> I have to have "Integrated Security=SSPI" in the connection string.
Yep, in my first reply:
http://www.aspfaq.com/2126
You can see this:
<snip>
Using Windows Authentication:
<%
cst = "Provider=SQLOLEDB.1;Data Source=<server/ip>;" & _
"Initial Catalog=<dbname>;Integrated Security=SSPI"
set conn = CreateObject("ADODB.Connection")
conn.open cst
%>
</snip>

Tuesday, March 20, 2012

Cant see SQL Server for first attempt

When I try to create MS OLE DB connection to SQL Server 2000 from some workstation I can't see server. After 200 sec I'm getting "timeout" message, but when I click "Ok" and try again it get connected fine. It doesn't matter if I'm doing this from Data Link Property or any other application. Always it fails on first time and works for second. I tried to check MDAC with COmCheck, reinstall MDAC even. Still no luck.
Thanks for any help.I am having a similar simptoms when connecting to one of my clients via VPN. May be a stupid question but did you check all the wires?:confused:|||This workstation works fine on a network, what wires you talking about?|||Well, if it's not the wire (network wire going to/coming to/from the NIC), then check the group policy for that workstation. Is any any different from the ones where you don't experience the problem?|||When I try to connect SQL Server 2000, I log on to workstation under my name to avoid all possible security problems, and it [connection to server] is works fine on other workstations uner my name.|||Looks like the two workstations are establishing a connection, when your contact your SQL Server for the first time.

If you close the connection,a nd you start again, it works immediately? Try to go to your SQL Server workstation with your WindowsExplorer, first, and see whether you can see it's directory structure immediately.|||I can see directory structure of my SQL Server machine immediately.

It looks for me like user workstation can't see SQL Server comp for some reasons with first attempt. And if I try to create connection (using any driver!) it takes 200 sec to get timeout message, after that it connects fine (of course I should click "Ok" and click "Test connection" second time). Second time works Ok always. The same thing happends in my VB applications. And yes, If I close application, or Data Link Property window, or any other way to connect to the Server, I will wait another 200 sec for first attempt. So, for user it looks like 200 sec delay, responce for error message without closing application, second attempt - application works fine, despite it open and close connections. If application will closed and reopen again, user should wait again 200 sec. But part of workstations works just fine.

Cant see sql express in vwd2005

I've installed vwd2005 and sql express, I'm trying to setup a database connection but the sql server doesnt appear in the drop down list. I've checked that the service is running and that the browser service is running too.

Anyone any ideas?

just type name of you server in the list and it should work

|||

just type name of you server in the list and it should work

Janusz

Thursday, March 8, 2012

cant retrieve connection string from web.config - ASP.NET 2.0

All,

I don't know what is the problem, i am not able to retrieve connection string from web.config in my code behind page

I used every solution provided by people in differents forums.

can anybody help me with this.

I used

WebConfigurationManager.OpenWebConfiguration("/TimeSheetApplication").ConnectionStrings("TimeSheetConnectionString").ConnectionString;

WebConfigurationManager.ConnectionStrings("TConnectionString").ConnectionString;

Here is a reference on MSDN

http://msdn2.microsoft.com/en-us/library/system.web.configuration.webconfigurationmanager(VS.80).aspx

or you can post your web.config with above code and let me look

|||

My code

Web.Config -

<connectionStrings>

<addname="TConnectionString"connectionString="Data Source=Source name"

providerName="System.Data.SqlClient" />

</connectionStrings>

Code Behind -

string query ="Select * from table"

string myConnectionString = ??

SqlConnection myConnection =newSqlConnection(myConnectionString);

SqlDataAdapter ad =newSqlDataAdapter(query, myConnection);

DataSet ds =newDataSet();

ad.Fill(ds,"table");

GridView1.DataSource = ds;

GridView1.DataBind();

? - When i used

ConnectionStringSettingsCollection connectionStrings =WebConfigurationManager.ConnectionStringsas ConnectionStringSettingsCollection;

connectionStrings["TConnectionString"].Name

it gives error

Cannot apply indexing with [] to an expression of type 'ConnectionStringSettingsCollection'

The type 'System.Configuration.ConnectionStringSettingsCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

|||

You can access this way

string connString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["TConnectionString"].ToString();

|||

Thanks Farooq...

However i used the same code earlier and i am getting the error

Cannot apply indexing with [] to an expression of type 'ConnectionStringSettingsCollection'

The type 'System.Configuration.ConnectionStringSettingsCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

|||

make sure you have this element in web.config:

<system.web>

<compilation>

<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>

</compilation>

</system.web>

cant register to server from client

When I register to SQL server 2000 on another machine, I
get message " SQL server doesn't exist or access is
denied. Connection open". The pinging of the two machines
is OK. And I checked the protocols of both machines were
the same. Tell me how to rectify this problem. ThanksAre you trying to register by IP or by Name? There is an entry for the
server in the Client Configuration Utility? There is an entry for the server
in the DNS or in your hosts file?
regards,
Srgio Monteiro - Brasil
www.sqlpass.org
"Lie" <anonymous@.discussions.microsoft.com> escreveu na mensagem
news:378201c3dcc8$bbe0d5f0$3101280a@.phx.gbl...
quote:

> When I register to SQL server 2000 on another machine, I
> get message " SQL server doesn't exist or access is
> denied. Connection open". The pinging of the two machines
> is OK. And I checked the protocols of both machines were
> the same. Tell me how to rectify this problem. Thanks
|||You need to retrieve the actual OS error to troubleshoot this problem.
Reply with the OS error returned while connecting using an ODBC test DSN.
Or test using ISQL.exe from a command prompt.
Example:
ISQL -Stcp:ServerNameHere -Usqluseridhere -Ppasswordhere -Q"select
@.@.version"
or
ISQL -Stcp:ServerNameHere -E -Q"select @.@.version"
Search the kb for the OS error returned.
Example:
10060 == Connection Timeout
10061 == Connection Refused. The server is not listening on TCP. This
could be caused if we fail to bind to the port.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Wednesday, March 7, 2012

Can't register remote SQL

When I try to register a remote SQL Server from a local desktop XP Pro PC, I
get the error:
"Client unable to establish connection. Named Pipes Provider: the network
path was not found. Timeout expired."
I checked and this is not a firewall problem because SQL ports are open. We
normally don't have a problem registering SQL servers like this; just this
one server. Any clues?
Thanks!!!
Is that particular server using Named Pipes, or is it set for TCP/IP? Check
the Server Network Utility to ensure Named Pipes is turned on on the server,
since your client appears to be using Named Pipes instead of TCP/IP.
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:e4otsANKFHA.904@.tk2msftngp13.phx.gbl...
> When I try to register a remote SQL Server from a local desktop XP Pro PC,
> I
> get the error:
> "Client unable to establish connection. Named Pipes Provider: the network
> path was not found. Timeout expired."
> I checked and this is not a firewall problem because SQL ports are open.
> We
> normally don't have a problem registering SQL servers like this; just this
> one server. Any clues?
> Thanks!!!
>
|||Hello,
Yes, I thought of that before, but I just checked again and the Server
Network Util says enabled protocols:
Named Pipes
TCP/IP
We are trying to register the SQL server remotely using the server's IP addr
which has always worked in the past. Anyone know what is wrong?
Thanks!!!
"Michael C#" <xyz@.yomomma.com> wrote in message
news:#HM9QONKFHA.3064@.TK2MSFTNGP12.phx.gbl...
> Is that particular server using Named Pipes, or is it set for TCP/IP?
Check
> the Server Network Utility to ensure Named Pipes is turned on on the
server,[vbcol=seagreen]
> since your client appears to be using Named Pipes instead of TCP/IP.
> "Dean J Garrett" <info@.amuletc.com> wrote in message
> news:e4otsANKFHA.904@.tk2msftngp13.phx.gbl...
PC,[vbcol=seagreen]
network[vbcol=seagreen]
this
>
|||Interesting. You're using the TCP/IP address, but it's trying to connect
via Named Pipes? Have you checked the Client Network Utility on your client
box to see if TCP/IP is enabled locally? Also have you established
connectivity to the remote server? i.e., can you Ping the remote box? It
sounds like you're trying to connect via TCP/IP, but it's falling back to
Named Pipes. I'd check the network settings on the server and make sure
it's reachable from the local box. There's a utility called SQLPing at
http://sqlsecurity.com/DesktopDefault.aspx (w/ source code) that can help
determine if you can see the other server from the local box.
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:OYoG%236NKFHA.2812@.TK2MSFTNGP15.phx.gbl...
> Hello,
> Yes, I thought of that before, but I just checked again and the Server
> Network Util says enabled protocols:
> Named Pipes
> TCP/IP
> We are trying to register the SQL server remotely using the server's IP
> addr
> which has always worked in the past. Anyone know what is wrong?
> Thanks!!!
>
> "Michael C#" <xyz@.yomomma.com> wrote in message
> news:#HM9QONKFHA.3064@.TK2MSFTNGP12.phx.gbl...
> Check
> server,
> PC,
> network
> this
>

Can't register remote SQL

When I try to register a remote SQL Server from a local desktop XP Pro PC, I
get the error:
"Client unable to establish connection. Named Pipes Provider: the network
path was not found. Timeout expired."
I checked and this is not a firewall problem because SQL ports are open. We
normally don't have a problem registering SQL servers like this; just this
one server. Any clues?
Thanks!!!Is that particular server using Named Pipes, or is it set for TCP/IP? Check
the Server Network Utility to ensure Named Pipes is turned on on the server,
since your client appears to be using Named Pipes instead of TCP/IP.
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:e4otsANKFHA.904@.tk2msftngp13.phx.gbl...
> When I try to register a remote SQL Server from a local desktop XP Pro PC,
> I
> get the error:
> "Client unable to establish connection. Named Pipes Provider: the network
> path was not found. Timeout expired."
> I checked and this is not a firewall problem because SQL ports are open.
> We
> normally don't have a problem registering SQL servers like this; just this
> one server. Any clues?
> Thanks!!!
>|||Hello,
Yes, I thought of that before, but I just checked again and the Server
Network Util says enabled protocols:
Named Pipes
TCP/IP
We are trying to register the SQL server remotely using the server's IP addr
which has always worked in the past. Anyone know what is wrong?
Thanks!!!
"Michael C#" <xyz@.yomomma.com> wrote in message
news:#HM9QONKFHA.3064@.TK2MSFTNGP12.phx.gbl...
> Is that particular server using Named Pipes, or is it set for TCP/IP?
Check
> the Server Network Utility to ensure Named Pipes is turned on on the
server,
> since your client appears to be using Named Pipes instead of TCP/IP.
> "Dean J Garrett" <info@.amuletc.com> wrote in message
> news:e4otsANKFHA.904@.tk2msftngp13.phx.gbl...
> > When I try to register a remote SQL Server from a local desktop XP Pro
PC,
> > I
> > get the error:
> >
> > "Client unable to establish connection. Named Pipes Provider: the
network
> > path was not found. Timeout expired."
> >
> > I checked and this is not a firewall problem because SQL ports are open.
> > We
> > normally don't have a problem registering SQL servers like this; just
this
> > one server. Any clues?
> >
> > Thanks!!!
> >
> >
>|||Interesting. You're using the TCP/IP address, but it's trying to connect
via Named Pipes? Have you checked the Client Network Utility on your client
box to see if TCP/IP is enabled locally? Also have you established
connectivity to the remote server? i.e., can you Ping the remote box? It
sounds like you're trying to connect via TCP/IP, but it's falling back to
Named Pipes. I'd check the network settings on the server and make sure
it's reachable from the local box. There's a utility called SQLPing at
http://sqlsecurity.com/DesktopDefault.aspx (w/ source code) that can help
determine if you can see the other server from the local box.
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:OYoG%236NKFHA.2812@.TK2MSFTNGP15.phx.gbl...
> Hello,
> Yes, I thought of that before, but I just checked again and the Server
> Network Util says enabled protocols:
> Named Pipes
> TCP/IP
> We are trying to register the SQL server remotely using the server's IP
> addr
> which has always worked in the past. Anyone know what is wrong?
> Thanks!!!
>
> "Michael C#" <xyz@.yomomma.com> wrote in message
> news:#HM9QONKFHA.3064@.TK2MSFTNGP12.phx.gbl...
>> Is that particular server using Named Pipes, or is it set for TCP/IP?
> Check
>> the Server Network Utility to ensure Named Pipes is turned on on the
> server,
>> since your client appears to be using Named Pipes instead of TCP/IP.
>> "Dean J Garrett" <info@.amuletc.com> wrote in message
>> news:e4otsANKFHA.904@.tk2msftngp13.phx.gbl...
>> > When I try to register a remote SQL Server from a local desktop XP Pro
> PC,
>> > I
>> > get the error:
>> >
>> > "Client unable to establish connection. Named Pipes Provider: the
> network
>> > path was not found. Timeout expired."
>> >
>> > I checked and this is not a firewall problem because SQL ports are
>> > open.
>> > We
>> > normally don't have a problem registering SQL servers like this; just
> this
>> > one server. Any clues?
>> >
>> > Thanks!!!
>> >
>> >
>>
>

Can't register remote SQL

When I try to register a remote SQL Server from a local desktop XP Pro PC, I
get the error:
"Client unable to establish connection. Named Pipes Provider: the network
path was not found. Timeout expired."
I checked and this is not a firewall problem because SQL ports are open. We
normally don't have a problem registering SQL servers like this; just this
one server. Any clues?
Thanks!!!Is that particular server using Named Pipes, or is it set for TCP/IP? Check
the Server Network Utility to ensure Named Pipes is turned on on the server,
since your client appears to be using Named Pipes instead of TCP/IP.
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:e4otsANKFHA.904@.tk2msftngp13.phx.gbl...
> When I try to register a remote SQL Server from a local desktop XP Pro PC,
> I
> get the error:
> "Client unable to establish connection. Named Pipes Provider: the network
> path was not found. Timeout expired."
> I checked and this is not a firewall problem because SQL ports are open.
> We
> normally don't have a problem registering SQL servers like this; just this
> one server. Any clues?
> Thanks!!!
>|||Hello,
Yes, I thought of that before, but I just checked again and the Server
Network Util says enabled protocols:
Named Pipes
TCP/IP
We are trying to register the SQL server remotely using the server's IP addr
which has always worked in the past. Anyone know what is wrong?
Thanks!!!
"Michael C#" <xyz@.yomomma.com> wrote in message
news:#HM9QONKFHA.3064@.TK2MSFTNGP12.phx.gbl...
> Is that particular server using Named Pipes, or is it set for TCP/IP?
Check
> the Server Network Utility to ensure Named Pipes is turned on on the
server,
> since your client appears to be using Named Pipes instead of TCP/IP.
> "Dean J Garrett" <info@.amuletc.com> wrote in message
> news:e4otsANKFHA.904@.tk2msftngp13.phx.gbl...
PC,[vbcol=seagreen]
network[vbcol=seagreen]
this[vbcol=seagreen]
>|||Interesting. You're using the TCP/IP address, but it's trying to connect
via Named Pipes? Have you checked the Client Network Utility on your client
box to see if TCP/IP is enabled locally? Also have you established
connectivity to the remote server? i.e., can you Ping the remote box? It
sounds like you're trying to connect via TCP/IP, but it's falling back to
Named Pipes. I'd check the network settings on the server and make sure
it's reachable from the local box. There's a utility called SQLPing at
http://sqlsecurity.com/DesktopDefault.aspx (w/ source code) that can help
determine if you can see the other server from the local box.
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:OYoG%236NKFHA.2812@.TK2MSFTNGP15.phx.gbl...
> Hello,
> Yes, I thought of that before, but I just checked again and the Server
> Network Util says enabled protocols:
> Named Pipes
> TCP/IP
> We are trying to register the SQL server remotely using the server's IP
> addr
> which has always worked in the past. Anyone know what is wrong?
> Thanks!!!
>
> "Michael C#" <xyz@.yomomma.com> wrote in message
> news:#HM9QONKFHA.3064@.TK2MSFTNGP12.phx.gbl...
> Check
> server,
> PC,
> network
> this
>

Friday, February 24, 2012

Can't make Remote Connection to SQL Cluster

Have got multiple SQL environments, both 2000 & 2005. Of these two are
clusters, one 2000 & one 2005.
Over remote VPN connection I can connect to every non-clustered server but
can't to either cluster. I've made sure that local & remote connections are
enabled on the clusters.
I have no problems connecting to both clusters on my local network so I'm
definitely connecting with the correct virtual servername.
Anybody had this issue before?
Thanks, Andy.Hi Andy
Although I have never tried this I don't think there should be anything that
stops you doing it. How are you connecting to the Clustered instance
(connection string or SQLCMD command) ? Which protocol are you using/enabled
?
Which port is being used? Are there any firewalls? Is the name being
resolved/can you connect to the IP address?
John
"AndyT" wrote:

> Have got multiple SQL environments, both 2000 & 2005. Of these two are
> clusters, one 2000 & one 2005.
> Over remote VPN connection I can connect to every non-clustered server but
> can't to either cluster. I've made sure that local & remote connections ar
e
> enabled on the clusters.
> I have no problems connecting to both clusters on my local network so I'm
> definitely connecting with the correct virtual servername.
> Anybody had this issue before?
> Thanks, Andy.
>
>|||Have you tried connecting to one of the clustered instances from a node
within the cluster that currently does not currently own the SQL Server
instance (the so-called "passive") node? If that works, then I wonder if
there is a firewall rule between where you are and where the cluster is that
is preventing you from getting to the cluster. However, if you can't get to
SQL server from another node in the cluster, it suggests that SQL is not
listening for remote connections. Be sure to check the SQL Server error
log. It says what protocols it's actually listening on. Be sure to do a
tracert on the SQL Server virtual IP.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"AndyT" <tipton@.tpg.com.au> wrote in message
news:ukMBqehNIHA.4740@.TK2MSFTNGP02.phx.gbl...
Have got multiple SQL environments, both 2000 & 2005. Of these two are
clusters, one 2000 & one 2005.
Over remote VPN connection I can connect to every non-clustered server but
can't to either cluster. I've made sure that local & remote connections are
enabled on the clusters.
I have no problems connecting to both clusters on my local network so I'm
definitely connecting with the correct virtual servername.
Anybody had this issue before?
Thanks, Andy.|||Could be a firewall issue. When you connect to a cluster, it listens on the
virtual IP. Replies are sent from the regular IP address, according to the
packet headers. This drives some firewalls batty. See your network admin
about allowing the physical IP as well as the virtual one to have access
from the outside.
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"AndyT" <tipton@.tpg.com.au> wrote in message
news:ukMBqehNIHA.4740@.TK2MSFTNGP02.phx.gbl...
> Have got multiple SQL environments, both 2000 & 2005. Of these two are
> clusters, one 2000 & one 2005.
> Over remote VPN connection I can connect to every non-clustered server but
> can't to either cluster. I've made sure that local & remote connections
> are enabled on the clusters.
> I have no problems connecting to both clusters on my local network so I'm
> definitely connecting with the correct virtual servername.
> Anybody had this issue before?
> Thanks, Andy.
>

Can't make Remote Connection to SQL Cluster

Have got multiple SQL environments, both 2000 & 2005. Of these two are
clusters, one 2000 & one 2005.
Over remote VPN connection I can connect to every non-clustered server but
can't to either cluster. I've made sure that local & remote connections are
enabled on the clusters.
I have no problems connecting to both clusters on my local network so I'm
definitely connecting with the correct virtual servername.
Anybody had this issue before?
Thanks, Andy.Hi Andy
Although I have never tried this I don't think there should be anything that
stops you doing it. How are you connecting to the Clustered instance
(connection string or SQLCMD command) ? Which protocol are you using/enabled?
Which port is being used? Are there any firewalls? Is the name being
resolved/can you connect to the IP address?
John
"AndyT" wrote:
> Have got multiple SQL environments, both 2000 & 2005. Of these two are
> clusters, one 2000 & one 2005.
> Over remote VPN connection I can connect to every non-clustered server but
> can't to either cluster. I've made sure that local & remote connections are
> enabled on the clusters.
> I have no problems connecting to both clusters on my local network so I'm
> definitely connecting with the correct virtual servername.
> Anybody had this issue before?
> Thanks, Andy.
>
>|||Have you tried connecting to one of the clustered instances from a node
within the cluster that currently does not currently own the SQL Server
instance (the so-called "passive") node? If that works, then I wonder if
there is a firewall rule between where you are and where the cluster is that
is preventing you from getting to the cluster. However, if you can't get to
SQL server from another node in the cluster, it suggests that SQL is not
listening for remote connections. Be sure to check the SQL Server error
log. It says what protocols it's actually listening on. Be sure to do a
tracert on the SQL Server virtual IP.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"AndyT" <tipton@.tpg.com.au> wrote in message
news:ukMBqehNIHA.4740@.TK2MSFTNGP02.phx.gbl...
Have got multiple SQL environments, both 2000 & 2005. Of these two are
clusters, one 2000 & one 2005.
Over remote VPN connection I can connect to every non-clustered server but
can't to either cluster. I've made sure that local & remote connections are
enabled on the clusters.
I have no problems connecting to both clusters on my local network so I'm
definitely connecting with the correct virtual servername.
Anybody had this issue before?
Thanks, Andy.|||Could be a firewall issue. When you connect to a cluster, it listens on the
virtual IP. Replies are sent from the regular IP address, according to the
packet headers. This drives some firewalls batty. See your network admin
about allowing the physical IP as well as the virtual one to have access
from the outside.
--
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"AndyT" <tipton@.tpg.com.au> wrote in message
news:ukMBqehNIHA.4740@.TK2MSFTNGP02.phx.gbl...
> Have got multiple SQL environments, both 2000 & 2005. Of these two are
> clusters, one 2000 & one 2005.
> Over remote VPN connection I can connect to every non-clustered server but
> can't to either cluster. I've made sure that local & remote connections
> are enabled on the clusters.
> I have no problems connecting to both clusters on my local network so I'm
> definitely connecting with the correct virtual servername.
> Anybody had this issue before?
> Thanks, Andy.
>

Can't make connection to SQL Server 2005 over VPN

Hi - if anyone can point me the the right direction it would be very
much appreciated. I have searched the groups but haven't sorted this
out yet.
I am trying to connect to a SQL Server 2005 database over a VPN and
am
not having any success. Perhaps there are some other tests that can
be
recommended to me to narrow down the problem.
The Server (at the office): Windows 2003 R2 with SQL Server 2005
(this
server is not a domain controller)
The Client (at home): Windows XP Pro
VPN: I can connect via the VPN just fine it would seem (for example,
I
can browse shared folders on the server)
My Test: As my ultimate goal is to make a ODBC connection to the
server DB, I have been attempting to make an ODBC DSN with the ODBC
Data Source Administrator - it always fails (error is: SQL Server
does
not exist of access denied).
Other notes:
- I can successfully connect to the SQL Server database from another
computer that is at the office
- At home, if I ping the server by name, the proper 'remote' IP
address gets returned, however I get 'request timed out' instead of
the 'reply from...'
- At home, In the ODBC Administrator setup, it automatically picks up
the remote server (by IP and by name) in the 'Server' drop down list.
- As far as I know, I have set SQL Server to accept remote
connections
Suggestions very much appreciated !
remote connections are disabled by default.. RIGHT?
<jan.mazing@.gmail.com> wrote in message
news:1176735701.954587.264080@.p77g2000hsh.googlegr oups.com...
> Hi - if anyone can point me the the right direction it would be very
> much appreciated. I have searched the groups but haven't sorted this
> out yet.
> I am trying to connect to a SQL Server 2005 database over a VPN and
> am
> not having any success. Perhaps there are some other tests that can
> be
> recommended to me to narrow down the problem.
>
> The Server (at the office): Windows 2003 R2 with SQL Server 2005
> (this
> server is not a domain controller)
>
> The Client (at home): Windows XP Pro
>
> VPN: I can connect via the VPN just fine it would seem (for example,
> I
> can browse shared folders on the server)
>
> My Test: As my ultimate goal is to make a ODBC connection to the
> server DB, I have been attempting to make an ODBC DSN with the ODBC
> Data Source Administrator - it always fails (error is: SQL Server
> does
> not exist of access denied).
>
> Other notes:
> - I can successfully connect to the SQL Server database from another
> computer that is at the office
> - At home, if I ping the server by name, the proper 'remote' IP
> address gets returned, however I get 'request timed out' instead of
> the 'reply from...'
> - At home, In the ODBC Administrator setup, it automatically picks up
> the remote server (by IP and by name) in the 'Server' drop down list.
> - As far as I know, I have set SQL Server to accept remote
> connections
>
> Suggestions very much appreciated !
>
|||Did you ever resolve this issue? It sounds very similar to mine - see post in
SQL Server Connectivity on 17 May - except I'm on XP Home.
"jan.mazing@.gmail.com" wrote:

> Hi - if anyone can point me the the right direction it would be very
> much appreciated. I have searched the groups but haven't sorted this
> out yet.
> I am trying to connect to a SQL Server 2005 database over a VPN and
> am
> not having any success. Perhaps there are some other tests that can
> be
> recommended to me to narrow down the problem.
>
> The Server (at the office): Windows 2003 R2 with SQL Server 2005
> (this
> server is not a domain controller)
>
> The Client (at home): Windows XP Pro
>
> VPN: I can connect via the VPN just fine it would seem (for example,
> I
> can browse shared folders on the server)
>
> My Test: As my ultimate goal is to make a ODBC connection to the
> server DB, I have been attempting to make an ODBC DSN with the ODBC
> Data Source Administrator - it always fails (error is: SQL Server
> does
> not exist of access denied).
>
> Other notes:
> - I can successfully connect to the SQL Server database from another
> computer that is at the office
> - At home, if I ping the server by name, the proper 'remote' IP
> address gets returned, however I get 'request timed out' instead of
> the 'reply from...'
> - At home, In the ODBC Administrator setup, it automatically picks up
> the remote server (by IP and by name) in the 'Server' drop down list.
> - As far as I know, I have set SQL Server to accept remote
> connections
>
> Suggestions very much appreciated !
>

Can't make connection to SQL Server 2005 over VPN

Hi - if anyone can point me the the right direction it would be very
much appreciated. I have searched the groups but haven't sorted this
out yet.
I am trying to connect to a SQL Server 2005 database over a VPN and
am
not having any success. Perhaps there are some other tests that can
be
recommended to me to narrow down the problem.
The Server (at the office): Windows 2003 R2 with SQL Server 2005
(this
server is not a domain controller)
The Client (at home): Windows XP Pro
VPN: I can connect via the VPN just fine it would seem (for example,
I
can browse shared folders on the server)
My Test: As my ultimate goal is to make a ODBC connection to the
server DB, I have been attempting to make an ODBC DSN with the ODBC
Data Source Administrator - it always fails (error is: SQL Server
does
not exist of access denied).
Other notes:
- I can successfully connect to the SQL Server database from another
computer that is at the office
- At home, if I ping the server by name, the proper 'remote' IP
address gets returned, however I get 'request timed out' instead of
the 'reply from...'
- At home, In the ODBC Administrator setup, it automatically picks up
the remote server (by IP and by name) in the 'Server' drop down list.
- As far as I know, I have set SQL Server to accept remote
connections
Suggestions very much appreciated !remote connections are disabled by default.. RIGHT?
<jan.mazing@.gmail.com> wrote in message
news:1176735701.954587.264080@.p77g2000hsh.googlegroups.com...
> Hi - if anyone can point me the the right direction it would be very
> much appreciated. I have searched the groups but haven't sorted this
> out yet.
> I am trying to connect to a SQL Server 2005 database over a VPN and
> am
> not having any success. Perhaps there are some other tests that can
> be
> recommended to me to narrow down the problem.
>
> The Server (at the office): Windows 2003 R2 with SQL Server 2005
> (this
> server is not a domain controller)
>
> The Client (at home): Windows XP Pro
>
> VPN: I can connect via the VPN just fine it would seem (for example,
> I
> can browse shared folders on the server)
>
> My Test: As my ultimate goal is to make a ODBC connection to the
> server DB, I have been attempting to make an ODBC DSN with the ODBC
> Data Source Administrator - it always fails (error is: SQL Server
> does
> not exist of access denied).
>
> Other notes:
> - I can successfully connect to the SQL Server database from another
> computer that is at the office
> - At home, if I ping the server by name, the proper 'remote' IP
> address gets returned, however I get 'request timed out' instead of
> the 'reply from...'
> - At home, In the ODBC Administrator setup, it automatically picks up
> the remote server (by IP and by name) in the 'Server' drop down list.
> - As far as I know, I have set SQL Server to accept remote
> connections
>
> Suggestions very much appreciated !
>|||Did you ever resolve this issue? It sounds very similar to mine - see post i
n
SQL Server Connectivity on 17 May - except I'm on XP Home.
"jan.mazing@.gmail.com" wrote:

> Hi - if anyone can point me the the right direction it would be very
> much appreciated. I have searched the groups but haven't sorted this
> out yet.
> I am trying to connect to a SQL Server 2005 database over a VPN and
> am
> not having any success. Perhaps there are some other tests that can
> be
> recommended to me to narrow down the problem.
>
> The Server (at the office): Windows 2003 R2 with SQL Server 2005
> (this
> server is not a domain controller)
>
> The Client (at home): Windows XP Pro
>
> VPN: I can connect via the VPN just fine it would seem (for example,
> I
> can browse shared folders on the server)
>
> My Test: As my ultimate goal is to make a ODBC connection to the
> server DB, I have been attempting to make an ODBC DSN with the ODBC
> Data Source Administrator - it always fails (error is: SQL Server
> does
> not exist of access denied).
>
> Other notes:
> - I can successfully connect to the SQL Server database from another
> computer that is at the office
> - At home, if I ping the server by name, the proper 'remote' IP
> address gets returned, however I get 'request timed out' instead of
> the 'reply from...'
> - At home, In the ODBC Administrator setup, it automatically picks up
> the remote server (by IP and by name) in the 'Server' drop down list.
> - As far as I know, I have set SQL Server to accept remote
> connections
>
> Suggestions very much appreciated !
>

Can't make a connection to SQL Express as Server does not exist or access denied...

Hi

I have recently downloaded SQL Server Express which I have installed using Windows authentication mode. I cannot seem to be able to make a connection to SQL Server from Dreamweaver or Microsoft Visual Web Developer as I am getting an error Server does not exist or access is denied....

I am relatively new to all of this, so would appreciate any advice....

When I installed SQL Server Express I chose Windows Authentication. When I fire up SQL Express and view Security option - the installation program has set up an sa login with a random password. I did not set this password, but think this might be a reason why I can't connect. To rectify the problem I tried creating a new user in SQL Server Express with a password that I specified. On going in to check the settings, I notice SQL Server Express has gone and changed it from the password that I set up.

Now when I try and connect to SQL Server Express I specify the following in the connection paramaters

Server: BGIRL\SQLEXPRESS

Database The database name that I've created

User: the new user that I created

Password: the password I created as part of new user setup

Now I get error message Server does not exist or access denied

Is the problem to do with passwords or perhaps one of the many parameters one seems to have to set up? How can I change a password if I didn't create it? Is there anywhere I can reset it?

PLEASE HELP - I have literally spent 3 days attempting to get this working and am about to give up entirely. Due to my lack of experience, I need very specific step by step instructions..

DId you enable remote connections ? For a step by step guide, visit my site on the link below and visit the Screencast section, you will find the Enable Remote Connection on the list. Feel free to put a comment in there if you find it useful.

HTH, Jens SUessmeyer.

http://www.sqlserver2005.de|||

Thank you for your quick response. I viewed some of your screencasts, and they are very useful...

I had already enabled remote connections so this was not the problem, started up the SQL Browser too, and no luck.

I believe my problem is to do with SQL Express automatically setting up an sa password for me, I can't seem to be able to change this - any ideas as to how I can get around it? Also, when I create my own user in SQL Express, the software automatically changes the password so that I can't use the new user either. Is there a setting I need to change?

Regards Bron

|||There might be a firewall issue with your computer. By default SQL Server is listening on 1433 and uses 1434 additionally. Make sure these ones are not blocked. SQL Server won′t chnage the passwords for you, if you mean that after creating a new user the numbers of stars / dots in the password field differs from the one you entered, that is just for obfuscating the real length of the password and just means that there i something secure store, you don′t need to care about that.

HTH; Jens Suessmeyer.

http://www.sqlserver2005.de

Can't login with windows user

Why I can't login to a SQL database with windows username and password (both
in OLE DB and ODBC).
If I try with trusted connection (or windows authentication) with the same
user works, but if I write by hand user name (domain\user) and password I
get "Error in initilizing provider". With SQL users works.
Hi,
For trusted connection you are not supposed to specify the user name and
password.
A single login to Operating system will give you access to SQL Server as
well. All you need is to click the "Windows Authentication" and click OK.
This will allow you to access the SQl Server with the credentials of
currently logged in OS user.
User name and password needs to be provided only for SQL server based
logins.
Thanks
Hari
MCDBA
"Sorin Sandu" <ssandu@.bizland.ro.invalid> wrote in message
news:O8x4qMSSEHA.3812@.TK2MSFTNGP11.phx.gbl...
> Why I can't login to a SQL database with windows username and password
(both
> in OLE DB and ODBC).
> If I try with trusted connection (or windows authentication) with the same
> user works, but if I write by hand user name (domain\user) and password I
> get "Error in initilizing provider". With SQL users works.
>
|||But I don't want to access the SQl Server with the credentials of
currently logged in OS user. I need another windows user. Windows not SQL
|||Hi,
We cant enter the user name for the windows based user. A single login to OS
will allow allow to login to sql server.
But you could try this:-
1. Map the network (network mapping) to the SQL server using the Windows
user you need to connect to sql server (This user should have rights in sql
server)
2. Now using query analyzer try to connect.
This uses the mapped users security context to login inside sql server
Thanks
Hari
MCDBA
"Sorin Sandu" <ssandu@.bizland.ro.invalid> wrote in message
news:OZcYjreSEHA.644@.tk2msftngp13.phx.gbl...
> But I don't want to access the SQl Server with the credentials of
> currently logged in OS user. I need another windows user. Windows not SQL
>
|||Hi
Please what do you mean by map the network (network mapping) ?
|||Mapping a network drive is to create a namesake, say "J" drive which is
actually pointing to a share across your network, like \\shared1\sqlfiles.
To do so, open Windows explorer, go to the Tools menu, you'll find "Map
network drive" as the 1st option. That option gives you the drive 'letter'
you want to choose, as well as the "folder" which is the network share. You
will of course have to be using a domain account, and that should have
necessary permissions to access that shared folder.
Hope that helps!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Can't login with windows user

Why I can't login to a SQL database with windows username and password (both
in OLE DB and ODBC).
If I try with trusted connection (or windows authentication) with the same
user works, but if I write by hand user name (domain\user) and password I
get "Error in initilizing provider". With SQL users works.Hi,
For trusted connection you are not supposed to specify the user name and
password.
A single login to Operating system will give you access to SQL Server as
well. All you need is to click the "Windows Authentication" and click OK.
This will allow you to access the SQl Server with the credentials of
currently logged in OS user.
User name and password needs to be provided only for SQL server based
logins.
Thanks
Hari
MCDBA
"Sorin Sandu" <ssandu@.bizland.ro.invalid> wrote in message
news:O8x4qMSSEHA.3812@.TK2MSFTNGP11.phx.gbl...
> Why I can't login to a SQL database with windows username and password
(both
> in OLE DB and ODBC).
> If I try with trusted connection (or windows authentication) with the same
> user works, but if I write by hand user name (domain\user) and password I
> get "Error in initilizing provider". With SQL users works.
>|||But I don't want to access the SQl Server with the credentials of
currently logged in OS user. I need another windows user. Windows not SQL|||Hi,
We cant enter the user name for the windows based user. A single login to OS
will allow allow to login to sql server.
But you could try this:-
1. Map the network (network mapping) to the SQL server using the Windows
user you need to connect to sql server (This user should have rights in sql
server)
2. Now using query analyzer try to connect.
This uses the mapped users security context to login inside sql server
Thanks
Hari
MCDBA
"Sorin Sandu" <ssandu@.bizland.ro.invalid> wrote in message
news:OZcYjreSEHA.644@.tk2msftngp13.phx.gbl...
> But I don't want to access the SQl Server with the credentials of
> currently logged in OS user. I need another windows user. Windows not SQL
>|||Hi
Please what do you mean by map the network (network mapping) ?|||Mapping a network drive is to create a namesake, say "J" drive which is
actually pointing to a share across your network, like \\shared1\sqlfiles.
To do so, open Windows explorer, go to the Tools menu, you'll find "Map
network drive" as the 1st option. That option gives you the drive 'letter'
you want to choose, as well as the "folder" which is the network share. You
will of course have to be using a domain account, and that should have
necessary permissions to access that shared folder.
Hope that helps!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Can't login with windows user

Why I can't login to a SQL database with windows username and password (both
in OLE DB and ODBC).
If I try with trusted connection (or windows authentication) with the same
user works, but if I write by hand user name (domain\user) and password I
get "Error in initilizing provider". With SQL users works.Hi,
For trusted connection you are not supposed to specify the user name and
password.
A single login to Operating system will give you access to SQL Server as
well. All you need is to click the "Windows Authentication" and click OK.
This will allow you to access the SQl Server with the credentials of
currently logged in OS user.
User name and password needs to be provided only for SQL server based
logins.
Thanks
Hari
MCDBA
"Sorin Sandu" <ssandu@.bizland.ro.invalid> wrote in message
news:O8x4qMSSEHA.3812@.TK2MSFTNGP11.phx.gbl...
> Why I can't login to a SQL database with windows username and password
(both
> in OLE DB and ODBC).
> If I try with trusted connection (or windows authentication) with the same
> user works, but if I write by hand user name (domain\user) and password I
> get "Error in initilizing provider". With SQL users works.
>

Sunday, February 19, 2012

cant login my database

hi,

this is the connection string i am using

'Data Source=.\SQLEXPRESS;INITIAL CATALOG=;AttachDbFilename='|DataDirectory|\HotStage.mdf';Integrated Security=True;User Instance=True '

it works all right when working in debug mode, but after i deploy it to my XP's IIS, i can't login my database, the error message is

'Can not open user default database. Login failed. Login failed for user xxx\ASPNET' 'xxx' is my computer name

i am the Admin. of my computer.

could anybody help ? thx!!!

When running in debug mode, I'd guess that you're using the VS development web server, which runs under your user credentials. Consequently, because you're an admin it is allowed to access SQL Server.

When hosting it in IIS, the worker process is running under the ASPNET user account, and this will not be allowed to access SQL Server by default. Therefore, using SQL Server Management Studio, create a login for the ASPNET account on the SQL Server and then grant it access to the appropriate databases.

|||

hi,

of course my SQL Server has ASPNET account, and it has the permission to 'connect sql' and 'create any database', but i still connect to my SQL.

i read some posts somewhere else, and they said i should remove the 'User Instance=True' clause, and i did connected to my SQL, but now i have another problem...it says my database is read-only

there are two functions on my page, both of which will update the database, but one works all right, the other does not...

|||

Hi,

Could you give us a further explaination on your issue. Do you mean that you remove the 'User Instance=True' clause and connect to your SQLServer succesfully, then fail to use one of your function to update your database while another update function works well? If so ,I think the problem should not caused by the database. Could you give us your code?

Thanks.

|||

hi,

the code is a little bit long, and i really don't know what caused this problem, so i do not know which part got wrong. and i don't think you want to read all my code.

but i can do some further explain, when i remove the 'User Instance=True', and use the 'AttachDB' clause, the database connected dynamically, but in SQL Management Studio, i see a 'Read-Only' label after my database, and my database is displayed in gray.

so would you tell me why my database is connected as read-only? and how can i solve this problem?

|||

Hi,

You need Read/Write permission on both MDF and LDF in order to editing data. If you're using IIS 6.0, you need to add Network Process account and give Read/Write permission to these two files. You also need to detach the database before changing the permissions on the file.

You can do this using SSEUtil.exe tool:http://www.microsoft.com/downloads/details.aspx?FamilyID=FA87E828-173F-472E-A85C-27ED01CF6B02&displaylang=en

Thanks.

|||

hi,

all solved, thanks man!

Sunday, February 12, 2012

Can't I dynamically read from any file? - Connection Manager does not exist

I have a Parent package and a child package.

I have hard coded the value for the User::FilePath variable in the parent package.

I am mapping this variable to the value of the same variable in the Child Package.

I created a directory and sql file: "C:\temp\sqlb.sql". I have verified that the path variable value is passed to the child package by using a Script task with a messgbox call.

How do I define an execute sql task to execute sql file: @.[User::FilePath] & "sqlb.sql". I'm using this expression for the SqlStatementSource property. I have entered the OLEDB server information and specified the SQLSourceType = fileconnection.

However I get the error:

[Execute SQL Task] Error: Connection manager "D:\rlewisdev\ZZ\sqlb.sql" does not exist.

What am I doing wrong?

SQLStatementSource in this case points to a connection manager, not a file. You'll have to build a connection manager, call it "SQLFile" or something and use that as the SQLStatementSource. Then you'll have to change the ConnectionString of the connection manager named "SQLFile" (or whatever you decide to call it.)|||

Hi boston..,

You have to create a connection manager based on file path,

you can do the following steps:

1-create connection manager myfilepath

2-right click on this connection and click properties

3-in properties click on the button ... behind expression property

4-In property expression editor ,select the connection string property, and click button ... in the right column

5-In expression builder window expand the variable tree and select ur path variable and drag it to the expression container.

6-click on evaluate expression

NB: you can save your configuration setting in xml file or regsitry or sql server from "package configuration wizard".

Thanks,

Tarek Ghazali

SQL Server MVP

http://www.sqlmvp.com

Friday, February 10, 2012

Can't Get SQL Authentication to work With XP Pro SP2 in very simple test case

I'm trying to work my way through the steps of using a User Id and Password in a connection string.

I'm working with SQL 2005 Express, VS2005, in the development server. Got an error I can't get around...tried it several diffent ways on a slightly more complicated test site...no joy...so went to the MSDN tutorial...made the most "vanilla" test I could think of, and still can't figure it out.

I thought it would be simple enough that I could post the whole thing (below)

The test works fine with Integrated Security = True in the connection string. When I remove that phrase, I get the error:

{"CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file E:\MyPath\App_Data\VSST_DB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."}

This occurs on the cn.Open statement below.

It gets past the login, so I know that the SQL User and password match up correctly.

==========================
<connectionStrings>
<add name="VSST_CN"
connectionString="Data Source=MyServer\SQLEXPRESS;AttachDbFilename=E:\MyPath\App_Data\VSST_DB.mdf;User Id = VSST; Password=vsst123"
providerName="System.Data.SqlClient"/>
</connectionStrings>

=========================
Page Code Behind (no controls on page)

Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim cn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("VSST_CN").ToString())

Dim cmd As SqlCommand = New SqlCommand("SELECT COUNT(*) FROM VSST_Table", cn)
cn.Open()
Dim rdr As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
rdr.Read()
Response.Write(rdr(0).ToString())


End Sub
End Class


=================
The DB

Table VSST_Table,
ID is int, primary key, identity
Field1, Field2, Field3, Field4, Field5 are varchar(50)

I added one record ("A", "B", "C", "D", "E") to the table through VS2005 Server Explorer

This shows up in Count = 1 from running the page when Integrated Security = True

=================
In SSMSE: (this is ALL I did, tried to use the minimum so not to confuse...)

I added the SQL Authentication Server level user "VSST" with the password "vsst123" (and the login works, as noted above)

I attach the .mdf

I add VSST to the Database Users, and give it db_owner

I add VSST to the Table with all permissions checked.

=====================================

I can't figure this out. This is a very vanilla test and I'm stumped. I'm about to give up on SQL Authentication entirely (at least for now), and just try to filter my inputs for SQL Injections...that's the only reason I have (at this stage in my biz plan) for needing SQL Authentication. On the other hand, I really don't like being this stumped on something that is so widely promoted as a common practice.

Any help on this would be greatly appreciated.

Thanks!

It's an XP SP2 security issue. The connect is running within an application sandbox which is not granted the authority to attach, create, or restore a database. The integrated security scenario works, because the Windows credentials are passed through. We spent days trying to figure a way around this one when dealing with a click once application installation and finally gave up. There wasn't a single permutation that we could use to get around the security restrictions that XP SP2 put in place. If the database already existed, everything connected and worked just fine. But, it simply refused to attach a database.|||

Thanks for the input. Wow. Good to know I wasn't completely blowing it....it looked too easy.

So, maybe it will work on the Windows 2003 VPS Server I'm renting...I guess I'll have to give it a try. But maybe it tells me I need to consider why SQL Authentication is critical to this app.

Grazie!

|||

I think there was something in the decision tree that I missed...

As I am gradually putting this together, it looks like the first choice is "1 server => windows authentication" vs "multiple servers (plus some other cases) => sql authentication"

After that, everything that is written about sql authentication seems to assume a level of professional expertise which is appropriately associated with a multi-server environment. Which probably means that the developers may have XP on their desks, but that they're logging into an W2003 development environment...so they never get exposed to this problem (or are aware of it and bypass it).

If you miss the first branch in the decision tree, this is never mentioned...it's all about encrypting web.config and guarding against sql injection by limiting table access, clever ways to use trusted this and that....but never "maybe you should just use Windows Authentication, if it's a single server app."

Long way to the first u-turn....hazards of being a newbit!

|||

Similar grief here

http://www.mcse.ms/message2347651.html