Lost about 60-75% of my primary and foreign keys when Migrating from SQL Server 7

Hi All,
I did an almost successful migration between SQL Server 7.0 and Oracle9i.
What happened:
I seem to have lost my primary and foreign keys in the migration. The funny thing is when I viewed the constraints and indexes in Toad, they were there. However when I tried to enabled those constraints nothing happened.
I really don't know how I can fixed this, but I don't understand why I didn't get a warning or an error message in the Migration Workbench (latest version).
I did ignore the following errors, could that have anything to do with the keys being lost.
Failed to create User:omwb_emulation; ORA-1920: user name "OMWB_EMULATION" conflicts with another user or role name
Failed to create User:guest;ORA-01920: user name "GUEST" conflicts with another user or role name
These users do not own any objects therefore I ignored them.
Please advise
Thanks

Hi Joe,
Not sure why you are able to see these objects and yet not able to enable them. Did you encounter any errors during the create Oracle Model phase?? Did you encounter any errors during the final Migrate phase?
Also, it is really important to have a tablespace created before an attempt is made to create tables and indexes in the destination Oracle database.
Regards
John

Similar Messages

  • Lack of Primary and Foreign Keys and Efficiency

    I am reverse engineering a Maximo database. I am shock that it does not have Primary or foreign keys define for 590 out of 620 tables.
    My question is does the lack of Primary and Foreign key relationships adversely impact the efficiency of an Oracle database? I think it does IBM techs do not think it does.
    Anyone has the answer?

    does the lack of Primary and Foreign key relationships adversely impact the efficiency of an Oracle database? Not necessarily. There are many large OLTP databases that do not define PKs and FKs.
    It is true that the presence of constraint defintions is used by the optimizer. However,
    what matters is how the application is written and how the optimizer handles it.
    Remember that Oracle Databases have been in production since before constraint definitions were introduced.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Jun 9, 2010 10:05 AM

  • Primary and Foreign Keys

    I've attempted to identify a primary and foreign key in these two tables, but I am getting a bunch of errors re duplicate keys and column names needing to be unique. Can someone explain to me what I am doing wrong? I have watched numerous tutorials. Perhaps
    the primary and foreign key I have identified don't meet the criteria?
    CREATE TABLE StockNames
    -- Added Primary key to [stock_symbol]
    [stock_symbol] VARCHAR(5) NOT NULL CONSTRAINT PK_stock_symbol PRIMARY KEY,
    [stock_name] VARCHAR(150) NOT NULL,
    [stock_exchange] VARCHAR(50) NOT NULL,
    GO
    stock_symbol stock_name stock_exchange
    AEA American External Accessories NYSE
    ASP All Sports Portal NYSE
    AIT Anthony Interest Technology NYSE
    ATV American Technology Vehicles NYSE
    ACM Anderson Charles and Mitchell NYSE
    ACH American Career Helpers NYSE
    AVA Alleviate America NYSE
    and the second table
    CREATE TABLE DailyPricesA (
    [stock_symbol] VARCHAR (5) NOT NULL CONSTRAINT FK_stocksymbol REFERENCES [StockNames]([stock_symbol]),
    [date] VARCHAR (15) NOT NULL,
    [stock_price_open] FLOAT (53) NOT NULL,
    [stock_price_high] FLOAT (53) NOT NULL,
    [stock_price_low] FLOAT (53) NOT NULL,
    [stock_price_close] FLOAT (53) NOT NULL,
    [stock_volume] INT NOT NULL,
    [stock_price_adj_close] FLOAT (53) NOT NULL,
    stock_exchange stock_symbol date stock_price_open stock_price_high stock_price_low stock_price_close stock_volume stock_price_adj_close
    NYSE AEA 8/02/2010 4.42 4.42 4.21 4.24 205500 4.24
    NYSE AEA 5/02/2010 4.42 4.54 4.22 4.41 194300 4.41
    NYSE AEA 4/02/2010 4.55 4.69 4.39 4.42 233800 4.42

    Hi Stan,
    I have removed "stock_exchange" - that removed that error. These are the other errors I am experiencing:Msg
    2714, Level 16, State 6, Line 8
    There is already an object named 'DailyPricesA' in the database.
    Msg 2714, Level 16, State 6, Line 36
    There is already an object named 'StockNames' in the database.
    Msg 2627, Level 14, State 1, Line 47
    Violation of PRIMARY KEY constraint 'PK__StockNam__117C59C768B2BB7F'. Cannot insert duplicate key in object 'dbo.StockNames'. The duplicate key value is (AA).
    The statement has been terminated.
    Msg 1913, Level 16, State 1, Line 54
    The operation failed because an index or statistics with name 'SNIndex' already exists on table 'DailyPricesA'.
    And the code:
    USE NYSEDatabaseProject
    -- Drop the table to clean up database.
    --DROP TABLE DailyPricesA
    --GO
    -- Create the table.
    CREATE TABLE DailyPricesA (
    [stock_symbol] VARCHAR (5) NOT NULL CONSTRAINT FK_stocksymbol REFERENCES [StockNames]([stock_symbol]),
    [date] VARCHAR (15) NOT NULL,
    [stock_price_open] FLOAT (53) NOT NULL,
    [stock_price_high] FLOAT (53) NOT NULL,
    [stock_price_low] FLOAT (53) NOT NULL,
    [stock_price_close] FLOAT (53) NOT NULL,
    [stock_volume] INT NOT NULL,
    [stock_price_adj_close] FLOAT (53) NOT NULL,
    -- Add a foreign key.
    -- [stock_symbol] VARCHAR (5) NOT NULL CONSTRAINT FK_stocksymbol REFERENCES [StockNames]([stock_symbol]),
    BULK INSERT DailyPricesA
    from 'C:\Users\fenwky\NYSE_daily_prices_A.csv'
    -- firstrow = 2 skips the header row, field terminator =',' deterines the separator, and rowterminator defines where the row ends
    with (firstrow = 2, fieldterminator = ',', rowterminator = '\n')
    GO
    -- Create an index named DPAIndex, for the columns stock_symbol//'DPAIndex' already exists on table 'DailyPricesA'
    --CREATE INDEX DPAIndex
    --ON DailyPricesA (stock_symbol);
    -- Drop the table to clean up database.
    -- DROP TABLE StockNames
    -- GO
    CREATE TABLE StockNames
    -- Added Primary key to [stock_symbol]
    [stock_symbol] VARCHAR(5) NOT NULL CONSTRAINT PK_stock_symbol PRIMARY KEY,
    [stock_name] VARCHAR(150) NOT NULL,
    [stock_exchange] VARCHAR(50) NOT NULL,
    GO
    -- Insert the CSV into the table named Stocknames
    BULK INSERT StockNames
    from 'C:\Users\fenwky\NYSE_stock_names.csv'
    -- firstrow = 2 skips the header row, field terminator =',' deterines the separator, and rowterminator defines where the row ends
    with (firstrow = 2, fieldterminator = ',', rowterminator = '\n')
    GO
    -- Create an index named SNIndex, for the columns stock_symbol and stock_exchange.
    CREATE INDEX SNIndex
    ON DailyPricesA (stock_symbol);
    -- Select all from DailyPricesA
    select * from StockNames

  • Steps SSIS and SSAS Migration from sql server 2005 to 2012?

    steps SSIS,SSRS and SSAS Migration from sql server 2005 to 2012? any precautions to take while migration.
    any documentation or any specified steps.

    Hi Vijay,
    According to your description, you want to migrate SQL Server Integration Services and SQL Server Analysis Services from SQL Server 2005 to SQL Server 2012.
    For how to migrate SQL Server Integration Services, please refer to the article:
    http://www.bidn.com/blogs/DevinKnight/ssis/2718/upgrading-packages-to-ssis-2012.
    In addition, since the issue regards SQL Server Integration Services. I suggest you post the question in the SQL Server Integration Services forums at
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlintegrationservices.
    For how to migrate SQL Server Analysis Services, please refer to this article:
    http://www.codeproject.com/Articles/435703/Migration-from-SQL-server-to.
    In addition, since the issue regards SQL Server Analysis Services. I suggest you post the question in the SQL Server Analysis Services forums at
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlanalysisservices. It is appropriate and more experts will assist you.
    Regards,
    Michelle Li

  • Problem with foreign and primary keys migration from SQL Server to Oracle

    Hi folks, i'm using SQL Developer to migrate from a SQL Server database to Oracle and i'm stuck with a couple issues:
    The worst of them so far is the fact that i can't migrate any of the PKs and FKs. After successfully capturing the SQL Server DB model and converting it to Oracle, when the tool generates the scripts, all ALTER TABLE queries that add the PKs and FKs have their target columns duplicated.
    for example: when i'm trying to migrate a simple table that contains an Id (PK) and Name columns, the tool generates the following scripts:
    PROMPT Creating Table TestTable...
    CREATE TABLE TestTable (
    Id NUMBER(10,0) NOT NULL,
    Name VARCHAR2 NOT NULL
    PROMPT Creating Primary Key Constraint PK_TestTable on table TestTable ...
    ALTER TABLE TestTable
    ADD CONSTRAINT PK_TestTable PRIMARY KEY
    Id,
    Id
    ENABLE
    As for the FKs, the tool duplicates the columns as well:
    ALTER TABLE SomeTable
    ADD CONSTRAINT FK_SomeTable_SomeTable2 FOREIGN KEY
    SomeTable2Id,
    SomeTable2Id
    REFERENCES SomeTable2
    Id,
    Id
    ENABLE
    Does anyone have a clue on how to solve these issues? I'd be greatly thankful for any answers!

    Hi Fernando,
    I was unable to replicate this issue. My primary / foreign keys where defined using unique columns.
    PROMPT Creating Primary Key Constraint PK_Suppliers on table Suppliers ...
    ALTER TABLE Suppliers
    ADD CONSTRAINT PK_Suppliers PRIMARY KEY
    SupplierID
    ENABLE
    I tried a few things like
    capturing twice and renaming both models the same
    renaming the converted models
    but with no luck.
    I think this issue is occuring either at the capture or convert phase.
    1) Are you performing the capture online or offline?
    2) Can you provide a the entire DDL for one of these tables and its indexes to see if I can replicate?
    3) Did the capture or convert fail or have to be redone at any stage ?
    I all else fails I would attempt a capture and convert again using a brand new repository (create a new schema in Oracle and associate the migration repository with it).
    Regards,
    Dermot
    SQL Developer Team
    Edited by: Dermot ONeill on Oct 22, 2009 12:18 PM

  • Oracle 9i primary and foreign key constraint

    I had created table in the following way
    create table dept(deptno number,dname varchar2(20));
    create table emp(empno number primary key,ename varchar2(25), deptno number references dept(deptno));
    One can get constraint name and constraint type from user_constraints table. But I want to know name of the column of table from which column is used as foreign key in another table. How to get such information?

    SQL> Select *From user_cons_columns  A
      2   Where Constraint_Name In (Select r_Constraint_Name
      3                           From User_Constraints B
      4        Where Table_Name='EMP'
      5          And Constraint_Type='R'
      6          Group By r_Constraint_Name
      7          )
      8  /
    OWNER                          CONSTRAINT_NAME                TABLE_NAME                     COLUMN_NAME                       
    SCOTT                          PK_DEPTNO                      DEPT                           DEPTNO                             Edited by: babaravi on Oct 5, 2009 3:34 PM

  • I had to factory reset my computer now I have lost about 36 hours of purchased music and cant get any help from itunes.

    I have lost access to about 36 hours of music and can't get any help from itunes, any suggestions?

    HelplessGG wrote:
    I have lost access to about 36 hours of music
    Download Past Purchases  >  http://support.apple.com/kb/HT2519
    HelplessGG wrote:
    ...can't get any help from itunes, ...
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Suggestion:
    Once you get this resolved... Create and Maintain a Backup of iTunes.
    >  http://support.apple.com/kb/HT1751

  • Primary key and Foreign key on same column

    Hi, I am able to create below tables , primary and foreign keys as below.
    But Is this valid design? Can I define a column (ckey2 in table "child") as
    primary key and as well as foreign key?
    CREATE TABLE parent (
    col1 NUMBER,
    col2 NUMBER
    CREATE TABLE child (
    ckey1 NUMBER,
    ckey2 NUMBER,
    ckey3 NUMBER
    alter table parent add constraint parent_pk primary key( col1 );
    alter table child add constraint child_pk primary key( ckey2 );
    alter table child add constraint child_fk foreign key( ckey2 ) references parent( col1);
    Thanks.

    Can I define a column (ckey2 in table "child") as primary key and as well as foreign key?You mean you want to define a one-to-one relationship between parent and child tables.. why would you want to do that ? You might as well merge the 2 tables into one.

  • How to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.

    how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.  thanks

    INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
       SELECT col1, col2, col3, ...
       FROM   sourcedb.dbo.tbl
    Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • I need to reformat my computer and I will loose my itunes, How do I go about getting all my apps free and paid back when I reinstall everything (Please someone help)

    I need to reformat my computer and I will loose my itunes, How do I go about getting all my apps free and paid back when I reinstall everything (Please someone help)

    Have you failed to backup your computer?
    If so, then you will have to redownload.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I just got this phone and im so lost im having problems puttig my pics and music on the phone from my memory card from my previous phone

    i just got this phone and im so lost im having problems puttig my pics and music on the phone from my memory card from my previous phone

    Import the music and photos from the memory card with your computer and place the music in your iTunes library.
    Place the photos in a folder to be designated for transfer to your iPhone.
    Select Sync Music under the Music tab for your iPhone sync preferences with iTunes to transfer this music and any other music in your iTunes library and select Sync Photos under the Photos tab for your iPhone sync preferences with iTunes selecting the folder where these photos are located followed by a sync.

  • Primary Key and Foreign Key Constraints

    Hi All,
    I would like to know PRIMARY KEY and FOREIGN KEY constraints on existing oracle tables. Could any one suggest me how to find out.
    Thanks,
    RED

    You can query DBA_CONSTRAINTS to get a list of all the constraints on table A and/or table B. The documentation I linked to gives a full list of the data you can see in DBA_CONSTRAINTS, but it includes things like the referenced table name and referenced constraint name for a foreign key constraint. If A is a parent of B or B is a parent of A, you could match up the parent's primary key constraint to the child's foreign key constraint.
    More generally, though, if you don't know that one of the tables is a parent of the other, figuring out how to join the two tables is probably not something that can be done using just the Oracle data dictionary. You would probably need an understanding of the data model being used to figure out what intermediate table(s) needed to be joined in order to relate rows in A to rows in B.
    Justin

  • Microsoft Word and Excel Hang When Pasting From Apple Applications

    I have had a problem ever since upgrading to Snow Leopard. Word and Excel hang when pasting from Apple applications like Safari and Pages. Pasting to OpenOffice does not show the problem. Pasting from Firefox does not show the problem. I have resolved font duplicates, got rid of input managers, reinstalled Office removing plist files and normal templates but the problem persists. Microsoft is saying it is not their software after looking at the crash dump created from force quit. Besides, sticking to open source software , I am at a loss for what to try next besides reinstalling Mac OS X 10.6 (I am on 10.6.2 now). Any help appreciated. I have crash dumps and snapshots of the hung process if anyone can read them. Word is using close to 100% of the CPU when hung.

    Microsoft is saying it is not their software after looking at the crash dump created from force quit.
    If their software is freezing up, it's certainly nobody else's fault. If those Apple apps are for some reason creating bad clipboard data, Microsoft's apps should be able to gracefully recover and report the problem. Error handling is probably one of the most important, and most difficult, aspects of programming, but you can't blame poor error handling on anyone but the developer. I suspect that, rather than bad clipboard data, it's more likely to be a case of Microsoft's apps simply not understanding something about perfectly valid clipboard data, because they haven't properly followed Apple developer guidelines.
    Of course, that's not a solution. I can't really provide you a solution, other than to ask what version of Office you're using. If you're using too old a version of Word, you should update. You should also let us know what kinds of stuff you're copying. More info always helps to get better answers.

  • [svn:cairngorm3:] 17872: Popup: Exposed set accessor of open for view state usage and fixed bug when closing from model within popup .

    Revision: 17872
    Revision: 17872
    Author:   [email protected]
    Date:     2010-09-27 08:04:40 -0700 (Mon, 27 Sep 2010)
    Log Message:
    Popup: Exposed set accessor of open for view state usage and fixed bug when closing from model within popup. http://www.spicefactory.org/forum/viewtopic.php?p=3932. Added new sample to show model and view state interactions.
    Modified Paths:
        cairngorm3/trunk/libraries/Popup/src/com/adobe/cairngorm/popup/PopUpBase.as
        cairngorm3/trunk/libraries/Popup/src/com/adobe/cairngorm/popup/PopUpFactory.as
        cairngorm3/trunk/libraries/Popup/src/com/adobe/cairngorm/popup/PopUpWrapper.as
        cairngorm3/trunk/libraries/PopupTest/.actionScriptProperties
        cairngorm3/trunk/libraries/PopupTest/src/samples/MyPopup.mxml
        cairngorm3/trunk/libraries/PopupTest/src/samples/PopUpPM.as
    Added Paths:
        cairngorm3/trunk/libraries/PopupTest/src/PopUpModelExample.mxml
        cairngorm3/trunk/libraries/PopupTest/src/samples/MyPopupWithModel.mxml

    Lots to be excited about. BUT...Just updated to 8.1 on one of my computers to test it out...
    Sadly, the following issue is NOT fixed for me. Is it with new projects only?  I haven't started a new project on 8.1 I've only opened an old project but the issue that I'm referring to which involves also a delay/freeze of anywhere from a few seconds to a MINUTE while the render bar goes from yellow to red and then back to yellow is still there. Boo.
    On the list above...
    Switching between sequences can turn the render bar red.
    This issue is incredibly easy to replicate. I really do hope it gets fixed. Here are the steps:
    1) Create two sequences with multiple short clips (the more clips the better)
    2) Make sure GPU acceleration is enabled.
    3) Add warp stabilizer to the clips in both sequences. Again, the more clips the longer the delay/freeze will be as the render bar goes from YELLOW to RED and then eventually back to YELLOW again.
    4) Hit SAVE.
    5) Now, toggle between sequences. You'll hit a short delay with a few clips stabilized and a LONG delay with lots stabilized. In my case this delay is around a full minute. The render bar will go from YELLOW to RED and then back to yellow...eventually.
    6) Toggle back to the original sequence and the delay occurs again.
    7) Once you've toggled between sequences and have gone through this delay, that's it, there is no longer a delay...UNTIL...(and here's the big kicker)...until the project is SAVED again. After that the issue returns when you toggle between sequences. Both saving manually and AUTOSAVING cause this issue. No way around it except not editing with GPU acceleration.
    Not sure what the issue is...caching issue when saving maybe? Either way, it stinks and it's still there in 8.1. Big bummer.
    Again, lots to be excited about with this release but I really was hopefully this specific issue was resolved.
    Sigh.

  • How can we find the most usage and lowest usage of table in Sql Server by T-SQL

    how can we find the most usage and lowest usage of table in Sql Server by T-SQL
    The table has time stamp column
    StartedOn datetime
    EndedOn datetime

    The Below query has been used , but the textdata column doesnot include the name of the table ServiceLog.
    SELECT
    FROM
    databasename,
    duration
    fn_trace_gettable('F:\Program
    Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\log_148.trc',
    default)
    WHERE
    DATABASENAME='ZTCFUTURE'
    AND TEXTDATA
    IS
    NOT
    NULL
    --AND TEXTDATA LIKE 'SERVICE%'
    order
    by cpu
    desc; 

Maybe you are looking for

  • Runtime does not work!

    Hi, this is urgent. Process didn't run but exit code is ok. could somebody please help me? my code looks something like this: public boolean run() { try { Runtime rt = Runtime.getRuntime(); Process p = rt.exec("c:\\app.exe" + " " + arg); int exitCode

  • Replace the header line in the o/p file

    My scenarion is to generate a xml file,the xml file contains a header line <?xml version="1.0" encoding="utf-8"?> and this lineis  to be relaced with <XYZ>. it is multi message mapping -- splitting of messages 1:n, i cannot add any extra fields to th

  • Various menus (incl. Netflix) not shown anymore

    I've had the Apple TV for a while and have used it mainly for watching movies on Netflix.  However, today I turned it on and various menus are missing, including Netflix under the Internet menu. on the General menu, the software says its up-to date (

  • User Notification Log Files? Do They Exist

    Are there any log files that show that a user was notified about a particular required deployment and its' deadline approaching? We seem to have users who complain about unexpected installations or reboots. We have Client Settings > Computer Agent >

  • Bug in Kotoeri  (Japanese kotoeri input) please help ?

    I have kotoeri all setup but in a word document when I try to input japanese words (having checked hiragna or katakana) using my qwerty keyborad the kotoeri switches continuously between romajis and kanas like this : nいっpおn trying to type 'nippon' An