Schemas synchronization script

Hello all,
I need to synchronize 2 oracle schemas on 2 different databases. I need SQL script to perform that from a powerbuilder program. The first schema is on a server database. The second is on a laptop. The user normally connect to the server, but sometimes needs to work outside the office on a database that is on his laptop. So he needs to update the schema on the laptop with data from the server and also post data to server when he come back to office. Can anyone help?
Thanks.

What about [DATA PUMP|http://www.oracle-base.com/articles/10g/OracleDataPump10g.php] ?
Also the link from [Oracle Doc|http://www.oracle.com/technology/products/database/utilities/index.html] .
Hope this will help you. ;)
Regards.
Satyaki De.

Similar Messages

  • SQL Server CE 3.5 SP2 - SQLCE Toolbox / Automated Database Schema Upgrade Scripting / Drop Index

    I am provisioning for automated database schema upgrades in a Windows Forms Application (VS2010/VB) which uses SQL Server Compact 3.5 SP2.  A portion of the schema upgrade procedure uses TSQL commands passed to SQLCE like the following:
    cmd.CommandText = "DROP INDEX [SaleComps$ProjID]"
    cmd.ExecuteNonQuery()
    However, when this command is processed by the SQLCE engine, I get the following error:
    Command: DROP INDEX [SaleComps].[ProjID]
    Error: The specified index does not exist. [ ProjID ]
    But, if I try to recreate the index (or try to change the index column) I get the following errors which indicate that the index is still there:
    Command: ALTER TABLE [SaleComps] ALTER COLUMN [ProjID] nvarchar(20) NULL
    Error: Cannot alter a column that is part of a key or an index. [ Index Name = SaleComps$ProjID,Column = ProjID ]
    Command: CREATE INDEX "SaleComps$ProjID" ON "SaleComps" ("ProjID" ASC)
    Error: The specified index already exists. [ SaleComps$ProjID ]
    Any ideas why this would not be working? Thanks!
    -BGood

    No, I was guessing at the syntax from reviewing other web postings, some of which were in different SQL dialects. 
    While your SQLCE Toolbox did not provide the DROP INDEX command, it did provide most of the "Schema Diff" scripting commands.  In hindsight, maybe SQLCE Toolbox should recognize when schema differences involve a Column which is used in an index, and
    DROP the index before executing the ALTER COLUMN command, then re-CREATE the index with the modified column.
    Despite this shortcoming, I am very thankful for the help provided by SQLCE Toolbox, and learned a little more about SQL scripting in the process.
    Thanks, ErikEJ!
    -BGood

  • Generating schema upgrade scripts

    On our project we're currently using Apache Torque Generator to create schema installation scripts for Oracle, MS SQL Server and DB2 with great success. However, making alterations to the schema and capturing these alterations in patch scripts is still a very manual process.
    Does anyone know of any open source tools that can help with this task? Either by automatically generating the patch scripts (based on comparison of two schemas), or by using some other means of upgrading (such as a java process that runs and makes changes programmatically). The scripts generated (or process run) would ideally be idempotent.
    Cheers,
    Joe

    Take a look at TOAD -quest software-.
    There is a Free edition abvailable where you can do a schema compare from which TOAD generates the SQL.
    I only use it for Oracle, never looked into using it for MySQL or DB2 so don't know about that.
    Message was edited by:
    mTeigeler

  • Create user/schema is script, then tables for that user/schema

    Hi;
    First off, if I phrase this a little wrong - I'm from the Sql Server world and still trying to totally understand Oracle.
    I have a schema (.sql file) that creates my database fine. But what I would liek to add to the .sql schema is for it to create a user and then place all the tables, indexes, sequences, and triggers in as belonging to that created user.
    This way we can tell people to log in as sysop and run the script to create the schema rather than create the user, log in as the user, then run the script.
    What do I need to add?
    thanks - dave

    Hi;
    I have tried:
    CREATE USER DAVE IDENTIFIED BY password;
    CONNECT DAVE/password AS SYSDBA
    I have also tried:
    CONNECT DAVE/password AS SYSTEM
    CONNECT DAVE AS SYSDBA
    CONNECT DAVE
    In all cases ApplicationExpress says it does not recognize the CONNECT command. Should I do something different? What I want to accomplish is that all subsequent commands in the script creating tables, indexes, etc are assigned to the user/schema DAVE.
    thanks - dave

  • Database schema synchronization

    Hello, i am going to maintain any machines with maxdb and synchronization in production, but i am still changing applicacion schema because i am still in development so i will need to be able to change the database schema to the machines in production to newer versions of the database, i am maintaining a catalog in my applicacion subversion repository so i can do diffs between versions, but i have two questions:
    1.- I have to stop synchronization when i am going to do schema changes, no? if i have to do it when i reactivate replication units if table columns have changed, do i have to reconfigure this replications units?
    2.- any utility to do a visual/easy database comparator and synchronizator of schema? i have found many utilities to do it with SQL Server or Oracle but only one that can work with any odbc database (i have not tested it yet but i am doing to do anytime soon, http://www.dbbalance.com)

    Hallo,
    if you rename your source or target schemas you have to stop synchronization and reconfigure the replications units.
    Best Regards
    Wolfgang

  • How to get feedback messages for schema creation script created by Tasks- Generate Script

    I am using sql server 2008 R2. I created a script file by using Tasks->Generate Scripts. I 
    selected option so only create statements are generated for all objects – tables, indexes, views, functions etc in the database.
    Then when I used this generated  script to create objects in another database in SSMS, it created the objects but did
     not give me any feed back, i.e., table created, view created etc. I thought my script did not run , but when I refreshed left panel 
    of SSMS and I can see all created objects.. So question is what  is needed to get 
    feedback when  sql statements are run..

    You need to add the PRINT statements yourself for that. The wizard will not do it for you.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Physical schema synchronization.

    It is possible to click a button and automatically synchronized the physical data model with a target database schema.
    Today I am able to create DDL and from there manually execute the DDL against a physical database schema inside a sqlplus window.
    It would be nice if I was able to execute these DDL’s within the SQL Data Modeler tool as a one click schema syncronization.
    The idea here is I am using an external schema that development can get the latest DDL without having to receive a new DDL file.
    Thanks,

    sql developer use SQL.net not jdbc.
    but if you can connect the db using sql developer, it means the db is up. review your data server jdbc url:
    jdbc:oracle:thin:@<host>:<port>:<sid>
    <host>: server network name or IP address. try use IP
    <port>: listener port number (usually 1521). 42521?
    <sid> : Instance service name (Oracle SID). your sid is 'dliv1' or 'dliv1.trw.com', etc

  • Dynamically assigning aggregation type in a matrix table

    I have a matrix table that will produce multiple summary columns.  These columns should not all use Sum in the Totals row at the bottom.  Some will any of these to be determined at runtime: Sum, Avg, Count, Min, Max.  I have a column in the
    underlying dataset that will tell me which aggregation type to use and now I need some logic in the summary cell to use the correct aggregation type.  I tried different variation of this:
    =IIF(Fields!AgType = "Sum",   Sum(Fields!VI_Impact.Value), … next IIF statement….
    And here’s the full line
    =IIF(Fields!AgType = "Sum",   Sum(Fields!VI_Impact.Value), IIF(Fields!AgType = "Avg",   Avg(Fields!VI_Impact.Value), IIF(Fields!AgType = "Cnt",   Count(Fields!VI_Impact.Value),  IIF(Fields!AgType
    = "Min",   Min(Fields!VI_Impact.Value), IIF(Fields!AgType = "Max",   Max(Fields!VI_Impact.Value), 0)))))
    I also replaced the zero at the end with another sum statement as a default if nothing else is used.
    Just to keep it real simple for proof of concept, I used:
    =IIF(Fields!AgType = "Sum",   Sum(Fields!VI_Impact.Value),  Sum(Fields!VI_Impact.Value))
    But the report gets the error:
    The Value expression for the textrun ‘VI_Impact.Paragraphs[0].TextRuns[0]’ contains an error: [BC30311] Value of type ‘Microsoft.ReportingServies.ReportProcessing.ReportObjectModel.field’ Cannot be converted to ‘String’
    Any idea how I can make this work?

    Thanks Jason.  I've put an sql script below that will create a test table and populate it with test data.  I also attached an rdl file so after you run the script and load the report, all you need to do is update the report's data source
    to the correct database and you will see exactly what I'm trying to do. 
    This report table creates a maxtrix with 4 SUM columns to the right.  as you will see in the data, the column headers are named by "VA", and column "AgType" shows how the column should be aggregated.  Once you run the report
    and look at the data it should be easy to understand.
    Thanks for any help you can offer.
    DESCRIPTION: Schema Synchronization Script for Object(s) \r\n
    tables:
    [dbo].[zzzRptValueImpactListing]
    AUTHOR: [Insert Author Name]
    DATE: 11/19/2014 5:17:57 PM
    LEGAL: 2013[Insert Company Name]
    SET NOEXEC OFF
    SET ANSI_WARNINGS ON
    SET XACT_ABORT ON
    SET IMPLICIT_TRANSACTIONS OFF
    SET ARITHABORT ON
    SET NOCOUNT ON
    SET QUOTED_IDENTIFIER ON
    SET NUMERIC_ROUNDABORT OFF
    SET CONCAT_NULL_YIELDS_NULL ON
    SET ANSI_NULLS ON
    SET ANSI_PADDING ON
    GO
    USE [VME_KP]
    GO
    BEGIN TRAN
    GO
    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    GO
    IF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
    GO
    -- Create Table [dbo].[zzzRptValueImpactListing]
    Print 'Create Table [dbo].[zzzRptValueImpactListing]'
    GO
    CREATE TABLE [dbo].[zzzRptValueImpactListing] (
    [Id_Number] [int] NULL,
    [Id_Name] [nvarchar](4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [VA] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [VI_Impact] [decimal](18, 3) NULL,
    [Id_Assignees] [nvarchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [AgType] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Pj_Id] [uniqueidentifier] NOT NULL
    GO
    IF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
    GO
    ALTER TABLE [dbo].[zzzRptValueImpactListing] SET (LOCK_ESCALATION = TABLE)
    GO
    IF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
    GO
    IF @@TRANCOUNT>0
    COMMIT
    SET NOEXEC OFF
    DESCRIPTION: Synchronization Script for Object(s)
    Tables:
    [dbo].[zzzRptValueImpactListing]
    AUTHOR: [Insert author name]
    DATE: 11/19/2014 5:50:25 PM
    LEGAL: 2014 [Insert company name]
    SET NOEXEC OFF
    SET ANSI_WARNINGS ON
    SET XACT_ABORT ON
    SET IMPLICIT_TRANSACTIONS OFF
    SET ARITHABORT ON
    SET NOCOUNT ON
    SET QUOTED_IDENTIFIER ON
    SET NUMERIC_ROUNDABORT OFF
    SET CONCAT_NULL_YIELDS_NULL ON
    SET ANSI_NULLS ON
    SET ANSI_PADDING ON
    GO
    BEGIN TRAN
    -- =======================================================
    -- Synchronization Script for Table: [dbo].[zzzRptValueImpactListing]
    -- =======================================================
    Print 'Synchronization Script for Table: [dbo].[zzzRptValueImpactListing]'
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (5, N'Change from double tape to liquid glue', N'Prod Cost', CONVERT([decimal](18, 3),-0.050), N'Philipp Bart
    Steve Stewart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (7, N'Position of NTC out of contact area', N'Complexity', CONVERT([decimal](18, 3),-170.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (7, N'Position of NTC out of contact area', N'Mrk Conf', CONVERT([decimal](18, 3),8.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (8, N'Change type of patches', N'Mrk Conf', CONVERT([decimal](18, 3),7.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (9, N'Reduce winding turns for harness', N'Mrk Conf', CONVERT([decimal](18, 3),8.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (9, N'Reduce winding turns for harness', N'Relblty', CONVERT([decimal](18, 3),1.500), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (11, N'Use fix sizes of carrier material rolls', N'Prod Cost', CONVERT([decimal](18, 3),-0.310), N'Marc Pauwels', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (11, N'Use fix sizes of carrier material rolls', N'Prod Cost', CONVERT([decimal](18, 3),-0.310), N'Marc Pauwels', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (12, N'Cold pressing process for laying or needle technology', N'Prod Cost', CONVERT([decimal](18, 3),0.080), N'George Padvorac', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (12, N'Cold pressing process for laying or needle technology', N'Relblty', CONVERT([decimal](18, 3),0.500), N'George Padvorac', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (13, N'Liquid cold gluing instead of hot processing', N'Complexity', CONVERT([decimal](18, 3),-100.000), N'Philipp Blattert', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (13, N'Liquid cold gluing instead of hot processing', N'Mrk Conf', CONVERT([decimal](18, 3),8.000), N'Philipp Blattert', N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (14, N'Confidential', N'Prod Cost', CONVERT([decimal](18, 3),-0.020), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (16, N'Decrease positioning tolerances to reduce distance between parts', N'Complexity', CONVERT([decimal](18, 3),-40.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (16, N'Decrease positioning tolerances to reduce distance between parts', N'Prod Cost', CONVERT([decimal](18, 3),-0.060), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (17, N'Control and reduce amount of thermoactive glue', N'Prod Cost', CONVERT([decimal](18, 3),-0.030), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Complexity', CONVERT([decimal](18, 3),-50.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Complexity', CONVERT([decimal](18, 3),-50.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Mrk Conf', CONVERT([decimal](18, 3),6.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Mrk Conf', CONVERT([decimal](18, 3),6.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Prod Cost', CONVERT([decimal](18, 3),-0.040), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (18, N'Pull off force harness: reduce spec', N'Prod Cost', CONVERT([decimal](18, 3),-0.040), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (23, N'Simplify and stabilize contact process', N'Mrk Conf', CONVERT([decimal](18, 3),6.000), NULL, N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (23, N'Simplify and stabilize contact process', N'Prod Cost', CONVERT([decimal](18, 3),-0.320), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (23, N'Simplify and stabilize contact process', N'Relblty', CONVERT([decimal](18, 3),1.500), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (24, N'Decrease positioning tolerances to reduce distance between parts', N'Prod Cost', CONVERT([decimal](18, 3),-0.210), N'Mark Powel
    Philipp Bart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (25, N'Separate extension of carrier material, than assembly by gluing', N'Complexity', CONVERT([decimal](18, 3),-20.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (25, N'Separate extension of carrier material, than assembly by gluing', N'Prod Cost', CONVERT([decimal](18, 3),-0.230), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (26, N'Use higher emission foam/fleece where possible', N'Mrk Conf', CONVERT([decimal](18, 3),7.000), N'Craig Squires
    Stacy Johnson', N'Avg', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (27, N'Reduce material variance fleece: width, composites, glue or not,', N'Complexity', CONVERT([decimal](18, 3),-5.000), N'Stacy Johnson', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (28, N'Confidential', N'Relblty', CONVERT([decimal](18, 3),4.000), NULL, N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (29, N'Reduce material variance tape: width, composites', N'Complexity', CONVERT([decimal](18, 3),-3.000), N'Steve Stewart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (29, N'Reduce material variance tape: width, composites', N'Prod Cost', CONVERT([decimal](18, 3),-0.350), N'Steve Stewart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    INSERT INTO [dbo].[zzzRptValueImpactListing] ([Id_Number], [Id_Name], [VA], [VI_Impact], [Id_Assignees], [AgType], [Pj_Id]) VALUES (29, N'Reduce material variance tape: width, composites', N'Relblty', CONVERT([decimal](18, 3),3.000), N'Steve Stewart', N'Sum', '47c9efba-f25e-4ffe-be66-5c5e7f3a3e18')
    GO
    -- TRANSACTION HANDLING
    IF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
    GO
    IF @@TRANCOUNT>0
    COMMIT
    SET NOEXEC OFF
    GO
    Here's the code for the rdl file:
    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
    <Body>
    <ReportItems>
    <Tablix Name="matrix1">
    <TablixCorner>
    <TablixCornerRows>
    <TablixCornerRow>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="textbox3">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>#</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    <Color>#054974</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox3</rd:DefaultName>
    <ToolTip>Idea Number</ToolTip>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>#fafafa</BackgroundColor>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="Textbox13">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Idea</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    <Color>#054974</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Left</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox13</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>#fafafa</BackgroundColor>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="Textbox1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Assignees</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    <Color>#054974</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Left</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox1</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>#fafafa</BackgroundColor>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    </TablixCornerRow>
    </TablixCornerRows>
    </TablixCorner>
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>0.95in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.3in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox2">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Sum(Fields!VI_Impact.Value)</Value>
    <Style>
    <Format>#,###.###</Format>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Right</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox2</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>None</Style>
    </Border>
    <TopBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </TopBorder>
    <BottomBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </BottomBorder>
    <LeftBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </LeftBorder>
    <RightBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </RightBorder>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>4pt</PaddingRight>
    <PaddingTop>3pt</PaddingTop>
    <PaddingBottom>3pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    <DataElementOutput>Output</DataElementOutput>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    <TablixRow>
    <Height>0.25in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="VI_Impact">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Sum(Fields!VI_Impact.Value)</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    <Format>#,###.###</Format>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Right</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>VI_Impact</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>None</Style>
    </Border>
    <TopBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </TopBorder>
    <BottomBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </BottomBorder>
    <LeftBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </LeftBorder>
    <RightBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </RightBorder>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>4pt</PaddingRight>
    <PaddingTop>3pt</PaddingTop>
    <PaddingBottom>3pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    <DataElementOutput>Output</DataElementOutput>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="matrix1_VA">
    <GroupExpressions>
    <GroupExpression>=Fields!VA.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!VA.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.3in</Size>
    <CellContents>
    <Textbox Name="VA">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!VA.Value</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    <Color>#054974</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Right</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>VA</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>WhiteSmoke</BackgroundColor>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>4pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="Id_Pj_Id">
    <GroupExpressions>
    <GroupExpression>=Fields!Pj_Id.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!Id_Number.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixMembers>
    <TablixMember>
    <Group Name="matrix1_Id_Number">
    <GroupExpressions>
    <GroupExpression>=Fields!Id_Number.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!Id_Number.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.4in</Size>
    <CellContents>
    <Textbox Name="Id_Number">
    <CanGrow>true</CanGrow>
    <CanShrink>true</CanShrink>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!Id_Number.Value</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Id_Number</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BottomBorder>
    <Color>LightGrey</Color>
    </BottomBorder>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember>
    <Group Name="matrix1_Id_Name">
    <GroupExpressions>
    <GroupExpression>=Fields!Id_Name.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!Id_Name.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>4.81979in</Size>
    <CellContents>
    <Textbox Name="Id_Name">
    <CanGrow>true</CanGrow>
    <CanShrink>true</CanShrink>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!Id_Name.Value</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Id_Name</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>None</Style>
    </Border>
    <TopBorder>
    <Style>Solid</Style>
    </TopBorder>
    <BottomBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </BottomBorder>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>3pt</PaddingTop>
    <PaddingBottom>3pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember>
    <TablixHeader>
    <Size>1.33333in</Size>
    <CellContents>
    <Textbox Name="Id_Assignees">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!Id_Assignees.Value</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Id_Assignees</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>None</Style>
    </Border>
    <TopBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </TopBorder>
    <BottomBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </BottomBorder>
    <LeftBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </LeftBorder>
    <RightBorder>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </RightBorder>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>3pt</PaddingTop>
    <PaddingBottom>3pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    </TablixMember>
    </TablixMembers>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    </TablixMembers>
    <DataElementOutput>Output</DataElementOutput>
    </TablixMember>
    <TablixMember>
    <TablixHeader>
    <Size>0.4in</Size>
    <CellContents>
    <Textbox Name="Textbox35">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style />
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox35</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>None</Style>
    </Border>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember>
    <TablixHeader>
    <Size>4.81979in</Size>
    <CellContents>
    <Textbox Name="Textbox36">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style>
    <FontWeight>Bold</FontWeight>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Right</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox36</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>None</Style>
    </Border>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>4pt</PaddingRight>
    <PaddingTop>3pt</PaddingTop>
    <PaddingBottom>3pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember>
    <TablixHeader>
    <Size>1.33333in</Size>
    <CellContents>
    <Textbox Name="Textbox6">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Totals</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Right</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox6</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>None</Style>
    </Border>
    <VerticalAlign>Middle</VerticalAlign>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>4pt</PaddingRight>
    <PaddingTop>3pt</PaddingTop>
    <PaddingBottom>3pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    </TablixMember>
    </TablixMembers>
    </TablixMember>
    </TablixMembers>
    <KeepWithGroup>Before</KeepWithGroup>
    </TablixMember>
    </TablixMembers>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <RepeatColumnHeaders>true</RepeatColumnHeaders>
    <RepeatRowHeaders>true</RepeatRowHeaders>
    <DataSetName>DataSet1</DataSetName>
    <Top>0.30375in</Top>
    <Height>0.85in</Height>
    <Width>7.50312in</Width>
    <Style />
    </Tablix>
    </ReportItems>
    <Height>1.845in</Height>
    <Style />
    </Body>
    <Width>8.42925in</Width>
    <Page>
    <PageHeight>8.5in</PageHeight>
    <PageWidth>14in</PageWidth>
    <LeftMargin>0.25in</LeftMargin>
    <RightMargin>0.25in</RightMargin>
    <TopMargin>0.25in</TopMargin>
    <BottomMargin>0.25in</BottomMargin>
    <Style />
    </Page>
    <AutoRefresh>0</AutoRefresh>
    <DataSources>
    <DataSource Name="VEMasterDataSource">
    <DataSourceReference>VEMasterDataSource</DataSourceReference>
    <rd:SecurityType>None</rd:SecurityType>
    <rd:DataSourceID>c76f7aa3-8f20-4495-a1bf-0b7a2ede98e3</rd:DataSourceID>
    </DataSource>
    </DataSources>
    <DataSets>
    <DataSet Name="DataSet1">
    <Query>
    <DataSourceName>VEMasterDataSource</DataSourceName>
    <CommandText>select * from zzzRptValueImpactListing</CommandText>
    <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
    </Query>
    <Fields>
    <Field Name="Id_Number">
    <DataField>Id_Number</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="Id_Name">
    <DataField>Id_Name</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="VA">
    <DataField>VA</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="VI_Impact">
    <DataField>VI_Impact</DataField>
    <rd:TypeName>System.Decimal</rd:TypeName>
    </Field>
    <Field Name="Id_Assignees">
    <DataField>Id_Assignees</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="AgType">
    <DataField>AgType</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="Pj_Id">
    <DataField>Pj_Id</DataField>
    <rd:TypeName>System.Guid</rd:TypeName>
    </Field>
    </Fields>
    </DataSet>
    </DataSets>
    <Language>en-US</Language>
    <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
    <rd:ReportUnitType>Inch</rd:ReportUnitType>
    <rd:ReportID>86e382ea-6e9e-46b0-a5c1-7bf67abfdcf5</rd:ReportID>
    </Report>

  • OWB 11g R1 DM Schema Script

    Dear All,
    I am working on Oracle Warehouse Builder 11g R1 (with Database as 11g R1) on Windows 2003 Server Enterprse Edition.
    While practicing on Oracle Database 11g-Data Warehousing Fundamentals Training - Activity Guide, Practice 1-1,
    I came across with two schema connections using SQL Developer. I am able to connect to SH schema, as this
    schema is generated (Created with data) during 11g DB R1 Installation.
    Another schema connection is DM schema which is not found during installation. This schema has SALES_FACT
    table and other tables... (How DM schema is generated ? Is DM schema a Data Mart or Data Model) please clarify.
    As I am not able to find the DM schema, I am stuck and cannot move further for practice. Please help
    me to get this schema script either thru download link or send the DM Schema creation script (zip) file to
    my mail id - [email protected]
    Awaiting a quick response.
    Regards
    Ajaz Ahmed

    Hi,
    SH Schema
    Re: SH Schema
    Posted: 16.03.2010 10:35 in response to: user527641 in response to: user527641      
         Helpful
    Click to report abuse...           Click to reply to this thread      Reply
    To install SH objects, you need to invoke OUI DBCA tool and select 'sample schema' to install the SH schema objects.
    To create DM views using SH objects, you need to run two SQL scripts (assume you have 11g Example CD installed), which are located at:
    $ORACLE_HOME/rdbms/demo/dmshgrants.sql
    $ORACLE_HOME/rdbms/demo/dmsh.sql
    More details about getting started with ODM can be found in the following link:
    http://www.oracle.com/technology/products/bi/odm/odm_education.html
    Xiafang
    Best regards,
    IM
    Edited by: Igor.M on 22.02.2012 03:51

  • Best Practice for Replicating Schema Changes

    Hi,
    We manage several merge replication topologies (each topology has a single publisher/distributor with several pull subscriptions, all servers/subscribers are SQL Server 2008 R2).  When we have a need to perform schema changes in support of pending software
    upgrades we do the following:
    a) Have all subscribers synchronize to ensure there are no unsynchronized changes present in the topology at the time of schema update,
    b) Make full copy-only backup of distribution and publication databases,
    c) Execute snapshot agent,
    d) Execute schema change script(s) on publisher (*) when c and d are reversed this has caused issues with changes to view definitions which has resulted in us having to reinitialize subscriptions,
    e) Have subscribers synchronize again to receive schema updates.
    Each topology has it's own quirks in terms of subscriber availability and consequently the best time to perform such updates.
    The above process would seem necessary when making schema changes to remove tables, columns and/or views from the database, but when schema changes are focused on adding and/or updating objects, and/or adding/updating data, is the entire process above necessary? 
    In this instance, if it's possible to remove the step of coordinating the entire topology to synchronize prior to performing these changes I would like to do that.
    The process as we currently perform it works without issue, but I'd like to streamline it if and where possible, while maintaining integrity and avoiding potential for non-convergence.
    Any assistance or insight you can provide is greatly appreciated.
    Best Regards
    Brad

    If you need to make schema changes then you will need to use ALTER syntax at the publisher.  By default the schema change will be propagated to subscribers automatically, publication property
    @replicate_ddl must be set to true.  This is covered in
    Make Schema Changes on Publication Databases.
    This can be done at anytime, without the need to synchronize unsynchronized changes, make a backup, or execute the snapshot agent.
    Adding an a new article involves adding the article to the publication, creating a new snapshot, and synchronizing the subscription to apply the schema and data for the newly added article. Reinitialization is not required, but a new snapshot is.
    Dropping an article from a publication involves dropping the articles, creating a new snapshot, and synchronizing subscriptions. Special considerations must be made for Merge publications with parameterized filters and compatibility level lower than 90RTM.
    This is covered in
    Add Articles to and Drop Articles from Existing Publications.
    Brandon Williams (blog |
    linkedin)

  • Generate Scripts in SQL Server 2008 R2 producing Error "Item has already been added.:

    I am trying to run a Generate Scripts Task on a Database to generate a script for every object in the DB including tables, SPs, UDFs, FKs, PKs, with the settings for Schema Only, Script Drop and Create, Script "if not Exists", use database,
    and Object level permissions. 
    I have used generate scripts before to generate this database about 5 months ago and every thing worked fine. 
    Today I first tried to generate it out on a server where I only have "db_Owner" for several databases.  This failed with the error.
    Microsoft.SqlServer.Management.Smo.FailedOperationException: Discover dependencies failed. ---> System.ArgumentException: Item has already been added. Key in dictionary: 'Server[@Name='DLINHD007557\SQL_2008R2_64']/Database[@Name='VFS_ProcurementTracking']/UnresolvedEntity[@Name='prc_ContractFatInfo']' Key being added: 'Server[@Name='DLINHD007557\SQL_2008R2_64']/Database[@Name='VFS_ProcurementTracking']/UnresolvedEntity[@Name='prc_ContractFatInfo']' at System.Collections.SortedList.Add(Object key, Object value) at Microsoft.SqlServer.Management.Smo.DependencyTree..ctor(Urn[] urns, DependencyChainCollection dependencies, Boolean fParents, Server server)
    So I tried tto do this on a local version of the database where I have sa rights.  Same error.
    Can someone advise me on what is going on here and how do I fix it?
    Edward R. Joell MCSD MCDBA

    How do you generate the script via SMO?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Oracle 9i Sample Schema running in client/server mode?

    I've got Oracle 9i up on RH7.3 and have successfully executed the sample schema on the Server using the mksample.sql script.
    Now the challenge is to run these same (sample schema) SQL scripts across a network using a 9i client. I copied the demo/schema files from the server installation to the client but when I invoke the mksample script the passwords have to include a connect_identifier which, in this environment, causes the subordinate scripts to get confused.
    Has anyone else attempted to do this?

    You did not have to change any of your scripts to put the connect_identifier.
    Within SQL*Plus you can use the "SET INSTANCE <connect_identifier>" command to make that Oracle instance
    your default for this session. After you do this, all your connect statements will not require a
    connect_identifier.
    ==============================================================
    $ sqlplus /nolog
    SQL> set instance ORA901
    Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
    With the Partitioning option
    JServer Release 9.0.1.1.1 - Production
    SQL> connect scott/tiger
    Connected.
    SQL>
    ==============================================================
    As you can see, after the SET INSTANCE command, the connect command does not need a connect_identifier.

  • HR SCHEMA FILES PRESENT BUT TABLES NOT SHOWN IN SQL DEVELOPER - PLS HELP

    Dear DBA's,
    I am studying towards the OCA and working through the SQL Fundamentals I Exam guide text book by John Watson and Roopesh Ramklass. I have a problem with accessing the HR Schema tables in SQL Developer. I can get connected to the HR schema but no information is available when i click on the + sign next to the "Tables (filtered)" link in SQL Developer under Human Resources - BTW (I've downloaded Oracle 11G)
    Please help, I've tried the following already;
    1. Downloaded the HR Schema sample scripts again
    2. Resetting the Sample schema with this syntax in SQL PLUS - @?/demo/schema/mksample systempwd syspwd hrpwd oepwd pmpwd ixpwd shpwd bipwd default_tablespace temp_tablespace log_file_directory/
    3. I have no Master script file so I cant recreate the sample scripts
    I've been reading forums and trying to Google but I am too new at this and just can't get the HR schema to display all the information in SQL Developer. Please help as I really badly need to practice the exercises in the text book.
    Any help to resolve this will be greatly appreciated.
    Ali
    Edited by: 942730 on Jun 26, 2012 1:15 AM

    942730 wrote:
    Dear DBA's,
    I am studying towards the OCA and working through the SQL Fundamentals I Exam guide text book by John Watson and Roopesh Ramklass. I have a problem with accessing the HR Schema tables in SQL Developer. I can get connected to the HR schema but no information is available when i click on the + sign next to the "Tables (filtered)" link in SQL Developer under Human Resources - BTW (I've downloaded Oracle 11G)
    Please help, I've tried the following already;
    1. Downloaded the HR Schema sample scripts again
    2. Resetting the Sample schema with this syntax in SQL PLUS - @?/demo/schema/mksample systempwd syspwd hrpwd oepwd pmpwd ixpwd shpwd bipwd default_tablespace temp_tablespace log_file_directory/
    3. I have no Master script file so I cant recreate the sample scripts
    I've been reading forums and trying to Google but I am too new at this and just can't get the HR schema to display all the information in SQL Developer. Please help as I really badly need to practice the exercises in the text book.
    Any help to resolve this will be greatly appreciated.
    Alisqlplus
    / as sysdba
    alter user HR identified by hr account unlock;
    connect hr/hr
    select table_name from user_tables;
    exit

  • Unable to install FOD schema for Jdeveloper 11g demo

    Run_target "refresh schema" when installing demo schema fails with:
    refreshSchema:
    BUILD FAILED
    C:\TEMP\FOD_11\Infrastructure\Ant\build.xml:52: The following error occurred while executing this line:
    C:\TEMP\FOD_11\Infrastructure\DBSchema\build.xml:91: The following error occurred while executing this line:
    C:\TEMP\FOD_11\Infrastructure\DBSchema\build.xml:56: The following error occurred while executing this line:
    C:\TEMP\FOD_11\Infrastructure\DBSchema\build.xml:28: C:\TEMP\FOD_11\Infrastructure\wlserver_10.3\server\lib not found.
    I have seen this problem cited on the forum but no solution. I have this in the C:\temp directory.
    Thanks for any help.

    I'm new to jdeveloper, in fact, I come from the database side and wanted to see how 'easy' it might be to develop an application using ADF. So I really don't know much about Java. I changed the jdeveloper path from C:\Oracle\Middleware\jdeveloper to C:/Oracle/middleware/jdeveloper and the schema build script then worked. So even though I am using a Microsoft OS, we always use forward slash instead of backward slash? OK. This is good to know.

  • Same Oracle Server, 2 schemas, one fast, one slow

    We are in the process of updating a database at our company to co-exist with a more recent release of third-party software. Only a few tables are changing.
    We decided to create two schemas: PLVT and PLV2T respectively
    PLVT contains the original version of the database
    PLV2T is the next version of the database
    Both schemas are complete databases, each schema is unaware of the other.
    We also have the same user defined in each schema: PLVT
    Both schemas use the same tablespaces so we wouldn't have to create two set of create scripts.
    Both schemas have all the proper indexes created.
    Unfortunately, performance is good on PLVT, but not good at all on PLV2T
    I run the following test script for each schema (I realize this script isn't optimized the best, but bear with me):
    select count(*) from time_reported tr, user_period up where
    to_char(up.period_finish-1,'YYYY') = '2001'
    and tr.period_number = up.period_number
    and tr.integrate_status in ('I', 'R', 'P')
    and tr.reported > 0;
    On the PLVT schema, the script takes 4 minutes to run
    On the PLV2T schema, the script takes 7 minutes to run
    Had I run the real script, which is much larger, the PLVT schema would have completed the script in 8 minutes while the PLV2T schema would run overnight and still not finish by morning. The EXPLAIN PLAN for the full-size script under both schemas is nearly identical.
    Both schemas are on the same development server, so one would think that they would run the same. They don't.
    What could have possibly gone wrong when the PLV2T schema was created?

    Well it was a shot in the dark (you got me confused, at least) ;)
    To clear things up a bit:
    You have two separate databases (collection of "physical" datafiles, log files, etc.).
    In both of them you have a schema (collection of "logical" objects) called: PLVT (hence you have a user called PLVT, the owner of these objects).
    SIDs are instance identifiers. You have two separate instances for these two databases. One instance is PLVT and the other one PLV2T. (An instance is processes and shared memory structure which manages the databases and are created when you startup the database. On Windows Oracle uses threads and the one instance process is oracle.exe) Another way of putting it, you have two NT services- OracleService<SID>, where SID is PLVT and PLV2T.
    Are these two databases using the same hardware, and at the same time? Do you have anything running against both databases at the same time?
    Is the second db a clone of the first db? How did you clone it? Did you make any changes afterward to the second db?
    Why do you suspect that something might have gone wrong in creation of the plv2t db?
    Both SIDs also use the same tablespaces too.I assume that you mean that both databases have the same tablespace names.
    Are instance parameters (init<SID>.ora) the same for both?
    What does sql> show sga tell? Any differences in v$parameter views?
    Hth,
    Fredrik

Maybe you are looking for