Use sqlplus command

Can someone tell me how to execute sqlplus command.

I`m Executing:
sqlplus user/pasw @/report/output/new/PlatformOut_Cdrs.sql

the error is:
SQL*Plus: Release 9.2.0.5.0 - Production on Wed Aug 9 15:37:44 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
HP-UX Error: 2: No such file or directory

Enter user-name:

---------------------
Please Help me.
Appreciate your reply
:confused: :frowning:

This means the instance of Oracle you are meant to use is not running. You need to contact your dba.

or sqlplus doesn't see the instance that you are connecting to. Connect using sqlplus user/pasw@DATABASE ... or, alternatively, you can set your ORACLE_SID variable.

Hi all,
I am new to sqlplus, anyone can help me to explain what's the following code is doing?

DECLARE
cursor c1 is select bts_int_id,
max(ave_busy_tch/res_av_denom14) maxBusyTch
from p_nbsc_res_avail
where to_char(period_start_time,'yyyymmdd')=to_char((sysdate-1),'yyyymmdd')
group by bts_int_id;
BEGIN
FOR x IN c1 LOOP
update RNP_temp_table set
bts_id = x.bts_int_id,
max_busy_tch=x.maxBusyTch
where bts_id = x.bts_int_id;
IF SQL%NOTFOUND THEN
insert into RNP_temp_table
( bts_id,
max_busy_tch)
values
( x.bts_int_id,
x.maxBusyTch);
END IF;
COMMIT;
END LOOP;
COMMIT;
END;
/

Thanks in advanced.

Anthony