Friday, March 30, 2012
Problem With Login Null
I have a problem. My web server is a Windows 2k Server and my database
server a Windows 2003. I use windows authentication to login at SQL Server,
but when I access from a client machine that uses Win 2k Professional I
always receive this message: "[Microsoft][ODBC SQL Server Driver][SQL
Server]Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.".
When I access from a client machine that uses Windows XP everything its
ok.
This problem only occurs at the web site. When I try to access the Query
Analyzer or the Enterprise Manager I still have the connection.
Can anyone help me?!
Thanks,
Riane Santos
riane@.cpunet.com.br
I've seen this error when a local security policy was in place preventing
access from the network. But, I don't see how that could be your problem
since it works from some machines.
"Riane de Oliveira Torres Santos" <riane@.cpunet.com.br> wrote in message
news:eI4Ehr1jEHA.2788@.tk2msftngp13.phx.gbl...
> Hi,
> I have a problem. My web server is a Windows 2k Server and my database
> server a Windows 2003. I use windows authentication to login at SQL
Server,
> but when I access from a client machine that uses Win 2k Professional I
> always receive this message: "[Microsoft][ODBC SQL Server Driver][SQL
> Server]Login failed for user '(null)'. Reason: Not associated with a
trusted
> SQL Server connection.".
> When I access from a client machine that uses Windows XP everything its
> ok.
> This problem only occurs at the web site. When I try to access the Query
> Analyzer or the Enterprise Manager I still have the connection.
> Can anyone help me?!
> Thanks,
> Riane Santos
> riane@.cpunet.com.br
>
sql
Problem With Login null
I have a problem. My web server is a Windows 2k Server and my database
server a Windows 2003. I use windows authentication to login at SQL Server,
but when I access from a client machine that uses Win 2k Professional I
always receive this message: "[Microsoft][ODBC SQL Server Driver]
1;SQL
Server]Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.".
When I access from a client machine that uses Windows XP everything its
ok.
This problem only occurs at the web site. When I try to access the Query
Analyzer or the Enterprise Manager I still have the connection.
Can anyone help me?!
Thanks,
Riane Santos
riane@.cpunet.com.brHi Riane,
If your web application is attempting to use the credentials of the web
client, then you'll need to implement
Security Delegation to get this to work.
Here's a good whitepaper on setting up Kerberos Delegation.
http://www.microsoft.com/downloads/...f94f-e28a-4726-
bffe-2f64ae2f59a2&displaylang=en
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
problem with login list
I'm using the 64-bit version of SQL Server 2005, SP2, on Windows
Server 2003 R2 X64 Enterprise Edition. I've got a bunch of users out
there who are the db_owner, db_accessadmin and db_securityadmin of
their different respective databases. I would expect that they would
be able to add users to their databases, given that a login exists on
the server. However, when they go to browse logins to add a user in
Management Studio, they are only shown a very short list (like,
themselves and sa, and that's it). We have hundreds of logins on the
server, and they should be able to add any one of them to their
databases if they wish. And if they try to type in the login name
directly, they get a permission denied error.
I am the system administrator, so thankfully I've not experienced this
problem, and I can add users for them. But I'd rather they be able to
do it themselves as they see fit. I have experimented by creating a
test SQL-authenticated login, and making it db_owner of a test
database. When I login with that test login and try to add a user, I
see the exact same behavior. The only logins viewable are my test
login and sa. The only other thing I can add is it's not just
occurring with the GUI interface; the same thing happens when I do a
direct query on the master.sys.syslogins view: I only see the same two
logins. So it appears it's happening at that level and the result
appears up in the GUI.
It appears this is a security/permissions thing. Anyone know if
there's a configuration setting or something that might be preventing
non-privileged users from being able to view all the server logins
when attempting to add users to their databases, in which they are
assigned the db_owner role?
Thanks
GringoSkyGringo (doug@.bu.edu) writes:
Quote:
Originally Posted by
>
I'm using the 64-bit version of SQL Server 2005, SP2, on Windows
Server 2003 R2 X64 Enterprise Edition. I've got a bunch of users out
there who are the db_owner, db_accessadmin and db_securityadmin of
their different respective databases. I would expect that they would
be able to add users to their databases, given that a login exists on
the server. However, when they go to browse logins to add a user in
Management Studio, they are only shown a very short list (like,
themselves and sa, and that's it). We have hundreds of logins on the
server, and they should be able to add any one of them to their
databases if they wish. And if they try to type in the login name
directly, they get a permission denied error.
They need to have VIEW DEFINITION on the logins they need to add. There
is no permission VIEW ANY LOGIN, but there is a server-level VIEW ANY
DEFINITION you can grant to them, but I would think twice before you
did.
Quote:
Originally Posted by
The only other thing I can add is it's not just occurring with the GUI
interface; the same thing happens when I do a direct query on the
master.sys.syslogins view: I only see the same two logins. So it
appears it's happening at that level and the result appears up in the
GUI.
It appears that you are of the old SQL 2000 school. :-)
Microsoft did a lot around security in SQL 2005, and one thing is
that objects are no longer visible to everyone. Essentially, you
can only see an object, if you have permission to it.
And the place to look for logins these days, is sys.server_principals.
While the old system tables are around for compatibility, they may not
show aspects that are new to SQL 2005.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
problem with login
I have a problem with login on slq server 2005 on the other machine. The story is:
1)
I have been trying create classes with help of SqlMetal (Linq tool) and all the time i have a message
Unhandled Exception: System.Data.SqlClient.SqlException: Login failed for user 'me'
2)
So, I tried connect by sqlcmd.
sqlcmd -S OURSERVER -d database -U me -P password
And the error message is:
Msg 18456, Level 14, State 1, Server OURSERVER, Line 1
Login failed for user 'me'.
and...
3)
I CAN connect to this database with help of "SQL Server Management Studio Express"
with the same username and password.
thanks for help
bakuuu
ps. sorry for my english
From your description, I don’t have enough information to determine if my following assumption is correct or not, but it may be worth a try.
I am guessing that the scenarios that fail (1) & (2) are from a remote machine, but the one that succeeds (3) is on the same machine as SQL Server Express. If this is true, it may be possible that TCP communications are disabled and/or the windows firewall is not allowing to connect. Please use SQL Server Configuration Manager to enable TCP (and restart the server) and make sure the firewall allows the connection.
Another possibility is that the DB “database” specified with the parameter –d is not available or you don’t have permission to connect. Try using the default DB (remove the –d database parameter) or master (-d master).
If my assumptions are not correct, we will appreciate further information in order to help.
Thanks a lot.
-Raul Garcia
SDE/T
SQL Server Engine
Wednesday, March 21, 2012
problem with guest account in the tempdb
thanx and regards
kiranthe tempdb is recreated every time the sql service is restarted from a copy of model. i might create a guest account in model to correct the issue but I am not sure why you are having people log into tempdb directly.|||Hi Sean Roussy
thanx a lot for ur reply. I added guest user in sysusers table of model database. and i restarted the server and tested the tempdb, now guest user is not deleted. It works well..
thank you.
kiran|||Note that creating a guest user in the model database is a HUGE security hole, not very far beyond removing the password from the sa login. It makes all kinds of attacks trivial against your server if you ever grant anyone the ability to write queries against your server.
-PatP|||True, I agree with Pat in this matter as the security is most important for a DBA.
Kiran
If this is a development environment then you can say it is not an issue, but if you can explain your need then there will be a way to accomplish.sql
Monday, March 12, 2012
problem with executing sp_addrolemember...
hi
executing the procedure requires membership to db_owner or db_securityadmin database roles so that has nothing to do with workstation but with principals and thus logins...
verify the login you are connecting with from the remote client is mapped to a database user with enought permissions..
regards
Saturday, February 25, 2012
Problem with default schema
under SQL Server 2005 I greatet a user with:
USE MYDB
CREATE USER TEST FOR LOGIN TEST WITH DEFAULT_SCHEMA = TEST
ALTER LOGIN TEST WITH DEFAULT_DATABASE =MYDB
and schema:
CREATE SCHEMA TEST AUTHORIZATION TEST;
Connecting to the database using SQL Native Client (2005.9.1399.0) and ODBC
with the user "TEST" leads to default schema "DBO".
That means: Selecting a table using the unqualified name:
SELECT * FROM MYTABLE
leads to "objekt not found" error, if the table "MYTABLE" is part of the
schema "TEST"
after executing the statement
EXECUTE AS USER='TEST'
the statement
SELECT * FROM MYTABLE
succeeds.
Why the default schema is not initially set to "TEST" after connection?
Greetings
MichaelHi, Michael,
I understand that you would like to know why the default schema was not
initially set to "TEST" after you log on your SQL Server with the login
TEST.
If I have misunderstood, please let me know.
Unfortunately per my test in SQL Server Management Studio, I could not
reproduce your issue. My test process was as following:
1. Logged on my SQL Server instance with a sysadmin account and created a
login named "globaltest" with default master database;
2. Executed the statement:
USE TestDB
CREATE USER TEST FOR LOGIN globaltest WITH DEFAULT_SCHEMA = TEST
ALTER LOGIN globaltest WITH DEFAULT_DATABASE TestDB
3. Executed the statement:
CREATE SCHEMA TEST AUTHORIZATION TEST;
4. Changed a table dbo.T1 to TEST.T1;
5. Closed the current connection and connected to the SQL Server instance
with the login 'globaltest';
6. Executed the query:
SELECT * FROM T1;
Everything worked fine. Are there some differences between our tests?
I recommend that you run "SELECT CURRENT_USER" to check if the user TEST is
the current user after you log on your SQL Server with the TEST login. You
may also perform a test according to my steps to see if the issue occurs.
If you have any other questions or concerns, please feel free to let me
know.
Have a good day!
Charles Wang
Microsoft Online Community Support
========================================
=============
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||underprocessable|||Hi, Michael,
Thanks for your posting your script file here.
I reproduced your issue at my side. After carefully checked the script, I
found that the issue was caused by the sysadmin role assigned to the login.
If a login has the server role sysadmin, it will be assigned to dbo
automatically.
That is why you got dbo when you executed the statement "SELECT
CURRENT_USER".
If the sysadmin role is cancelled, the issue will not occur.
Please refer to:
Database Owner (dbo)
http://msdn2.microsoft.com/en-us/library/aa905208(sql.80).aspx
Hope this helps. Please feel free to let me know if you have any other
questions or concerns.
Have a good day!
Charles Wang
Microsoft Online Community Support
========================================
=============
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||Hi Charles,
many thanks for your help. In the execution environment it's not required
that the login is assigned to the sysadmin role.
So i'll change the skript!
Greetings
Michael|||Hi, Michael,
Thanks for your updating and response.
I am very glad to hear that the issue has been resolved. Please feel free
to let me know if you have any other questions or concerns.
Have a good day!
Charles Wang
Microsoft Online Community Support
Problem with default schema
Hi
I have a user database say Solumina. There is a login defined on the instance of sql 2005 server , say XYZ. There is also a user defined XYZ in the database mapped to the login 'XYZ' with the default schema as 'sfmfg' (Assume that 'sfmfg' schema already exists).
My question when I try to create a random table with the following syntax it gets created in the dbo schema instead of the sfmfg schema (I am using sfmfg login credentials).
create table t1(id int)
Can some 1 please help out.
Regards
Imtiaz
Is sfmfg a member of db_owner role? It is always safer to use 2-part names in your objects so that you know explicitly the schema for the object.