oracle - How to write a procedure to execute a .txt file -


I have several txt files on my local system, each of which has a table creation query. These are big tables, so I have a separate file for each table. I have to write a procedure / function which will execute each of these .txt files and make tables in tables.

How can I do this? The server is Oracle11g and I'm using SQL Developer to access it.

Just before the full script path on SQL Developer @ and execute it. East.

  @ 'c: \ script dir \ script1.sql' @ 'c: \ script dir \ script2.sql' @ 'c: \ script dir \ script3.sql'  

Select all the lines and press the Execute button. There is no need to write a complex process to access the file system and deploy the script. On SQL * plus, you only need to paste and enter each line, or call all script calls placed on the wrapper script. Just a

  @ 'C: \ script dir \ callAllScripts SQL'  

If I had to fully develop an automatic deployment tool for a system, So I can store the scripts on the local FS or access the server on a shared network folder, and to execute the slip in the same way, a loop on the shell or batch script called sqlplus, as I mentioned above Have done


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -