psKillProcesses

Description

    This process kills user connections to a SQL Server.  You
    can tell whose connections to kill or kill the connections
    attached to certain databases.   Also, you can shutdown
    the SQL Server in an orderly fashion.
    You must have sa_role to run this.

 

Syntax

psKillProcesses -Sserver -Uusername -Ppassword
-Nlogin_name_pattern -Ddatabase_pattern
-Flog_file -Mmax_init_log_size
-Ooptions

 

Arguments

-S

Sybase Server Name

-U

Sybase User Name

-P

Sybase User Password

-N

Select processes with this login name pattern

-A

Select processes which are running this application pattern

-D

Select processes which are using databases with this pattern

-F

Log file

-M

Maximum initialize size of log file in bytes [0]

-O

Options

 

Options

b

Continue even if Backup Server processes are running

d

Make sure all user processes are dead

t

If kill fails, try syb_terminate

s

Shutdown the server if no processes are left

f

Shutdown the server immediately the best way possible

 

Environment Variables Behind the Scenes

DSQUERY

When -S is not specified.

SYB_USER

When -U is not specified.

SYB_PASS

When -P is not specified.

PS_SYSMSG_FILE

Name of the tool's messages file.

 

Shutting Down an ASE Server

To make sure a SQL Server is shutdown, just use -Of.  A -Of will do:
     1.  'kill' on all user processes
     2.  'syb_terminate' on any user processes if (1) fails
     3.  'shutdown' if there are no user processes left
     4.  'checkpoint' in every database and then 'shutdown with nowait' if (3) fails
     However, remember that I will not kill anything if any of your specified
     processes are doing dumps or loads.  Before interrupting a dump or load,
     you must first 'shutdown with nowait' the appropriate Backup Servers.  I
     will not do that for you.   After you shutdown your Backup Servers, then
     you can run psKillProcesses.
     If you want to live dangerously, you can even shutdown the SQL Server
     while processes are dumping or loading.  Do a -Obf.   But if you do this,
     you do it at your own risk.

 

Go to DBPowerSuite 7.9 List of Programs.


Updated: Thu Jun 18 21:12:26 2009