Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: sebcj on January 15, 2008, 03:19:19 pm

Title: Import Oracle DB schema from ODBC (datatype issue)
Post by: sebcj on January 15, 2008, 03:19:19 pm
Hi

while i am importing a an oracle schema into a diagram, all the datatypes generating as varchar(255). can anyone help me to sort this issue?
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: «Midnight» on January 15, 2008, 06:21:59 pm
Don't know, but here's some things to check.

What version of Oracle are you importing?

What client (vendor and version) are you using to establish the ODBC (or OLEDB) connection?

What default DBMS product have you set for your project? You can set this on the Settings | Database Datatypes dialog; choose a Product Name from the drop-down and check the Set as Default box.

If these don't help search the forum. I'm sure I've seen this here before.

David
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: Luis J. Lobo on January 16, 2008, 01:16:34 am
I had the same problem some weeks ago. Try the "Microsoft Oracle for OLEDB" driver instead of the "Oracle Provider for OLEDB" when creating the ODBC connection.
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: sebcj on January 16, 2008, 08:29:31 am
I've changed the drivers, but still i am getting the same datatype :(, is there any other checks i need to do?
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: sebcj on January 16, 2008, 08:33:38 am
I'm trying to import oracle 9.1, I tried ORACLE ODBC DRIVER and Microsoft ODBC for Oracle, but still I am not able to import all datatypes. just varchar(255). Default DBMS is Oracle,
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: «Midnight» on January 16, 2008, 08:50:48 am
Are you perhaps missing some permissions on the Oracle side?
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: sebcj on January 16, 2008, 08:57:19 am
currently i've all required permissions in the schema
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: Luis J. Lobo on January 16, 2008, 09:08:09 am
In the ODBC connection window, try typing the "SCHEMA OWNER"
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: sebcj on January 16, 2008, 09:11:48 am
I already included the Schema owner window in ODBC connection window
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: «Midnight» on January 16, 2008, 09:13:26 am
Actually, try clearing that entry. Someone had a problem recently, and clearing the owner solve it.
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: sebcj on January 16, 2008, 09:24:15 am
you mean, remove connection, and recreate it?

I tried this for different schema's but for every schema imports, i am getting the same issue
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: sebcj on January 17, 2008, 07:17:05 am
All, at last i managed to import correctly, it was  the problem with the driver, I replaced the driver and now importing correctly.

One solution i needed now, that is, previously i imported 1 whole schema with varchar(255) datatype into one folder in datamodel, and created many datamodel diagrams based on that.  now, when i import the schema again with correct datatype into the same folder, how can I make these changes reflect in my data model diagrams?

Creating all datamodel diagrams again is a big task, i am looking for a solution to reflect these changes into my diagrams...

Can anyone help on these please?
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: «Midnight» on January 17, 2008, 08:21:58 am
Off hand I think a quick add-in is what you need. Just traverse the new model. For each table locate matching elements in the rest of your models. Then for each column in the table find the matching attribute in the other models and adjust the settings.

It might sound like work, but given the way EA works it would probably be pretty easy.

You might also be able to do this with a bunch of SQL statements against the EA back end repository. You'd have to be very careful about this unless you are expert at manipulating EA models this way. If anything goes wrong you're entirely without a safety net, and you might not find out until the model malfunctions at a later - and always more inconvenient - time.
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: Luis J. Lobo on January 17, 2008, 08:37:30 am
In the "Code Engeneering | Import DB Schema from ODBC..." window, "Synchonization" section, you can select into import as new tables or synch within existing Tables.

The synchronization maintains the existing relations of the Tables with other UML elements.

Try it.
Title: Re: Import Oracle DB schema from ODBC (datatype is
Post by: sebcj on January 17, 2008, 09:17:51 am
Thanks a lot louis, this works!!