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 ««123»»

SSIS – Transfer SQL Server Objects Debugged Expand / Collapse
Author
Message
Posted Friday, April 27, 2007 12:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 16, 2007 5:13 AM
Points: 1, Visits: 2
Super sleuthing. Thanks.
Post #361440
Posted Monday, April 30, 2007 12:41 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 25, 2007 8:35 AM
Points: 3, Visits: 1

I ran into the same issue using Microsoft's SMO objects in C#.  I opened a case with Microsoft and they confirmed that there was a bug.  As you discovered, the problem is that when you rename an object whose definition is contained in sys.sql_modules the object gets renamed in sys.objects, but the source code is not modified in sys.sql_modules.

Interestingly, the people responsible for SQL Server Management Studio have "fixed" the problem in their code.  Whenever you script a stored procedure through the right-click menus the new (correct) name appears in the script even though the old name appears in the sys.sql_modules record for that stored procedure.  Apparently, they rebuild the definition line up to the AS keyword and then concatenate the rest of the script from sys.sql_modules.  What a kludge!!!

Why not fix the underlying problem?  When you rename an object whose definition appears in sys.sql_modules, replace the old name with the new name in the object definition script in sys.sql_modules!

Post #362084
Posted Tuesday, May 15, 2007 9:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 25, 2014 12:51 PM
Points: 5, Visits: 87

From SQL server books online:

http://msdn2.microsoft.com/en-us/library/aa214392(sql.80).aspx

Topic: Modifying and Renaming a Stored Procedure

Note  Renaming a stored procedure does not change the name of the stored procedure in the text of the procedure's definition. To change the name of the stored procedure in the definition, modify the stored procedure directly.




Post #366035
Posted Wednesday, November 28, 2007 1:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, January 30, 2008 3:08 AM
Points: 8, Visits: 6
hey that's really great both writer and package :).

I used it and customized according to my needs but one thing where i am going to tuck is how i can transfer Table with all of its elements like defaults,constrains,clustered and nonclustered indexes , primray and without data , how i can generate script for tables this pkg only does for stored procedures and functions i try my best to do it through MS pakage but unable to it its internal bugg .

Reply Soon ,

Thanks in advance;)
Post #426729
Posted Tuesday, April 8, 2008 9:22 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 7:31 AM
Points: 81, Visits: 371
Thanks for the article. I too have wondered about the 'features' that Microsoft has in their SSIS objects. I just completed my first large SSIS project and ran into similar (although different) problems. I had thought about doing an article similar to yours, but you beat me to it.

I agree with your views on how Microsoft could release code for us developers to debug. Makes you really wonder about their QA staff and if they have anybody on the QA side that knows how businesses really operate.

Cheers,
Mike Byrd


Mike Byrd
Post #481669
Posted Tuesday, April 8, 2008 11:01 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 30, 2014 10:08 PM
Points: 1,038, Visits: 444
Good article. I've always as a matter of habit scripted drop & create commands because of the potential problems they may cause but, over time, had forgotten exactly why I started doing it :) Good article! I'm not really well versed in SSIS but have occasionally used the copy tasks with mixed results - at least I can keep this in mind when using it.

Also, you cannot really disable sp_rename because it's used by SQL Server diagram schema saving code generation (I'm sure it has a better name than that!) extensively. If you change the schema of a table it creates a table with a similar name and the new schema, transfers the data, drops the old table, renames the new table and recreates referential integrity, etc. If sp_rename was crippled then you'd run into interesting issues :)



Post #482046
Posted Wednesday, June 4, 2008 1:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, May 5, 2012 11:43 PM
Points: 1, Visits: 35
:) Many Thanks.
Post #511175
Posted Friday, July 4, 2008 4:11 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 7:48 AM
Points: 1,221, Visits: 1,433
:) At last! the answer to Transfer Server Objects

Set CopySchema to True!

Many thanks I've been looking for this for a while.
Post #528587
Posted Wednesday, October 29, 2008 3:59 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 29, 2008 3:50 PM
Points: 1, Visits: 1
Steve, Well done!!!

I am not a SQL developer at all but have been forced into this because I have 3GL background LOL and appearently overly ambitious. So I have a new 2005 database going live in two months and have to create a monthly migration package. I am learning SSIS on my own because my Company cannot afford training. Enough of my sad story. I have some questions on your diagram because I need to do the same thing and I got the same errors and I want to make it dynamic like yours. I have questions on the Looping and passing the list of objects from the storage to the DROP FOR LOOP.

I hate beg but if you have a moment you might be able to get me on the right track.

My name is Steve Cogan
My email is scogan@zoomtown.com if you are intested in answering some questions send me an email and I will email back.

Sincerely,

Steve Cogan
Post #593983
Posted Monday, January 5, 2009 11:07 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, July 27, 2010 11:05 AM
Points: 38, Visits: 35
Microsoft took an intuitive, easy-to-use tool (DTS), and turned into a needlessly complicated, buggy disaster called SSIS. I believe Microsoft has completely lost touch with who their customers really are. Most SQL Server users are people like me, who work on multiple projects with tight budgets and timelines. I need a tool that solves the most common problems quickly, reliably, and intuitively. SSIS is not intuitive, is not easy to use, and is buggy and unreliable.

Granted, there are a handful of SQL Server uber-studs (and studettes) who need obscure programming features and capabilities that I could probably not even dream up. However, that is a small percentage of the SQL Server user community. The rest of us need to accomplish the most common tasks quickly.

I sincerely hope that Microsoft would get re-focused on the real users of SQL Server, and make SSIS usable for for the broad community of users.
Post #630008
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse