connecting to sqlplus [message #484596] |
Wed, 01 December 2010 18:41 |
ramesh55.sse
Messages: 262 Registered: December 2008 Location: Hyderabad
|
Senior Member |
|
|
Hi Experts,
Hi All,
This following is the job is schedule to refresh materialized views.
which is written in unix.
#!/bin/ksh
. $HOME/.jobmanrc
. $pjc_bin_path/PJCEFUNCS
JOBNAME mvrefreshj APPLICATION=$wedb_app_name MAXCOND=01 AUTOSTART
export WEDB_EOM=N
LOADAPPVARIABLES $wedb_env_file
JOB_PATH $wedb_path_file
# ============================================================================
# ============================== JOB BEGIN ===================================
# ============================================================================
#
# ============================ STEP 010 BEGIN ================================
#
#
# STEP_EXECUTE STEP010 sqlplus / @$WEDB_SQL/mvrefresh.sql
STEP_END
#
# ============================================================================
# ============================================================================
# ============================================================================
JOB_END
# =============================== JOB END ====================================
# ENDJOB mvrefreshj
# ============================================================================
The following is the sql file this job is callling.
WHENEVER SQLERROR EXIT SQL.SQLCODE
WHENEVER OSERROR EXIT SQL.OSCODE
set echo on
set serveroutput on
DECLARE
/*****************************
PROCEDURE: refresh snapshots
This procedure is called to refresh the mviews
*****************************/
procedure refresh_mviews IS
begin
DBMS_MVIEW.REFRESH('emp_mvw', 'C' );
commit;
end refresh_snapshots ;
/***** Main block *****/
BEGIN
refresh_snapshots;
End;
/
EXIT;
If I ran that job by default it is connect to user1 ,but i want to connect to user2.
Where should I give the connect statement and to write that code pleae help me.
I tried this
sqlplus user2/12345/@$WEDB_SQL after pressing again it's asking for username and passord.
Thanks.
|
|
|
|
|
|
|
|
|
|