August 7, 2003 at 6:44 am
hi
Could someone please tell me how I can kill user connection by using SQL agent job or any auto job?
It because we have backup plan which runs every morning 12am. Some of our developers doesn't like to shutdown the their computer and even SQL Enterprise Manager they just locked the computer and go home. Result is back plan fail to proceed as someone got connection to database but they not using it.
That was the reason I am looking if I could kill all user process at 11pm every night. Is it possible??
August 7, 2003 at 6:52 am
How do you perform the backup? If it is SQL Server backup with backup database command, It doesn't matter whether you have users connecting to the database.
What error message did you receive when your backup plan failed?
August 7, 2003 at 6:59 am
thanks for your reply.
i have database maintenance plans which run automatically 12am. Management|Current Activity|Database Maintenance Plans. when it fails it sql sent email to me that backup plan could run last night.
Is it the right way to do backup plans?
Could you please recommand more effisient way to do back up plans (i need to do 12am)
August 7, 2003 at 7:18 am
I guess you choose 'database integrity check' option with 'attempt to fix any minor error' in your maintenance plan, Can you comfirm that?
August 7, 2003 at 7:21 am
'database integrity check' not been selected in my backup plans.
August 7, 2003 at 7:47 am
I think there is a script in the script library that will kill all connections in a database. Just search for kill users, or something like that. If you can't find one, I've got one.
Tom
August 7, 2003 at 7:53 am
sorry couldn't find any thing which help kill users. could you pass me one if you have, thank you
August 7, 2003 at 8:11 am
Enable 'text report' by going plan properties --> reporting tab --> check 'write report to a text file ...', rerun the job --> review the text report to see any useful information.
August 7, 2003 at 9:40 am
I found the script out there. Search for "Kill all Connections".
That should do you.
Thanks Tom
August 7, 2003 at 10:17 am
i will try this.
thanks to everyone who reply me.
August 7, 2003 at 10:18 am
Kill the user's connection is not the solution to resolve the backup failure. We are running 7X24 and get backup done well.
August 7, 2003 at 11:38 am
I agree, I usually write my own scripts to do backups and dbcc's, and have never run into a problem with backing up the database. I would profile the machine when the job kicks off and see what is actually happening.
Tom
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply