Re: SMSS - script to new window uses sp_executesql?!



That's odd, I can only replicate the behavior by using the 'Generate
Scripts' wizard.

Even if the setting it [True] in the Generate Scripts wizard, right-clicking
on the object and scripting to a new windows as CREATE does NOT replicate.

Hummm...

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


"KJ" <n_o_s_p_a__m@xxxxxxxx> wrote in message
news:1164995357.600708.144770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am not using the Wizard, only right-clicking the proc name under
Programmability->Stored Procedures

Arnie Rowland wrote:
Thanks, I have not used the Wizard to script individual procedures, so I
had
not seen that behavior.

If you just right click on the procedure, and select script to new window
as
CREATE, it does not happen there as you describe -only on the wizard.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to
the
top yourself.
- H. Norman Schwarzkopf


"KJ" <n_o_s_p_a__m@xxxxxxxx> wrote in message
news:1164993819.213218.103340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Set the IF NOT EXISTS scripting option to true, then right-click any sp
and choose:

Script Stored Procedure as->Create to->New query editor window.


Arnie Rowland wrote:
What you are describing is not the normal behavior.

Please tell us exactly what you do, step by step, in order to this
kind
of a
script.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer
to
the
top yourself.
- H. Norman Schwarzkopf


"KJ" <n_o_s_p_a__m@xxxxxxxx> wrote in message
news:1164984736.958544.17310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is there any way to get the old "script to new window as" instead of
the new style that uses:

EXEC dbo.sp_executesql @statement = N'ALTER PROCEDURE
[dbo].[usp_GetSeri...

I can't believe this is the only way to script a proc to a query
window...





.



Relevant Pages

  • Re: SMSS - script to new window uses sp_executesql?!
    ... I am not using the Wizard, only right-clicking the proc name under ... it does not happen there as you describe -only on the wizard. ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ...
    (microsoft.public.sqlserver.tools)
  • Re: SMSS - script to new window uses sp_executesql?!
    ... Thanks, I have not used the Wizard to script individual procedures, so I had ... it does not happen there as you describe -only on the wizard. ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ...
    (microsoft.public.sqlserver.tools)
  • Re: ANSI Standards
    ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... can script out the entire database and all object into one ... the set fips option and then just parse the entire script. ...
    (microsoft.public.sqlserver.tools)
  • Re: SMSS - script to new window uses sp_executesql?!
    ... Set the IF NOT EXISTS scripting option to true, ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... I can't believe this is the only way to script a proc to a query ...
    (microsoft.public.sqlserver.tools)
  • Re: transfering users
    ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... I need to replace the existing database with the new database but keep all ... Is there a script that can be used to script ...
    (microsoft.public.sqlserver.security)

Loading