Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
While writing procedure n pl/sql developer, alter session not working. Can't set alter session.Please find the below code and let me know any idea.


SQL
BEGIN
              SELECT ls_live_schema||'_arc' INTO ls_from_user FROM dual;
              dbms_output.put_line(ls_live_schema);
              ls_sql:='Alter session set current_schema='||ls_from_user;
                EXECUTE IMMEDIATE ls_sql;
                -- ' || '' ||
                        --  ls_live_schema || '' || '_ARC';
                          --commit;
                          SELECT sys_context('USERENV', 'CURRENT_SCHEMA') INTO ls_curr_user FROM dual;
         --     using ls_from_user;
END;
Posted
Updated 18-Jun-15 23:44pm
v2
Comments
CHill60 19-Jun-15 6:32am    
Do you have the ALTER SESSION system privilege set for these credentials?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900