This is my scenario.
I have Test1.sql, Test2.sql and Test3.sql files with create, drop, insert, etc statements. The number of files could increase in the future.
I wanted to run all of them in a single script so I created a master script Master.sql, which has the below
@@Test1.sql
@@Test2.sql
@@Test3.sql
I run it as @"Path to the script\master.sql" using SQL plus command prompt on my windows and if I wanted to run it through SQL developer, I just open the master.sql file and run it. So far so good…
Now, I have to run the master.sql in various environments with different user and schema names but the user and schema names are hard coded in the scripts. I want to be able to replace all the occurrences of the hard coded names with parameters and pass them just once on Master script execution. Both from the command prompt and using SQL developer. How do I do it? Please advice.