PL/SQL (MOSC)

MOSC Banner

Code help

edited Sep 27, 2013 3:52AM in PL/SQL (MOSC) 10 commentsAnswered
Hello All,
I need some help from you all ... Very sorry, even though this looks silly and simple but i'm newbie to PL/SQL coding.

I need help in writing one simple pl/sql block that connects to the user and executes the commands and comeout. For example -

sqlplus user/user
@test.sql

test.sql should has pl/sql block doing -

declare
select 'connect jones/xyz'||VALUE from v$parameter where NAME='db_name';

conn user2/abc<password> # this is output for above command, so it connect here to different user

begin
   drop sequence
   create squence
end


This i need to include in one of my shell scripts where i do not want to hardcode/viewable the user password to all who access the script. As the support development team is from different organization and they are not really helping us in this very small piece of code. Atleast some clue how to execute that connect part taken from SQL can help me in trying or starting my piece of code.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center