SQL Datamodeling: importing sql

Hello,
I'm importing a ddl file to sql datamodeler. Columns, pks and uks are imported ok but the foreign keys are not imported allthough they are in the script.
The script was created from sql developer.
fragment:
CREATE TABLE "DARWIN"."DUS_ALLOCATIES"
(     "ID" NUMBER NOT NULL ENABLE,
     "PSN_ID" NUMBER,
     "ODT_ID" NUMBER NOT NULL ENABLE,
     "STARTDATUM" DATE NOT NULL ENABLE,
     "EINDDATUM" DATE,
     "UURTARIEF" NUMBER(6,2) NOT NULL ENABLE,
     "AFSPRAKEN" VARCHAR2(4000 BYTE),
     "OPMERKINGEN" VARCHAR2(100 BYTE),
     "INZET_PERCENTAGE" NUMBER(5,2) DEFAULT 100,
     CONSTRAINT "ALC_PK" PRIMARY KEY ("ID"))
     CONSTRAINT "ALC_PSN_FK1" FOREIGN KEY ("PSN_ID")
     REFERENCES "DARWIN"."DUS_PERSONEN" ("ID") ENABLE,
     CONSTRAINT "ALC_ODT_FK1" FOREIGN KEY ("ODT_ID")
     REFERENCES "DARWIN"."DUS_OPDRACHTEN" ("ID") ENABLE
Regards Erik

ArnoldH wrote:
Hi Philip,
Could you expand a bit on your reply? Do you mean the import will work in the current release if the quotes are stripped off? Do you mean that the next release will work with the quotes? (What about without the quotes too? As the normal output for DBMS_METADATA.GET_DDL is quoted ("owner"."object"), will the next release work with either? I hope so.)
Thanks,Hi Arnold,
on your questions - yes, yes (yes,yes).
In current published release - it should work without quotes. With quotes, obviously it doesn't work when definition of foreign keys are embedded in "create table" statement. It's fixed and should work in next published release. I use should because parsing of scripts always can be surprising.
Philip

Similar Messages

  • SQL Datamodeler: Importing Domains

    Hello,
    I see that you can easily import domain definitions.
    How can you export them?
    Wouldn't it be a good idea to seperate user defined domains and the predefined ones?
    Regards Erik

    Hi,
    Got round this limitation as follows:
    (Please keep a copy of the default system domains XML file before you proceed. The file is $SQLModeler_Install_Home\datamodeling\domains\defaultdomains.xml).
    First delete all the default system domains and then create your new domains.
    After saving the model, the new domains will be written into defaultdomains.xml.
    You can now copy and rename this as your customized domains file while can be imported for other uses.
    You can restore the original system domains file from the backup copy you made earlier.
    Enjoy.
    Chiedu

  • SQL datamodeler: No repository?

    Hello
    I thought that the production version of SQL Datamodeler would contain a repository. In fact it was one of the question on the faq on the sql developer data modeler home page
    (http://www.oracle.com/technology/products/database/datamodeler/html/datamodelerfaq.html#repository)
    How are the models currently stored and will there be a repository?
    SQL Developer Data Modeler stores each model in a standard directory with the model name as directory name with an additional main header file using the model_name.xml. You can store models locally or on a central file server. Many early adopter customers have successfully used open source version tools such as Subversion, to keep their models under source code control.
    Currently the Repository is under development. Models will be stored in a standard relational Oracle database.
    Are there still plans to use a repository ? I think osdm is a great product but I personally think you need a repository to make it a multi-user datamodeling tool.
    Regards Erik

    Yes, we plan to support both.
    Erik,
    You make my point exactly: Like many users you say you want a database repository for a multi-user environment, but now you say "In that case we could create productivity boosters and quality checks using pl/sql." What do you want here? This is different. The tool provides a full Design Rules section for quality checks and you can use the reporting repository for additional reports.
    Today, the production release of the Data Modeler supports a reporting repository.
    1. Take any design and select the export option to export it to the reporting repository.
    2. The export dialog is a connection dialog.
    3. If you have never exported the design before, the tables required will be created for you in the schema you provide. -We recommend you create a new schema for this purpose - Subsequent exports will be added to the same repository, unless directed.
    You can now import the provided reports into SQL Developer and run these reports about your design. Because it's just a schema in the database, you can use SQL Developer to browse the tables and add your own reports.
    There is a full tutorial on this on the [ Data Modeler|http://www.oracle.com/technology/products/database/datamodeler/index.html] site.
    Sue

  • Logical SQL to physical SQL in datamodel.

    I am designing a report in BI publisher and for that I am creating a datamodel.
    My datamodel contains 4 dataset with 4 different logical SQLs and all use source as Oracle BIEE.
    When I generate/execute xml from datamodel I observed in nqquery.log that BI publisher is executing each logical SQL in sequence.
    That is OBIEE first send logical SQL of one of the dataset and then convert it to physical SQL. After first physical SQL is completed then only it is converting second logical SQL to physical.
    So logical to physical query is happening in sequence rather than in parallel.
    My datamodel contains huge logical SQLs and OBIEE takes almost 40 seconds each to convert it physical query. This will result in total 160 seconds for just converting 4 logical SQLs to physical SQLs.
    Does anybody know if there is any setting where I can manage to convert multiple logical to physical in parallel?

    Hi Experts,
    Please help on this.

  • Logical SQL to physical SQL taking time in datamodel.

    I am designing a report in BI publisher and for that I am creating a datamodel.
    My datamodel contains 4 dataset with 4 different logical SQLs and all use source as Oracle BIEE.
    When I generate/execute xml from datamodel I observed in nqquery.log that BI publisher is executing each logical SQL in sequence.
    That is OBIEE first send logical SQL of one of the dataset and then convert it to physical SQL. After first physical SQL is completed then only it is converting second logical SQL to physical.
    So logical to physical query is happening in sequence rather than in parallel.
    My datamodel contains huge logical SQLs and OBIEE takes almost 40 seconds each to convert it physical query. This will result in total 160 seconds for just converting 4 logical SQLs to physical SQLs.
    Does anybody know if there is any setting where I can manage to convert multiple logical to physical in parallel?

    Hi Experts,
    Please help on this.

  • Writing a stored procedure to import SQL Server table data into a Oracle table

    Hello,
    As a new DBA I have been tasked with writing a stored procedure to import SQL Server table data into an Oracle table. I have been given many suggestions on how to do it from SQL Server but I I just need to write a stored procedure to run it from the Oracle side. Suggestions/guidance on where to start would be greatly appreciated! Thank you!
    I started to write it based on what I have but I know this is not correct :/
    # Here is the select statement for the data source in SQL Server...
    SELECT COMPANY
    ,CUSTOMER
    ,TRANS_TYPE
    ,INVOICE
    ,TRANS_DATE
    ,STATUS
    ,TRAN_AMT
    ,CREDIT_AMT
    ,APPLD_AMT
    ,ADJ_AMT
    ,TRANS_USER1
    ,PROCESS_LEVEL
    ,DESCRIPTION
    ,DUE_DATE
    ,OUR_DATE
    ,OUR_TIME
    ,PROCESS_FLAG
    ,ERROR_DESCRIPTION
      FROM data_source_table_name
    #It loads data into the table in Oracle....   
    Insert into oracle_destination_table_name (
    COMPANY,
    CUSTOMER,
    TRANS_TYPE,
    INVOICE,
    TRANS_DATE,
    STATUS,
    TRANS_AMT,
    CREDIT_AMT,
    APPLD_AMT,
    ADJ_AMT,
    TRANS_USER1,
    PROCESS_LEVEL,
    DESCRIPTION,
    DUE_DATE,
    OUR_DATE,
    OUR_TIME,
    PROCESS_FLAG,
    ERROR_DESCRIPTION)
    END;

    CREATE TABLE statements would have been better as MS-SQL and Oracle don't have the same data types.
    OUR_DATE, OUR_TIME will (most likely) be ONE column in Oracle.
    DATABASE LINK
    Personally, I'd just load the data over a database link:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_table@mssql_db_link
    As far as creating the database link from Oracle to MS-SQL ... that is for somebody else to answer.
    (most likely you'll need to use an ODBC driver)
    EXTERNAL TABLE
    If the data from MS-SQL is in a CSV file, just use and external table.
    same concept:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_external_table
    MK

  • SQL Server Import and Export Wizard Issue

    i am trying to export SQL data into excel to send out weekly reports.  I have created a view and a SQL account has access to this view; however, I am unable to successfully export the data.  In preview I see all of the data yet it fails on the
    Pre-execute with the below.  It creates the excel file with just the header.  I am using SQL 2014 and loaded the 64 bit AccessDatabaseengine.  I am selecting excel 2007.  Any ideas welcome.
    Messages
    Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
     (SQL Server Import and Export Wizard)
    Error 0xc02020e8: Data Flow Task 1: Opening a rowset for "WeeklyList" failed. Check that the object exists in the database.
     (SQL Server Import and Export Wizard)
    Error 0xc004701a: Data Flow Task 1: Destination - WeeklyList failed the pre-execute phase and returned error code 0xC02020E8.
     (SQL Server Import and Export Wizard)

    Hi astro,
    Please ensure that you haven’t renamed or moved the destination excel file during the exporting process. Also make sure that “Create destination table” option is checked as below screenshot and the SQL statement is correct.
    For more details about using SQL Server Import/Export Wizard to export data from a SQL Server database to an Excel spreadsheet, please review the below blog.
    http://www.mssqltips.com/sqlservertutorial/202/simple-way-to-export-data-from-sql-server/
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

  • Import SQL into Fact Table - Conversion Error

    Hi All,
    I am new to BPC MS and did not know much into MS SQL.
    I am facing the Conversion error while converting between unicode and non unicode string data types.
    We are using SAP BPC 10.0 MS SP13, EPM-Addin SP18 on .Net 4
    The below is the error log
    Total Step: 4
    SQLToTxt: Failed in 0 seconds
    Import SQL into Fact Table: Failed in 0 seconds
    [Selection]
    DB = BPC
    TABLE = GlBalanceOpening
    COLUMNS = Account,Auxiliary,Curr,BalanceDateTime,Amount
    TRANSFORMATION = \JMG\LIQ_JMG\DataManager\TransformationFiles\GLOpeningBalances.xls
    CLEARDATA = No
    RUNLOGIC = No
    PROCESSCUBE = Yes
    CHECKLCK = No
    [Message]
    An error occurred while executing a package.
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Account" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "AccountName" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Auxiliary" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "AuxiliaryName" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Curr" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Dr" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1071636234
    Source = SQLToTxt
    SubComponent= OLE DB Source [68]
    Description = Column "Cr" cannot convert between unicode and non-unicode string data types.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1073450901
    Source = SQLToTxt
    SubComponent= SSIS.Pipeline
    Description = "component "OLE DB Source" (68)" failed validation and returned validation status "VS_ISBROKEN".
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1073450996
    Source = SQLToTxt
    SubComponent= SSIS.Pipeline
    Description = One or more component failed validation.
    IDOfInterfaceWithError= {C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}
    Package Error Events: 
    ErrorCode = -1073594105
    Source = SQLToTxt
    SubComponent=
    Description = There were errors during task validation.
    IDOfInterfaceWithError= {B4E78907-3D9C-4229-9DB9-6A311E45C779}
    Thanks and Regards,
    Raj

    Hi Raj,
    you have to modify the script of your package, see please 1629737 - Error in ImportSQL Data Manager Package
    Regards
         Roberto

  • SQL*Loader Import Problem

    Hi,
    I am trying to import some data from .txt file to a table in Oracle DB using TOAD- Sql*Loader - Import wizard. I was able to load all the files successfully. All the files are pipe(|) delimited. But in one of the files, when the values for the field is NULL - it is populated as ' ' (space), I have trouble in loading these files.
    Suppose I have the fields f1, f2, f3, f4 in the .txt file. And say I have the data as following (and delimter as pipe(|)):
    f1 f2 f3 f4 f5
    r1|01|xyz|123|abc
    r2|02| |234|bcd * 3rd column being null(space)
    r3| |sam|345|def * 2nd field being null(space)
    |04|ram|456|efg * 1st field being null(space)
    |05|abc|567|gef * 1st column being null
    I have problems loading the records 4,5 using Sql*loader, as the first field being null, the data is not being loaded properly. Is there any alternative way of loading this file into my table. Please help me.

    Pl post OS and database versions, along with the contents of the loader control file and the loader log file with the errors.
    http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_field_list.htm#i1009544
    HTH
    Srini

  • Need to add a filter to imported SQL

    I used the File\Import-SQL menu option to import an existing query from another application. The query runs and creates a results table. I do not see an option in the Query\Request section to add a filter so that the user can select a range of values at runtime. I am using BI + Interactive Reporting Studio version 9.3.

    The short answer is, "It can't be done."
    Here's the JavaScript coder's answers.
    You can add a result filter and provide dashboard controls to enable the user to enter or select values, then use scripting to modify the filter and navigate to the results.
    You can provide dashboard controls to enable the user to enter or select values, then use scripting to modify the sql file, re-import it, then process the query.

  • DB Adapter not importing SQL Svr tables

    Hi,
    Oracle Software:
    OS: Windows
    AS10g (10.1.2)
    BPEL GA Release
    10g DB (used for dehydration)
    SQL Server:
    Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
    Issue:
    BPEL DB adapter is not generating a list of tables to import from a SQL Server connection.
    What I have done so far:
    In JDev, create a new DB connection to connect to the SQL Server and it works fine. I am able to see all tablesn and views by expanding the connection.
    In my BPEL partner link, I use the adapter wizard to select DB Adapter and then select the DB connection (SQL sver connection) I have created. All works well until I get to the import table screen where it does not generate a list of available tables to choose from.
    Any help would be greatly appreciated.
    Thanks!

    Hmmm ... Just to understand your problem correctly:
    - can you click on the "Import Tables" button successfully ? Meaning does this bring up another dialog titled "Import Tables" ?
    - If yes, are you able to select the tables to import ?
    - Subsequently, is the wizard not doing anything ? Is this right?
    Regardless, it would also help to run jdev via the following command: $ORACLE_HOME\integration\jdev\jdev\bin\jdev.exe [instead of the windows shortcut - JDeveloper BPEL Designer - which uses jdevw.exe]. This should launch the jdev along with a DOS window where you can see any stack trace if any being dumped by the UI code. When doing the "Import", I am sure you will see some stack trace that you could post back to this thread which would help us debug this issue further.
    Thanks.
    Shashi

  • Import /sql/tracker.sql as File Type = Application Export

    Im trying to download the tracker application and dont understand this instruction
    Import /sql/tracker.sql as File Type = Application Export
    Does any one know what I should do.
    many thanks

    Im trying to download the tracker application and dont understand this instruction
    Import /sql/tracker.sql as File Type = Application Export
    Does any one know what I should do.
    many thanks

  • SQL LOADER Import

    Hello
    So I have a export from a MYSQLl database a .sql file that I would like to import into oracle. Can I do that without creating a control file? Would I have to creat a control file for every table that is in the database?
    Brian Sims

    Hi Brian,
    when you don't have a control file the defaults will be used and the defaults commonly don't work in general. As you can imagine every table has its own data types which commonly requires a dedicated control file for every table.
    There's a dedicated SQL*Loader forum and they might be able to assist you to automate the process
    Export/Import/SQL Loader & External Tables

  • Sql datamodeler: Design rules

    Hello,
    In sql datamodeler you can check your design against a number of design rules.
    Is there a way you can influence these design rules?
    - can you say wheter a design rule is applicable or not?
    - can you change the severity?
    - can you change the rule (for instance other naming convention rules)
    Regards Erik

    Not at this stage. We want to allow users to modify them in the future. There are ways you can influence some of these. So on the Model Properties dialog their are Naming Options. If you change these, you can influence the design rules. Also, in the General Options there is a naming Standards section. So you can set naming standards here and these are used in conjunction with the Designer Rules.
    I'm working on a document about all the naming standards and design rules and how they are used. It's not yet available, but I'll put it onto the Data Modeling page when it's ready.
    Sue

  • Importing SQL into Discoverer?

    I've converted an Access application (35 tables and 150 queries) to Oracle. Is there any way to import or 'cut and paste' the SQL into Discoverer? I don't like to think I have to do each by hand.

    In discoverer plus in file options you can see
    Import Sql click this it will prompt you to give the name of sql file
    here you can give the name of the sql file containing the sql query.

Maybe you are looking for

  • Connection to MySQL DB

    hello, to make a connection to MySQL DB in my webapp. I want to use a connection pool I have download the commons-dbcp-1.2.1.jar. in my webApp. I have a simple class that implemnt a sinple connection to the data base public SQLFactory()      createCo

  • " Statement not accessible"

    Hi all there is an error  for the below statemnt APPEND 'Techn.Platz' TO it_fieldnames. " Statement not accessible" Thanks Protyusha

  • IPhoto can't import when card contains movies

    Hi all, I have been suffering from a weird problem for a while: once in a while iPhoto refused to import images from an SD card and hung with the color wheel spinning until the next reboot. If interested, the original thread is here: https://discussi

  • How do I know if the Itunes card was activated

    I bought an ITUNES gift card for my grandson, how do I know if it was activated? The receipt does not say.

  • Can Cisco Connect be password protected?

    I set up a E3200 today for a friend who has a small business. He has 6 staff in his office where it is installed. I installed it using the web interface for the router, but wanted to show him how to change the guest password using the Cisco Connect s