﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Discuss content posted by vinaykumar / Article Discussions by Author  / Copy Multiple objects from One Schema to Another Schema / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 02:30:07 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Copy Multiple objects from One Schema to Another Schema</title><link>http://www.sqlservercentral.com/Forums/Topic1183537-576-1.aspx</link><description>Hi Arju,Sorry for reply to0 late. Please check the below link. this will help you. http://www.sqlservercentral.com/scripts/T-SQL/97571/I have also create different kind of scripts related to copy objects from one schema to another schema. You can check my other scripts.</description><pubDate>Thu, 28 Mar 2013 23:34:27 GMT</pubDate><dc:creator>Danny Ocean</dc:creator></item><item><title>RE: Copy Multiple objects from One Schema to Another Schema</title><link>http://www.sqlservercentral.com/Forums/Topic1183537-576-1.aspx</link><description>Really it's a nice and useful articles. Practically it solved my issue and saved my time.I have a question again... Can we move one table \ multiple tables from one schema to multiple schemas along with all the properties (identiy column, default values, primary key, Cluster and non-cluster indexes)Again this will save my time lot.Thanks,Mallikarjun</description><pubDate>Wed, 04 Apr 2012 18:55:39 GMT</pubDate><dc:creator>Arju</dc:creator></item><item><title>RE: Copy Multiple objects from One Schema to Another Schema</title><link>http://www.sqlservercentral.com/Forums/Topic1183537-576-1.aspx</link><description>Mehernosh, Thank for your suggestion !!! :-)</description><pubDate>Tue, 04 Oct 2011 02:17:23 GMT</pubDate><dc:creator>Danny Ocean</dc:creator></item><item><title>RE: Copy Multiple objects from One Schema to Another Schema</title><link>http://www.sqlservercentral.com/Forums/Topic1183537-576-1.aspx</link><description>Hi Vinay, nice script. Liked both your scripts for objects copying across schemas. Just wanted to share this other way to add SQL objects to multiple database on a server.[code="other"]http://www.sqlservercentral.com/Forums/Topic1168030-9-1.aspx[/code]If you wanted to add a SQL table or view or any SQL object to multiple database on your server and do not want to execute the script over and over again in all the multiple databases than the following SQL script can be used.There have been instances where I had to add a stored procedure or a table in multiple client database as a part of the schema change process and this script has come in handy.[code="sql"]--ADD SQL OBJECTS(TABLES, VIEWS, SPS, UDFS ET AL) TO ALL THE DATABASES ON THE SERVER. PRINT '##### BEGIN DB SCRIPT ##### 'EXEC SP_MSFOREACHDB 'USE [?]IF ''?'' NOT IN (''MASTER'', ''MODEL'', ''MSDB'', ''TEMPDB'', ''ADVENTUREWORKS'' )BEGINIF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = ''MYTABLE'')BEGINCREATE TABLE [DBO].[MYTABLE](COLUMN_1 VARCHAR(50) NULL, COLUMN_2 DATETIME NULL)PRINT '' TABLE CREATED IN DATABASE ('' + DB_NAME() + '')''ENDELSEPRINT '' TABLE PRESENT IN DATABASE ('' + DB_NAME() + '')''END 'PRINT '##### DB SCRIPT COMPLETED #####'[/code] :-)Regards,</description><pubDate>Tue, 04 Oct 2011 00:52:51 GMT</pubDate><dc:creator>Mehernosh</dc:creator></item><item><title>Copy Multiple objects from One Schema to Another Schema</title><link>http://www.sqlservercentral.com/Forums/Topic1183537-576-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/75911/"&gt;Copy Multiple objects from One Schema to Another Schema&lt;/A&gt;[/B]</description><pubDate>Thu, 29 Sep 2011 23:52:15 GMT</pubDate><dc:creator>Danny Ocean</dc:creator></item></channel></rss>