January 4, 2008 at 9:19 am
Hi,
I am trying to generate create object script from t-sql and came across this undocumented “xp_get_script” procedure, can anybody please tell me how to get the script for a given object by using this procedure?
Thanks,
------------
Prakash Sawant
http://psawant.blogspot.com
January 4, 2008 at 9:39 am
Try this. Its working good for me. Create this proc in you current database.
CREATE PROCEDURE sp_get_script @name sysname
AS
BEGIN
exec master.dbo.xp_get_script @name
END
SQL DBA.
January 4, 2008 at 9:43 am
I have tryed that, but not able to get any script out.
just getting below error.
Msg 22047, Level 16, State 0, Line 0
Error executing xp_get_script extended stored procedure: Specified resource name could not be found
------------
Prakash Sawant
http://psawant.blogspot.com
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy