Skip to content

Instantly share code, notes, and snippets.

@Amoenus
Created April 3, 2017 10:39
Show Gist options
  • Save Amoenus/b6ba726a008f682b1cbb84bece20eac0 to your computer and use it in GitHub Desktop.
Save Amoenus/b6ba726a008f682b1cbb84bece20eac0 to your computer and use it in GitHub Desktop.
SQL Plus script runner
@echo off
echo Setting credentials
set user_name=USERNAME
echo User Name: %user_name%
set password=PASSWORD
echo Password: %password%
set net_service_name=DATABASESID
echo SID: %net_service_name%
echo running master.sql script
(
echo @master.sql
echo exit
) | sqlplus -s %user_name%/%password%@%net_service_name%
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment