June 20, 2011 at 11:36 am
Hello guys,
I have to copy objects between 2 schemas of 2 databases. I need to select all the objects within schema and BIDS does not give any option of selecting all the tables within schema or selecting all the procedures within a schema. Right now I need to select all the objects manually as there are multiple schemas in my source database. If any one has got any ideas for automating this task, it will be really helpful.
Thanks,
Nick
June 25, 2011 at 6:09 pm
Have you looked at the XML of the package? It might be as easy as creating and adding your own XML nodes to the file. If it looks doable you can write some T-SQL queries with some string manipulation against your database's sys.tables to select out the needed XML.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
June 27, 2011 at 2:30 pm
You can also look at the INFORMATION_SCHEMA.TABLES to find all tables in a schema. The challenge is finding all OBJECTS in a schema. (Tables, Procedures, Views, etc.) I've had a lot of fun looking thru and finding stuff in INFORMATION_SCHEMA. In fact, I use it for the IF TABLE EXISTS statements when I have to create a new table.
Greg Roberts
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply