13 Replies Latest reply: Nov 28, 2012 11:34 PM by 751828 RSS

    database dump

    751828
      Hi experts,


      Can someone help me how to keep database dump in my local system. Iam having the below script and what to change this in order to dump it in my local.

      SET EXPDEST=G:\
      
      
      echo on
      echo Eksport startet > %EXPDEST%\exp_full_startet.txt 
      exp SYSTEM/milde5@spider FULL=Y FILE=%EXPDEST%\exp_full_spider.dmp LOG=%EXPDEST%\exp_full_spider.log BUFFER=900000 RECORDLENGTH=65536 statistics=none
        • 1. Re: database dump
          Niket Kumar
          SET EXPDEST=_G:\_

          change the underline path to your path in which you want the export...

          one more thing i want to ask...

          is this script running on server? and you want dump on your local machine?
          • 2. Re: database dump
            751828
            which script you are asking about? Can you explain me clear as iam not having much knowledge on data imports and stuff like this..
            • 3. Re: database dump
              Niket Kumar
              database is installed on your local system?
              • 4. Re: database dump
                751828
                No database is not installed in my system. It was installed some where remotely...
                • 5. Re: database dump
                  Niket Kumar
                  exp SYSTEM/milde5@spider FULL=Y FILE=%EXPDEST%\exp_full_spider.dmp LOG=%EXPDEST%\exp_full_spider.log BUFFER=900000 RECORDLENGTH=65536 statistics=none
                  in place of %EXPDEST% you can put direct path like c:\ or G:
                  exp SYSTEM/milde5@spider FULL=Y FILE=G:\exp_full_spider.dmp LOG=G:\exp_full_spider.log BUFFER=900000 RECORDLENGTH=65536 statistics=none
                  export will go to G:/ drive now.
                  • 6. Re: database dump
                    751828
                    now this is what my script look like after i modified according to you.
                    @echo off
                    @echo ----  exp_full.cmd  ------  START  ---------------------
                    REM               
                    REM     Kjører full eksport av Oracle database
                    REM
                    REM
                    REM
                    
                    SET EXPDEST=G:\
                    
                    
                    echo on
                    echo Eksport startet > %EXPDEST%\exp_full_startet.txt 
                    
                    exp SYSTEM/milde5@spider FULL=Y FILE=G:\exp_full_spider.dmp LOG=G:\exp_full_spider.log BUFFER=900000 RECORDLENGTH=65536 statistics=none
                    
                    
                    
                    @echo ----  exp_full.cmd  ------  FERDIG ---------------------
                    i pasted the above script into notepad and saved it as test.cmd file. Now i run that cmd but couldn't see any dump in my G: drive.What else i have to do.
                    • 7. Re: database dump
                      Niket Kumar
                      exp SYSTEM/milde5@spider FULL=Y FILE=G:\exp_full_spider.dmp LOG=G:\exp_full_spider.log BUFFER=900000 RECORDLENGTH=65536 statistics=none


                      just try above on command prompt...

                      send output of G:\exp_full_spider.log file
                      • 8. Re: database dump
                        751828
                        i tried this

                        C:Documents and Settings\swathi>exp system/milde@spider full=y file=G:\exp_full_spider.dmp log=G:\exp_full_spider.log BUFFER=900000 RECORDLENGTH=65536 statistics=none
                        'exp' is not recognized as an internal or external command,
                        operable program or batch file.
                        • 9. Re: database dump
                          Niket Kumar
                          thats the error.....


                          you need to set ORACLE_HOME.

                          cmd>echo %ORACLE_HOME%


                          if result is nothing set ORACLE_HOME to oracle software directory installed in your system like :

                          C:\oraclexe\app\oracle\product\11.2.0\server
                          • 10. Re: database dump
                            751828
                            i tried C:\>echo %ORACLE_HOME%
                            %ORACLE_HOME%

                            later i search the for the path that u said, below is the path i can find. Iam not sure whether oracle was installed in my local or not. But in the Start---> Programs i can see Oracle-Oracleclient11g_Home1

                            C:\product\11.1.0\client_1


                            Suggest me how to proceed...
                            • 11. Re: database dump
                              Niket Kumar
                              you haven't installed oracle on your system.

                              it is oracle client (installed on your system) which is used to connect oracle database running on other server or machine.

                              you cannot use exp in it.
                              • 12. Re: database dump
                                751828
                                Now how to proceed, actually my requirement is
                                please improve the current cmd file of Spider DB Full Export? 
                                
                                 
                                
                                Presume that the directory is C:\SpiderDB
                                
                                1.       Check any dump file exists in C:\SpiderDB
                                
                                a.       If yes, presume File1.dump is exist
                                
                                                                                                           i.      Check any dump file exists in the backup folder C:\SpiderDB \Spider_Dump_Backup.
                                
                                1.       If Yes, delete the file inside the backup folder C:\SpiderDB \Spider_Dump_Backup.
                                
                                                                                                         ii.      Move the File1.dump to the backup folder
                                
                                2.       Send email notification about job completion to yourself first (testing) by trigger the procedure “SENDMAIL”
                                
                                a.       In the email, please include the date creation and file size of dump file inside C:\SpiderDB
                                cmd file that they provide me
                                @echo off
                                @echo ----  exp_full.cmd  ------  START  ---------------------
                                REM               
                                REM     Kjører full eksport av Oracle database
                                REM
                                REM
                                REM
                                
                                SET EXPDEST=G:\
                                
                                
                                echo on
                                echo Eksport startet > %EXPDEST%\exp_full_startet.txt 
                                exp SYSTEM/milde5@spider FULL=Y FILE=%EXPDEST%\exp_full_spider.dmp LOG=%EXPDEST%\exp_full_spider.log BUFFER=900000 RECORDLENGTH=65536 statistics=none
                                
                                
                                
                                @echo ----  exp_full.cmd  ------  FERDIG ---------------------
                                I order to do so i want to import it into my local and test it first. If not can you please help me in doing directly as the above requirement.i will provide what all the info you need.
                                • 13. Re: database dump
                                  Niket Kumar
                                  you can modify yourself...

                                  use
                                  below for delete all files in spider directory.
                                  cmd>C:\SpiderDB\del /q  *
                                  use move command to move backup file.

                                  for mail check google links....

                                  http://tech.deepumohan.com/2010/07/export-oracle-database-with-auto-file.html

                                  more helpful

                                  http://www.dba-oracle.com/t_scripts_windows_export.htm