Periodically Trappng Whose Logged In?

Jul 13, 1999

Hello:

In order to eliminate all users who have been using the SA login, I would like to trap all users periodically who are logged in. We have changed the
sa password but just to monitor the login/userid usage, I have the following question:

1) how can I periodically write out to a log, which users are logged in to a given database at certain times of the day?

2) Which steps would I follow to do so?

Thanks.

David Spaisman

View 3 Replies


ADVERTISEMENT

Importing Multiple CSV Files Periodically

Jun 2, 2008

I have a folder on an SFTP server in our internal network which gets flat files periodically (almost every minute) from another server. The file structure is like this:
Flat File Format•Line 1—List of field names comma separated •Line 2—List of field type comma separated •Line 3—Data comma separated •Line 4—Data comma separated and so on...
All the files will be like this without the .csv extention. There are a lot of fields and creating a column for each field manually will be a pain. Heres what I am trying to do:
1. Create a process that runs periodically on the server and imports data from files into the SQL server table.
2. Use the information in line 1 and 2 to create the schema of the table and then ignore those lines in every import (the data should be appended to the existing data).
What are my options?
Thank you all,Bullpit 
 
 

View 3 Replies View Related

Check Periodically If SQL Server Is Running

Aug 28, 2006

Hi,

I have my SQL server installed and running on a windows 2003 server. Sometimes, the server stops unexpectedly. I want to know if there is any mechanism to alert as and when the SQL server or SQL server agent goes down.

I guess everything is a windows service. Can we have a mechanism to test this service from a script and send an alert mail when the server goes down? How can this be done from a script?

Thanks in advance

-Sudhakar

View 4 Replies View Related

What What Is The Best Way To Transfer Data To MySQL Periodically

Aug 1, 2007

Hi everyone, here is my situation and what I am hoping to accomplish.
I want some data from my msSQL to be seen on my website but I do not want a website to access the msSQL database due to performance etc (the database is not intended for website use).
Innitially I was thinking of exporting the data every 24hours to a text file that the website would access, but now I am thinking it would be better to have some data sent to a mySQL database that I have from my webhost.

I am not really sure what the best way to do this is, any help please?
thank a lot

View 13 Replies View Related

Making A Stored Procedure Run On It's Own Periodically.

Jul 20, 2005

Hi,I have a requirement to update a table in SQL Server through a storedprocedure,the stored procedure should run periodically, say once in a month, andupdate the table.I should not use any external programs to call thestored procedure, is there any other way to do it without using anexternal programs.Thanks in advance,Rajan

View 2 Replies View Related

Creating Process Doing Specific Job Periodically

Dec 7, 2006

Hi, can I create a background process in SQL Server doing specific jobs periodically? Stored procedure is the only solution?

View 4 Replies View Related

SQL 2012 :: Index Rebuild Job Fails Periodically At Update Stats?

Mar 18, 2015

I have a job that runs nightly, rebuild index. job runs fine every night but every few weeks it fails.

USE msdb
GO
EXECUTE dbo.IndexOptimize
@Databases = 'USER_DATABASES',
@FragmentationLow = NULL,
@FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 30,
@SortInTempdb = 'Y',
@UpdateStatistics = 'ALL',
@OnlyModifiedStatistics = 'Y'

This calls the Sp that does the Reindex. It fails at the update statistics with a very generic message. like " Command: UPDATE STATISTICS [xxxx_DB].[dbo].[xxxx_xxx] [_WA_Sys_00000007_49C3F6B7] [SQ... The step failed."

I suspect it has more error but this is all it is showing me when I right click on the job history. therefore, I updated the job step in the advance tab with log to a txt file. Am I on the right track or there is another way to see error some where else.

I looked at the logs but they didn't show any thing.

View 9 Replies View Related

SQL 2012 :: Auto ID Primary Key Specified As Int And Table Data Is Deleted Periodically?

Jun 25, 2015

I have a table that has a primary key that is auto incremented by 1. This table's data is cleared out periodically and as data gets added the auto id primary key continues to increase in numeric value. Once the data is cleared from the table the auto id names could be used again(the eventId is not stored) Currently the eventID is at 26,581,399. I know the maximum int value is 2,147,483,647.

How should I handle this? or rebuild the table every time the data is cleared(problematically)?

View 3 Replies View Related

Will Turning Readwrite Back On Periodically Affect Queries That Are Running?

Oct 16, 2007

for some filegroups, we are turning readwrite back on periodically to trickle some data into an archive. This lasts a few seconds and then we turn readonly back on. What is the impact of doing this while a query is running on the archive?

View 1 Replies View Related

Scheduled SSIS/DTS Package Fails Periodically With Exit Code -1073741819

