Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Wednesday, March 28, 2012

Problems In Connecting Using New Driver

I tried using the new MSSQL 2005 driver which I downloaded from
http://blogs.msdn.com/dataaccess/ar...28/475032.aspx.
But I had problems in connecting to the database using it.
I used the following lines to make the connection.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con1 =
DriverManager.getConnection("jdbc:sqlserver://localhost;databaseName=BCTEST"
,
"fiorano", "fiorano123");
I got the following error.
com.microsoft.sqlserver.jdbc.SQLServerException: Failed
Logon:com.microsoft.sqls
erver.jdbc.SQLServerException: DBComms.error reading input. Context:Read
packet
header, Unexpected end of stream, readBytes:-1, negative read result,
PktNumber:
0, ReadThisPacket:0, PktDataSize:4,096
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown
Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at JDBCTestYukon.main(JDBCTestYukon.java:17)
I even tried with the simpler URL "jdbc:sqlserver://localhost" but I got the
same error.
Please help.If I use Type1 driver like below its working fine.
java.lang.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection1 =
java.sql.DriverManager.getConnection("jdbc:odbc:DEV329;user=sa;password=ontr
ack20");
But for the thin driver getteing the same exception..I need to upgrade
my Java version'

Friday, March 23, 2012

Problems connecting with VS.NET Server Explorer

I have SQL Server SPK3 and Visual Studio.NET running on the same machine.
When I try to connect to my SQL Server from the VS.NET Server Explorer I can
expand the server and look at the SQL Server instance on my computer but when
I try to expand the instance, I get a login dialog entitled "SQL Server
Login" which asks for Login and Password. When I put in what I think the
Login and Password should be, it tells me, "The specified procedure could not
be found". If I check the option that says, "Use Windows NT Integrated
Security" it tells me "The specified procedure could not be found". I need
some assistance from some gurus. What's going on here?!!
I cannot help you but have a similar problem. I can add servers, but never
connect and see details. Worse yet, I cannot create a connection. I go
through the dialog and click test connection and get connection "test
connection succeeded" message. When I try to finish the task I get a message
twice saying "Unable to connect to database. The connection failed. Check
your username and password, and try again." Using either Enterprise Manager
or Query Analyzer, I can connect to the server and databases and see whatever
I need to.
I have Visual Studio 2003, I am trying to connect to both a MSDE SP3 (same
machine) and SQL Enterprise SP3 (different machine).
I am not sure when exactly this occurred as in the past I had created some
connections. I noticed it within the last couple weeks as I have gotten back
into .Net for my current project. I cannot use the old connections and once
deleted cannot recreate them as above.
"DBase_Tron" wrote:

> I have SQL Server SPK3 and Visual Studio.NET running on the same machine.
> When I try to connect to my SQL Server from the VS.NET Server Explorer I can
> expand the server and look at the SQL Server instance on my computer but when
> I try to expand the instance, I get a login dialog entitled "SQL Server
> Login" which asks for Login and Password. When I put in what I think the
> Login and Password should be, it tells me, "The specified procedure could not
> be found". If I check the option that says, "Use Windows NT Integrated
> Security" it tells me "The specified procedure could not be found". I need
> some assistance from some gurus. What's going on here?!!
|||

Quote:

Originally posted by DBase_Tron
I have SQL Server SPK3 and Visual Studio.NET running on the same machine.
When I try to connect to my SQL Server from the VS.NET Server Explorer I can
expand the server and look at the SQL Server instance on my computer but when
I try to expand the instance, I get a login dialog entitled "SQL Server
Login" which asks for Login and Password. When I put in what I think the
Login and Password should be, it tells me, "The specified procedure could not
be found". If I check the option that says, "Use Windows NT Integrated
Security" it tells me "The specified procedure could not be found". I need
some assistance from some gurus. What's going on here?!!

|||I have been searching news groups and Microsoft support sites for two days now and finally found a solution to our problem. You should download MDAC 2.8 and install. Apparently a new procedure has been included in this release. Good Luck.|||I had the same problem and what did to solve it was removing the Alias in
the SQL Server Client Network Utility, done.
Hope it helps
Javier.
"Matt Wyncoop" <Matt Wyncoop@.discussions.microsoft.com> wrote in message
news:E55058DA-AA95-48BA-930C-0726BDCAEA28@.microsoft.com...[vbcol=seagreen]
>I cannot help you but have a similar problem. I can add servers, but never
> connect and see details. Worse yet, I cannot create a connection. I go
> through the dialog and click test connection and get connection "test
> connection succeeded" message. When I try to finish the task I get a
> message
> twice saying "Unable to connect to database. The connection failed. Check
> your username and password, and try again." Using either Enterprise
> Manager
> or Query Analyzer, I can connect to the server and databases and see
> whatever
> I need to.
> I have Visual Studio 2003, I am trying to connect to both a MSDE SP3 (same
> machine) and SQL Enterprise SP3 (different machine).
> I am not sure when exactly this occurred as in the past I had created some
> connections. I noticed it within the last couple weeks as I have gotten
> back
> into .Net for my current project. I cannot use the old connections and
> once
> deleted cannot recreate them as above.
>
> "DBase_Tron" wrote:
|||I looked there and I have no aliases.
"Javier Troconis" wrote:

> I had the same problem and what did to solve it was removing the Alias in
> the SQL Server Client Network Utility, done.
> Hope it helps
> Javier.
> "Matt Wyncoop" <Matt Wyncoop@.discussions.microsoft.com> wrote in message
> news:E55058DA-AA95-48BA-930C-0726BDCAEA28@.microsoft.com...
>
>

Problems connecting to SSAS instance over HTTP in Excel 2003

Our Biz users are all running Excel 2003, and we've recently set up a bunch of cubes that we'd like to open up to them.

I followed the steps here: http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx
to set up HTTP access to SSAS2005. It works great from my machine, I figured because I had SQL 05 installed locally and all the requisite drivers, etc.

On our biz users' desktops, however, it wasn't as peachy.

I first figured out I had to install MSXML6 and the SSAS 9.0 driver on their machine to connect to the cube. I downloaded those from here:

http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

Once I was able to set up the connection to the cube, and about to create a pivot table in Excel, the Query wizard failed, with this error:

"XML parsing failed at line 1, column 9: DTD is prohibited"

Googling didn't seem to uncover anything useful, has anyone seen this before?

Not sure how google works, but using Windows Live Search (www.live.com) discovered the following thread:

http://www.topxml.com/MS-XML-Analysis/rn-132023_HTTP-XML/A-access-to-AS2005-cause-an-error.aspx

In the thread user Jeje attached the HTTP trace, which is pretty helpful - it shows that first client components tried to use 9.0 driver, but then falled back to 8.0 driver, which is probably the reason for the error. Why did it fall back to 8.0 - perhaps a permission issue ?

|||Whoops, now I feel bad for not using Live . I'll have to be sure to use both now!

Mosha - security sounds like it could be a probable cause. I'll try experimenting with permission issues tomorrow. Also, on a related thread in the same forum a MS employee noted:

Sent date: 01/06/2006
From: "Akshai Mirchandani [MS]" <(email address - cut out)>
Message:
This is a known issue -- a hotfix should be available soon from support.

Thanks,

Akshai

(http://cc.msnscache.com/cache.aspx?q=4937159748319&lang=en-US&mkt=en-US&FORM=CVRE2)

Are you aware of any related hotfixes that address this issue?|||Argh, I tried completely loosening security on the olap/ folder and its children, but this doesn't seem to help at all. I checked our IIS logs and like in Mosha's link the client seems to be attempting the 9.0 driver and then falling back to the 8.0 driver, which of course doesn't work.

Anyone know if there's a hotfix for this?|||Interesting. Changing IIS auth to anonymous seems like it completely solves this problem...although I'm unsure of the security implications -

Client -> IIS (msmdpump.dll) -> SSAS

If IIS is not using windows auth, does SSAS just use the anonymous user's credentials (ie the IUSR_ acct) to authenticate?|||

If you run Profiler against the Analysis Server, you can see which user attempted to connect -- if it was the IUSR_xxx or similar user then you know it is a security issue and the Pump is not able to delegate the user credentials to the Analysis Server for some reason.

I believe the hotfix was about using Basic authentication which doesn't seem to be your scenario.

Thanks,

Akshai

|||

Hi all,

I've also been encountering issues with HTTP access to SSAS 2005, but with excel 2007.

Although it's working from excel 2003 (but only if the option to save the username/password is checked when creating the data source for the pivot table), it won't let me access it from excel 2007. I always get an access denied-like message when i try to set up the connection to the data source.

We haven't been able to identify where is the issue. We set the HTTP access as via the link mentionned before, but that won't let us access from excel 2007.

We've also been facing some backward compatibility issues using excel 2003 with OLE DB provider for analysis services 9.0 installed.

With it we can not connect to our SSAS 2000 cubes (again via http) anymore, the error is the response returned via the HTTP server is not valid (even though we try using the OPAL 8.0 driver).

Any idea how we could solve that issue? did we miss a component to install to ensure compatibility with both version of SSAS?

thanks in advance for your help.

Cheers, and happy new year!

sql

Problems connecting to SQLServer Express in Plesk Server

My hosting provider use Plesk to sell space over the internet and said to me that SQLServer Express is installed on the server. I always get an stupid error trying to connect to the SQLExpress Database in my App_Data folder.

I use the connection string:
* data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|Exam
pleDB.mdf;User Instance=true
With this connection string I get the error saying that server does not alow remote connection

*data source=localhost\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|Exam
pleDB.mdf;User Instance=true

With this connection string I get the error:
Invalid value for key 'attachdbfilename'

I get the same message if I put anything in the AttachDBFileName. Why the .NET does not find the database?

tkx in advance
Paulo Aboim Pinto
Odivelas - Portugal

By default SQL Express doesn't allow remote connections, you have to configure it before you connect to the SQL service from remote. Take a look at this article for more information:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

And you'd better usemachinename\SQLEXPRESS as Data Source in your connection string, as localhost\SQLEXPRESS doesn't work in some case.

Problems connecting to SQL-Server

Hi,
we have an customer trying to run our app. after installation. They get the
error messeage: Login failed for user skdomain/skuser.
Our app uses ADO.NET and the database is MS SQL Server. The program and sql
server is installed on a separate server. To run the app. they have 8
application servers with metaframe. Our app is set up to connect to the
database using WIN NT autentication.
Our app. runs fine if the user log in as domain administrator.
Is skdomain\skuser been granted access with a login in SQL Server? Do
they have the required users added to the server as well as setup as
users in the database?
-Sue
On Mon, 25 Oct 2004 08:23:03 -0700, "Olav"
<Olav@.discussions.microsoft.com> wrote:

>Hi,
>we have an customer trying to run our app. after installation. They get the
>error messeage: Login failed for user skdomain/skuser.
>Our app uses ADO.NET and the database is MS SQL Server. The program and sql
>server is installed on a separate server. To run the app. they have 8
>application servers with metaframe. Our app is set up to connect to the
>database using WIN NT autentication.
>Our app. runs fine if the user log in as domain administrator.
|||Hi Sue,
i dont follow you here. My be because i use a standalone XP Pro PC?
Where do i "click" to grant access with a login in SQL Servers? Can i see it
on my PC or must i use my customers?
Olav
"Sue Hoegemeier" wrote:

> Is skdomain\skuser been granted access with a login in SQL Server? Do
> they have the required users added to the server as well as setup as
> users in the database?
> -Sue
> On Mon, 25 Oct 2004 08:23:03 -0700, "Olav"
> <Olav@.discussions.microsoft.com> wrote:
>
>
|||You won't see skdomain\skuser on your PC. A windows login is
specific to the domain or workgroup. When using windows
authentication, any login you want to have access to SQL
Server needs to be added as a login for SQL Server. In
Enterprise Manager go to Security and then to Logins. Right
click on select New Login. Click the button to the right of
the Name text box and you will pull up the domain or
workgroup logins that you can add as logins for SQL Server.
-Sue
On Wed, 27 Oct 2004 03:37:04 -0700, "Olav"
<Olav@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Hi Sue,
>i dont follow you here. My be because i use a standalone XP Pro PC?
>Where do i "click" to grant access with a login in SQL Servers? Can i see it
>on my PC or must i use my customers?
>Olav
>"Sue Hoegemeier" wrote:
|||Thanks Sue,
this can take som time when there is 200 users to add?
May be a faster approach is to use SQL authentication.
Then it would work with only one user registered the same place?
Is there a difference in connection speed with NT and SQL authentication?
Olav
"Sue Hoegemeier" wrote:

> You won't see skdomain\skuser on your PC. A windows login is
> specific to the domain or workgroup. When using windows
> authentication, any login you want to have access to SQL
> Server needs to be added as a login for SQL Server. In
> Enterprise Manager go to Security and then to Logins. Right
> click on select New Login. Click the button to the right of
> the Name text box and you will pull up the domain or
> workgroup logins that you can add as logins for SQL Server.
> -Sue
> On Wed, 27 Oct 2004 03:37:04 -0700, "Olav"
> <Olav@.discussions.microsoft.com> wrote:
>
>
|||When you have a lot of users, it's generally more efficient to use
Windows groups rather than individual Windows logins. Another
consideration is that you don't necessarily have to use just
Enterprise Manager to add the logins - you can execute sp_grantlogin
to grant a windows account login access to SQL Server. You can use
sp_grantdbaccess to allow the login access to a database. This can
give you more flexibility in terms of building a script the users
access.
There is no real performance difference between the two authentication
modes. Windows Authentication is more secure than using SQL logins.
You may also want to check SQL Server books online and read up on
application roles as that may be something you would want to look
into.
-Sue
On Wed, 27 Oct 2004 06:47:06 -0700, "Olav"
<Olav@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Thanks Sue,
>this can take som time when there is 200 users to add?
>May be a faster approach is to use SQL authentication.
>Then it would work with only one user registered the same place?
>Is there a difference in connection speed with NT and SQL authentication?
>Olav
>
>"Sue Hoegemeier" wrote:
|||Using a single SQL Server auth login for 200 users is not very secure.
Although I'm sure the DBA will probably appreciate getting out and talking
to all 200 employees every time he decides to change that password.
Tracking down any security issues should be easier, since you don't actually
have to track 200 users; just track the one login and blame all 200 users!
"Olav" <Olav@.discussions.microsoft.com> wrote in message
news:A35FA747-EAF6-44CE-AAAB-659A6C80AB14@.microsoft.com...[vbcol=seagreen]
> Thanks Sue,
> this can take som time when there is 200 users to add?
> May be a faster approach is to use SQL authentication.
> Then it would work with only one user registered the same place?
> Is there a difference in connection speed with NT and SQL authentication?
> Olav
>
> "Sue Hoegemeier" wrote:
see it[vbcol=seagreen]
get the[vbcol=seagreen]
and sql[vbcol=seagreen]
8[vbcol=seagreen]
the[vbcol=seagreen]

Problems connecting to SQL-Server

Hi,
we have an customer trying to run our app. after installation. They get the
error messeage: Login failed for user skdomain/skuser.
Our app uses ADO.NET and the database is MS SQL Server. The program and sql
server is installed on a separate server. To run the app. they have 8
application servers with metaframe. Our app is set up to connect to the
database using WIN NT autentication.
Our app. runs fine if the user log in as domain administrator.Is skdomain\skuser been granted access with a login in SQL Server? Do
they have the required users added to the server as well as setup as
users in the database?
-Sue
On Mon, 25 Oct 2004 08:23:03 -0700, "Olav"
<Olav@.discussions.microsoft.com> wrote:

>Hi,
>we have an customer trying to run our app. after installation. They get the
>error messeage: Login failed for user skdomain/skuser.
>Our app uses ADO.NET and the database is MS SQL Server. The program and sql
>server is installed on a separate server. To run the app. they have 8
>application servers with metaframe. Our app is set up to connect to the
>database using WIN NT autentication.
>Our app. runs fine if the user log in as domain administrator.|||Hi Sue,
i dont follow you here. My be because i use a standalone XP Pro PC?
Where do i "click" to grant access with a login in SQL Servers? Can i see it
on my PC or must i use my customers?
Olav
"Sue Hoegemeier" wrote:

> Is skdomain\skuser been granted access with a login in SQL Server? Do
> they have the required users added to the server as well as setup as
> users in the database?
> -Sue
> On Mon, 25 Oct 2004 08:23:03 -0700, "Olav"
> <Olav@.discussions.microsoft.com> wrote:
>
>|||You won't see skdomain\skuser on your PC. A windows login is
specific to the domain or workgroup. When using windows
authentication, any login you want to have access to SQL
Server needs to be added as a login for SQL Server. In
Enterprise Manager go to Security and then to Logins. Right
click on select New Login. Click the button to the right of
the Name text box and you will pull up the domain or
workgroup logins that you can add as logins for SQL Server.
-Sue
On Wed, 27 Oct 2004 03:37:04 -0700, "Olav"
<Olav@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Hi Sue,
>i dont follow you here. My be because i use a standalone XP Pro PC?
>Where do i "click" to grant access with a login in SQL Servers? Can i see i
t
>on my PC or must i use my customers?
>Olav
>"Sue Hoegemeier" wrote:
>|||Thanks Sue,
this can take som time when there is 200 users to add?
May be a faster approach is to use SQL authentication.
Then it would work with only one user registered the same place?
Is there a difference in connection speed with NT and SQL authentication?
Olav
"Sue Hoegemeier" wrote:

> You won't see skdomain\skuser on your PC. A windows login is
> specific to the domain or workgroup. When using windows
> authentication, any login you want to have access to SQL
> Server needs to be added as a login for SQL Server. In
> Enterprise Manager go to Security and then to Logins. Right
> click on select New Login. Click the button to the right of
> the Name text box and you will pull up the domain or
> workgroup logins that you can add as logins for SQL Server.
> -Sue
> On Wed, 27 Oct 2004 03:37:04 -0700, "Olav"
> <Olav@.discussions.microsoft.com> wrote:
>
>|||When you have a lot of users, it's generally more efficient to use
Windows groups rather than individual Windows logins. Another
consideration is that you don't necessarily have to use just
Enterprise Manager to add the logins - you can execute sp_grantlogin
to grant a windows account login access to SQL Server. You can use
sp_grantdbaccess to allow the login access to a database. This can
give you more flexibility in terms of building a script the users
access.
There is no real performance difference between the two authentication
modes. Windows Authentication is more secure than using SQL logins.
You may also want to check SQL Server books online and read up on
application roles as that may be something you would want to look
into.
-Sue
On Wed, 27 Oct 2004 06:47:06 -0700, "Olav"
<Olav@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Thanks Sue,
>this can take som time when there is 200 users to add?
>May be a faster approach is to use SQL authentication.
>Then it would work with only one user registered the same place?
>Is there a difference in connection speed with NT and SQL authentication?
>Olav
>
>"Sue Hoegemeier" wrote:
>|||Using a single SQL Server auth login for 200 users is not very secure.
Although I'm sure the DBA will probably appreciate getting out and talking
to all 200 employees every time he decides to change that password.
Tracking down any security issues should be easier, since you don't actually
have to track 200 users; just track the one login and blame all 200 users!
"Olav" <Olav@.discussions.microsoft.com> wrote in message
news:A35FA747-EAF6-44CE-AAAB-659A6C80AB14@.microsoft.com...[vbcol=seagreen]
> Thanks Sue,
> this can take som time when there is 200 users to add?
> May be a faster approach is to use SQL authentication.
> Then it would work with only one user registered the same place?
> Is there a difference in connection speed with NT and SQL authentication?
> Olav
>
> "Sue Hoegemeier" wrote:
>
see it[vbcol=seagreen]
get the[vbcol=seagreen]
and sql[vbcol=seagreen]
8[vbcol=seagreen]
the[vbcol=seagreen]

Problems connecting to SQL2K after install on same server as SQL 2005

We have a current install of SQL2005 Developer on a Win 2003 Server Enterprise and it works as advertised. It is accessed as Test05

Yesterday a SQL2000 Developer Edition was also installed on the same Server as named instance Test05\Test052000.

The 2000 seems to start and run OK and can be connect to by Management studio etc from that same box. However it can not be connect to via the network. Any ideas?

You will have to make sure that the system and SQL Server are set up to allow remote connections to the server. Look at this KB Article.

Problems connecting to SQL server(data source)

Hi,

I am new to SQL server and am experiencing problems with connecting to SQL server express from my VS C++ 6. Since its just the start, I am trying to play around with data access on the computer with the server installed.

I want to connect to the server through ODBC and understand that I can do so by first creating a data source. However, at the Data Source Administrator, there were errors when connecting to the server. I tried with different server names, with Shared memory/TCP/Named pipes enabled(in all combinations) at the Configuration Manager but to no avail.

However, I am able to contact to the server through Shared memory at the Management Studio Express. I don't know what is wrong.

Let me know if you need extra information to give me assistance.

Thanks in advance.

Mel

The most likely issue is that you haven't applied the SQLEXPRESS instance name to your server on the first page.

Name: <any name>

Description: <any description>

You could use either of the following for your server name:

Server: <server name>\SQLEXPRESS

Server: .\SQLEXPRESS

Server: (local)\SQLEXPRESS

I think you can bypass creating a data source in ODBC by specifying the information directly in the connection string,

a simple connection string might look like "DRIVER={SQL Native Client}; SERVER=(local)\SQLEXPRESS; Trusted_Connection=YES". This link might offer a little bit of help: http://doc.ddart.net/mssql/sql70/6_odbcht_6.htm You should also check out the SQL Server 2005 samples, they have a fairly decent ODBC section. You can download them here: http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en

Hope this helps!

John

sql

Problems connecting to SQL server on W2K3 from Win 2000 workstatio

We are running SQL Server 2000 on Windows Server 2003 (SP1 not installed).
We are trying to access our databases using Enterprise manager from our
machines in the office using windows authentication. We have no problems
from Windows XP machines (using both TCP/IP and Named Pipes). I can connect
to the server using the SA account (TCP/IP) and Named Pipes from a windows
2000 workstation, but cannot access the SQL server from Windows 2000 machine
s
using TCP/IP.
When we try to log in using Windows 2000 we get "login failed for user
null". From xp machines it goes straight in.
Testing that I have done:
? Set up an alias to the Windows 2003 server name (SQL Server Client Netwo
rk
Utility). No luck
? I can map a folder to the machine using net use command
? I am in the same AD domain.
? The clients are connecting to the server using integrated security (not
allowing SQL authentication)
I cannot understand what’s going on; do you have any pointers on where to
start looking?
ThanksSame here, except we can not to connect from win98 machines. From XP
everything looks fine. Before everything worked for about 1,5 years and
only today morning crashed. Btw, connection to (local) on server machine
works fine. Nobody did any changes in TCP/IP nor in DSN settings.|||This is because you are using Windows authentication without a domain setup.
If you aren't using a domain you shouldn't use windows authentication
because it tends not to work, use SQL Authentication and you'll always
connect. The problem is mainly that the users you are signed in to the W2k
box doesn't match a user on the W2k3 box, or the user isn't passed properly
to SQL, or if you really want to setup Windows authentication use to put the
workstations that servers into a domain..
Thanks,
Mike Bulava, MCDBA
"Mike Allen" <MikeAllen@.discussions.microsoft.com> wrote in message
news:071EE849-F61A-4729-8598-67974D2D5269@.microsoft.com...
> We are running SQL Server 2000 on Windows Server 2003 (SP1 not installed).
> We are trying to access our databases using Enterprise manager from our
> machines in the office using windows authentication. We have no problems
> from Windows XP machines (using both TCP/IP and Named Pipes). I can
> connect
> to the server using the SA account (TCP/IP) and Named Pipes from a windows
> 2000 workstation, but cannot access the SQL server from windows 2000
> machines
> using TCP/IP.
> When we try to log in using Windows 2000 we get "login failed for user
> null". From xp machines it goes straight in.
> Testing that I have done:
> . Set up an alias to the Windows 2003 server name (SQL Server Client
> Network
> Utility). No luck
> . I can map a folder to the machine using net use command
> . I am in the same AD domain.
> . The clients are connecting to the server using integrated security (not
> allowing SQL authentication)
> I cannot understand what's going on; do you have any pointers on where to
> start looking?
> Thanks
>
>

Wednesday, March 21, 2012

Problems connecting to SQL server on W2K3 from Win 2000 workstatio

We are running SQL Server 2000 on Windows Server 2003 (SP1 not installed).
We are trying to access our databases using Enterprise manager from our
machines in the office using windows authentication. We have no problems
from windows XP machines (using both TCP/IP and Named Pipes). I can connect
to the server using the SA account (TCP/IP) and Named Pipes from a windows
2000 workstation, but cannot access the SQL server from windows 2000 machines
using TCP/IP.
When we try to log in using windows 2000 we get "login failed for user
null". From xp machines it goes straight in.
Testing that I have done:
?Set up an alias to the Windows 2003 server name (SQL Server Client Network
Utility). No luck
?I can map a folder to the machine using net use command
?I am in the same AD domain.
?The clients are connecting to the server using integrated security (not
allowing SQL authentication)
I cannot understand what’s going on; do you have any pointers on where to
start looking?
Thanks
Same here, except we can not to connect from win98 machines. From XP
everything looks fine. Before everything worked for about 1,5 years and
only today morning crashed. Btw, connection to (local) on server machine
works fine. Nobody did any changes in TCP/IP nor in DSN settings.
|||This is because you are using Windows authentication without a domain setup.
If you aren't using a domain you shouldn't use windows authentication
because it tends not to work, use SQL Authentication and you'll always
connect. The problem is mainly that the users you are signed in to the W2k
box doesn't match a user on the W2k3 box, or the user isn't passed properly
to SQL, or if you really want to setup Windows authentication use to put the
workstations that servers into a domain..
Thanks,
Mike Bulava, MCDBA
"Mike Allen" <MikeAllen@.discussions.microsoft.com> wrote in message
news:071EE849-F61A-4729-8598-67974D2D5269@.microsoft.com...
> We are running SQL Server 2000 on Windows Server 2003 (SP1 not installed).
> We are trying to access our databases using Enterprise manager from our
> machines in the office using windows authentication. We have no problems
> from windows XP machines (using both TCP/IP and Named Pipes). I can
> connect
> to the server using the SA account (TCP/IP) and Named Pipes from a windows
> 2000 workstation, but cannot access the SQL server from windows 2000
> machines
> using TCP/IP.
> When we try to log in using windows 2000 we get "login failed for user
> null". From xp machines it goes straight in.
> Testing that I have done:
> . Set up an alias to the Windows 2003 server name (SQL Server Client
> Network
> Utility). No luck
> . I can map a folder to the machine using net use command
> . I am in the same AD domain.
> . The clients are connecting to the server using integrated security (not
> allowing SQL authentication)
> I cannot understand what's going on; do you have any pointers on where to
> start looking?
> Thanks
>
>

Problems connecting to SQL Server DB using Perl CGI

Please help. I am at my wits end. :confused:

I have SQL Server 2000 on a Windows 2003 server. I have my database on a Nmade Instance . Named Pipes is disabled and only TCP/IP is enabled. Authentication is set to Windows only. The server is in Active Directory.

My web site is on a Windows 2000 server with IIS 5. I have installed the Client Network Utilities and set the alias to TCP/IP also. I can connect to the SQL server using the Query Analyzer.

I have downloaded and installed ActiveState's ActivePerl 5.6.1.638-MSWin32-x86.msi on both machines. I have also installed DBI and DBD::ODBC on both machine. Both machine have MDAC 2.8 installed.

The code I am using to connect is as follows:
my $user = 'user';
my $pass = 'password';
my $db = "database";
my $server = "servername\\instancename";
my $ipadd = "xxx.xx.xx.xxx,xxxx";
my $driver = '{SQL Server}';
Option #1
$DSN = 'driver=$driver;Server=$server;uid=$user;pwd=$pass ;database=$db;network=DBMSSOCN;address=$ipadd;';
$dbh = DBI->connect("dbi:ODBC:$DSN") or die 'Cannot Open SQL Server Database $DBI::errstr\n';

Option #2
$DSN = 'driver=$driver;Server=$server;uid=$user;pwd=$pass ;database=$db';
$dbh = DBI->connect("dbi:ODBC:$DSN") or die 'Cannot Open SQL Server Database $DBI::errstr\n';

Option #3
$dbh = DBI->connect('dbi:ODBC:driver=$driver:dsn',$user,$pass) or die 'Cannot Open SQL Server Database $DBI::errstr\n';

Option #4
$dbh = DBI->connect("dbi:ODBC:database=$db;server=$server",$user,$pass) or die '$DBI::errstr\n';

From all that I have read and from previous scripts I have written, any of these should work, but I am getting the following error.

DBI connect('driver=$driver:dsn','user',...) failed: at C:\cgi-bin\CGI.pl line xxx Cannot Open SQL Server Database $DBI::errstr\n at C:\cgi-bin\CGI.pl line xxx.
Where xxx = the line number of the connection call.

All of my previous scripts have been written for forms where the web server(Apache), database(MySQL), and script(Perl CGI) are all on the same machine. I am not at all familiar with SQL Server, and am struggling to learn quickly. PLease and ideas would be greatly appreciated.
Thank you
LANACI don't know Perl, but VBScript would look very simple using Option #1:

user = "user"
pass = "password"
db = "database"
server = "servername\\instancename"
ipadd = "xxx.xx.xx.xxx,xxxx"
driver = "{SQL Server}"
connect_string="driver=" & driver & ";server=" & server & ";uid=" & user & ";pwd=" & pass & ";database=" & db & ";network=dbmssocn"|||Try setting up a SQL Profiler trace on the database server. Trace all error/warning events, and see if you are getting anything at all from the client.

I am afraid I have never worked with DBI, so I can not tell you if there is anything obviously wrong in the code.

problems connecting to sql express 2005 server, where mdf file go?

Hello, I have correctly installed sql express 2005 onto my company server. I can connect to the sql express 2005 fine within sql management studio express. I can also connect to it the within visual studio 2005 server explorer. I have my database (MDF) on our server. I am trying to run my application within my client computer. I have changed the connection string property to connect to the server:

"Data Source=CTS\SQLEXPRESS;Initial Catalog=UpdateAttributes;Integrated Security=True"

My program will only work if there is a local copy of MDF database located within my application directory. If I remove the local copy, it errors "No process is on the other end of the pipe" Is it possible to have my application without the local copy of the MDF? I thought the idea is to have the MDF on the server. Then my app would not have the MDF copy!?Fixed the problem. Went to the server, changed the sql server 2005 surface area configuration under remote connections from using TCP/IP to TCP/IP and named pipes.

Problems connecting to SQL 2005 DB on server

Hi - I have Web Developer, SQL Express 2005 running locally on my pc, and on my remote server.

Everything is fine locally, but when I copy my files over to my server (have setup a virtual dir, and ensured it is running .net2) I get the following message when trying to connect:

An attempt to attach an auto-named database for file C:\websites\sickness\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

I have tried attaching and detaching the database from within SSME on the server - my connection string is:

<connectionStrings>
<add name="SicknessConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

I've tried it with and without the User Instance = True set

Has anyone got an actual fix for this?

Thanks, Mark

Hi - I'm sorry for bumping this, but I'm sure I can't be the only person with this problem - is there a more appropriate place I should look for an answer?

Kind regards,

Mark|||

mtait wrote:

is there a more appropriate place I should look for an answer?


Yes, I've now moved this question from the Getting Started forum to this SQL Server forum.|||I am pretty sure the problem is that you are missing the Database attribute for your connection string. I always usehttp://www.connectionstrings.com/ as a connection string reference. Drill down under SQL Server 2005 and look at the 2 SQL Server Express connection string examples. I think this will help you.|||

Hi - thank you - I was using connectionstrings.com - but each one fails.

I've now reinstalled SQL Express, and allowed Mixed Mode.

From SSME I've set the sa password to 'Bob99' and use this connection string:

<connectionStrings>

<add name="SicknessConnectionString" connectionString="Server=.\SQLExpress;Database=sickdb;User ID=sa;Password=Bob99;Trusted_Connection=False"

providerName="System.Data.SqlClient" />
</connectionStrings>

...and now the error is:

System.Data.SqlClient.SqlException: Cannot open database "sickdb" requested by the login. The login failed.
Login failed for user 'sa'.

I've checked, and rechecked the sa password - again, thanks for any help on this.

Mark

|||

Try detaching the database. You've permanently attached it, or you already have a database named 'database' on the other server. I notice that now you are calling it 'sickdb'. You could try renaming the database.mdf to sickdb.mdf as well. Then go back to your original connection string (of course you will need to change the reference from database.mdf to sickdb.mdf).

Just an FYI - your last error message is saying the userid/password is fine, but that user has no access to the 'sickdb' database. You can of course at this point go forwards and assign sa rights to the database, or you can go back and fix the original problem and not worry about permissions at all.

|||

Hi - thanks again for the help.

I think I've messed things up somewhere - I'm trying to change too many things to make this work, and I still end up with the same error messages.

If I uninstall SQL Express 2005, and do a clean install, with mixed mode authentication, is there a step by step guide anywhere which will advise how to:

a) setup a new user from within SSME
b) whether to attach the database file or not
c) which section of SSME to change to allow the user to connect to the local (database is on the same remote server as IIS) database - whether in Security/Logins or Database/Properties
d) advise a connection string which would work given the above steps#

Sorry - I know people are trying to help me, but I've just got myself completely mixed up here.

Thanks, Mark

sql

Problems connecting to SQL 2005 DB on server

Hi - I've been posting this in the aso.net forums, but I seem to have
stalled in there.
I have SQL Server Express 2005, and .net running on a windows 2000
server, remote server on my network. SQL Express and IIS/the web
application need to run on the same box.
I can get these to run locally through the internal webserver in
VS2005/Express, but when I deploy them to the remote server - I can't
connect to the database file - which is on exactly the same box. I
either get the cannot attach database, as it already exists, login for
user fails, or connected but no instance on the other end type errors
(please see http://forums.asp.net/1215828/ShowPost.aspx for my posts).
What I would ideally like is guidance on:
If I uninstall SQL Express 2005, and do a clean install, with mixed mode
authentication, is there a step by step guide anywhere which will advise
how to:
a) setup a new user from within SSME
b) whether to attach the database file or not
c) which section of SSME to change to allow the user to connect to the
local (database is on the same remote server as IIS) database - whether
in Security/Logins or Database/Properties
d) advise a connection string which would work given the above steps#
Thanks for any help here - I'm not a DBA, and don't have access to one.
Thanks, Mark
*** Sent via Developersdex http://www.examnotes.net ***
Hi - is there a more appropriate group I should maybe post this to?
Thanks, Mark
*** Sent via Developersdex http://www.examnotes.net ***

Problems connecting to server using Management Studio

Hi all,
I got this problem which makes me struggle in the last few days.
I am able to connect to my local server using a query analyzer or calling sql commands in a window application, but there's no way I can access it in Management Studio: by clicking "Connect" it just waits forever, and it doesn't respond to any other command (it must be shut by terminating the process)
Got any hints?

Thanks

Mauro

Try restarting the sql services may be your server is in hunged state......but i am not sure if that would solve the problem

|||Unfortunately, it doesn't do the trick... in fact, it's like Manag. Studio is able to connect to the server (I can see the list of databases in advanced options) but it doesn't show the result afterwards. Could it be a security/account problem?

Thanks

M|||Hi again,
just another hint trying to understand what's going on.
I just spent a couple of hours removing both the server and the client components and install it again, but the problems remains. Does configuration survive removal? Or should I look somewhere else?

Thanks

Mauro
|||From Management Studio are u trying to connect using Windows authentication or SQL authentication?
|||Both actually. And the result is the same connecting to a local or remote machine, that's why I am quite curious about this error (that in fact makes development harder... )

Mauro

Problems connecting to server using Management Studio

Hi all,
I got this problem which makes me struggle in the last few days.
I am able to connect to my local server using a query analyzer or calling sql commands in a window application, but there's no way I can access it in Management Studio: by clicking "Connect" it just waits forever, and it doesn't respond to any other command (it must be shut by terminating the process)
Got any hints?

Thanks

Mauro

Try restarting the sql services may be your server is in hunged state......but i am not sure if that would solve the problem

|||Unfortunately, it doesn't do the trick... in fact, it's like Manag. Studio is able to connect to the server (I can see the list of databases in advanced options) but it doesn't show the result afterwards. Could it be a security/account problem?

Thanks

M|||Hi again,
just another hint trying to understand what's going on.
I just spent a couple of hours removing both the server and the client components and install it again, but the problems remains. Does configuration survive removal? Or should I look somewhere else?

Thanks

Mauro
|||From Management Studio are u trying to connect using Windows authentication or SQL authentication?
|||Both actually. And the result is the same connecting to a local or remote machine, that's why I am quite curious about this error (that in fact makes development harder... )

Mauro

Problems Connecting to Server Due to Deliting of Default DB

Hlp!
I have made a stoopid mistake of deleting the DB that was sat to default with Enterprise Manager. Now I can't use Enterprise Manager to work with any of my DB's.

Don't get me wrong, the server is still running, and I am able to view all the old folders in IIS, I can log into and add content to different sites I am working with.
But Ican not add new DB's, make backups or modify excisting tables and so on.

There must be a way to make another Db my new defalut? Pls say it is, so I don't need to reinstall, cause then I will loose data the way it is now.

Pls tell me there is a someway easy way around this issue.

slopee
Sad n' bitterEXEC sp_defaultdb 'User', 'DB'|||I will try this in commandline, and put my username, and the DB i want for default

If this does not work I hope someone can give mestep by step guiding, that way I know what I am doing:)) I am not even sure this is to be run from cmd, or where i should run it:))

Will try this, and let you know how it went.

slopee|||Ok, sure what you wrote is totally correct, but I am afraid I am going to need more then that. I will need a step by step guide on howto do this, cause i didn't work from cmd line.

If someone knows what to do here, pls guide me.

slopee|||Clearly I need help. I can barely spell, ("Deliting" lol) how should I possible manage to apply the line you submitted?;-)

Come on y'all, surely there is someone how can give me basic details? I need it explained in details, and step-by-step pls.

s|||From MS Support (http://support.microsoft.com/default.aspx?scid=kb;en-us;307864&Product=sql):

f the user's default database no longer exists, or has been marked suspect, use the ISQL command line utility to change the user's default database to a database that is currently available for a connection.

1. At a command line prompt, type the following and then press ENTER: C:\>isql -E

2. At the isql prompt, type the following and then press ENTER: 1>sp_defaultdb 'user's_login', 'master'

3. At the second prompt, type the following and then press ENTER:2>go|||Great.

Thx y'all.

s

problems connecting to remote SQL Server 2005

I'm using Visual Studio 2005 Pro and am attempting to connect to a remote SQL Server 2005. I have the server name, SQL login credentials, and database name. However, when I try connecting I get this error:

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

I know that remote access is enabled because I received the connection instructions directly from the database administrator. I've tried turning off my firewall. I've tried connecting with Data source: Microsoft SQL Server using both Data providers: ".NET Framework Data Provider for SQL Server" and ".NET Framework Data Provider for OLE DB". Nothing seems to work.

Any suggestions for what I may be doing wrong? Do I have to have certain software installed on my computer to make this work (other that VS2005)?

-Mathminded

You have to configure SQL Server for remote connection and it is covered in the thread below, post again if you still need help. Hope this helps.

http://forums.asp.net/thread/1379211.aspx

|||

Thanks, Caddre. Just to clarify, I am trying to connect to a remote SQL Server 2005 that is maintained by someone else. They already have remote access enabled, but I haven't been able to connect to it. They have hundreds of users and the rest of them are connecting fine. Do I also have to enable remote access on my local SQL Express installation in order to connect to their server? It seems counterintuitive to me so I want to double-check before I spend several MORE hours trying to get this to work.

Thanks!

|||

I see your point but there are many reason for such problem so it takes time, I have found two troubleshooting links provided by Microsoft and another provided by another developer, run through the check list and post again if none works. Hope this helps.

http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx

http://blogs.msdn.com/sql_protocols/archive/2006/04/21/581035.aspx

http://geekswithblogs.net/timh/archive/2006/01/30/67586.aspx

|||

Thanks again, Caddre. I really appreciate your help. I've checked out all that information but it hasn't led me to a solution. I hate to give up an entire night of work, but I'm going to have to give up on this for now and try again tomorrow. If I come up with anything, I'll post it.

Thanks! :-)

|||If those did not work then it is either connection string or permissions you need to check back with them I hope you are not having this problem with Godaddy because users always run into problem with them. Hope this helps.|||

Problem solved! :-) It turns out they had never had a remote user have to access the SQL server from outside the company, so it was a firewall issue. They added my IP as an exception and it worked flawlessly. Thanks again, Caddre, for your willingness to help. I really appreciate it.

-Mathminded

|||

Problem solved! :-) It turns out they had never had a remote user have to access the SQL server from outside the company, so it was a firewall issue. They added my IP as an exception and it worked flawlessly. Thanks again, Caddre, for your willingness to help. I really appreciate it.

-Mathminded

|||

I am glad to see your problem was resolved but fire wall addressed in the protocol troubleshooting link I gave you.

http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx

|||

You're right, it was in those lists. That was one of the things I tried checking last night and one of the reasons I decided to give up. Unfortunately, there is no way (that I know of) to know with certainty that you are being blocked by a firewall. Last night I did try to ping and telnet to the server (two things from the links you provided) but when that didn't work it either meant they had disabled those functions OR I was being blocked by a firewall.

I'm glad you replied. I had marked the thread as resolved but hadn't remembered to mark your post as the answer. I don't know how the whole points thing works on this site, but if that's how people get points I wanted to make sure you got them.

Thanks again for all your help.

-Mathminded

|||Fire wall always block database and web server, it is the second thing to check after the configuration of the server and the points are not important to me anymore I have moved on from that subject, I always post again as needed so it will help future users with same problem.sql

Problems connecting to MSDE through ADO.NET

Hi there,
i've installed MSDE and have successfully connected to it from a remote version of Enterprise Manager but when i try to connect using ADO.NET from a website using the same login details i get the following message:
"SQL Server does not exist or access denied"
I installed msde with DISABLENETWORKPROTOCOLS=0 and SECURITYMODE=SQL so everything should be setup properly.
My connection string looks like this:
server=ip_address\instance_name;uid=myusername;pwd=mypassword;database=mydatabase
This connection string works fine when testing locally (without ip address ie. localhost\instance_name)
Any ideas why this doesn't work??You need to check that if the user has accessto the database. For most hosting companies they provide ASPNET useraccount and also NETWORK users. Give permission to ASPNET user and seeif it works also try the same for NETWORK users.

|||Thanks for the reply, you've lost me a bit though. I've setup my own server using Apache and mod_aspdotnet and have successfully tested it remotely from asp.net pages connecting to a MySQL database also on my server. Now i wish to use MSDE and am getting this problem.
How do i setup an ASPNET user account and give it permission to use the database? And why do i need to?
cheers

