Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Creating a Script from a Stored Procedure Expand / Collapse
Author
Message
Posted Thursday, April 24, 2003 12:00 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, May 29, 2012 11:22 AM
Points: 1,755, Visits: 4,652
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/rrandall/creatingascriptfromastoredprocedure.asp


Ryan Randall

Solutions are easy. Understanding the problem, now, that's the hard part.
Post #11674
Posted Thursday, May 1, 2003 10:06 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, November 18, 2003 12:00 AM
Points: 60, Visits: 1
This is probably just a button for me, but I'd like Ryan to stay away from single letter variables. 'i' and 'q' don't tell me that much. Even if he uses iSuccess, it would be of help.

Handy content, though.






Post #60474
Posted Tuesday, May 4, 2004 6:55 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, October 24, 2004 11:43 PM
Points: 154, Visits: 1

Very good content. Help me a lot especially in debugging and printing reports directly from store procedures.

One question. Is the method sp_OAXXXXX create security issues, such as the person need certain special rights, such as belongs to sysAdmin?





Regards,
kokyan
Post #114400
Posted Thursday, June 17, 2004 6:40 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Sunday, July 8, 2007 8:40 AM
Points: 50, Visits: 1

Thanks for the detailied method.  I am constantly creating scripts from existing stored procs, but have always opened the proc in Query Analyzer and simply cut and pasted into a text document, or saved the query as a new file.

I'm curious as to when the need for this would arise.

Thanks

Post #121570
Posted Thursday, September 13, 2007 12:39 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, September 15, 2014 5:04 PM
Points: 469, Visits: 264

I came across this article while looking for a size limit on the sp_OAMethod output vaiable.  It turns out that the 255 character limit that Ryan had in this article has been increased to at least 4000 bytes.  See link http://support.microsoft.com/kb/325492.

The answer to the prior to posts (which I realize are old, but again in case some else comes to this article) are:

1) The sp_OA% procedures are in the master database and are not granted execute to anyone other that master dbo (basically sysadmin).  You would either need to grant execute to these procedures to a user or role and add the user to master (or you could use public), or create the calling procedure (Ryan's proc) in master and just grant access to this calling procedure and the permissions should then inherit correctly since it is all within a single DB.

2) The reason you would do something like this in a procedure rather than copy/paste from a query window is if you were executing this as a batch job and not interactively.

 

Post #399085
Posted Friday, September 14, 2007 3:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 4:15 PM
Points: 1, Visits: 154

What would be the right Script ID to be used in order to create a script that alters the existing SP Code?

Thanks

Post #399217
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse