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

Synchronize a stored procedure between two servers Expand / Collapse
Author
Message
Posted Monday, November 30, 2009 11:01 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, December 4, 2013 7:19 PM
Points: 76, Visits: 73
Comments posted to this topic are about the item Synchronize a stored procedure between two servers
Post #826393
Posted Friday, December 11, 2009 2:57 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, September 13, 2014 12:30 AM
Points: 27, Visits: 470
Interesting idea to copy objects. However, according to SOX, those who have full access to production and development are distinct two groups of people. You cannot push DEV object into PROD like so. (sorry being negative, SOX is good or bad, but if you are not small shop). PROD always refresh DEV so be careful what you push.
I can see the use of any opportunity to push an object, say between two QA platforms, if the script can enhance to do a list of SPs one shot.


Jason
http://dbace.us
Post #833234
Posted Tuesday, December 15, 2009 4:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, August 12, 2013 11:39 PM
Points: 44, Visits: 116
Nice stored procedure to synchronize but its not Synchronize GRANT permission. So can you tell me how to synchronize with GRANT permission.
Post #834397
Posted Tuesday, December 15, 2009 10:04 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 1:46 PM
Points: 79, Visits: 1,331
Your declared sizes are possibly going to cause truncation:

	@ProcedureName VARCHAR(50) = NULL,
@SourceServer VARCHAR(50) = NULL,
@SourceDatabase VARCHAR(50) = NULL,
@TargetServer VARCHAR(50) = NULL,
@TargetDatabase VARCHAR(50) = NULL

maybe declare them as this:

	@ProcedureName sysname = NULL,
@SourceServer sysname = NULL,
@SourceDatabase sysname = NULL,
@TargetServer sysname = NULL,
@TargetDatabase sysname = NULL

info from this link: http://technet.microsoft.com/en-us/library/ms191240.aspx

The sysname data type is used for table columns, variables, and stored procedure parameters that store object names. The exact definition of sysname is related to the rules for identifiers. Therefore, it can vary between instances of SQL Server. sysname is functionally the same as nvarchar(128) except that, by default, sysname is NOT NULL. In earlier versions of SQL Server, sysname is defined as varchar(30).
Post #834624
Posted Tuesday, March 13, 2012 12:48 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, June 16, 2014 9:42 AM
Points: 16, Visits: 40
Nice post!
I would suggest adding the ColId column, from the syscomments table to the #tblTmp table, to ensure reading back the rows from that table in the same order as they were in the syscomments table.

Thanks for sharing your script!

Post #1266238
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse