DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Data replication between 2 schemas within one DB server

Hybrid View

  1. #1
    Join Date
    Feb 2014
    Posts
    2

    Post Data replication between 2 schemas within one DB server

    Hello,

    I have 2 schema A & B with some tables. 2 questions -

    1. Daily data replicate from schema A tables to schema B tables.
    2. Schema B tables need to be updated with based on some criterias, as mentioned.
    a) Replace ';' to '.'
    b) formatted to “DD. MM.YYYY”

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    You might want to just use data pump to move the data, then run update commands to fix the data.

  3. #3
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by Kris_2014 View Post
    ...b) formatted to “DD. MM.YYYY”
    if such date is stored as a date data type column then no changes to the data are needed but to the nls_date_format.

    Probably a logon trigger that identifying the new session as pointing to schema B issues an alter session set nls_date_format='DD.MM.YYYY' would suffice.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  4. #4
    Join Date
    Feb 2014
    Posts
    2
    Hello,

    I am new to this area , can you please share the complete command lines and also the trigger details

  5. #5
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by Kris_2014 View Post
    Hello,

    I am new to this area , can you please share the complete command lines and also the trigger details
    In order for anyone to do that you would need to share the details of what the tables look like and which columns need to get updated
    and how they should get updated. If your dates are stored in a date field then they will take on what ever date format you are using in
    your database/front end. You should also explain why you need to change semi colons to periods, and which columns in which tables
    need to be updated. There should be plenty of code on how to write a before insert row by row trigger.

    Here is a good start in finding your answer!!!

    http://tinyurl.com/you-should-google-for-that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width