Problems connecting to MSDE on Windows 2003

I have installed MSDE 2000 SP3a on Windows 2003 Server Web edition.
I am trying to connect to this DB using enterprise manager from another
machine (Windows 2000 Server where SQL Server is installed) with no luck. I
am getting: SQL Server does not exist or access is denied. ConnectionOpen
(Connect())".
I have tried connecting using both Windows Authentication mode and using the
sa account (which I am not sure I know the password for the MSDE).
Can anyone help ?
Thanks
ra294@.hotmail.comCheck whether the instance is listening on any network protocols using
Server Network utility and enable them appropriately.
Thanks,
Bala.
This posting is provided "AS IS" with no warranties, and confers no
rights.
"ra294" <ra294@.hotmail.com> wrote in message
news:%23qkr5RW%23DHA.3808@.TK2MSFTNGP09.phx.gbl...
> I have installed MSDE 2000 SP3a on Windows 2003 Server Web edition.
> I am trying to connect to this DB using enterprise manager from another
> machine (Windows 2000 Server where SQL Server is installed) with no luck.
I
> am getting: SQL Server does not exist or access is denied. ConnectionOpen
> (Connect())".
> I have tried connecting using both Windows Authentication mode and using
the
> sa account (which I am not sure I know the password for the MSDE).
> Can anyone help ?
> Thanks
> ra294@.hotmail.com
>