SQL & PL/SQL :: Change Password Without Using ALTER Statement?
Aug 9, 2010
Requirement: I need to create a Function to allow users to change their own password when they are logging in to an application. Also, I would prefer to not use the ALTER command.
I can use trigger to monitor ALTER TABLESPACE ddl statement against a particular tablespace in a schema.
CREATE OR REPLACE TRIGGER HOT_MAIL_DDL_CHANGE AFTER ALTER TABLESPACE <tbs_name> ON SHANNURA.SCHEMA BEGIN INSERT INTO HOT_MAIL_DDL_AUDIT_LOG VALUES (SYSDATE, SYS_CONTEXT('USERENV', 'SESSION_USER'), ORA_SYSEVENT, ORA_DICT_OBJ_TYPE, ORA_DICT_OBJ_NAME ); END; /
I think, line no.2 isn't a valid statement. Or can I use AUDIT instead - in fact, I want to monitor/audit only ALTER TABLESPACE ddl statement and that too for a particular tablespace only.
I'm using Oracle SQL Developer and querying on date fields. I use this "alter session" statement to set my default date time format to get my datetime values. My question is, is there a way I can incorporate the following statement into my "select" query so that Crystal can read it? I use the statement below before my select statement to query datetime differences. Problem is, Crystal doesn't like the statement below.
Using TO_CHAR( ) and formatting my date fields that way doesn't work when I have to take the difference between date fields to the minute/second level. That's why I use the alter session command below, but I cannot seem to incorporate it with my select statement as a Crystal data source.
alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS'
I need a PL/SQL stored procedure which will accept a datafile name as parameter and dynamically create and execute "alter tablespace" command to add this passed datafile dynamically.
how to play around with NDS dynamic sql and I'm trying to add a column on the fly.Basically the procedure is trying to take a table name, column name, and eventually a data type and adds it to a table.
It works fine without the bind variable for the column name, accepting the table name on the fly.As soon as it tries to use the column name I get an ORA-00904 invalid identifier exception.
Here is the procedure I'm using
CODEcreate or replace procedure test(tbl_name varchar2, col_name varchar2) IS qry varchar2(500); begin
I need know the impact in my oracle database 10g R2, if i change root/oracle passwords in my Oracle RAC environment, my database using ASM and the nodes is in Red Hat 4.7.
I am calling a form whose name is welcome from the menu module. Now there is a button "change password" on the welcome form and I want that when I call the welcome form automatically the change password button should be pressed and which in turn calls a new window for resetting of password.
I am calling the welcome form by using go_form('welcome');I tried this coding in the menu module.
go_form('welcome'); GO_ITEM('APP_VERSION.RESET_PASSWORD'); show_reset_password; ----------------------------------- PROCEDURE show_reset_password IS [code]....
some days ago we chaged sys,system and sysman password using SQL console. ORACLE 10.2.0.1.0 Now Backups and SQL console loggins are ok but we cant connect OEM console having: insufficient privileges, logging as sys / as sysdba
we reload (start / stop) oem console service and now the OM page is unable to be desplayed having (when starts finished no error messages was found):
The webpage cannot be found
or
Enterprise Manager is not able to connect to the database instance. The state of the components are listed below.
OBJECTIVE: To allow a user to change their own password after logging into an application.
BACKGROUND: I have a stored procedure where I pass the userid, old password, and new password. The stored procedure contains the following ALTER statement:
EXECUTE IMMEDIATE 'ALTER USER :uid IDENTIFIED BY :npwd REPLACE :opwd' USING IN v_user_id, v_new_pwd, v_old_pwd;
where v_user_id, v_new_pwd, and v_old_pwd are the arguments passed to the stored procedure.
FACTS: (1) The procedure compiles fine; (2) During execution, SQLCODE returns "0" (i.e. zero); (3) My userid does have permission to change my password and execute the stored procedure; (4) At the time I call the stored procedure, I am successfully logged into the application with my userid and old password.
PROBLEM: When I try to login with the new password I get the following error: "ORA-01017 invalid username/password; logon denied".
We have enable the alter log for audit purpose so the password will be display in the log which is not security. I try to use "password" to change password but very user got the error below.
SQL> password Changing password for RUDEE Old password: New password: Retype new password: ERROR: ORA-00604: error occurred at recursive SQL level 1 ORA-20014: -6502 ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 27
When i try to change the user account password, i get following error.
alter user bala identified by Ju4hlsd2;
ERROR at line 1: ORA-20178: ORA-20176: ORA-28003: password verification for the specified password failed ORA-20007: Password cannot consist of sequences of 3+ characters from the userid
One of my Customer had followed the document applied pertaining to mitigate against vulnerability CVE-2012-3132.
New Document Mitigation steps for CVE-2012-3132 [ID 1482694.1]
This was applied to a database and it stopped the 'password' command from succeeding in SQLPLUS. Once the trigger was disabled, it worked fine.
ORA-00604: error occurred at recursive SQL level 1 ORA-06531: Reference to uninitialized collection ORA-06512: at "SYS.NAME_SECURITY", line 165 ORA-06512: at line 2
Why is this behavior seen? By the way, he was able to change the password using TOAD. Only sqlplus is the issue.
how to change non - SYS oracle users' password in data guard envirnment. We all know that for SYS password change in data guard. DBA has to change in primary database by either "alter user SYS identified by xxxx" or create password file with orapwd.
Then scp password file to standby database. However, if I want to change SYSTEM or DBSNMP passwords, I change on primary with " alter user ....." SQL, then new passwords will be login dictionary. But this new SYSTEM pqssword will be shipped with redo log to standby and SYSTEM password on standby will be updated? I need technical answer on this question
Session 1 create table tab1 as select * from dba_objects where object_id is not null; alter session set events '10046 trace name context forever, level 12'; declare x number; begin for i in 1..4 loop
[code]....
Session 2
after "starting" the above pl/sql block from Session 1, I keep on querying tab2 from Session 2 And as soon as 2 records are inserted in tab2, I create index from Session 2
select * from tab2; select * from tab2; select * from tab2; N ---------- 1 2 create index i on tab1(object_id);
As I have tested from a single session (just before this test) such index is used for the sql statement
select count(1) into x from tab1 where object_id=2331;
However when I checked the trace file I am not geeting results as expected
I am expecting 4 execution plans - 2 FTS and 2 Index Access scans and for this I am issuing following command
SELECT COUNT(1) FROM TAB1 WHERE OBJECT_ID=2331 call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.00 0 1 0 0 Execute 4 0.00 0.00 0 2 0 0
[code]....
1) Why I am unable to see 4 execution plans - 2 with FTS and 2 with Index access when I mentioned 'aggregate=no'?
2) Whether the index i will be used for last 2 iterations after first 2 iterations of FTS?
If answer to above question 2) is 'No'
By which method I can force an ongoing sql statement in loop to take different execution path? Of course I can't hard parse sql in 'that' current session Will flushing Shared pool work in above case?
I am trying to create a procedure that will send in the customer id, password and new password. The procedure will say if it has been updated or not. this is the code i have.
--Patty Carson --Assignment 3 Question 3 --Description: Allows the user to change a password for a customer CREATE or REPLACE procedure ChgPwd (custid OUT number, password OUT VARCHAR2, newpassword IN VARCHAR2) AS [code]...
I want to know what if any person don't know the password of SYS, can he create password file, becauase i dont know the password of sys users, generally login with '/ as sysdba',
HOW to use variable P_TMPLID in following statement
TYPE typ_unrecon IS TABLE OF REC_' || P_TMPLID ||'_UNRECON%ROWTYPE index by binary_integer;
because its throwing error while compiling
and also in statement FORALL i IN unrecondata.FIRST .. unrecondata.LAST SAVE EXCEPTIONS --STRSQL := ''; --STRSQL := ' INSERT INTO REC_' || P_TMPLID ||'_UNRECON VALUES ' || unrecondata(i); -- EXECUTE IMMEDIATE STRSQL; INSERT INTO REC_' || P_TMPLID ||'_UNRECON VALUES unrecondata(i);---throwing error on this statement commit; --dbms_output.put_line(unrecondata(2).TRANSID); EXCEPTION
I have issue of TABLESPACES on test instance. Tablespace files are TEMP1,TEMP2 and APPS_UNDOTS1. Initially TEMP1 and TEMP2 were of 4 GB but now the have grown to 32 GB each respectively. Resulting an occupied space of 64 GB on test server. I want to reuse that space on test instance as those tablespaces never crosses used space of 1%. Reason of this problem was my DBA set AUTOEXTEND as ON for tablespaces.
I have a table Employee which gets updated and Inserted very frequently. Wanted to increase the PCTFREE value for this table
select table_name,pct_free,chain_cnt from user_tables where table_name='EMPLOYEE'
EMPLOYEE NULL 0
is the output. I altered the pctfree like below
ALTER TABLE EMPLOYEE PCTFREE 30
and I can see Table altered but the value is not reflecting in above command again. Where else I should alter the value and cross check that value is changed.
In the following merge statement in the USINg clause...I am using a select stament of one schema WEDB.But that same select statement should take data from 30 schemeas and then check the condition below condition
ON(source.DNO = target.DNO AND source.BNO=target.BNO);
I thought that using UNIONALL for select statement of the schemas as below.
I'm issuing an alter session setting NLS_DATE_FORMAT in a C batch process right after the connection takes place. The format I specify is YYYYMMDDHH24MISS, this is the format used all over the process. In my development environment this works perfectly, but I've had problems in other environments.
CASE A development environment: The process works fine, $NLS_LANG and $NLS_DATE_FORMAT environment variables are not set.
CASE B Test envirnonment 1: The process failed.$NLS_LANG=American_America.WE8ISO8859P1 $NLS_DATE_FORMAT environment variable is not set.For some reason the $NLS_LANG variable seems to have more weight than the alter session command.. why? The process works fine after setting $NLS_DATE_FORMAT to the desired format.
CASE C Test envirnonment 2: The process failed. $NLS_LANG and $NLS_DATE_FORMAT environment variables are not set. Can't get it to work here. why?