Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 set serveroutput off

Author  Topic 

pnpsql
Posting Yak Master

246 Posts

Posted - 2011-10-14 : 13:33:56
hi all, i amm new to sql server world, basically i am a oracle developer
i need to know is there any way to not show the state ments like this:

print 'process started'

there is option is oracle that set serveroutput off; that do what i need.

pls help me..

challenge everything

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-14 : 13:49:20
no direct method.
What we usually do is to add a parameter called @msgs or @debug which will be set to default value of 0 and prints will be enclosed with if like

if @debug = 1
print 'process started'

....

so that message will come only if @debug =1 which we pass only during debugging

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-10-14 : 13:55:09
Not sure if this is a direct equivalent or not but you can change your query options - under Results | To Text | there is an option to "Discard results after query executes". I believe that will perform the statement but not present anything in the results pane.

Be One with the Optimizer
TG
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-14 : 13:57:37
quote:
Originally posted by TG

Not sure if this is a direct equivalent or not but you can change your query options - under Results | To Text | there is an option to "Discard results after query executes". I believe that will perform the statement but not present anything in the results pane.

Be One with the Optimizer
TG


will it discard messages tab contents also?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-10-14 : 14:00:52
Yes. But that setting is under the "results to Grid" options. (separate from results to Text)

Be One with the Optimizer
TG
Go to Top of Page

pnpsql
Posting Yak Master

246 Posts

Posted - 2011-10-14 : 14:48:37
is there any command that do it, because how can i do it on server where patches are deployed

challenge everything
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-10-14 : 15:49:20
for unattended installation I think there a way you can perform a "silent" installation? via switch or .ini file or something?

Be One with the Optimizer
TG
Go to Top of Page

jassi.singh
Posting Yak Master

122 Posts

Posted - 2011-10-15 : 05:48:54
You can view result in grid and message tab, your message will be printed in message tab and result will be shown in grid or you can save it in a file

Please mark answer as accepted if it helped you.

Thanks,
Jassi Singh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-15 : 06:10:35
quote:
Originally posted by jassi.singh

You can view result in grid and message tab, your message will be printed in message tab and result will be shown in grid or you can save it in a file

Please mark answer as accepted if it helped you.

Thanks,
Jassi Singh


Was that solution to OPs question?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

plalcheriwt
Starting Member

3 Posts

Posted - 2013-06-24 : 05:27:05
frank zappa posters field mander nonoxynol 9 condoms panasonic th 42pwd6 plastic craft beads [url=http://www.kiplingjpsaleforu.com/]????? ??[/url]
paper cutter blades separation anxiety in children pgl985uc green star 1000 fx2 [url=http://www.sunglassesclubjp.com/]????? ?????[/url]
a call pass the buck scribners rigas doganis seaguar fluorocarbon wood storage sheds prostata massage george rr martin bose wave??a€????? radio ii saturated fat cholesterol [url=http://www.viviennejpbestseller.com/]?????? ???[/url]
revo 3062 heated fan notarial seal paintball sites for sale radio control helicopter
Go to Top of Page
   

- Advertisement -