Hey guys. Thanks for any help you can offer. I am new to Oracle SQL and have purchased Murach's 2nd edition of the title of this discussion. I am getting everything set up but there doesn't seem to be anything happening when I try to run the setup_database.bat file. I get an SP2-0310: unable to open file "setup_database.sql".
Here is the .bat file:
@ECHO off
:: Murach's Oracle SQL and PL/SQL
:: Mike Murach & Associates, Inc.
::
:: Uses SQL*Plus utility to run the SQL scripts that create
:: and populate the tables in the AP, OM, and EX schemas.
:: If necessary, edit the username/password
sqlplus system/system @setup_database
:: Display a message about the log file
ECHO.
ECHO For details, check the setup_database.log file in the current directory.
ECHO.
:: Display 'press any key to continue' message
PAUSE
Here is the setup_database.sql file:
spool setup_database.log;
prompt>Creating users/schemas
start create_users
prompt>Creating AP tables
start create_ap_tables
prompt>Creating OM tables
start create_om_tables
prompt>Creating EX tables
start create_ex_tables
spool off;
exit;
The book had said to modify the .bat file with c:\oraclexe\app\oracle\product\11.2.0\server\bin\sqlplus if the .bat didn't "find the correct version of the SQL*Plus application"...though that doesn't seem to be my issue I did that and still nothing worked. I get the error and the setup_database.log file remains empty. The log is empty because it isn't actually executing correctly and opening the sql file...so is my problem my SQL*Plus? It is version 11.2.0.2.0 and it shows that I am connected to the Oracle Database 11g Express Edition of the same release version. I know the user name and password of "system" aren't a good practice but I went with those as suggested by the book because I am on a secure machine. (In case you were wondering if it was a password/username issue perhaps.)
I had found this forum https://community.oracle.com/thread/2401518?start=0&tstart=0 which is similar but it looks like this guy was getting it logged and was using the wrong passwords. Mine isn't logging a thing.
I appreciate any help offered. Thanks in advance.