[Show all top banners]

CyLegend
Replies to this thread:

More by CyLegend
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 sql help
[VIEWED 5942 TIMES]
SAVE! for ease of future access.
Posted on 04-07-11 5:09 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hello, I am trying to print out the source for eachof the password verify function in Oracle, but it doesnt seem to work using the script below:

select name, text from dba_source where name in (select limit from dba_profiles where resource_name = 'PASSWORD_VERIFY_FUNCTION');




Any help is appreciated,
Thanks

 
Posted on 04-07-11 5:35 PM     [Snapshot: 8]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

by source do you mean the source code of the function, the one that is in  $ORACLE_HOME/rdbms/admin/utlpwdmg.sql?
Anyway here is a sql that displays profile, resource_naem and Limit
SELECT profile, resource_name, limit
FROM dba_profiles
WHERE resource_name='PASSWORD_VERIFY_FUNCTION';


Did some more search..it looks like when u run utlpwdmg.sql, it does three things
-creates a function called verify_function_11g  (for 11 g)
-Alters profile which enables the default profile with the new password fucntion.
-Creates legacy function verify_function.

if you are trying to print the source of these two functions, then first run that sql, that will create these two function.
Then do
select TEXT from all_source where TYPE='FUNCTION'
check if your function is there
and then do
select TEXT from all_source where name='VERIFY_FUNCTION'

I've not tried this myself, dont have admin rights.
See if this helps, or someone else might have better answer.
Last edited: 07-Apr-11 05:50 PM

 
Posted on 04-07-11 5:46 PM     [Snapshot: 21]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Thank you prankster and yes by source i meant the source code of the function
Last edited: 07-Apr-11 05:46 PM

 
Posted on 04-07-11 5:51 PM     [Snapshot: 37]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

just updated my original content, see if that helps.
 
Posted on 04-07-11 5:56 PM     [Snapshot: 40]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

if you are trying to print the source of these two functions, then first run that sql, that will create these two function.
Then do
select TEXT from all_source where TYPE='FUNCTION'
select NAME from all_source where type='FUNCTION'
check if your function is there


 
Posted on 04-07-11 6:00 PM     [Snapshot: 47]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I will try that, thanks
 
Posted on 04-08-11 11:44 AM     [Snapshot: 120]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 Hi Prankster,

Do you know of a script that will run through the table "dba_source" as well as "dba_profiles" to get to the user password ("password_verify_function" of dba_profiles").  I want to automate to list out all source code withought having to access each dba table.  The original script that I tried below did not seem to work:  Any help will be appreciated.

select name, text from dba_source where name in (select limit from dba_profiles where resource name = "PASSWORD_VERIFY_FUNCTION");

Thanks again!

 
Posted on 04-08-11 12:13 PM     [Snapshot: 129]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

IMO your original sql should work. Only thing is you dont have any verify_function created. Thats why it is displaying nothing.
Once you run utlpwdmg.sql and then assign particular function to the profile. The limit should have the funciton name . You can verify this by using following sql,

SELECT profile, resource_name, limit
FROM dba_profiles
WHERE profile='DEFAULT'and resource_name='PASSWORD_VERIFY_FUNCTION';

Currently you'll have something like below since no verify function is assigned to a profile.
PROFILE                        RESOURCE_NAME                    RESOURCE_TYPE LIMIT                                   
------------------------------ -------------------------------- ------------- ----------------------------------------
DEFAULT                        PASSWORD_VERIFY_FUNCTION         PASSWORD      NULL                                    

Once you apply password verification function to the profile using
ALTER PROFILE DEFAULT LIMIT
PASSWORD_LIFE_TIME 60
PASSWORD_GRACE_TIME 10
PASSWORD_REUSE_TIME 1800
PASSWORD_REUSE_MAX UNLIMITED
FAILED_LOGIN_ATTEMPTS 3
PASSWORD_LOCK_TIME 1/1440
PASSWORD_VERIFY_FUNCTION verify_function;


The above output would look something like below
PROFILE                        RESOURCE_NAME                    RESOURCE_TYPE LIMIT                                   
------------------------------ -------------------------------- ------------- ----------------------------------------
DEFAULT                        PASSWORD_VERIFY_FUNCTION         PASSWORD      verify_function

Then your original should work. I've not tested it out myself, neither done it before, but did some search. And this makes sense to me. There might be better answers from DBAs. Let us know if u find better soln.
Last edited: 08-Apr-11 12:13 PM

 
Posted on 04-11-11 4:53 PM     [Snapshot: 229]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 Prankster thank you the script worked perfectly. 
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 30 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
nrn citizenship
ढ्याउ गर्दा दसैँको खसी गनाउच
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
Travelling to Nepal - TPS AP- PASSPORT
कल्लाई मुर्ख भन्या ?
Morning dharahara
मन भित्र को पत्रै पत्र!
emergency donation needed
Guess how many vaccines a one year old baby is given
जाडो, बा र म……
Elderly parents travelling to US (any suggestions besides Special Assistance)?
Susta Susta Degree Maile REMIXED version
1974 AD Pinjadako Suga Remixed
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters