Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

SHUTDOWN is waiting for processes to complete

7 posts in Product Futures Discussion Last posting was on 2003-04-03 19:53:31.0Z
patrick Posted on 2003-04-01 17:21:01.0Z
From: "patrick" <dont@spam.com>
Subject: SHUTDOWN is waiting for processes to complete
Date: Tue, 1 Apr 2003 19:21:01 +0200
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <OqY24OH#CHA.334@forums-2-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: mtb.eins-und-eins.de 212.227.34.190
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1099
Article PK: 95340

1> shutdown
2> go
SHUTDOWN is waiting for 9 process(es) to complete.

well, i would really like to know which ones!

--
pat


Sherlock, Kevin Posted on 2003-04-01 17:46:01.0Z
Message-ID: <3E89D04D.E958E092@qwest.com.nospam>
Date: Tue, 01 Apr 2003 11:46:01 -0600
From: "Sherlock, Kevin" <ksherlo@qwest.com.nospam>
Reply-To: ksherlo@qwest.com.nospam
Organization: QWEST Wireless
X-Mailer: Mozilla 4.79 (Macintosh; U; PPC)
X-Accept-Language: en,pdf,ko
MIME-Version: 1.0
Subject: Re: SHUTDOWN is waiting for processes to complete
References: <OqY24OH#CHA.334@forums-2-dub>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: np45.qwest.com 155.70.39.45
Lines: 6
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1100
Article PK: 95338

exec sp_who
shutdown
go

patrick wrote:
>
> 1> shutdown
> 2> go
> SHUTDOWN is waiting for 9 process(es) to complete.
>
> well, i would really like to know which ones!
>
> --
> pat


patrick Posted on 2003-04-01 18:00:53.0Z
From: "patrick" <dont@spam.com>
References: <OqY24OH#CHA.334@forums-2-dub> <3E89D04D.E958E092@qwest.com.nospam>
Subject: Re: SHUTDOWN is waiting for processes to complete
Date: Tue, 1 Apr 2003 20:00:53 +0200
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <OiWU#jH#CHA.266@forums-1-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: mtb.eins-und-eins.de 212.227.34.190
Path: forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1101
Article PK: 95341

hm, i dont get it
i can exec sp_who before or after submitted shutdown
but still it would show more processes than it is waiting for
cant shutdown say "waiting for spid(s) 123, 234, 345" ?
in my case there are far more than 100 running processes - how to
distinguish?

Kevin Sherlock wrote:
> exec sp_who
> shutdown
> go
>
> patrick wrote:
> >
> > 1> shutdown
> > 2> go
> > SHUTDOWN is waiting for 9 process(es) to complete.
> >
> > well, i would really like to know which ones!


Bret Halford Posted on 2003-04-01 19:37:05.0Z
Message-ID: <3E89EA61.B5326CE9@sybase.com>
Date: Tue, 01 Apr 2003 12:37:05 -0700
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: SHUTDOWN is waiting for processes to complete
References: <OqY24OH#CHA.334@forums-2-dub> <3E89D04D.E958E092@qwest.com.nospam> <OiWU#jH#CHA.266@forums-1-dub>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: vpn-dub-178.sybase.com 10.22.120.178
Lines: 21
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1102
Article PK: 95344

As a starter, you can eliminate the ones that are in status "awaiting
command".

If you do a select from sysprocesses rather than exec sp_who, you could
filter the output to eliminate "awaiting command" and system processes.


-bret

patrick wrote:
>
> hm, i dont get it
> i can exec sp_who before or after submitted shutdown
> but still it would show more processes than it is waiting for
> cant shutdown say "waiting for spid(s) 123, 234, 345" ?
> in my case there are far more than 100 running processes - how to
> distinguish?
>
> Kevin Sherlock wrote:
> > exec sp_who
> > shutdown
> > go
> >
> > patrick wrote:
> > >
> > > 1> shutdown
> > > 2> go
> > > SHUTDOWN is waiting for 9 process(es) to complete.
> > >
> > > well, i would really like to know which ones!


patrick Posted on 2003-04-02 15:52:26.0Z
From: "patrick" <dont@spam.com>
References: <OqY24OH#CHA.334@forums-2-dub> <3E89D04D.E958E092@qwest.com.nospam> <OiWU#jH#CHA.266@forums-1-dub> <3E89EA61.B5326CE9@sybase.com>
Subject: Re: SHUTDOWN is waiting for processes to complete
Date: Wed, 2 Apr 2003 17:52:26 +0200
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <e3sJECT#CHA.331@forums-2-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: mtb.eins-und-eins.de 212.227.34.190
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1105
Article PK: 95347


Bret Halford wrote
> As a starter, you can eliminate the ones that are in status "awaiting
> command".
>
> If you do a select from sysprocesses rather than exec sp_who, you could
> filter the output to eliminate "awaiting command" and system processes.

what a pain - that's what i do now
since shutdown obviously knows about the processes
why not dbcc traceon() or shutdown with verbose?
it would be so much easier
--
pat


Bret Halford Posted on 2003-04-02 16:40:10.0Z
Message-ID: <3E8B126A.162ECD12@sybase.com>
Date: Wed, 02 Apr 2003 09:40:10 -0700
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: SHUTDOWN is waiting for processes to complete
References: <OqY24OH#CHA.334@forums-2-dub> <3E89D04D.E958E092@qwest.com.nospam> <OiWU#jH#CHA.266@forums-1-dub> <3E89EA61.B5326CE9@sybase.com> <e3sJECT#CHA.331@forums-2-dub>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: bret-pc2.sybase.com 157.133.80.186
Lines: 19
Path: forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1106
Article PK: 95346

How about just creating your own store procedure to do it?

create procedure myshutdown as
print "These spids are active:"
select spid, cmd from master..sysprocesses
where suid > 0
and cmd not like "AWAITING%"
shutdown
go

patrick wrote:
>
> Bret Halford wrote
> > As a starter, you can eliminate the ones that are in status "awaiting
> > command".
> >
> > If you do a select from sysprocesses rather than exec sp_who, you could
> > filter the output to eliminate "awaiting command" and system processes.
> what a pain - that's what i do now
> since shutdown obviously knows about the processes
> why not dbcc traceon() or shutdown with verbose?
> it would be so much easier
> --
> pat


KR Posted on 2003-04-03 19:53:31.0Z
Reply-To: "KR" <zzb26@mail.com.NOJUNK>
From: "KR" <zzb26@mail.com.NOJUNK>
References: <OqY24OH#CHA.334@forums-2-dub> <3E89D04D.E958E092@qwest.com.nospam> <OiWU#jH#CHA.266@forums-1-dub> <3E89EA61.B5326CE9@sybase.com> <e3sJECT#CHA.331@forums-2-dub> <3E8B126A.162ECD12@sybase.com>
Subject: Re: SHUTDOWN is waiting for processes to complete
Date: Thu, 3 Apr 2003 21:53:31 +0200
Lines: 108
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <#Gn#Fth#CHA.185@forums-2-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: m57.net81-65-230.noos.fr 81.65.230.57
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1107
Article PK: 95345

Here is a proc I use quite a bit to see active logins

KR



------------------- sp_whodowhat --------------------------

use sybsystemprocs
go

if exists (select *
from sysobjects
where type = 'P'
and name = 'sp_whodowhat')
begin
print "Dropping sp_whodowhat"
drop procedure sp_whodowhat
end
go

print "Installing sp_whodowhat"
go

create proc sp_whodowhat @login varchar(30) = NULL
as
begin
if @login = NULL -- Show All active logins
select spid ,
convert(varchar(10),sl.name) Login,
convert(varchar(5), sp.status) STATUS,
convert(varchar(8),program_name) PGM,
convert(varchar(7),cmd) CMD ,
convert(varchar(5),blocked) Blocked ,
convert(varchar(18),isnull(object_name(id,dbid),
convert(varchar(18),id)) ) PROC_NAME ,
convert(varchar(5),linenum) Line,
convert(varchar(20),db_name(dbid)) DB
from master..sysprocesses sp, master..syslogins sl
where sp.suid > 0
and sp.suid = sl.suid
AND sp.status != 'recv sleep'
order by 2
else
begin
if suser_id( @login ) = NULL
begin
print "Invalid Login!"
return 0
end

select spid ,
convert(varchar(10),sl.name) Usr_Nm,
convert(varchar(5), sp.status) STATUS,
convert(varchar(8),program_name) PGM,
convert(varchar(7),cmd) CMD ,
convert(varchar(5),blocked) Blocked ,
convert(varchar(18),isnull(object_name(id,dbid),
convert(varchar(18),id)) ) PROC_NAME ,
convert(varchar(5),linenum) Line,
convert(varchar(20),db_name(dbid)) DB
from master..sysprocesses sp, master..syslogins sl
where sp.suid = suser_id( @login)
and sp.suid = sl.suid
AND sp.status != 'recv sleep'
order by 1 desc
end
end
go
grant execute on sp_whodowhat to public
go

"Bret Halford" <bret@sybase.com> wrote in message
news:3E8B126A.162ECD12@sybase.com...
> How about just creating your own store procedure to do it?
>
> create procedure myshutdown as
> print "These spids are active:"
> select spid, cmd from master..sysprocesses
> where suid > 0
> and cmd not like "AWAITING%"
> shutdown
> go
>
>
> patrick wrote:
> >
> > Bret Halford wrote
> > > As a starter, you can eliminate the ones that are in status "awaiting
> > > command".
> > >
> > > If you do a select from sysprocesses rather than exec sp_who, you
could
> > > filter the output to eliminate "awaiting command" and system
processes.
> > what a pain - that's what i do now
> > since shutdown obviously knows about the processes
> > why not dbcc traceon() or shutdown with verbose?
> > it would be so much easier
> > --
> > pat