Showing posts with label situation. Show all posts
Showing posts with label situation. Show all posts

Thursday, March 8, 2012

Cannot create a connection to data source

I am in the same situation as many who have been getting this problem except
I have a slightly unique situation. I cannot specify credentials in my
shared connection. I am using the three tier approach without AS. I cannot
specify credentials because I want them to run a stored procedure that uses
the credentials passed in to return them only thier data, not the data of any
other user. It parses the user name using the system_user attribute to find
out who is calling the procedure and then queries the database with that
information. If I pass credentials in then everyone will see the same data,
not the result I want. I need to know how to get the credentials to pass to
the third tier. Can someone help with this...?
-Ed
Web Systems Engineer
Mercy Medical CenterThis seems to have one more wrinkle. It is only when I try to use pass
through authentication. If I switch the data source to "The credentials
supplied by the user running the report" and check the box "Use as Windows
credentials when connecting to data source." and then use the same
credentials I am logged into the computer with the report loads exactly as
expected. If I change the datasource to Windows NT Integrated Security then
the reports fails to load with an error. The error is :
"Reporting Services Error
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Cannot create a connection to data source 'src'.
(rsErrorOpeningConnection) Get Online Help
Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection. "
-Ed Mackin
Web Systems Engineer
"Ed Mackin" wrote:
> I am in the same situation as many who have been getting this problem except
> I have a slightly unique situation. I cannot specify credentials in my
> shared connection. I am using the three tier approach without AS. I cannot
> specify credentials because I want them to run a stored procedure that uses
> the credentials passed in to return them only thier data, not the data of any
> other user. It parses the user name using the system_user attribute to find
> out who is calling the procedure and then queries the database with that
> information. If I pass credentials in then everyone will see the same data,
> not the result I want. I need to know how to get the credentials to pass to
> the third tier. Can someone help with this...?
> -Ed
> Web Systems Engineer
> Mercy Medical Center
>

Friday, February 24, 2012

Cannot connect to SQL Server on different machine

Hello, I know this has been covered many times but I just can't get an answer that applies to my situation.
- SQL Server is on different machine.
- I need to connect to SQL Server with SQL authentication. (Not a Windows account)
- I CAN connect through Server Explorer as the user specified by the database administrator.
- I CAN run stored procedures through the Query Analyzer as the user specified by the database administrator.
- I CANNOT connect by the browsing ASP.NET application
I have tried the connection string in the Web.Config and at the page level but keep getting messages such asLogin failed for user 'User' or sometimes "Not associated with a trusted Connection"
In Web.Config I have:<authenticationmode="None"/>

On the page I have:
Dim strConnAsString = "database=servername;initial catalog=databasename;user id=User;password=password"
Dim connAsNew SqlConnection(strConn)
conn.Open()
I always get an error at conn.Open()
I have spent too many hours playing around with this - any suggestions?? Please!!
By telling it to connect asUser the ASPNET account does not have to be created in SQL Server correct?
Thanks for any help!!

Your connection string is specifying that you should connect using a trusted connection. You have to have this in your connection string:

Trusted_Connection=false;

If you are ever in doubt about the connection string, then try refer to this site:

www.connectionstrings.com

Cheers,

Justin

|||

Thanks for your reply, but this did not make a difference.

I put in a Response.write to show the identy and it displayed "machinename\ASPNET"
but my error message is displaying "Login failed for user'User'.
I needUser to log into the SQL Server.
Will I have to makeUser a windows account and then impersonate it to access the SQL Server?
- ASPNET is not in SQL Server as we want to connect withUser
I've checked out connectionstrings.com, but I think my problem is more of an account issue.
Thanks.

Thursday, February 16, 2012

cannot connect to server through ssms - cannot generate sspi context

Hi,

I have gone through so many kb articles to understanding the problem, but no luck as yet.

Here is the situation:

I have two dev servers : Server A and Server B. Both are set up in an identical fashion. Windows 2003 sp2, Sql Server 2005 sp1 Developer Edition, both are on the same domain, Both have all the three protocols enabled: Shared Memory, Tcpip, and Named Pipes in that order. I can ping both servers, and telnet using the default port. Both have only default instances. Both use the same domain user account for sql service. Both have the error in the log saying that spn could not be registered so authentication may fall back to NTLM.

Here is the issue: When I try to register Server A specifying tcp-ip connection, I am successful and I can see that the authentication is NTLM - is as expected. since the spn registration did not happen and since the sqlservice account is not a domain admin, the authentication used NTLM over tcp-ip. However, I try to register Server B specifying tcpip, I get a cannot generate sspi context error. Why did the authentication not fall back to NTLM as in Server A? From what I read in the KB articles, I asked our network admin to check up the spn, but he assures me that spn were never manually registered.

Can somebody throw more light on this issue?

Thanks

KRSE

http://blogs.msdn.com/sql_protocols/archive/2006/12/02/understanding-kerberos-and-ntlm-authentication-in-sql-server-connections.aspx

If you look at number 6 in the above team blog, it should shed some light on the problem.

Hope that helps.

John

P.S. If this addresses your problem, please mark your question as answered.

Tuesday, February 14, 2012

Cannot connect to remote server with enterprise mgr

Hi I am a newbie so I will try to describe my situation below.
I purchased a Server running Windows 2003 and installed SQL 2000 with SP4.
The server is hosted in a co-location building at my ISP. I have terminal
Server access. I have a application that I will use to connect thru the
interent to that server to the database. When I tried to connect using
Enterprise manager using the public Ip i get "invalid connection,
connectionOpen(parse correctparme. What am I not doing correctly?
I can connect once I'm connected thru Terminal server, but not when I try
to connect from my local box.
I had a similar problem occur when I changed hosting companies. At some
point, my firewall closed port 1433 and it needs to be open and allow
traffic. Also, I have to specify the port number with my server. I connect
with the server IP address, <111.333.555.666,1433>. mssql,mydomain.com,1433
works as well. Try that.
This does assume that you are using the default port for SQL Server which is
1433.
Dan
"francis" wrote:

> Hi I am a newbie so I will try to describe my situation below.
> I purchased a Server running Windows 2003 and installed SQL 2000 with SP4.
> The server is hosted in a co-location building at my ISP. I have terminal
> Server access. I have a application that I will use to connect thru the
> interent to that server to the database. When I tried to connect using
> Enterprise manager using the public Ip i get "invalid connection,
> connectionOpen(parse correctparme. What am I not doing correctly?
> I can connect once I'm connected thru Terminal server, but not when I try
> to connect from my local box.

Cannot connect to remote server with enterprise mgr

Hi I am a newbie so I will try to describe my situation below.
I purchased a Server running Windows 2003 and installed SQL 2000 with SP4.
The server is hosted in a co-location building at my ISP. I have terminal
Server access. I have a application that I will use to connect thru the
interent to that server to the database. When I tried to connect using
Enterprise manager using the public Ip i get "invalid connection,
connectionOpen(parse correctparme. What am I not doing correctly?
I can connect once I'm connected thru Terminal server, but not when I try
to connect from my local box.I had a similar problem occur when I changed hosting companies. At some
point, my firewall closed port 1433 and it needs to be open and allow
traffic. Also, I have to specify the port number with my server. I connect
with the server IP address, <111.333.555.666,1433>. mssql,mydomain.com,1433
works as well. Try that.
This does assume that you are using the default port for SQL Server which is
1433.
Dan
"francis" wrote:

> Hi I am a newbie so I will try to describe my situation below.
> I purchased a Server running Windows 2003 and installed SQL 2000 with SP4.
> The server is hosted in a co-location building at my ISP. I have terminal
> Server access. I have a application that I will use to connect thru the
> interent to that server to the database. When I tried to connect using
> Enterprise manager using the public Ip i get "invalid connection,
> connectionOpen(parse correctparme. What am I not doing correctly?
> I can connect once I'm connected thru Terminal server, but not when I try
> to connect from my local box.