HOw to find who connected to database at what time

I am still on SQL Server 2000. I know Oracle pretty well but learning SQL 
Server. In Oracle there is a listere log which shows who made databas 
econnection at what time. Is there something similar in SQL Server. 
0
Utf
1/29/2010 2:49:01 AM
sqlserver.server 1327 articles. 0 followers. Follow

4 Replies
1108 Views

Similar Articles

[PageSpeed] 48

See if  this gives you what you need:

EXEC sp_who2

-- 
HTH
Kalen
----------------------------------------
Kalen Delaney
SQL Server MVP
www.SQLServerInternals.com

"Prem Mehrotra" <PremMehrotra@discussions.microsoft.com> wrote in message 
news:D5911D7A-4D65-4398-A228-7ADD37CE02E7@microsoft.com...
> I am still on SQL Server 2000. I know Oracle pretty well but learning SQL
> Server. In Oracle there is a listere log which shows who made databas
> econnection at what time. Is there something similar in SQL Server. 

0
Kalen
1/29/2010 2:57:08 AM
sp_who2 seems to who is currently connected to database. I am looking for a 
hsitory, evey tme a user connneted, a line should be shown.  

"Kalen Delaney" wrote:

> See if  this gives you what you need:
> 
> EXEC sp_who2
> 
> -- 
> HTH
> Kalen
> ----------------------------------------
> Kalen Delaney
> SQL Server MVP
> www.SQLServerInternals.com
> 
> "Prem Mehrotra" <PremMehrotra@discussions.microsoft.com> wrote in message 
> news:D5911D7A-4D65-4398-A228-7ADD37CE02E7@microsoft.com...
> > I am still on SQL Server 2000. I know Oracle pretty well but learning SQL
> > Server. In Oracle there is a listere log which shows who made databas
> > econnection at what time. Is there something similar in SQL Server. 
> 
0
Utf
1/29/2010 4:43:01 AM
No, this information is not maintained automatically.  You could poll 
sysprocesses occasionally and save the info to a table of your own, or you 
could run a trace that just captured connections.

-- 
HTH
Kalen
----------------------------------------
Kalen Delaney
SQL Server MVP
www.SQLServerInternals.com

"Prem Mehrotra" <PremMehrotra@discussions.microsoft.com> wrote in message 
news:10BAC9F0-20F8-44AE-9CD9-88C5D1E23EA8@microsoft.com...
> sp_who2 seems to who is currently connected to database. I am looking for 
> a
> hsitory, evey tme a user connneted, a line should be shown.
>
> "Kalen Delaney" wrote:
>
>> See if  this gives you what you need:
>>
>> EXEC sp_who2
>>
>> -- 
>> HTH
>> Kalen
>> ----------------------------------------
>> Kalen Delaney
>> SQL Server MVP
>> www.SQLServerInternals.com
>>
>> "Prem Mehrotra" <PremMehrotra@discussions.microsoft.com> wrote in message
>> news:D5911D7A-4D65-4398-A228-7ADD37CE02E7@microsoft.com...
>> > I am still on SQL Server 2000. I know Oracle pretty well but learning 
>> > SQL
>> > Server. In Oracle there is a listere log which shows who made databas
>> > econnection at what time. Is there something similar in SQL Server.
>> 
0
Kalen
1/29/2010 5:02:01 AM
You can configure SQL Server to log this (to errorlog and eventlog). By 
default it logs failed logins. Right-click instance in SSMS and configure. 
Then mine either errorlog or eventlog to grab the data and store it wherever 
you want. For instance, using xp_readerrorlog (or is it sp_readerrorlog?... 
search and you will find). Or if 2008, EE, you can use a Server Audit.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi



"Prem Mehrotra" <PremMehrotra@discussions.microsoft.com> wrote in message 
news:10BAC9F0-20F8-44AE-9CD9-88C5D1E23EA8@microsoft.com...
> sp_who2 seems to who is currently connected to database. I am looking for 
> a
> hsitory, evey tme a user connneted, a line should be shown.
>
> "Kalen Delaney" wrote:
>
>> See if  this gives you what you need:
>>
>> EXEC sp_who2
>>
>> -- 
>> HTH
>> Kalen
>> ----------------------------------------
>> Kalen Delaney
>> SQL Server MVP
>> www.SQLServerInternals.com
>>
>> "Prem Mehrotra" <PremMehrotra@discussions.microsoft.com> wrote in message
>> news:D5911D7A-4D65-4398-A228-7ADD37CE02E7@microsoft.com...
>> > I am still on SQL Server 2000. I know Oracle pretty well but learning 
>> > SQL
>> > Server. In Oracle there is a listere log which shows who made databas
>> > econnection at what time. Is there something similar in SQL Server.
>> 
0
Tibor
1/29/2010 7:52:50 AM
Reply:

Similar Artilces:

find and replace contents of tables and text boxes
I have a 200 page document in publisher 2007. The contents of each page differ by only a small amount of text at the top of each page. Each page contains a large table and several text boxes. I need to replace the old information in the table and several text boxes with the same new information for all 200 pages. How do I do this quickly and efficiently? Put the table and text boxes on the master page. Ctrl+m. -- Mary Sauer http://msauer.mvps.org/ "Katy" <Katy@discussions.microsoft.com> wrote in message news:56F513B4-D272-4421-B9D6-979AF70D74A9@microsoft.com... >...

Connect to cable?
I cannot get Outlook set up to connect to the internet. We have cable. The only options I find in the help material is for LAN, dial-up and modem. Can anyone help? THANKS! Choose LAN or Any Available. (Cable/DSL is LAN) "Herb" <anonymous@discussions.microsoft.com> wrote in message news:933d01c496dc$4ce47a70$a601280a@phx.gbl... >I cannot get Outlook set up to connect to the internet. We > have cable. The only options I find in the help material > is for LAN, dial-up and modem. Can anyone help? THANKS! ...

Intermitten loss of Server Connection OL98, Win98
System: W98SE, Outlook 98, IE 6.0, No AntiVirus Email Software I have an intermittent problem. I connect thru dialup modem to ISP fine. Receive my new messages ok. Can typically send out one or two email msgs and then fails. Msg says unable to find server even though the phone connection is still in place. Internet Explorer and Outlook both out of commission at this point. If I disconnect and redial the whole process normally repeats itself. Occasionally it will work fine for a few hours but then starts up again. I reinstalled all software (win98, Outlook, and IE6),updated a...

How can you find how many worksheets in a workbook?
We have a really big project going on with a lot of seperate worksheets in one workbook. Is there a quick way to find out how many 'tabs' are in the book? In the VBE immediate window ?Activeworkbook.Worksheets.Count -- HTH Bob Phillips "JonM4" <JonM4@discussions.microsoft.com> wrote in message news:304CBAEC-95DF-4265-BD24-D797DDFBA4F2@microsoft.com... > We have a really big project going on with a lot of seperate worksheets in > one workbook. Is there a quick way to find out how many 'tabs' are in the > book? Open the VB editor, then open ...

Advanced SQL Query and Advanced Find
I need to add contacts to a marketing list based on an advanced SQL query, Advanced find does not offer the proper fields and joins. Is there an easy way to run the query outside of CRM and then somehow get the contacts into the marketing list? Create a Query using the "FilteredContact" view in CRM, it offers all the fields you need. Furthermore, in order to create marketing list against your query i suggest you do it using the webservice API. If you need help working with the API feel free to contact me at anytime I can certainly help you. Oshri Cohen Web: http://mymscrm3.blogs...

Moving databases between servers
I plan on installating a second mail server. Is it possible to unmount an information store, copy it to another server and mount it on the second server? Our database is "really" large and I feel this would be much faster than moving each mailbox individually. I have a feeling it won't work because Active Directory will not be updated but I thought I'd ask anyhow ;) Although I haven't done it, I have read that you can... http://www.microsoft.com/technet/prodtechnol/exchange/2000/support/dbrecovr.mspx I should have added that I am running Exchange 2003 SP1 on Win...

How i can calculate time
Dear Anybody, pls tell me that i have how i can calculate time in seven different cells A B C D 12.35am 11.30pm 7.00Am 7.00 pm What will be the total Hour and minute of these Please explain in more detail. Do you want the difference between each pair of times? -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Rao Ratan Singh" <RaoRatanSingh@discussions.microsoft.com> wrote in message news:B5F3B614-3A23-4B09-8314-251825CF4F50@microsoft.com... > Dear Anybody, > pls tell me that i have how i can calculate time...

