11 Replies Latest reply on Feb 8, 2013 10:19 AM by 930854

    Consolidation

    930854
      Hi all,

      I am new in oracle. My job is oracle technical support. I need to consolidate the scripts in a single file whatever i have it. Is there any tool is available means, please let me know.
        • 1. Re: Consolidation
          Chanchal Wankhade
          927851 wrote:
          Hi all,

          I am new in oracle. My job is oracle technical support. I need to consolidate the scripts in a single file whatever i have it. Is there any tool is available means, please let me know.
          Hellow,

          Not uderstanding your question clearly.
          Script means what different text file, doc file or what.
          • 2. Re: Consolidation
            930854
            Sorry for the confusion. Script means .sql file. Developer develope the script based on requirement, i need to consolidate that scripts in single .sql file.
            • 3. Re: Consolidation
              sb92075
              927851 wrote:
              Sorry for the confusion. Script means .sql file. Developer develope the script based on requirement, i need to consolidate that scripts in single .sql file.
              any text editor can be used to modify *.sql files & join them as appropriate
              • 4. Re: Consolidation
                Chanchal Wankhade
                Hi,

                You can do it as shown below:-
                copy your all the .sql fine on one directory. now suppose you have 5 .sql find on test directory on d drive then follow the below steps
                go to run
                type cmd
                it will show you command prompt
                type D:(press enter)
                type *.sql >> script.sql
                -- you can modify above file name if you want consolidated file in .sql only 
                then follow above steps other wise just type txt or csv or other kind of format instate of .sql like suppose you want consolidated script in text format then type
                type *.sql >> script.txt
                best of luck.
                • 5. Re: Consolidation
                  930854
                  Hi,

                  I tried but i got the empty file. Please advice
                  • 6. Re: Consolidation
                    Chanchal Wankhade
                    hi,

                    specify your directory structure and what you have done step by step.
                    I think it should not fail. You must have run that command from the location where your .sql files are not resides.

                    Post your steps here.
                    • 7. Re: Consolidation
                      930854
                      Hi,

                      Steps:

                      Microsoft Windows [Version 6.1.7601]
                      Copyright (c) 2009 Microsoft Corporation. All rights reserved.
                      The system cannot find the path specified.

                      C:\Users\muhiadeen.a>cd C:\Users\muhiadeen.a\Desktop\test

                      C:\Users\muhiadeen.a\Desktop\test>*.sql >> script.sql
                      '*.sql' is not recognized as an internal or external command,
                      operable program or batch file.

                      C:\Users\muhiadeen.a\Desktop\test>

                      It generate the script file, but it's in empty file. Please advice.
                      • 8. Re: Consolidation
                        P.Forstmann
                        You must run exactly what is written because type is a Windows executable that displays file contents in a Windows console window:
                        type *.sql > script.sql
                        • 9. Re: Consolidation
                          930854
                          Hi,

                          It's working great, but in my folder am having only 5 files. After executing this command

                          type *.sql > script.sql

                          the script.sql file having more than 10 files contents. I need exact that 5 files contents only.

                          Please advice.
                          • 10. Re: Consolidation
                            JohnWatson
                            An odd question for an Oracle forum.
                            You can nominate your five files, and copy them into one file:
                            copy file1.sql + file2.sql + file3.sql + file4.sql + file5.sql all_five_files.sql
                            --
                            John Watson
                            http://skillbuilders.com
                            • 11. Re: Consolidation
                              930854
                              Hi john,

                              It's working good, Thank you for your valuable moment. I have one more question, if i have more than 100 files means that time also i need to use this command?