import a .dmp file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iryelena
    New Member
    • Mar 2008
    • 6

    import a .dmp file

    Hello,
    the code as how to import a .dmp file of oracle 9i by browsing from a specific location .
    import to the database just clicking the button, in Forms Developer and selecting the files location.
    i am not that much experienced
    thats
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Originally posted by iryelena
    Hello,
    the code as how to import a .dmp file of oracle 9i by browsing from a specific location .
    import to the database just clicking the button, in Forms Developer and selecting the files location.
    i am not that much experienced
    thats
    Try using UTL_FILE package under your button click trigger and read a file from particular location and read the data line by line and insert into the oracle database.

    Comment

    • iryelena
      New Member
      • Mar 2008
      • 6

      #3
      i don't understand.
      When import a .dmp file use comand (with cmd)
      imp username/password@bd file=...... ignore=y full=y;
      i use this command in cod ?
      how i use UTL_FILE package(the cod).
      i don't know how to use it because i have no experience with programming.
      thank you verry much

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Originally posted by iryelena
        i don't understand.
        When import a .dmp file use comand (with cmd)
        imp username/password@bd file=...... ignore=y full=y;
        i use this command in cod ?
        how i use UTL_FILE package(the cod).
        i don't know how to use it because i have no experience with programming.
        thank you verry much
        You can also use IMP Command from CMD to import the data. So is that IMP command working for you?

        Comment

        • iryelena
          New Member
          • Mar 2008
          • 6

          #5
          i have to import .dmp with Developer Forms(just click to button),no in cmd.

          Comment

          • amitpatel66
            Recognized Expert Top Contributor
            • Mar 2007
            • 2358

            #6
            Try this piece of code would be helpful:

            [code=oracle]
            -- when button-pressed then....

            declare
            alrt number;
            v_directory varchar2(200) := 'c:\backup';
            -------
            path varchar2(100):= 'back_up'||to_c har(sysdate,'dd-mm-yyyy-hh-mi-ss');
            v_exp varchar2(200) := 'exp scott/tiger@orcl file = '||v_directory| |'\'||path||'.d mp owner=scott grants=yes'; --for specify user use owner=user
            -------
            begin
            host(v_exp);
            if form_success then

            set_alert_prope rty('msg',alert _message_text,' Form success');
            alrt:=show_aler t('msg');
            else
            message('there are errors ');
            end if;
            end;
            [/code]

            Comment

            • iryelena
              New Member
              • Mar 2008
              • 6

              #7
              the code was good for export, but if in c:\backup\ i have more than one file, how import every one of them;
              can you tell me what code i can write that when i press the button it opens a window (like "open"), where i can choose the one i need and import it in my data base

              Thanks

              Comment

              • amitpatel66
                Recognized Expert Top Contributor
                • Mar 2007
                • 2358

                #8
                Originally posted by iryelena
                the code was good for export, but if in c:\backup\ i have more than one file, how import every one of them;
                can you tell me what code i can write that when i press the button it opens a window (like "open"), where i can choose the one i need and import it in my data base

                Thanks
                This Link would give you good idea on how you can achieve your task!!

                Comment

                Working...