Skip to Main Content

SQL Developer Data Modeler

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

import DDL from SQL Server?

885257Nov 3 2011 — edited Dec 21 2011
can anyone help me understand exactly what kind of DDL statements are supported for IMPORT?

I'm trying to import a SQL Server schema. SQL Server Management Studio has a "Generate Scripts" option that will let you script objects in the database. Unfortunately, OSDDM won't import it properly.

Here's an example statement that won't work:

CREATE TABLE [hs_user_role](
[user_role_key] [int] IDENTITY(1,1) NOT NULL,
[hs_user_role_pk] [int] NOT NULL,
[hs_user_id] [char](20) NOT NULL,
[hs_role_id] [char](4) NOT NULL,
[hs_create_dt_tm] [datetime](7) NOT NULL,
[hs_create_user_id] [char](20) NOT NULL,
[seq_no] [int] NOT NULL,
[action] [varchar](50) NOT NULL,
[create_dt_tm] [datetime](7) NOT NULL,
[user_id] [char](20) NOT NULL,
[hs_row_id] [bigint] NOT NULL,
CONSTRAINT [PK_user_role_key] PRIMARY KEY CLUSTERED
(
[user_role_key] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

This statement has at least two problems.
One, the table name gets imported as "hs_user_role(" with the open paren character.
Two, the primary key can't be created, which of course cascades down to a number of other errors in the remaining script.

The specific error in the import log says "Column for index [PK_user_role_key] doesn't exist."

This makes me wonder: if DM won't import the file as it's generated by SQL Server, what will it import? Has anyone else gotten SQL DDL import to work well?

using version 3.0.0.665
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2012
Added on Nov 3 2011
4 comments
716 views