message send time
Exchange 5.5 sp4 - how long will a message stay in the MTA queue before it is sent back to the sender as non deliverable if the receiving MTA is down? I thought it was 48 hours, but I can't find where to verify that time. Any help is greatly appreciated. Thank you. Nancy Stevens nstevens@tycoint.com see this: http://support.microsoft.com/default.aspx?scid=kb;en-us;271545 "Nancy Stevens" <nstevens@tycoint.com> wrote in message news:uRbgfpPlEHA.3772@TK2MSFTNGP14.phx.gbl... > Exchange 5.5 sp4 - how long will a message stay in the MTA queue before it > is sent bac...

clean up database
We have finished customising the CRM system but have a lot of test information in the databse - is it possible to remove the test data but keep the customised fields, workflows etc... in place - start with a blank db but with all out settings intact? If anyone knows, we would appreciate it if you could share how with us. Thanks, John Finnigan The only way to accomplish this would be to manually delete records (unsupported) from the associated tables. -- Matt Parks MVP - Microsoft CRM "JohnF" <JohnF@discussions.microsoft.com> wrote in message news:6BDC1424-8103-447...

Reconcile Error: Can't find table ME_Download_Transactions
We're testing 8.0 prior to upgrade and I receive the error: Can't find table ME_Download_Transactions Is there a fix for this? I looking in the support knowledge base and there didn't appear to be one..... VinceV Vince, Check in company database if you have this table: ME142807. This table is what they refer to as ME_Download_Transactions. If this is not there, the suggessted way of re-creating this is to make a backup and upgrading Electronic Reconcile again using your CD1. Since this is a test environment, I personally would copy this from another database if ther...

Removing a link that can't be found with FIND.
I have linked spreadsheets. When the wookbooks the links refer to have been deleted, I still get the link tying to link when I open the spreadsheet. I have to hit cancel every time on several links when I open a workbook. I've tried to "find" the link, but it always can't- even when I seach for the link "finding" in all formulas. I can "find" the valid links though, as the find always goes right to the cell containing the link. And, I do know how to change a link, and how to link elsewhere or look in a different location for the linked data. Most...

Find and answer to blank email body? <1164607086.163818.205870@j44g2000cwa.googlegroups.com>
Just wondered if you found a solution to this issue as we are having the same issue. Ours revolves mostly around sending replies, but also applies to saved drafts and such. Please let me know if you found a resolution. Thanks. -Scott EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com ...

Adding Time Deadline to a Task
I see that I can have a "Due Date" for a task, but can I have a time deadline (11:45; 2:00; etc) as well so that I can know that I have to have something done BY a certain time? ...

Windows update just does not find any patches for windows
I run windows update but no patches ever show up for windows. Belarc advisor and It.shavlik both say that I am missing critical and regular patches. Any thoughts would be appreciated. Always state your full Windows version (e.g., WinXP SP3; WinXP 64-bit SP2; Vista SP1; Vista 64-bit SP2; Win7; Win7 64-bit) when posting in a forum or newsgroup. Please do so in your next reply. RonRPh wrote: > I run windows update but no patches ever show up for windows. Belarc > advisor > and It.shavlik both say that I am missing critical and regular patches. > Any > thoughts ...

Access 2003 database opens as read-only on Vista with Office 2007
I'm moving my files from my old computer (XP, Office 2003) to my new computer (Vista, Office 2007). When I open a 2003 Access database I created on the old computer, it runs as read-only, even though that attribute is not set in the file properties. How can I get the database to run normally? "Cassandra Berg" <CassandraBerg@discussions.microsoft.com> wrote in message news:9E42B330-C3DB-4130-96C3-ECB3DEB48B5B@microsoft.com... > I'm moving my files from my old computer (XP, Office 2003) to my new > computer > (Vista, Office 2007). When I open a 2...

Find a Row
I want to do a text search in column A of sheet 1. I want the ROW number where it finds this text first to be displayed. Then I want to select the 3rd columns to the right of the row containing the text. Is that possible in VBA ? Jeff Sub FindIt() Dim sfind As String Dim rownum As Long sfind = "apple" rownum = Application.WorksheetFunction. _ Match(sfind, Range("A:A"), 0) MsgBox Cells(rownum, "D").Value End Sub HTH Jason Atlanta, GA >-----Original Message----- >I want to do a text search in column A of sheet 1. I want the ROW number >where it f...

Synchronization error "The underlying connection was closed"
A customer uses CRM 3.0 Update Rollup #1 and the Vista compatibe V3C client on a Windows XP SP2 machine with Outlook 2003. The laptop client is installed. Everytime he tries to go offline, an error appears while synchronizing data records: "The underlying connection was closed. A connection that was expected to be kept alive was closed by the server." Sometimes there appears another error message: "The request was aborted. The request was cancelled." I already removed the CRM-outlook- client and installed againe, but ist didn't help. Other users at other machines ca...

To add a new entry into Database
can you assist me in adding a new entry into the database. I'm using MS Access and ODBC driver and i'm getting error for the function RecordSet::AddNew(); error: 'CRecordset::AddNew' : illegal call of non-static member function. Thank you in advance regards Jayanth jayanth wrote: > can you assist me in adding a new entry into the database. I'm using MS > Access and ODBC driver and i'm getting error for the function > RecordSet::AddNew(); > error: 'CRecordset::AddNew' : illegal call of non-static member > function. > > Thank you in adva...

cannot connect to web site
cannot connect to web site from two home computers but can connect from other computers. Get Internet explorer can not display the web page. www.projectw.org Thanks for sharing that with us. "Herman R Standiford" <noonehere@noplace.com> wrote in message news:4c181319$0$284$14726298@news.sunsite.dk... : cannot connect to web site from two home computers but can connect from : other computers. Get Internet explorer can not display the web page. : www.projectw.org : : I like the handle (name) -- Peter Please Reply to Newsgroup for the benefit ...

Application project in the database is corupt!
Hi, I get this message, every time I run the debugger into what ever module in my Access 2003 program: "The changes you have requested to the table where not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field that contain duplicate data, remove the index to permit duplicate entries and try again." and after that I'm not able to launch my program any more. If I try to open a Module I get this message: "The Visual Basic for Application project in the database is corrupt" No way t...

closing 1 file at a time
I have Excel (2003) set up (running in Win2kpro) so that if multiple files are open then I see each one individually in the task bar. This is what I want. However, unlike Word, when I close one Excel file in the task bar (by right clicking it and choosing the "close" option), ALL the excel files close presumably indicating that I only have 1 instance of Excel running. When I close 1 word doc only that one closes, not all of them. This is very frustrating if I have 3 or 4 files open and they're all currently saved. They all close at once. I don't want that to happen. I only w...

create a rule based on received time
Even when the template askes for "creation time" it only accepts a date format ...

cant find UserName or LoginName in dot net help?
in vb6 it's GetUserName(stBuff, lBuffLen) where GetUserName() is in the win api how to do in dotnet? (2008 express) couldn't find in help - guess i don't know the right search term, user, username,login,loginname etc didn't turn up an answer that i could see. thanks mark Am 26.06.2010 20:40, schrieb mp: > in vb6 it's GetUserName(stBuff, lBuffLen) > where GetUserName() is in the win api > how to do in dotnet? (2008 express) > couldn't find in help - guess i don't know the right search term, user, > username,login,loginname etc didn&...

How can you import data from another database using query ?
I am using SQL Server 2005. I would like to import data from dbA to dbB for tblMin, but only for some of the data in tblMin. Both dbA and dbB have tblMin. So, in the import wizard, i selected "Write a query to specify the data to transfer", then I write a query like this: SELECT * FROM [dbA].[dbo].[tblMin] where symbol = 'ABC' If I do this, the import wizard creates a new table called Query, and import the data to Query, instead of importing it to tblMin on dbB. How can I import the data to tblMin on dbB ? Thank you fniles (fniles@pfmail.com) writes:...

Can't find contact data when merging from outlook 07 to word 07
I used to use outlook 2003 and word 2003. When I wanted to do a mail merge I would use a defined view in outlook to narrow the contacts that I wanted in my mail merge. I would then going through the mail merge wizard, check the box that says "All contacts in current view" which would give me that subset of contacts that I wanted to merge. When I went to word it would show a file OMM1.doc that contained the outlook data subset that I had chosen. In 2007 it doesn't seem to auto-populate the data from outlook and I'm forced to choose a file. What am I doing wr...