Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. CONVERTING ORACLE SCRIPT TO SQL SERVER

CONVERTING ORACLE SCRIPT TO SQL SERVER

Scheduled Pinned Locked Moved Database
databasesql-serveroraclesysadmintools
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    ps_prakash02
    wrote on last edited by
    #1

    Hi, I've tables, procedures and functions scripts of a oracle database. i need to convert it to sql server scripts. how to do that?. we don't have oracle database but we have only scripts for the oracle database objects, is it possible to convert those scripts to sql server and create those objects in sql server database. sql server version is 2005. Thanks in Advance

    S B 2 Replies Last reply
    0
    • P ps_prakash02

      Hi, I've tables, procedures and functions scripts of a oracle database. i need to convert it to sql server scripts. how to do that?. we don't have oracle database but we have only scripts for the oracle database objects, is it possible to convert those scripts to sql server and create those objects in sql server database. sql server version is 2005. Thanks in Advance

      S Offline
      S Offline
      Simon_Whale
      wrote on last edited by
      #2

      try this oracle to sql server conversion

      As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

      P 1 Reply Last reply
      0
      • S Simon_Whale

        try this oracle to sql server conversion

        As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

        P Offline
        P Offline
        ps_prakash02
        wrote on last edited by
        #3

        SQL Server Migration Assistant for Oracle (SSMA for Oracle), does it requires oracle client in my system, i don't have any oracle in my system at the same time i'm very new to oracle. i've tried some trial tools but everything require oracle database but i've only oracle script. how to convert those scripts to sql server based one.

        S 1 Reply Last reply
        0
        • P ps_prakash02

          SQL Server Migration Assistant for Oracle (SSMA for Oracle), does it requires oracle client in my system, i don't have any oracle in my system at the same time i'm very new to oracle. i've tried some trial tools but everything require oracle database but i've only oracle script. how to convert those scripts to sql server based one.

          S Offline
          S Offline
          Simon_Whale
          wrote on last edited by
          #4

          best thing I could suggest is to post some of the code and we'll give you a head start on its conversion

          As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

          P 1 Reply Last reply
          0
          • S Simon_Whale

            best thing I could suggest is to post some of the code and we'll give you a head start on its conversion

            As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

            P Offline
            P Offline
            ps_prakash02
            wrote on last edited by
            #5

            Hi, I'm posting sample table script CREATE TABLE "DEV"."APP_ID" ( "AID" NUMBER NOT NULL ENABLE, "ID_TYPE" NUMBER NOT NULL ENABLE, "CREATED" DATE DEFAULT sysdate NOT NULL ENABLE, "CREATED_BY" VARCHAR2(30 BYTE) NOT NULL ENABLE, "UPDATED" DATE DEFAULT sysdate NOT NULL ENABLE, "UPDATED_BY" VARCHAR2(30 BYTE) NOT NULL ENABLE, PRIMARY KEY ("AID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "APPLICATION_DATA" ENABLE, FOREIGN KEY ("ID_TYPE") REFERENCES "DEV"."ID_TYPE" ("ID_TYPE") ENABLE ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "APPLICATION_DATA" ; CREATE OR REPLACE TRIGGER "DEV"."T_APP_ID" BEFORE INSERT OR UPDATE ON APP_ID FOR EACH ROW BEGIN :new.updated := sysdate; :new.updated_by := username; if inserting then :new.created_by := username; end if; END T_APP_ID; / ALTER TRIGGER "DEV"."T_APP_ID" ENABLE;

            S 1 Reply Last reply
            0
            • P ps_prakash02

              Hi, I've tables, procedures and functions scripts of a oracle database. i need to convert it to sql server scripts. how to do that?. we don't have oracle database but we have only scripts for the oracle database objects, is it possible to convert those scripts to sql server and create those objects in sql server database. sql server version is 2005. Thanks in Advance

              B Offline
              B Offline
              Bernhard Hiller
              wrote on last edited by
              #6

              Also Oracle offers free versions of their engine for developers - get one. Then get that database with those scripts, and then use a conversion tool as already suggested.

              P 1 Reply Last reply
              0
              • P ps_prakash02

                Hi, I'm posting sample table script CREATE TABLE "DEV"."APP_ID" ( "AID" NUMBER NOT NULL ENABLE, "ID_TYPE" NUMBER NOT NULL ENABLE, "CREATED" DATE DEFAULT sysdate NOT NULL ENABLE, "CREATED_BY" VARCHAR2(30 BYTE) NOT NULL ENABLE, "UPDATED" DATE DEFAULT sysdate NOT NULL ENABLE, "UPDATED_BY" VARCHAR2(30 BYTE) NOT NULL ENABLE, PRIMARY KEY ("AID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "APPLICATION_DATA" ENABLE, FOREIGN KEY ("ID_TYPE") REFERENCES "DEV"."ID_TYPE" ("ID_TYPE") ENABLE ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "APPLICATION_DATA" ; CREATE OR REPLACE TRIGGER "DEV"."T_APP_ID" BEFORE INSERT OR UPDATE ON APP_ID FOR EACH ROW BEGIN :new.updated := sysdate; :new.updated_by := username; if inserting then :new.created_by := username; end if; END T_APP_ID; / ALTER TRIGGER "DEV"."T_APP_ID" ENABLE;

                S Offline
                S Offline
                Simon_Whale
                wrote on last edited by
                #7

                CREATE TABLE App_ID
                (
                aid INTEGER PRIMARY KEY NONCLUSTERED,
                id_type INTEGER FOREIGN KEY REFERENCES dev.id_type,
                created DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
                created_by varchar(30) NOT NULL,
                updated DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
                updated_by varchar(30) NOT NULL,
                )

                drop table app_id

                been a bit too long since I've done Oracle to remeber triggers so here an msnd refernce link triggers

                As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

                P 1 Reply Last reply
                0
                • S Simon_Whale

                  CREATE TABLE App_ID
                  (
                  aid INTEGER PRIMARY KEY NONCLUSTERED,
                  id_type INTEGER FOREIGN KEY REFERENCES dev.id_type,
                  created DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
                  created_by varchar(30) NOT NULL,
                  updated DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
                  updated_by varchar(30) NOT NULL,
                  )

                  drop table app_id

                  been a bit too long since I've done Oracle to remeber triggers so here an msnd refernce link triggers

                  As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

                  P Offline
                  P Offline
                  ps_prakash02
                  wrote on last edited by
                  #8

                  so we have to go with manual process if we don't have oracle database.

                  1 Reply Last reply
                  0
                  • B Bernhard Hiller

                    Also Oracle offers free versions of their engine for developers - get one. Then get that database with those scripts, and then use a conversion tool as already suggested.

                    P Offline
                    P Offline
                    ps_prakash02
                    wrote on last edited by
                    #9

                    Thanks bhiller, I'm downloading it. but it seems to be a huge file.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups