Wednesday, March 7, 2012
Login Triggers?
someone (anyone) logs in to a MSSQL SQL 2000 instance? I had thought MSSQL
came with login triggers but I haven't been able to find any info.
TIA,
JDNo, sorry.
If you want to track logins, you can log all login attempts. Or you can run
a SQL Trace that captures that information. However, if you wanted to do
some additional work for the user, there is no trigger for that.
RLF
"Joe D" <jkdriscoll@.qg.com> wrote in message
news:dvph8d$2k91$1@.sxnews1.qg.com...
> Quick question about SQL 2000. Are there ways to have a trigger fire when
> someone (anyone) logs in to a MSSQL SQL 2000 instance? I had thought MSSQL
> came with login triggers but I haven't been able to find any info.
> TIA,
> JD
>|||thanks for the feed back Russell.
Do you if SQL 2005 will offer it?
Thanks again.
"Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
news:O5cm9uRTGHA.4900@.TK2MSFTNGP12.phx.gbl...
> No, sorry.
> If you want to track logins, you can log all login attempts. Or you can
> run a SQL Trace that captures that information. However, if you wanted to
> do some additional work for the user, there is no trigger for that.
> RLF
> "Joe D" <jkdriscoll@.qg.com> wrote in message
> news:dvph8d$2k91$1@.sxnews1.qg.com...
>|||Hello Joe,
> Do you if SQL 2005 will offer it?
Thats an interesting question. The answer is yes, but you'll have to be a
bit more creative than you might like.
In 2005 you can do an CREATE EVENT NOTIFICATION on SERVER FOR AUDIT_LOGIN|AU
DIT_LOGIN_FAILED|AUDIT_LOGOUT
etc and send that payload to a service broker queue for processing. The spro
c
that processes queued messages could then do what you neeed more than likely
.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||Interesting.
Thanks Kent.
"Kent Tegels" <ktegels@.develop.com> wrote in message
news:b87ad741c12a8c81b0a6c56b8f0@.news.microsoft.com...
> Hello Joe,
>
> Thats an interesting question. The answer is yes, but you'll have to be a
> bit more creative than you might like.
> In 2005 you can do an CREATE EVENT NOTIFICATION on SERVER FOR
> AUDIT_LOGIN|AUDIT_LOGIN_FAILED|AUDIT_LOG
OUT etc and send that payload to a
> service broker queue for processing. The sproc that processes queued
> messages could then do what you neeed more than likely.
> Thank you,
> Kent Tegels
> DevelopMentor
> http://staff.develop.com/ktegels/
>|||>> Thats an interesting question. The answer is yes, but you'll have to[vbcol=seagreen]
Closing the loop on this: http://www.sqljunkies.com/WebLog/kt...ifications.aspx
Enjoy!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
Login to SQL with non domain account
user, and is executed with a local computer user.
When I use the same VB script while logged on with any domain user it
executes successfully.
All SQL tools like query analyzer and enterprise admin have not problems.
What can cause this problem?
Any help would be appreciated.
Thanks in advance,
Ido Friedman
Hi,
Looks liks your SQL Server is setup for Windows Authentication only. In that
case to communicate to
SQL Server you may need to login to client with an domain user which has
access to SQL Server. Incase
if you can not do that then change the authetication mode to Windows and SQL
Server authentication.
In this you could connect to SQL Server using SQL Server Authentication.
Thanks
Hari
"Ido friedman" <Idofriedman@.discussions.microsoft.com> wrote in message
news:85A4A648-23E0-4AF6-870D-BE7380734DBC@.microsoft.com...
>I have a problem accessing a SQL instance from a VB script that uses a SQL
> user, and is executed with a local computer user.
> When I use the same VB script while logged on with any domain user it
> executes successfully.
> All SQL tools like query analyzer and enterprise admin have not problems.
> What can cause this problem?
> Any help would be appreciated.
>
> Thanks in advance,
> Ido Friedman
Login to SQL Server Express using Command Prompt
oSQL is supported, but SQLCmd is the 2005 equivalent that is recommended. Simply open a command prompt and open the connection to your server as in:
SQLCmd -S .\sqlexpress -E
This will take you to a prompt where you can start typing commands. More information about SQLCmd is available in Books Online.
Regards,
Mike Wachal
SQL Express team
-
Mark the best posts as Answers!
I don't have SQL Server Express Manager. I want to enable ASPNET account in SQL Server Express so that my ASP.NET application can access databases created in SQL Server Express.
How can I accomplish above task using Command Promt. If anyone recommend any GUI tools other than Express Manager it may be even better.
Thanks a lot for your support.
|||You can download Management Studio Express from http://msdn.microsoft.com/vstudio/express/sql/download/. If you want to use the command line, use SQLCmd as I suggested above.
Once you've connected using SQLCmd, you will need to write T-SQL statements to create Logins and Users for the ASPNET user. You should be able to find information about creating Logins and Users in the Books Online at http://msdn2.microsoft.com
Regards,
Mike Wachal
SQL Express team
-
Mark the best posts as Answers!
Now I can connect to SQL Server Express using Command Prompt but I get some error messages when I use T-SQL commands.Following are the commands I used.
D:\Documents and Settings\Sankar>sqlcmd -S .\sqlexpress
1> use BookShop
2> SELECT Name FROM Department
3> GO
I receive following error message when I type above SELECT statement .
Msg 911, Level 16, State 1, Server JAMESGAT-5BB8A7\SQLEXPRESS, Line 1
Could not locate entry in sysdatabases for database 'BookShop'. No entry found
with that name. Make sure that the name is entered correctly.
1>
Oops, I forgot to specify the path. The command should be typed as below.
sqlcmd -S .\sqlexpress -d D:\Inetpub\wwwroot\BookShop\App_Data\BookShop.mdf
We can perform T-SQL queries after connecting to the database as described above.
Login to SQL Server
and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
to connect usinng string:
"PROVIDER=SQLOLEDB.1;DATA
SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx ;"
i'm geting the message:
"Login failed for user 'ABCABC'. Reason: Not associated with a trusted
SQL Server connection"
Why is that so?
thanks.
*** Sent via Developersdex http://www.codecomments.com ***
Seems like SQL Server only accepts Windows logins.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"George Ivanov" <gsivanov@.yahoo.com> wrote in message news:On9qlKI1FHA.4032@.TK2MSFTNGP15.phx.gbl...
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx ;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***
|||Hi George
This connection string will connect using SQL authentication. If you want
Domain authentication you must use something similar to
"Persist Security Info=False;Integrated
Security=SSPI;database=northwind;server=mySQLServe r"
Integrated Security=SSPI; is the key item here and means that the already
domain authenticated user who is starting your application will be used to
access SQL server. This could be the interactive user on the desktop, IIS or
another application so you will need to make sure that whatever starts your
application is already logged on with the required account.
Nik Marshall-Blank MCSD/MCDBA
Linz, Austria
"George Ivanov" <gsivanov@.yahoo.com> wrote in message
news:On9qlKI1FHA.4032@.TK2MSFTNGP15.phx.gbl...
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx ;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***
|||It seems like you are using Windows user (you have provide domain name on
your message) not sql user.
But it seems on your connection string you are using sql user.
So if you want to use Trusted Connection you need to change your connection
string.
Check out:
http://www.connectionstrings.com/
"George Ivanov" wrote:
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx ;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***
>
Login to SQL Server
and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
to connect usinng string:
"PROVIDER=SQLOLEDB.1;DATA
SOURCE=SQLServer1;DATABASE=DB1;UID=ABCAB
C;PWD=xxxx;"
i'm geting the message:
"Login failed for user 'ABCABC'. Reason: Not associated with a trusted
SQL Server connection"
Why is that so?
thanks.
*** Sent via Developersdex http://www.codecomments.com ***Seems like SQL Server only accepts Windows logins.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"George Ivanov" <gsivanov@.yahoo.com> wrote in message news:On9qlKI1FHA.4032@.TK2MSFTNGP15.phx
.gbl...
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCAB
C;PWD=xxxx;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***|||Hi George
This connection string will connect using SQL authentication. If you want
Domain authentication you must use something similar to
"Persist Security Info=False;Integrated
Security=SSPI;database=northwind;server=
mySQLServer"
Integrated Security=SSPI; is the key item here and means that the already
domain authenticated user who is starting your application will be used to
access SQL server. This could be the interactive user on the desktop, IIS or
another application so you will need to make sure that whatever starts your
application is already logged on with the required account.
Nik Marshall-Blank MCSD/MCDBA
Linz, Austria
"George Ivanov" <gsivanov@.yahoo.com> wrote in message
news:On9qlKI1FHA.4032@.TK2MSFTNGP15.phx.gbl...
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCAB
C;PWD=xxxx;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***|||It seems like you are using Windows user (you have provide domain name on
your message) not sql user.
But it seems on your connection string you are using sql user.
So if you want to use Trusted Connection you need to change your connection
string.
Check out:
http://www.connectionstrings.com/
"George Ivanov" wrote:
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCAB
C;PWD=xxxx;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***
>
Login to SQL Server
and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
to connect usinng string:
"PROVIDER=SQLOLEDB.1;DATA
SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx;"
i'm geting the message:
"Login failed for user 'ABCABC'. Reason: Not associated with a trusted
SQL Server connection"
Why is that so?
thanks.
*** Sent via Developersdex http://www.developersdex.com ***Seems like SQL Server only accepts Windows logins.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"George Ivanov" <gsivanov@.yahoo.com> wrote in message news:On9qlKI1FHA.4032@.TK2MSFTNGP15.phx.gbl...
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.developersdex.com ***|||Hi George
This connection string will connect using SQL authentication. If you want
Domain authentication you must use something similar to
"Persist Security Info=False;Integrated
Security=SSPI;database=northwind;server=mySQLServer"
Integrated Security=SSPI; is the key item here and means that the already
domain authenticated user who is starting your application will be used to
access SQL server. This could be the interactive user on the desktop, IIS or
another application so you will need to make sure that whatever starts your
application is already logged on with the required account.
--
Nik Marshall-Blank MCSD/MCDBA
Linz, Austria
"George Ivanov" <gsivanov@.yahoo.com> wrote in message
news:On9qlKI1FHA.4032@.TK2MSFTNGP15.phx.gbl...
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.developersdex.com ***|||It seems like you are using Windows user (you have provide domain name on
your message) not sql user.
But it seems on your connection string you are using sql user.
So if you want to use Trusted Connection you need to change your connection
string.
Check out:
http://www.connectionstrings.com/
"George Ivanov" wrote:
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.developersdex.com ***
>
Friday, February 24, 2012
Login Resolution
Friends
I have one SQL server2000 which have Mixed Mode authentication.It is working fine in PC which server instance is situating.But I have another PC which having connectvity tools of SQL Server.When I am trying to access SQL Server from the second PC through SQL authentication access getting denied.In the same time if I am accessing any of first PC's Folder using it's administrator password.Then if try with SQL authentication I am able to connect with SQL Server in the First PC from second PC .Please note SQL server instance is not in windows authentication mode .What may be the problem.Please suggest me a resolution
Thanks in Advance
Filson
What is the error logged in the SQL Server errorlog?
Thanks
Laurentiu