Tool/Code to migrate Oracle dump files to T-SQL format

Hi, I have a third party tool that takes an oracle dump file and creates a schema text file for the tables and then table files.  This is just peachy, except that the schema file is in PL/SQL ... I have no way (that I can do) to create the table schemas from this text file... this is the format the file is in:

CREATE TABLE "ACCOUNT_TYPE" ("ACC_TYPE" CHAR(1) CONSTRAINT "ACCTP_ACC_TYPE_NN" NOT NULL ENABLE, "ACC_SUB_TYPE" CHAR(1) CONSTRAINT "ACCTP_ACC_SUB_TYPE_NN" NOT NULL ENABLE, "SYS_CREATION_DATE" DATE NOT NULL ENABLE, "SYS_UPDATE_DATE" DATE, "OPERATOR_ID" NUMBER(9, 0), "APPLICATION_ID" CHAR(6), "DL_SERVICE_CODE" CHAR(5) NOT NULL ENABLE, "DL_UPDATE_STAMP" NUMBER(4, 0), "SUBS_NOT_ALLOWED" CHAR(1) CONSTRAINT "ACCTP_SUBS_NOT_ALLOWED_NN" NOT NULL ENABLE, "NAME_FORMAT" CHAR(1), "ADDRESS_REQ_IND" CHAR(1), "CAS_CREDIT_REQ_IND" CHAR(1), "INITIAL_CREDIT_CLASS" CHAR(1), "DEF_CAS_APPL_TYPE" CHAR(6), "FORCE_ZERO_BAL_IND" CHAR(1), "BILL_PROD_IND" CHAR(1), "BALANCE_HANDLE_IND" CHAR(1), "CCIR_PROD_IND" CHAR(1), "DEF_APPR_CTN_QTY" NUMBER(4, 0), "NATIONAL_NO_REQ_IND" CHAR(1), "DESCRIPTION" VARCHAR2(40), "SPECIAL_PARAMS" VARCHAR2(1000), "DEF_PRICE_CD_EQP" CHAR(6), "DEF_PRICE_CD_SRV" CHAR(6), "UNIDENTIFIED_PYM_IND" CHAR(1), "CUST_TP_FOR_TAX" CHAR(1), "WELCOME_LETTER" CHAR(1), "ALLOW_CHANGE_TYPE" CHAR(1) CONSTRAINT "ACCTP_ALLOW_CHANGE_TYPE_NN" NOT NULL ENABLE, "SOC_MATCH" CHAR(1), "RA_IND" CHAR(1), "DEFAULT_IND" CHAR(1), "DEF_SUPPRESS_BILL" CHAR(1), "ERATE_IND" CHAR(1), "SPEC_RES_ALLOC_IND" CHAR(1) CONSTRAINT "ACCTP_SPEC_RES_ALLOC_IND_NN" NOT NULL ENABLE, "LTPYMCRG_ALLOW_IND" CHAR(1), "GSA_GRID_PRST_IND" CHAR(1), "CORP_ID_IND" CHAR(1) CONSTRAINT "ACCTP_CORP_ID_IND_NN" NOT NULL ENABLE, "AUTO_CHARGE_IND" CHAR(1) CONSTRAINT "ACCTP_AUTO_CHARGE_IND_NN" NOT NULL ENABLE, "PREPAY_IND" CHAR(1) CONSTRAINT "ACCTP_PREPAY_IND_NN" NOT NULL ENABLE, "RESTRICT_EQUIP_IND" CHAR(1) CONSTRAINT "ACCTP_RESTRICT_EQUIP_IND_NN" NOT NULL ENABLE, "CRD_LMT_IND" CHAR(1) CONSTRAINT "ACCTP_CRD_LMT_IND_NN" NOT NULL ENABLE, "IDENTIFY_REQ_IND" CHAR(1) CONSTRAINT "ACCTP_IDENTIFY_REQ_IND_NN" NOT NULL ENABLE, "SSN_TAX_ID_REQ" CHAR(1) CONSTRAINT "ACCTP_SSN_TAX_ID_REQ_NN" NOT NULL ENABLE, "CNAM_SE" VARCHAR2(3) CONSTRAINT "ACCTP_CNAM_SE_NN" NOT NULL ENABLE, "SSN_IND" CHAR(1) CONSTRAINT "ACCTP_SSN_IND_NN" NOT NULL ENABLE, "TAX_ID_IND" CHAR(1) CONSTRAINT "ACCTP_TAX_ID_IND_NN" NOT NULL ENABLE, "PS_IND" CHAR(1) CONSTRAINT "ACCTP_PS_IND_NN" NOT NULL ENABLE, "DVC_TP" VARCHAR2(30) CONSTRAINT "ACCTP_DVC_TP_NN" NOT NULL ENABLE)  PCTFREE 10 PCTUSED 40 INITRANS 2 MAXTRANS 255 LOGGING STORAGE(INITIAL 16384 NEXT 81920 MINEXTENTS 1 MAXEXTENTS 400 PCTINCREASE 0 FREELISTS 2 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "POOL_DATA"

Etc... etc... for as many tables in the dump as there are.  I'm trying to automate this process in SQL Server but I don't know how to make the above code usable for T-SQL without writing a ton of parcing code to make it T-SQL... I need either a third party tool or someone who might have some code already prepared that does this.  I need to get this out fairly quickly... so, I'm hoping someone can help me.  Its very urgent.

Thanks!
Roxanne25Asked:
Who is Participating?
 
Roxanne25Author Commented:
Actually, after review, I believe I can do this myself using the REPLACE() function in SQL... I think I can just do a bulk insert on the text file and have each create table statement in one row, and then loop through the table and replace out all the non T-SQL code.  That should give me a usable CREATE TABLE statement to work with.

Thanks me :)
0
 
David LittleCommented:
Have you thought about using DTS? If you can connect to both your Oracle environment and the SQL Server environment, you can use DTS to both create the tables and migrate the data.

IF you don't want the data, just step through the "Import Data" wizard and point to your Oracle database as the source and the SQL Server database as the destination. Don't run the package but save it to the SQL Server database. Then go back in and DESIGN the package. Delete all the transformations and then execute the package. You'll still run all the create table steps. At the end, you could generate a script out of SQL Server to rebuild all the tables from scratch if you need it.

David
0
 
Roxanne25Author Commented:
No, I am using Oracle dump files.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
arbertCommented:
0
 
Roxanne25Author Commented:
That's not a duplicate question... that is my question.  And its not quite the same thing and the other one is closed.  I really need an answer to this.
0
 
arbertCommented:
Um.....looks pretty close.....

"Secondly, is there some way that I can read the .dmp file in SQL Server?  Or are dump files specific to only the platform from which they came?  I can get SQL to run a command line shell and run the tool to "undump" the oracle file, but just wondered if there was an easier way to do it. "
0
 
Roxanne25Author Commented:
Well, that question you posted was asking about another way to undump the file... I already undumped the file... now I'm asking about the specific contents of that file and how to convert that to T-SQL.  Definately not the same thing.  Also, the overall question wasn't exactly answered...an alternative was given by downloading oracle personal edition.  

So please help me with my current question if you can.  

Thanks.
0
 
YensidModCommented:
Asker found his own solution. Question is PAQed and 500 points refunded.

YensidMod
Experts Exchange Moderator
0
 
Roxanne25Author Commented:
I'm not a him... I'm a girl :P
hehe
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.