[MS SQL Server] SELECT INTO running for 22 hours |
SELECT INTO running for 22 hours Posted: 06 Sep 2013 03:55 AM PDT Some executed a SELECT INTO and it has been running for 22 hours.He was running an SSIS Package and he tried to stop it. SSIS did not respond so he killed the package so it retained the connection.It involves a large number of record. I replaced the columns with a COUNT(*) and I got an overflow on a int column.It is impacting other processes.If I kill the SPID it will go into a rollback for at least 22 hours.Any ideas on a safe course of action? |
How to fix Logon trigger issue Posted: 05 Sep 2013 07:32 AM PDT hi,I have this trigger (see below) and I get the login failure due to trigger execution (SQL error 17892) every time I try to login. If I drop the trigger (drop trigger <trigger name> on all server) the error is gone but I need to have that trigger and also need the user's to log in.Can anyone look at the code and help me to fix the trigger so that I can use that trigger to capture login information into that table.create trigger [Tr_ServerLoginAudit]on all server for logonasbeginINSERT INTO PG_LoginAuditselect @@SPID, SYSTEM_USER, HOST_NAME(), HOST_ID(), CURRENT_TIMESTAMP, APP_NAME (), DB_NAME()ENDGOthanks |
Posted: 18 Aug 2011 02:39 AM PDT Hello All,I'm running SQL 2008 R2. I have an intermediate issue with my backup for this one database. Some days the backup completes successfully with no problem and other days - could be 3 or 4 in a row - the backup fails with the following error:Executed as user: NT AUTHORITY\SYSTEM. Cannot open backup device 'F:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\SMS.BAK'. Operating system error 32(The process cannot access the file because it is being used by another process.). [SQLSTATE 42000] (Error 3201) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.The command used to backup the database is:BACKUP DATABASE [SMS] TO DISK = N'F:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\SMS.BAK' WITH NOFORMAT, INIT, NAME = N'SMS- Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10GOIs there any way to determine what that process is that is preventing the backup from occurring? Or are there any suggestions on how I can ensure that the backup device isn't causing an issue with the backup?Let me know if you have any questions.Thanks in advance for your help.Ronnie |
You are subscribed to email updates from SQLServerCentral / SQL Server 2008 / SQL Server 2008 Administration To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment