How to change all fk constraints in schema to refer to different schema

Hi,
We wish to change all the fk constraints which point to tables on one schema to same table names but owned by a different schema.
Is this possible?
Thinking of query user_constraints
select *
from user_constraints r
where r.constraint_type = 'R'
and r.r_owner = 'REF'
can put this inside loop but can you modify fk constriant to refer to table owned by different schema
11.2.0.3
Don't really want to need to drop and recreate.
Thanks
Edited by: user5716448 on 06-Apr-2012 04:26

Yes. You need to drop the constraint and recreate it using the clause 'new_schema.objct_name' in the constraint creation statement.
For example, if you want to change the constraint cons_1 to point to some column col_1 in schema sch_2 then the sequence of statements will be like,
ALTER TABLE TAB_1 DROP CONSTRAINT CONS_1;
ALTER TABLE TAB_1 ADD CONSTRAINT CONS_1 FOREIGN KEY COL_1 REFERENCES SCH_2.TAB_1(COL_1);
Remember, you have to have all the privileges required to use/reference the table in schema_2.

Similar Messages

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • How to change the input and output schema in BPEL process

    hi',
    Please tell me how to change the input and output schema in BPEL process after the process is made.
    thanks
    Yatan

    If your intention is just changing the content you are passing to bpel/returning from bpel
    Here is another way
    just update your default created xsd files with new elements, update wsdl elements in message definition and chnage bpel code to reflect new elements in activities
    Regards,
    Praveen

  • HT1399 can anyone tell me how to change all the songs in my I-Tunes Library to the Graphic Equilizer setting of Bass Boost, without clicking on every single song individually to change them ?  thanks.

    Can anyone tell me how to change all the songs in my I Tunes Library to the Graphic Equilizer Setting of Bass Boost, without having to change each song individually?  Thank U.       [email protected]

    Hello guinness guzzler,
    You can set the equalizer from the View menu, which will affect any songs played in iTunes.
    iTunes 11 for Windows: Adjust the sound quality
    http://support.apple.com/kb/PH12334
    Cheers,
    Allen

  • How to change all specific colors to another color.

    Can some one tell me how to change all colors in Illustrator to another color all at once.
    I used to work in Freehand and you could select all, them go to a panel and have it change
    all of one color to another in a layout.
    Exp. You could change pms 356 to pms 410 without selecting each individually.
    I can't find this feature in Illustrator CS4
    Any help appreciated
    HJMann42

    Thanks Monika and Kurt.
    Figured it out. But I couldn't get it to affect groups inside clipping masks. Basically had to completely
    disassamble the logo.
    Don't know why Illustrator has to make it so difficult. In Freehand it's simple: select the entire object, open
    a panel, a few clicks and bingo it's done. Even if things are grouped, groups within groups, pasted into another group....no problem.

  • How to change the password of a schema using Oracle SQL Developer

    Hi need to change the password of a schema using Oracle SQL Developer how do i do it?

    Hi
    alter user username identified by password

  • How to change all used colors to 100% black

    It's probably a dead simple answer, but I can't find it.
    Here's the thing:
    In a product brochure I had to change all product drawings to 100% black.
    What I did was select all unused colors from the palette, deleted them. Then changed all the used colors into 100% black (drag Global black swatch onto the other swatches while holding Alt).
    In the printing office it appeared that there were still elements in the drawings that weren't in 100% black. Those elements had colors that weren't in a swatch in the color palette.
    How can I change ALL the used colors, including the ones that haven't been turned into a swatch in color palette, into 100% black?
    Thanks for any help!
    (Illustrator CS3 is what I'm working with)

    James,
    I am using CS3.
    It's a bit of a complicated story.
    I get the drawings supplied from my customer. The drawings are made in an Autocad-like program (I forgot its name), then imported into Autocad (because that first piece of software doesn't have the right export-extensions) and then from Autocad it's exported to Illustrator.
    The customer wanted to do the conversion to black themselves, because it would ease my work-load, since I wouldn't have to open and adjust all those drawings again when they have it open already.
    Only they are using CS2.
    I guess they'll just have to upgrade...

  • How to change all published projects sites format?

    Hi every one;
    I have about 400 project in pwa, our client deceided to change all project site format(design,webpart,library,...)
    how can I change all projects sites format? it will take too much time to change their format one by one
    thanks for any help

    You can not change the project site format which you already have,You need to perform this one by one for project site. 
    As far as time is concerned it depends on your format. 
    Also you can create one project site template in which you can add your webpart, add library and give your format then attach that template with Enterprise Project Template so that at least new project site will have all the new format.
    kirtesh

  • How to change the existing constraint for the table.

    hi my table having the check constraint. but now i want to change the values in that constraint.
    is it possible to change the check constraint values. and with out disable or drop my constraint. i dont want to change the constraint name also.
    now i will give you my existing constraint and proposed constraint syntax.
    my existing constraint Syntax is :
    CONSTRAINT CONS_MRANTYPE
    CHECK (MRAN_TYPE IN ('SP','JW','SD','SC','OT')
    my proposed constraint syntax is :
    CONSTRAINT CONS_MRANTYPE
    CHECK (MRAN_TYPE IN ('SP','JW','SD','SC','OT','JR')
    Thanks
    Indra

    Hi Indra,
    this forum is for problems related to Oracle SQL Developer Data Modeler.
    Philip

  • How to change all icons

    Hi,
    I've some serious problem. I'm creating theme with "Nokia Series 40 Theme Studio 2.2". I can change only 21 icons
    (applications, audio_message, brew, icamera, CDMA, contacts, extras, gallery, go_to, log, media, messaging, numeric_entry, organizer, PTT, services, settings, SIMATK, sport, voice_portal, wireless_village).
    And I'd like to change the others (folder icons, radio, games, IM, battery, "message icons" ...).
    Is there any option to change it all (new graphic suit).
    My phone: nokia 6267 (S40, same interface as 6131).
    THX

    korngear, as far as I know, Ownskin is useless for S40 phones, and it isn't the answer for S60 phones, either, if you want to change all application icons.
    The S40 theme tool is a Forum Nokia (content) developer tool, so try the Forum Nokia discussion boards: http://forum.nokia.com
    However, I suspect that what application icons the tool lets you edit, are those apps you can edit.

  • How to select all  indexes in a schema , for gathering the statistics

    In OEM 10g , How can we select all the indexes in a particular schema for gathering the statistics.
    For example , consider the schema got 1500 indexes. When i clicked on select all , it is selecting 10 indexes in one stretch ( all which are present in that page).
    For 1500 indexes , i have to make 150 such selection.
    How can we avoid it.
    In 9i OEM, its quite simple. With just 1 mouse clicke , we can select all the indexes .
    Thanks
    Naveen
    314 439 9554

    On the Administration Tab of the instance, choose Statistics Management - Manage Optimizer Statistics, then Gather Optimizer Statistics and click Continue. You then get a choice of Database, Schema, Tables or Indexes.
    Stupid that you have to supply an OS username and password to do this but anyway.

  • How to drop all tables in perticular schema??

    Hi,
    I am new in oracle.
    I want to drop all tables in one perticular schema,
    Please tell me solution.
    PratHamesh

    If your few of your tables have referential intigrity constraints and trying to drop master table whithout droping child table first, oracle will produce an error.
    Better option would be to drop the entire schema and then create a new schema with the same name.
    on sql plus.
    set long size 20000
    select dbms_metadata.get_ddl('USER','USERNAME') from dual;
    --then save the above output to create the user later.
    drop username cascade
    use the above saved script to create the user again.
    Jaffar

  • How to change all field font sizes in one go?

    Hi Does anyone know how i can do this.
    Someone created a form for us with fields but not all of the fields are the same font or size, how can i change them all without doing them one by one?
    many thanks

    Select them all by pressing Ctrl+A while using the Select Object Tool (a
    black cursor), or by manually selecting the ones you want, then right-click
    one of them and select Properties. You will be able to edit the common
    properties of all the selected fields.

  • How to change all datasources from one database to another

    I have many datasources defined in weblogic connect to one database, login as different users to different sachems.
    Is there any easy way to switch all of them to another database? changing each of them through console seems not so easy.
    Thanks

    you can use WLST - use the console to record the step for 1 datasource, and use the generated python file as a reference
    connect('weblogic', 'weblogic1', 't3:yourhost:7001')
    datasource='your_datasource'
    datasource_url='your_new_url'
    edit()
    startEdit()
    cd('/JDBCSystemResources/' + datasource + '/JDBCResource/' + datasource + '/JDBCDriverParams/' + datasource)
    cmo.setUrl(datasource_url)
    save()
    activate()

  • How To Change 'ALL' Value from Radio button

    Is it possible to change the 'ALL' value that is defaulted in the radio button group in BEx Web Designer?  Instead of showing as 'ALL' I would like it to display 'Show All Products'

    Create a custom Javascript which will replace the text for ALL on the onload event of the web template.
    Thanks.

Maybe you are looking for

  • How can I find and print a bill from Apple site?

    Hi I need to get and print the invoice of my macbook purchase. It's a MacBook Pro I bought in 2008 and as It is an old purchase it makes it quite difficult to find the invoice. Thank you for help.

  • How do I use my iTunes Balance instead of a Credit Card?

    I want to gift money I have in my account. I had that money because I reedeemed an iTunes Gift Card. However, when I go to gift something it keeps asking for me to put a credit card. Even if I put a credit card I can only send money from the credit c

  • How do I restore a Windows 8.1 system image if I upgraded from Windows 8?

    I have a new HP Envy TouchSmart 15 Notebook PC 15-j003cl. It came with Windows 8 which I upgraded to Windows 8.1. I created the HP Recovery USB flash drive. From my reading I understand that the recovery USB flash drive is Windows 8 not 8.1. My quest

  • How can I install two Nook ereader apps on my iPad?

    I want to install another Nook reader app on my iPad 2. It happened in my iPhone, but I don't know how.

  • CS6 Presets are Missing

    I recently upgraded my hardrive from a 250 GB to 500 GB SSD. I used Apple's migration assistant to move everything over. In the process, I updated the OS to Mavericks. Now I'm noticing that a majority of my presets for Illustrator and Photoshop are m