Oct 2, 2007

We have a vendor who has an SSIS package that executes a DTS package. We've asked that they migrate the DTS code completely to SSIS, but that is something that will not be done in the near future. The package is scheduled to run every 5 minutes through a SQL Server scheduled job. 95% of the time the package executes without an error, but occassionally the following error is reported.


Date 10/2/2007 7:35:00 AM
Log Job History (Pyxis - Data Load)

Step ID 1
Server DEVSQL1V5
Job Name Pyxis - Data Load
Step Name Run SSIS Package
Duration 00:00:03
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0


Message
Executed as user: Domain_NameSQLService. The return value was unknown. The process exit code was -1073741819. The step failed.



When I look at the DTS and SSIS package logs no errors are reported and each log indicates the package completed successfully.

Any ideas what this exit code is indicating or how to further troubleshoot the problem?

Thanks, Dave

View 4 Replies View Related

Setup And Upgrade :: Differential Backups Periodically Taking Longer Than Expected Time To Complete

Jun 15, 2015

We are running a SQL Server 2008R2 64-bit database system on a Windows 2012 R2 64-bit Standard system. I have noticed in recent weeks that our differential backups periodically are taking longer than expected to complete. The usual amount of time is about one hour, but on several occasions, it has taken upwards to five hours. The nights when the job takes longer to complete are on Friday.

I did some checking online, and one possible reason for this issue is my scheduling the reindexing of the database on the morning of the Differential backup. For example, this past Friday the reindexing occurred at 1:00 AM with the Differential running at 10:00 PM that night.The article that I read suggested the reindexing, which takes several minutes, if that, to complete, should be scheduled to run just before the Full backup job.

View 2 Replies View Related

Non Logged

Nov 17, 1999

How does SQL SErver detect that a non logged operation has occured? The syslogs table does not give any indication of this.

Thanks

View 2 Replies View Related

How To See Who You Are Logged In As

Mar 29, 2002

Hi,

I am new to SQL Server 2000, and would like to know how you can determine who is currently logged into the system on a specific PC. I was told there is a command that starts with "Sys", but they didn't know the specific command.

Also, how would I re-log in as a different user (to test the rights that were set per user). Thanks for the help in advance.

View 3 Replies View Related

Error Not Logged

Jul 7, 2000

Error 18456 will not write to the NT Event Log. I have made sure that it is set up to always write to the Windows NT Event log, but when the error occurs there is not entry in the log.
Other errors log just fine, but this one does not.

Has anyone had this problem?

TIA
Paul

View 2 Replies View Related

How To Specify "NON-LOGGED" DTS Operation

Jun 4, 2001

On SQL 2k, How can I set my DTS package, which imports a 3 million row .TXT file to a table, as a NON-LOGGED operation?

(LOGGING is taking tooooo long!! I will be sure to run a full DB backup when the job completes.)

thx-
BT

View 1 Replies View Related

Logged Operation

Dec 14, 2007

Can anybody explain whether Delete and Truncate are Logged Operations?

On some site, I came accross Truncate is not Logged Operation, on some site, Truncate is Logged Operation.

Can anybody explain, what exactly it is?

Thanks in advance,

Mahesh

View 2 Replies View Related

Is User Logged-on?

Jul 23, 2005

Dear GroupI wondered whether there's a function or script that will show mewhether a user is currently logged-on to a MSSQL 2000 database? I'musing SQL Authentication.Thanks very much for your help & efforts!Have a nice day!Martin

View 2 Replies View Related

Users Logged In

Sep 28, 2007

Is there a way in 2005 to tell what user is logged into what databaseon the SQL Server?thanks,Scott

View 3 Replies View Related

Not Logged In With Appropriate Permissions

Jan 11, 2008

I'm trying to run the SDK Quickstart, but it keeps terminating due to login and permissions problems. It doesn't elaborate. I'm running SQL Express and SDK 2.0

View 4 Replies View Related

Is A Dbcc Dbreindex Logged?

Jan 5, 2001

If I reindex tables on a production server and dump the transaction log then load that tran log to a
warm standby server --will the indices be rebuilt on the standby server? My guess is no,
but I've heard people say otherwise.

--jen

View 1 Replies View Related

Does Index Defrag Get Logged?

Sep 15, 2006

I've noticed a huge transaction log size after having run an
index defragmentation. Does a defrag get written to the transaction
log really? (Assuming the full recovery model.)

View 1 Replies View Related

Non-logged Delete Of Records???

Nov 1, 2006

I have a database in Simple mode from which I wish to delete several million rows of one table (not all rows so 'TRUNCATE TABLE' is no good), without making the transaction log file grow to several GB in size. Any ideas??? I'm almost at the point where I might create a new table and copy the records I want to keep instead...
Thanks, Simon.

View 2 Replies View Related

Stopping Transactions Being Logged

Mar 28, 2004

Hi,

I have searched google and have found no real answer to this....

We are creating a database to support an application which is loading in data as part of the cutover from their current db to SQL Server.

The datafile is around 56GB and when the data processing occurs, as its not just inserts, the transaction logs fills out to around 65GB, and probably more, just that we ran out of space. So question is, is there a workaround for stopping the logging of this processing at all. I have seen that bulk-logged mode may be used, but the option with TABLOCK must be used, and there is no way to get hands on code which performs this processing.

Is there a way to turn off transaction loggin at any point?

Thanks,
Jim

View 7 Replies View Related

SQL Users Logged In Report

Feb 15, 2006

Hi

I need to get a report that tells me the no. of users logged on to the SQL Server (this has to be an hourly report)

Will this do



WHILE 1=1
BEGIN
Select Hostname,getdate() from sysprocesses
WAITFOR DELAY '00:59:00'
END
GO


Will it have any bad affects on the SQL Server


Or can someone plz let me knw how to get that


Thanks

View 3 Replies View Related

Can't See Job Details Unless Logged Into Server.

Jul 6, 2007

I open up the SQL Server Agent Job window, and I can't see details under the General, Steps, Schedules, or other tabs unless I am running SSMS directly on that server. So much for remote management, eh?
Anybody else experiencing this problem?
Anybody else notice that jobs may fail to complete correctly without raising any errors or logging any issues?
Anybody else remember when, a year ago, SQL Server was a good product?
Anybody think Microsoft is listening?
Anybody? Buehler? Buehler?

e4 d5 xd5 Nf6

View 9 Replies View Related

How To Check How Many Users Logged In

Dec 15, 2007

Hi,
I have a question regarding sqlserver 2005
I am working on a production server.
how to check how many users are logged in currently in sqlserver and
also how to check the session info and memory usage by a paticular user......

View 1 Replies View Related

How To Find Out The Logged In User

Mar 24, 2008

Hi,
I wanted to know How can i find out that with which user i am logged in. Is there any command to find out the same.
( like in oracle, we have command -- showuser, which will return the logged in user of your session).

Thanks in advance.
-- Chetan

View 5 Replies View Related

How To Find Out When A User Last Logged In

Jun 14, 2006

Hi There



I am in the process of cosolidating sql servers.

One of them literally has hundreds of sql logins, obviously i need to clean these up, however i a not sure how to determine when a user last logged in ?

How can i find out the last login date of a user ?

Thanx

View 3 Replies View Related

Select Latest Logged In User

Apr 23, 2007

Hi!
I would like to select the 10 latest logged in users and then display them in a gridview-control....
But Iam not good at SQL, so I would really appreciate if someone could help me to write the select-part for this!!
(I use the database 'ASPNETDB.mdf', which is automatically created by VVD 2005 Express Edition)

View 2 Replies View Related

Get The Currently Logged In User's SQL Role In A Different Database

May 14, 2008

NOTE: I am talking about roles in my sql server - NOT in asp.net. I need to create a stored procedure that retrieves the roles that the currently logged in sql user has for a different database. I have the code that gets the roles for the user, but it only works if the user is in the database. I want to be in one database, and get the roles for a different database. I have tried using USE DATABASE, but this is not allowed in a store procedure.

View 10 Replies View Related

Database List For The Currently Logged In User

Jul 11, 2004

I can get a list of all databases in SQL Server using

sqlText = "select name from sysdatabases order by name".

How can I get such a list for the currently logged in user only?

Thanks in advance

Harold Hoffman

View 1 Replies View Related

How Do I Refer To The User Logged On To The Database?

Apr 22, 2000

How do I refer to the user logged on to the database?
I can refer to a table as dbo.tblApptDaily,
but how do I refer to
[current user].tblApptDaily?

Create Procedure "prcCreateApptDaily"
as
Create dbo.tblApptDaily
(ID int primary key, ApptTime datetime,
book1 numeric, book_Status1numeric default (0), PN1 varchar (50), ApptID1
int,...LastID int)

View 2 Replies View Related

Switching In And Out Of Bulk Logged Mode

Jul 22, 2004

I sometimes have problems when running index rebuilds due to the tran log growing too big. MS suggest switching the db from full recovery mode to bulk-logged mode fur the duration of the rebuild. Question is, when you switch a db from full recovery to bulk logged, does that invalidate the tran log backups up to that point? When the db is switched back into full-recovery mode, are the following tran log backups still in sequence?

Clive

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved