Home > Archive > ASE Database forum > April 2005 > Message suppression









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Message suppression
Jerry

2005-04-21, 8:24 pm

Hello,

Within a stored procedure, is there a way to suppress (or automatically
respond "yes" to) any information message dialog boxes that pop up so
that the procedure can run unattended?

Thanks,

Jerry


Michael Peppler

2005-04-22, 3:24 am

On Thu, 21 Apr 2005 15:02:39 -0700, Jerry wrote:

> Hello,
>
> Within a stored procedure, is there a way to suppress (or automatically
> respond "yes" to) any information message dialog boxes that pop up so that
> the procedure can run unattended?


No.

But then a stored procedure can't normally generate a popup (or any form
of user interaction) directly, so I'm not sure what part of your system
is generating these message dialog boxes.

Michael
--
Michael Peppler [TeamSybase] mpeppler@peppler.org - http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html


Jerry

2005-04-22, 1:24 pm

The message appears when we run a dumptrans stored procedure
we created. It states:

"Line:1
Backup Server session id is: 51. Use this value when executing the
'sp_volchanged' system stored
procedure after fulfilling any volume change request from the Backup Server.
Continue?"

And here is the stored procedure:

create procedure dba_ucsb_dumptrans
@dbname varchar(30)=null,
@segmentname varchar(30)=null,
@space_left int=null,
@status int=null
as
begin
declare
@dirname varchar(255),
@filename varchar(255),
@timestr varchar(80)

if @dbname=null
select @dbname='advprod'

if not exists (select * from master..sysdatabases
where name = @dbname)
begin
print 'Database %1! is unknown in this Server.',@dbname
return
end

select
@dirname = 'F:/translog_dumps/',
@timestr =
convert(char(4),date
part(yy,getdate()))+

right('00'+convert(c
har(2),datepart(mm,g
etdate())),2)+
right('00'+datename(
dd,getdate()),2)+
right('00'+datename(
hh,getdate()),2)+
right('00'+datename(
mi,getdate()),2)+
right('00'+datename(
ss,getdate()),2)

select
@filename = @dirname+@timestr+'.'+@dbname+'.logdump'

print 'Dumping Database %1! to %2!', @dbname, @filename

dump tran @dbname to @filename

end

Jerry


"Michael Peppler" <mpeppler@peppler.org> wrote in message
news:pan.2005.04.22.05.17.47.670433@peppler.org...
> On Thu, 21 Apr 2005 15:02:39 -0700, Jerry wrote:
>
that[color=darkred]
>
> No.
>
> But then a stored procedure can't normally generate a popup (or any form
> of user interaction) directly, so I'm not sure what part of your system
> is generating these message dialog boxes.
>
> Michael
> --
> Michael Peppler [TeamSybase] mpeppler@peppler.org -

http://www.peppler.org/
> Sybase DBA/Developer
> Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
>
>



Bret Halford

2005-04-22, 1:24 pm

But how are you executing the stored procedure? The standard
isql utitlity, for instance, does not raise popups - it simply reports
the message and keeps on going.

-bret


Jerry wrote:
[color=darkred]
> The message appears when we run a dumptrans stored procedure
> we created. It states:
>
> "Line:1
> Backup Server session id is: 51. Use this value when executing the
> 'sp_volchanged' system stored
> procedure after fulfilling any volume change request from the Backup Server.
> Continue?"
>
> And here is the stored procedure:
>
> create procedure dba_ucsb_dumptrans
> @dbname varchar(30)=null,
> @segmentname varchar(30)=null,
> @space_left int=null,
> @status int=null
> as
> begin
> declare
> @dirname varchar(255),
> @filename varchar(255),
> @timestr varchar(80)
>
> if @dbname=null
> select @dbname='advprod'
>
> if not exists (select * from master..sysdatabases
> where name = @dbname)
> begin
> print 'Database %1! is unknown in this Server.',@dbname
> return
> end
>
> select
> @dirname = 'F:/translog_dumps/',
> @timestr =
> convert(char(4),date
part(yy,getdate()))+

> right('00'+convert(c
har(2),datepart(mm,g
etdate())),2)+
> right('00'+datename(
dd,getdate()),2)+
> right('00'+datename(
hh,getdate()),2)+
> right('00'+datename(
mi,getdate()),2)+
> right('00'+datename(
ss,getdate()),2)
>
> select
> @filename = @dirname+@timestr+'.'+@dbname+'.logdump'
>
> print 'Dumping Database %1! to %2!', @dbname, @filename
>
> dump tran @dbname to @filename
>
> end
>
> Jerry
>
> "Michael Peppler" <mpeppler@peppler.org> wrote in message
> news:pan.2005.04.22.05.17.47.670433@peppler.org...
> that
> http://www.peppler.org/

Jerry

2005-04-22, 1:24 pm

It is being executed in the PowerBuilder 8.0.4 database painter:

"exec dba_ucsb_dumptrans;"

Jerry

"Bret Halford" <bret@sybase.com> wrote in message
news:426936C6.B4C4687B@sybase.com...
> But how are you executing the stored procedure? The standard
> isql utitlity, for instance, does not raise popups - it simply reports
> the message and keeps on going.
>
> -bret
>
>
> Jerry wrote:
>
Server.[color=darkred]
automatically[color=
darkred]
so[color=darkred]
form[color=darkred]
system[color=darkred
]
>



Mark K

2005-04-22, 8:24 pm

Since PB is doing the popup, the stored procedure has no control over it.
I'm guessing you aren't really running this in the painter, but in a PB app.
The PB app is getting the message back and calling MessageBox to display it.
You could change the PB app to ignore these messages and not display the
message box.

Mark Kusma
http://www.sybase.com/support/about...t/otherservices


"Jerry" <jerry@ia.ucsb.edu> wrote in message news:426937d0$1@foru
ms-2-dub...
> It is being executed in the PowerBuilder 8.0.4 database painter:
>
> "exec dba_ucsb_dumptrans;"
>
> Jerry
>
> "Bret Halford" <bret@sybase.com> wrote in message
> news:426936C6.B4C4687B@sybase.com...
> Server.
> automatically
> so
> form
> system
>
>



Jerry

2005-04-25, 11:23 am

We are running it in the "ISQL Session" tab in the PowerBuilder Database
painter, not from within a PowerBuilder application.

Jerry


"Mark K" <xxxx> wrote in message news:42695d33$1@foru
ms-2-dub...
> Since PB is doing the popup, the stored procedure has no control over it.
> I'm guessing you aren't really running this in the painter, but in a PB

app.
> The PB app is getting the message back and calling MessageBox to display

it.
> You could change the PB app to ignore these messages and not display the
> message box.
>
> Mark Kusma
> http://www.sybase.com/support/about...t/otherservices
>
>
> "Jerry" <jerry@ia.ucsb.edu> wrote in message

news:426937d0$1@foru
ms-2-dub...
up[color=darkred]
any[color=darkred]
>
>



mdchachi

2005-04-27, 11:24 am

The solution is to stop running this from PowerBuilder (or
see if PowerBuilder has a message suppression option).
There's nothing you can do from within the stored procedure.


> We are running it in the "ISQL Session" tab in the
> PowerBuilder Database painter, not from within a
> PowerBuilder application.
>
> Jerry
>
>
> "Mark K" <xxxx> wrote in message
> guessing you aren't really running this in the painter,
> but in a PB app.
> MessageBox to display it.
> news:426937d0$1@foru
ms-2-dub...
> news:pan.2005.04.22.05.17.47.670433@peppler.org... On Thu,
> dialog boxes that pop up
> generate a popup (or any
>
>

Mark K

2005-04-28, 7:24 am

Jerry,

Your original post says that you want to be able to run this unattended. You
can't run queries from the ISQL Session in unattended mode. You would have
to put that query into a PB application, which can then trap the messages
and not display a message box.

Mark Kusma
http://www.sybase.com/support/about...t/otherservices


"Jerry" <jerry@ia.ucsb.edu> wrote in message news:426d1d64@forums
-1-dub...
> We are running it in the "ISQL Session" tab in the PowerBuilder Database
> painter, not from within a PowerBuilder application.
>
> Jerry
>
>
> "Mark K" <xxxx> wrote in message news:42695d33$1@foru
ms-2-dub...
it.[color=darkred]
> app.
> it.
> news:426937d0$1@foru
ms-2-dub...
reports[color=darkre
d]
Backup[color=darkred
]
pop[color=darkred]
> up
> any
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com