Removing schema prefix from DDL statements

When I do a change via sql developer, such as adding/dropping a field or table, etc... I need to send the change as a SQL script to my DBA (so it could be sent with our next upgrade to customers, etc).
But, the changes are always prefixed by the schema owner. How can I remove this? For example, if I add a field called: B to table: A, which is under schema O, the sql will look like this:
alter table O.A add (B);
I don't want the "O." to be in there by default. IMO, it is "stupid" for SQL Developer to do this.
My connection profile is to login as user "O".
I do see an option:
Preferences, Database, ObjectViewer Parameters: Show Schema
I un-check this box, because it does make one thing better: it makes it if I goto the "SQL" tab of a table i'm looking at, the sql to create the table won't have the schema prefix, which I think is the "correct" behaviour.
Is there anyway to "turn off schema prefix" for my "alters" ?

On the connections tab...
I expand TAbles
I highlight the table i want to add to.
I click Actions
I click Columns, Add
I proceed with entering the column via the GUI.
There's a tab called "SQL" that writes the SQL for whatever i'm doing. I want to be able to take this sql and send to my DBA, but I don't want it to be prefixed by the schema owner.

Similar Messages

  • How to remove namespace prefix from target payload when using HTTP in PI7.0

    Hi,
    i have a requirement to remove namespace prefix from target payload when receiver receives the payload by an HTTP request.
    i am not able to use XML Anonymizer Bean as in HTTP channel its not possiile.
    Target structure after mapping now is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns3:Order xmlns:ns3="urn:xxx-com:pi:project">
    fields
    </ns3:Order>
    i need the target structure after mapping should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Order xmlns:="urn:xxx-com:pi:project">
    fields
    <Order>
    i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Please reply if anyone has solved this problem before.
    Thanks

    Hi ,
    >>>i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Which process you've used for removing namespace...java/xslt mapping. In case of java mapping plese remove ns3 while creating the target element. Please go through the below blog it may help you.
    Quick Tips: Dealing with Namespaces in XI/PI
    Regards,
    Priyanka

  • Remove L01 prefix from Olap uni

    HI Experts
    In my webi doc . i should not have L01 prefix from the olap universe.
    For ex: if i have L01Country from olap uni . i should only have country in webi.
    My issue is i can edit object properties and do it but how to do it at once when there are around 2000 or more object details i cant edit each and every one .
    any procedure to hide it r remove it at universe level
    Regards

    i think this link may help you
    http://www.forumtopics.com/busobj/viewtopic.php?t=21029&postdays=0&postorder=asc&start=0
    good luck
    Amr

  • Remove Namespace Prefix from SOAP response

    Hi
    I have a File-XI-SOAP scenario. I pass data from the file to SOAP. If the data is good, I receive a Response and If the data is bad I get an fault message called AccountUtilsException. But I am not able to read this message properly.
    The message we receive from the webservice is
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Request Message Mapping --> <edu.purdue.account.AccountUtils.AccountUtilsException xsi:type='ns1:AccountUtilsException' xmlns:ns1='urn://www.purdue.edu/apps/account/ns'><message xsi:type='soapenc:string' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'>lastName is a required field</message><type xsi:type='xsd:int'>5</type></edu.purdue.account.AccountUtils.AccountUtilsException>
    In sxmb_moni when we try to read this message I get the error Reference to undeclared namespace prefix: 'xsi'.
    I tried removing the xsi prefix using anonymizer.acceptNamespaces = urn://www.purdue.edu/apps/account/ns ns1.
    I tried this too urn://www.purdue.edu/apps/account/ns ''.
    the AF_MODULES/AnonymizerBean is second in my processing sequence immediately following the XISOAPAdapterBean.
    The problem still persists. Any suggestions? The webservice people are not willing to remove the xsi:
    Thanks,
    Jahnavi

    The XMLAnonymizerBean does not consider namespace prefixes in attributes. So you should allow also those prefixes and namespaces which are used here.
    Without the XMLAnonymizerBean the xsi namespace declaration should be available as well, if not it is a bug. Check if you have applied the latest patch and open an OSS ticket, if this is the case.
    Regards
    Stefan

  • Removing password protection from bank statements

    Can my bank allow me to remove the password protection from my pdf statements once I've opened them?

    mvillion wrote:
    Can my bank allow me to remove the password protection from my pdf statements once I've opened them?
    Ask your bank.

  • OMB script to remove DBLink and Schema configuration from mapping

    In OWB903 we have used prefixes for most of our tables used in mappings. (By right clicking on the mapping, choosing configure and then setting the Schema/DB Link for each table under "Sources and Targets")
    We are now in the process of upgrading to OWB 904, and because of the way OWB 904 handles locations we would like to remove the prefixes from the mapping configurations. Our project consists of 100+ mappings, so it would be nice if it was possible to do this by runing a OMB script.
    I would appreciate it very much if anybody can come up with an example of how to do this.

    Roald,
    Here is an example of a OMB script that renames all the tables in a project (to run a script, you have to open the OMBPlus application and enter 'source <filename>' on the prompt, where filename is the name of the file containing the script):
    # rename.tcl
    # Renames the names of tables, mappings, cubes and dimension for a project.
    # Prefixes the names with 'WH_'
    # Please update the connection information here.
    # The connect string format is repository_user/repository_pwd@hostname:port:service_name
    # Connecting to the repository:
    OMBCONNECT owb904/owb904@localhost:1521:ora9201
    puts "Connected to repository."
    # Setting the project and prefix variables (set project name here):
    set MProject MY_PROJECT
    set wh WH_
    #Open the project
    # Entering into the Project (CC = Changing Context):
    OMBCC '$MProject'
    set module_list [OMBLIST ORACLE_MODULES]
    # Loop to enter into each project module:
         foreach i in {$module_list}{
              puts "Working on module: $module_list ."
              OMBCC '$module_list'
              set table_list [OMBLIST TABLES]
    # Loop to prefix the name of each table in the current module:
                   foreach j in {$table_list}{
                        puts "     Working on table: $table_list ."
                        OMBALTER TABLE '$j'
                             RENAME TO '$wh$j'
    puts "Done."
    # Saving the changes:
    OMBCOMMIT
    # Disconnecting from the repository:
    OMBDISCONNECT
    As you know, OMBPlus is based on the TCL scripting language. For more info on TCL, take a look at:
    http://www.scriptics.com
    Also, for more info on the OWB specific commands, take a look at the Users guide.
    Regards:
    Igor

  • Remove prefix from dimension id in *rec statement

    Hi,
    I search through the documentation and find that to add a prefix, the statement should be
    *REC(ACCOUNT = ACC_ + ACCOUNT.GROUP).
    Does anyone knows how to remove the prefix when creating new records,
    for e.g. in my account dimension, I have a member "ACC_HC". After processing, it should generate a record using account "HC"?
    appreciate you help. Thanks!
    Rgds
    PH

    I don't know if I understand you correctly, but what you want to do is not use the prefix?
    Cause then you would just type
    *REC(ACCOUNT=ACCOUNT.GROUP)
    and it would generate a record without prefix.
    Regards,
    Tim Vierhout

  • Executing a DDL statement from java code

    Hi all,
    this is code from jdev11.1.1.3 version. I am trying to execute a DDL statement in oracle db from java code, but "ORA-00900: invalid SQL statement" error is coming.
    I am trying to create a table in same schema in same db by using 'Copy' command.
    Same DDL command is executing from sql command prompt & table is being created. Plz help me , as how to do from java?
            public String cmb_action() {
            // Add event code here...
            try {
                //getting source db connection
                InitialContext initialContext = new InitialContext();
                DataSource ds = (DataSource) initialContext.lookup("java:comp/env/jdbc/SourceConnDS");
                Connection sourceconn = ds.getConnection();
                sourceconn.setAutoCommit(false);
                String sql = "Copy from myschema/mypass@DB insert t_dept using select * from dept;"                       
                Statement stat = sourceconn.createStatement();
                stat.executeUpdate(sql);
                sourceconn.commit();
                System.out.println("done");
              catch (Exception ne) {
                // TODO: Add catch code
                ne.printStackTrace();
            return null;
        }

    I have a requirement to transfer data from one db to another db from Java Application Layer.Maybe, maye not. We get all sorts of weird "requirements" - which are nothing but thoughts or proposed solutions.
    But,
    Did the "requirement" mention whether the table existed already or not in the target database? - If not, did it tell you to create it - drop/create it?
    Did the "requirement" deliver some explanation to why this copying was neeeded? - Are we talking replication? - Or a one time cloning?
    Etc, etc,
    Personally I would always argue against a "reuirement" like that. - It just isn't the way to do it. Period.
    Regards
    Peter
    P.S: If you are satisfied with what COPY does, then you could let Java make an OS call and do it from there?

  • Track DDL statements for schema.

    Dear all,
    I want to track all DDL statements being performed on particular schema.
    I want to capture entire sql statement being run.
    How can I achive this.
    Please advice.
    Waiting for your reply.
    Regards,

    Hi all,
    I have used this trigger to track ddl.
    create table perfstat.stats$ddl_log(
    user_name varchar2(30),
    ddl_date date,
    ddl_type varchar2(30),
    object_type varchar2(18),
    owner varchar2(30),
    object_name varchar2(128)
    create or replace triggerDDLTrigger
    AFTER DDL ON DATABASE
    BEGIN
    insert into
    perfstat.stats$ddl_log
    user_name,
    ddl_date,
    ddl_type,
    object_type,
    owner,
    object_name
    VALUES
    ora_login_user,
    sysdate,
    ora_sysevent,
    ora_dict_obj_type,
    ora_dict_obj_owner,
    ora_dict_obj_name
    END;
    It's working fine ,
    But I want to capture entire sql statement into stats$ddl_log table.
    What to modify in table or trigger that I could achive this.
    Waiting for your reply.
    Thanks and regards...

  • Execute DDL statements from pl / sql

    Hi !!!!
    I have to create every object (tables, sequences, etc) using a pl / sql block, so I need first looking for the object in the data dictionary and if it doesn't exist execute a ddl statement to create it.
    I wanted to execute at the same "execute immediate " :
    - create table.
    - create synonym for the table created before.
    - comments on table
    - comments on table's columns
    - grants on the table.
    But I found some errors:
    - I can`t have semicolon after every statement so I get an "ORA-00911: invalid character". I did'nt try to scape the semicolon so I need it.
    - I split the execute immediate so now I have one execute immediate for every statement but I got an error in this statement:
    EXECUTE IMMEDIATE 'COMMENT ON TABLE SYSADM.CVP_PAQ_SMS_REC_PRUEBA IS "COMMENT ON TABLE"  '; The error I get is this:
    ORA-01780: string literal required
    Any suggestions about this ?
    Thanks.

    The comment itself needs to be a SQL string so it needs to be delimited with single quotes not double quotes. You can either use two single quotes
    EXECUTE IMMEDIATE 'COMMENT ON TABLE SYSADM.CVP_PAQ_SMS_REC_PRUEBA IS ''COMMENT ON TABLE''  ';or you can use the q quoting syntax
    EXECUTE IMMEDIATE q'[COMMENT ON TABLE SYSADM.CVP_PAQ_SMS_REC_PRUEBA IS 'COMMENT ON TABLE'  ]';You cannot combine multiple DDL statements into a single block (well, you could use dynamic PL/SQL, but then your string would have a bunch of embedded EXECUTE IMMEDIATE statements which would presumably not buy you much).
    Justin

  • DDL statements and dynamic  sql  in stored procedure

    I created a stored procedure to create and drop tables, using dynamic sql.
    When I try to do the inserts using dynamic sql, i.e
    v_string := 'INSERT statement';
    EXECUTE IMMEDIATE v_string;
    I get the following error message:
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at line 63
    Line 63 happens to be the line that the EXECUTE IMMEDIATE v_string; statement is in.
    I am able to describe the table that the inserts are being made into, so I know that the table exists.
    Any idea why I'm getting this error message would be appreciated.

    Yes I do and I have been able to create other tables using dynamic sql.
    The table that I am having problems with SELECTs data from another table to get its column values; within the SELECT statement, the CAST function is used:
    ie. CAST(CASE SUBSTR(CAST(E_MOD AS VARCHAR(7)),2,3)
    WHEN 'AAA' THEN 'A55'
    ELSE ............
    I get the following error message:
    ERROR at line 18: (this line starts the CAST statement)
    ORA-06550: line 18, column 13:
    PLS-00103: Encountered the symbol "AAA" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod not rem return
    returning <an exponent (**)> <> or != or ~= >= <= <> and or
    like between into using || bulk
    When I remove the quotes or add another single quote, the same error cascades to 'A55'.
    After doing the same for the next error, I get the error message below:
    ERROR at line 1: (this line has the EXECUTE IMMEDIATE statement)
    ORA-00936: missing expression
    ORA-06512: at line 6
    Any idea what the problem could be?
    Also is there another way to have DDL statements as stored procedures other than using dynamic sql or the DBMS_SQL package?

  • PL SQL Web Service with XML output - Remove the declaration from the proces

    Using JDeveloper to create PL/SQL web services it inserts the generic declaration
    <?xml version="1.0" encoding="UTF-8" ?>. I want to remove this line from the payload.
    Here is the entire payload. Why is this inserted and how do I get rid of it.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server.Exception:</faultcode>
    <faultstring>java.sql.SQLException: java.sql.SQLException: ORA-04068: existing state of packages has been discarded ORA-04063: package body "FDC_API.PVR_IPS_TICKET" has errors ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at line 1</faultstring>
    <faultactor>/pvr_ora-pvr_tickets-context-root/Pvr2ips</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>rvice, my payload has the

    We can generate jaxws from 11.1.2.0 onwards using This is now provided by the TopLink web service provider builder, which can be via the TopLink DBWS provider wizard from JDeveloper since the 11.1.2.0.0 release
    1.4.4 Database Web Services (DBWS)
    http://docs.oracle.com/cd/E23943_01/doc.1111/e26045/general.htm#CHDIEEHG
    Hope that heps
    Regards,
    Sunil P

  • Remove 1000 prefix before hier nodenames while loading master data

    Hi experts,
    I am loading the master data for profit center dimension in bpc from 0profit_ctr in bw. The attributes are loading fine but the hier nodenames are starting with 1000 which i want to remove. Unless they are removed, there will also be a problem when i next attempt to load the hierarchy. I used suppresscharacter=1000 before the *Mapping section, but that does not work. Though it shows in the package detail that the records have been loaded but when i check the dimension i find that the Hier nodenames are totally skipped.
    Kindly note, that i used the approach used in the following thread:-
    Conversion: Remove first 4 characters and then ParseINT.
    N.B : the attributes don't have 1000 before them , so they should be loaded as it is, infact they are getting loaded properly.
    I only need to remove the 1000 prefix from Hier nodename. i have also tried using an if statement in mapping section as
    ID(1:4)=*STR(1000) THEN ID(5:14)
    but this approach is also not working as the hier nodenames do not have any fixed length and while validating it fails to get to the end of the record, the 5:14 thing isnt effective probably as the lengths vary.
    Please help.
    Edited by: debchandra on Dec 2, 2011 8:25 AM

    Hi Vishal,
    As i mentioned, SUPPRESSCHARACTER=1000 in the *OPTIONS did not work. it's totally skipping the records beginning with 1000. Note, that i followed the approach as in : Conversion: Remove first 4 characters and then ParseINT.
    Thanks,
    Debayan
    Edited by: debchandra on Dec 5, 2011 11:14 AM

  • XSLT mapping to remove namespace prefix

    Hi experts,
    I have one requrement where I need to remove the prefix ns0 from the xml (given below) getting generated in message mapping.
    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns0:ExecuteRequest xmlns:ns0="http://test/">
    <ns0:_sRequestXML><inteflow>body</inteflow></ns0:_sRequestXML></ns0:ExecuteRequest></soap:Body></soap:Envelope>
    I am usimg the below xslt and it is now adding one ns0 prefix in the tag <inteflow>.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <ExecuteRequest xmlns="http://test/">
    <_sRequestXML>
    <inteflow>
    <xsl:copy-of select="//inteflow"/>
    </inteflow>
    </_sRequestXML>
    </ExecuteRequest>
    </xsl:template>
    </xsl:stylesheet>
    Result after using xslt.
    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ExecuteRequest xmlns="http://test/"><_sRequestXML>
    <inteflow xmlns:ns0="http://decisionintellect.com/inteport/"></inteflow></_sRequestXML></ExecuteRequest></soap:Body></soap:Envelope>
    Can you please help. What is wrong in the xslt and how I can get the desired result.
    Thanks & Regards,
    Pratyus Ganguly
    <?

    Hi Pratyus
    XMLAnonymizerBean works fine when I try it with your payload. Here is the config, basically I included the namespace for everything except the ns0.
    Parameter Name
    Parameter Value
    anonymizer.acceptNamespaces
    http://www.w3.org/2001/XMLSchema xsd http://www.w3.org/2001/XMLSchema-instance xsi http://schemas.xmlsoap.org/soap/envelope/ soap
    Before
    After
    Rgds
    Eng Swee

  • Executing multiple DDL statements with OracleCommand

    hi..
    im having trouble executing multiple ddl statements with the the oracle command object. i have tried to enclose them within Begin.. End; block but with no use.
    this problem seems to occur only with DDL statements,.. as my DML like update, delete and Inserts seem to work fine when enclosed within the PL /SQL block.
    single DDL statements also seem to work fine. so im guessing this has nothing to do with priviledges. any ideas?
    my code as follows
    OracleCommand command = new OracleCommand();
    command.CommandType = CommandType.Text;
    command.CommandText = string.Format(@"{0}",script);
    conn.Open();
    command.Connection = conn;
    command.ExecuteNonQuery();
    the script is read from a file, and looks like this. (note : i have removed any line breaks or any other characters)
    BEGIN ALTER TABLE SYSTEMUSER DISABLE CONSTRAINT FK_USER_CLIENT; ALTER TRIGGER SET_SUBSCRIPTION_SUB_I DISABLE; END;
    this is the error i get.
    Oracle.DataAccess.Client.OracleException: ORA-06550: line 1, column 7:
    PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
    begin case declare exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe.

    If I'm not mistaken, we're not allowed to issue DDL inside anonymoue block (or stored procedure) since DDL has implicit commit in it. But you still can execute DDL using EXECUTE IMMEDIATE or using DBMS_SQL package. Try changing your CommandText like this,
    BEGIN
       EXECUTE IMMEDIATE 'ALTER TABLE SYSTEMUSER DISABLE CONSTRAINT FK_USER_CLIENT';
       EXECUTE IMMEDIATE 'ALTER TRIGGER SET_SUBSCRIPTION_SUB_I DISABLE';
    END;Hope this helps,
    [Nur Hidayat|http://nur-hidayat.net/]

Maybe you are looking for

  • Cannot login with Network account.

    Hi, I am an experimented Mac user, but quite new with Snow Leopard Server. I've just purchased the brand new MacMini Server. I have configured my server with the name server.local and installed OpenDirectory as Master. I wanted to try the network log

  • How do I block an email address. It has sent over 40 of same message.

    This is a freecycle person who posted the item once. Somehow it keeps coming to my inbox and blocking all my regular mail. So far it has come to my in box over 40 times and it is still coming.

  • How can I use my Iphone as a remote control?

    How can I use my Iphone 6 as a remote control?

  • Photoshop CS4 running slow on MAC OS X

    I bought myself a MAC OS X recently with a student edition of Photoshop CS4, i am currently studying photography and have been told many times that a mac would be the best option to edit images- this coupled with Photoshop CS4. However since loading

  • Is it a bug in N73ME New FW?

    After try a lot to get it done correctly with N73ME FW 4.0727.2.2.1. It still does not work like the old FW. All autostart applications messed up. I tried every which way; including re-install FW twice also all my software twice. I can not solve the