Definition of the roles of database using DBMS_SESSION. Set_Role in ADF
Hello:In Oracle Forms, on login, we use DBMS_Session.set_Role () to define the database roles that grant the user access to the various database tables.
In Jdev 11.1.2.3, RedHat 5.8, we now perform the same functionality in Applications of Fusion ADF.
In the ADF, where we put the call to DBMS_SESSION. SET_ROLE()?
Is there a better way to accomplish this feature?
Thanks for the help.
You can override the method prepareSession of the AOS.
These might help:
http://www.techartifact.com/blogs/2012/09/preparesession-method-in-ADF.html
http://DBA-ADF.blogspot.com/2012/07/row-level-security-using-ADF-and.html
Tags: Java
Similar Questions
-
How dynamically update the role of oracle using the trigger
How dynamically update the role of oracle using the trigger:
I have svmanger owner of schema in the database. There are five tables belonged to svmanager.
Table A, B, C, D, E.
I have a role that is played only to these tables under the scheme: SVMANAGER_READ_ONLY
now, if I create a new table F under svmanager. the role that svmanager_read_only does not work is updated, so the user had assigned role cannot access table F.
is there a way to create the trigger for this role dynamically update any when a table is created or deleted?
Thank you.I really really really don't suggest to do this - it's a bad habit. If possible I'd just adding the grant as part of the steps to the role on the new creation of the table.
But for fun here's how you can accomplish this:create or replace procedure execute_grant(v_ddl in varchar2) is begin execute immediate v_ddl; end; /
create or replace trigger catch_create_table_trg after create on schema DECLARE ddl_job number; ddl_str varchar2(50); begin IF ora_dict_obj_type = 'TABLE' THEN ddl_str := 'GRANT SELECT ON '||ora_dict_obj_owner||'.'||ora_dict_obj_name||' TO SVMANAGER_READ_ONLY'; dbms_job.submit(job => ddl_job, what => 'execute_grant(''' || ddl_str || ''');', next_date => sysdate+(5/24/60/60)); END IF; end; /
Test it
create table F (id number(1));
Validate
select * from ROLE_TAB_PRIVS where ROLE = 'SVMANAGER_READ_ONLY';
-
Inserting a new record in the database using a form empty ADF
Hello
I'm trying to insert a new record into the database using a form.
I have an Employee table and its corresponding entity object and the view object. The table has an id that is used as the primary key and is filled using a sequence in the comic book.
Data controls, I dragged and dropped at the sight of the employee as a form of ADF and checked the submit button include. Then I dragged and dropped the validation on submit button operation.
When I connect to the app and go to the page used to create, I have 2 problems:
1 - the form is filled with the logged in user info.
2. If I try to change the news and validation, the user info is changed in the database and no new record is created.
It makes a little sense to me, but I would like to know if there is a way around it (get an empty form and insert a new record).
NB: the employee id is not part of the form, I want to be filled using the sequence.
Kind regards
MBUser, please tell us your jdev version!
To do this, you must create a new record before going to the display of the form page. In a stubborn workflow (btf), you drag the operation createInsert of the VO on the btf and it will generate a link method, add a view to the btf and put a navigation of the binding of the method of the page. Mark the method as 'Activity by default'. Now, ren, you call the workflow, you create a new record that will show your blank form.
Timo
-
The installation for EM 12 c document indicates "Install Oracle Database 11 g Release 2 (11.2.0.3) software on the host computer, where you want to create the database". I want to use Oracle database 12 c. Is there a template to preconfigure the repository on a database of 12 c? Or is there a work around?
For the version EM Cloud control 12.1.0.5, which is the most recent version of the MA, the models for the 12.1.0.2 of the database version is available here.
Note that, although a DB template helps you to simplify the installation process, you can always install EM12c without one. If necessary, look at the manual below:
http://docs.Oracle.com/CD/E24628_01/install.121/e22624/install_em_exist_db.htm#EMBSC159
Kind regards
-Loc
-
My databases are 11.2.0.3.7 Enterprise Edition. My OS is AIX 7.1.
I am to convert databases to use individual zones of rapid recovery and have two questions about what values to assign to database settings related to archived redo logs. This example refers to a database.
I read that if I specify
Log_archive_dest_1 =' LOCATION = USE_DB_RECOVERY_FILE_DEST'
the names of newspapers archived redo written in the default quick recovery area is '% t_%S_%r.dbf '.
In the past my archived redo logs have been appointed based on the parameter
log_archive_format='GPAIDT_archive_log_%t_%s_%r.arc'
I think log_archive_format will be ignored for logs archived redo written in the fast recovery area.
I am planning to write a second copy of the archived redo logs based on the parameter
ALTER system set log_archive_dest_2 = ' LOCATION = / t07/admin/GPAIDT/arch.
If I do this, the copy of logs placed in /t07 will be called '% t_%S_%r.dbf' or 'GPAIDT_archive_log_%t_%s_%r.arc '?
Before my use of a fast recovery area, I used the OEM 12 c Console to specify settings of backup of database that has been deleted and archived redo logs after 1 backup. Oracle manuals say rather specify a deletion of "none" policy and allow Oracle delete newspapers in the area of fast recovery if necessary. Since I got to keep a second copy of these log files in /t07 should I keep the policy that says to delete logs after 1 backup? If I don't do that, how will they removed from /t07?
Thank you
Bill
If I do this, the copy of logs placed in /t07 will be called '% t_%S_%r.dbf' or 'GPAIDT_archive_log_%t_%s_%r.arc '?
They will be "GPAIDT_archive_log_%t_%s_%r.arc". LOG_ARCHIVE_FORMAT is only ignored for directories under OMF.
Since I got to keep a second copy of these log files in /t07 should I keep the policy that says to delete logs after 1 backup? If I don't do that, how will they removed from /t07?
You can hold the deletion policy as it is. Oracle documentation, defining the STRATEGY of the ARCHIVELOG DELETION: "the deletion of archived newspaper policy applies to logs archive destinations, including the area of fast recovery."
-
Store the file of database using WEBUTIL
Hello
I used webutil_file_transfer. Client_To_AS_with_progress to download files from client to server applications using Forms 10 g
However, now I want to save the database file and not download on the database.
In addition to the problem, I was wondering if there is documentation available on WEBUTIL
I use Forms Builder version 10.1.2.0.2 on Windows XP
Help, pleaseUse webutil_file_transfer. Client_To_DB_with_progress.
There is no method for DB, but you can build it yourself looking in the code in client_to_as and client_to_db
-
Hello!
I have v7 IBM AIX and cluster HACMP set up two identical nodes included
I have a head node after the installation of database using dbca I got error with the message:
ORA-01102: cannot mount database in EXCLUSIVE mode
Database cannot mount)
Here is the information from the alert log:
MON may 25 18:00:07 2015
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
SNA system picked latch-free 3
With the help of LOG_ARCHIVE_DEST_1 parameter value by default as USE_DB_RECOVERY_FILE_DEST
Autotune undo retention is enabled.
IMODE = BR
ILAT = 84
LICENSE_MAX_USERS = 0
SYS audit is disabled
Commissioning:
Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
With the options of partitioning, OLAP, Data Mining and Real Application Testing.
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1/
System name: nodename
Name of the node: nodename
Version: 1
Version: 7
Machine: 0003F6E5D600
Using the settings in /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfiletestdb.ora side Server spfile
Parameters of the system with default values:
process = 500
sessions = 772
= 18G memory_target
control_files = "/ ctl1/oradata/testdb/control01.ctl".
control_files = "/ ctl2/oradata/testdb/control02.ctl".
control_files = "/ ctl3/oradata/testdb/control03.ctl".
DB_BLOCK_SIZE = 8192
compatible = "11.2.0.0.0."
db_recovery_file_dest = ' / backup/fra.
db_recovery_file_dest_size = 100G
undo_tablespace = 'UNDOTBS1.
Remote_login_passwordfile = "EXCLUSIVE."
db_domain = «»
dispatchers = "(PROTOCOL=TCP) (SERVICE = testdbXDB)" "
audit_file_dest = ' / u01/app/oracle/admin/testdb/adump.
AUDIT_TRAIL = 'DB '.
db_name = 'testdb '.
open_cursors = 300
diagnostic_dest = ' / u01/app/oracle '.
MON may 25 18:00:08 2015
PMON started with pid = 2, OS id = 14418020
MON may 25 18:00:08 2015
PSP0 started with pid = 3, OS id = 17891420
MON may 25 18:00:09 2015
VKTM started with pid = 4, OS id = 14090348 high priority
VKTM clocked at (10) precision of milliseconds with DBRM quantum (100) ms
MON may 25 18:00:09 2015
GEN0 started with pid = 5, OS id = 9109714
MON may 25 18:00:09 2015
DIAG started with pid = 6, OS id = 16449704
MON may 25 18:00:09 2015
DBRM started with pid = 7, OS id = 17104928
MON may 25 18:00:10 2015
DIA0 started with pid = 8, OS id = 13303950
MON may 25 18:00:10 2015
MA started with pid = 9, OS id = 12517522
MON may 25 18:00:10 2015
DBW0 started with pid = 10, OS id = 11993232
MON may 25 18:00:10 2015
LGWR started with pid = 11, OS id = 15401010
MON may 25 18:00:10 2015
CKPT started with pid = 12, OS id = 6619318
MON may 25 18:00:10 2015
SMON started with pid = 13, OS id = 16515222
MON may 25 18:00:10 2015
RECCE has started with pid = 14, OS id = 13172906
MON may 25 18:00:10 2015
MMON started with pid = 15, OS id = 15794324
commissioning 1 dispatcher (s) for '(ADDRESS =(PARTIAL=YES) (PROTOCOL = TCP))' network address...
MON may 25 18:00:10 2015
MMNL started with pid = 16, OS id = 18546742
commissioning or shared server 1...
Environment ORACLE_BASE = / u01/app/oracle /.
MON may 25 18:00:11 2015
ALTER DATABASE MOUNT
sculkget: failed to lock /u01/app/oracle/product/11.2.0/dbhome_1//dbs/lkTESTDB exclusive
sculkget: lock held by PID: 3670226
ORA-09968: cannot lock file
IBM AIX RISC System/6000 error: 13: permission denied
Additional information: 3670226
ORA-1102 marked during: ALTER DATABASE MOUNT...
But if I install the darabase even dbca on node secondary, all installed and executed successfully.
But in the two nodes even permissions, user oracle and oinstall group ID identified the same and $ORACLE_BASE and $ORACLE_HOME user owner oracle and oinstall user group.
A someone has encountered this problem and solved?
Thanks in advance!
Hello
you are using IBM AIX PowerHA for your database (active/passive) configuration. then you just install the binaries 'once' on one of the nodes. then coordinate with your operating system administrator to configure the fail the test scenarios.
for your question. before you start the database, make sure that there are no "orphaned" oracle process using the UNIX grep command:
$ ps - ef | grep ora
Kill the oracle of the hanging of the process to release the lock on the database file handle:
$ kill-9
I hope this helps.
Kind regards
-
Can us refresh database using the recovery catalog?
Hi all, I need update the dev of database using the prod database backup, we have TSM server and database of separate catalog for storing backups. No, my doubt is, we can update database dev using catalog, which has the backup of all info the prod
In my previous organization, we used to copy the backup of the prod dev we restore and recover it in dev db. But in this organization, we have a TSM server that stores all backups of prod and dev.
Please tell me we can update dev db using info catalogue simply and without copying backups of prod? If possible how?
Thank you
Harish
user8596912 wrote:
Yes I know that the content of the rman script.
But we have not, so how can we be expected to comment on?
My question is that the connection to the rman is good or bad?
It would depend on the content of the script you do not think that we need to see.
In the end, you can determine whether this is good or bad by testing.
Because the rman is not connected directly to the target db prod.
Have you read the link I gave you?
I would limit for you: a database mirroring
The docs in detail how to duplicate a database
1 - active database
2 - from a backup WITH a connection target (the database prod)
3. from a backup WITHOUT a connection target (the database prod) but WITH a recovery catalog connection
4 - from a backup WITHOUT connection AND connection catalog recovery target (the database prod)
BTW, why you score your own messages as 'useful' to your own problem?
-
ORA-06565: cannot run the ROLE VALUE from stored procedures
Hello!
I'm trying to call a procedure from a function. Among the statements in the procedure stored is of dbms_session.set_role ('HAVE');
I get the error "Cannot run a DEFINED ROLE less stored proceduers". I joined the call in an anonymous block above, but the error still exists.
Any idea will really help me.
Thank you>
I'm trying to call a procedure from a function. Among the statements in the procedure stored is of dbms_session.set_role ('HAVE');I get the error "Cannot run a DEFINED ROLE less stored proceduers". I joined the call in an anonymous block above, but the error still exists.
Any idea will really help me.
>
This will work only if the procedure is defined for the APPELLANT's rights.Roles are disabled in named PL/SQL blocks unless you use of the APPELLANT's rights by setting the code with AUTHID CURRENT_USER.
The Oracle documentation provides a very clear explanation - based restriction is for the NAMED PL/SQL blocks rights DEFINER of this use (the default):
>
Roles used in the appointed with rights to define blocksAll roles are disabled in any PL/SQL block named (stored procedure, function, or trigger) that runs with the rights of the author. Roles are not used to privilege control, and you cannot define roles within the procedure of a DEFINER rights.
>
The database Security Guide has the information in the section "operation of the roles in PL/SQL blocks (which, of course, wouldln was necessary if they didn't work.).
http://docs.Oracle.com/CD/B28359_01/network.111/B28531/authorization.htm#i1007304
>
The use of roles in a PL/SQL block depends on if it is an anonymous block, or a block named (stored procedure, function, or trigger), and if it runs with the rights of the author or the rights of the applicant.Roles used in the appointed with rights to define blocks
All roles are disabled in any PL/SQL block named (stored procedure, function, or trigger) that runs with the rights of the author. Roles are not used to privilege control, and you cannot define roles within the procedure of a DEFINER rights.The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that runs with DEFINER SESSION_ROLES rights issues, the query returns no rows.
See also:
Oracle database reference
Roles used in blocks named with the rights of the plaintiff and anonymous PL/SQL
Named PL/SQL blocks that run with the rights of the applicant and the anonymous PL/SQL blocks are executed at the end of the privileges granted through active roles. Current roles are used for verification within rights Summoner of privilege the PL/SQL block. You can use dynamic SQL statements to define a role in the session. -
Is is possible to connect Netbean IDE to the Oracle XE database.
Is possible to connect Netbean IDE to the Oracle XE database uses drivers provided with Netbean network.
I m giving continuation of input to Netbean parameter.
Data entry mode: entry field
Driver name: JAVA DB (Network)
Host: light-LMO
Port: 1521
Database: XE
Username:lightweight
Password: xxxxx
When tried connecting the Oracle XE using netbean I got following error.
ubable to add a connection. Could not establish a connection to the jdbc:derby://lightweight-ovm:1521 / XE
using org.apache.derby.jdbc.ClientDriver (insufficient during the reading of the network - wait a minimum)
6 bland and received only 1 byrtes. the connection has been lost.
However, I can able to connect in the jsp pages using the following connection string.
Class.forName ("oracle.jdbc.driver.OracleDriver");
Conn = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:XE", "light", "oracle");
What's not here?Please post this in
Database connectivity - Java Database Connectivity (JDBC) Forums...
http://forums.Sun.com/forum.jspa?forumid=48&start=0
Concerning
Rajesh -
change 'Expression of Identification' of the definition of the doc who is deployed
I want to change the "Expression of the Identification" of the definition of the doc.
I used this doc def (def1) of agreement and deployed. But I wanted to update doc def. When I change "Expression of Identification" of the definition of the doc,
I get the message below.
Cannot update XPath Expression as the document definition is used by active or inactive agreements
I created an another doc def (def2), did my contract to consult again doc def (def2), deployed and tried to change the original doc def (def1). But I'm still
having the same problem.Withdraw from the agreement existing (def1) in the page "Manage the deployment" of the Administration and then try to update the docdef.
Rgds,
Nitesh jegou -
Revoke the option for the roles of users admin
Hi all
OS: SunOS
DB: 10.2.0.3
Hello
How to revoke the privilege of admin for the roles of specific uses;
Ex:
I want to revoke admin option for roles connect, new_connect nmos_user from users.
It allows:
DEALER GRANTED_ROLE SMA DEF
------------------------------ ------------------------------ --- ---
ABC abc_role Yes Yes
Published by: [email protected] on March 13, 2010 05:03See: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm#SQLRF01603
"To revoke the ADMIN OPTION on a privilege system or a user role, you must revoke the privilege or the role of the user in total and then grant the privilege or role to the user without the ADMIN OPTION."
-
Hello
I have a question about the segragation of database access using authentication of the os (like sqlplus "/ as sysdba") in the windows environment. Let me briefly explain my requirement: -.
Assume that you have two DBA viz DBA1 and DBA2 and 4 resideds of databases in a windows server say A, B, C and D.Now I want to configure it in a way if DBA1 opens a session on the server then it may connect to the database A and B using only OS and DBA2 authentication can connect to database C and D only use OS authentication.
Please let me know how to configure for this requirement.
Version of the database is 11.2.0.3
Hello
This doc is 11.1 but I guess it's the same in 11.2 roles on Windows and administering external users
You create a group ORA_SID_DBA and doing it this way - in recent years I have done but it used to work ok...
See you soon,.
Harry
-
DIRT and what his role with the MS - SQL database
I am setting up the procedure for the Bare Metal Restore for our Telco servers. And I wonder if the DIRT back up the MS - SQL databases.
We have 4.0 (4) SR1 and use DIRT 1.0 Build 122
Thank you
Debbie
Restoration of dirt requires that the unit (same saved version) is running before, it'll do a restore - as these UnityDB and ReportDb databases must be present - restoring pulling data out of the local DBs first before their replacement by the saved tables (without things like the name of the local server, which GC/DCs we are connected) configuration etc...). So no, it won't it create on the fly because the restore cannot function without a server in operation of the first unit. This isn't just a backup and restore, but also a type migration tool.
-
Dear all,
I am a beginner in the ADF and am under Jdeveloper Studio Edition Version 12.2.1.0.0.
I have a page that consists of two taskflows.
First workflow has a fragment which is to have a table based on view object salespersons (not editable)
Second task flow contains a form of ADF from the same view object Salespersons.
As the user selecting a line in the table of the same record is displayed as no problem.
Now, I have added two buttons Activate and Deactivate that is to change the status of the sales.
I tried to use two ways an updated using the procedure of database and then put in value by programming and I have different questions with two of them:
Now, here's the code of the Java bean for activation:
Option A - the problem with this is the value of the column in the list (the first task rate displayed) is not synchronized
and Activate and Deactivate buttons are not disabled and active properly.
{} public void confirmActivation (DialogEvent dialogEvent)
If (dialogEvent.getOutcome () == DialogEvent.Outcome.yes) {}
DBSequence vId;
vId = dcId.getValue ((DBSequence));
Links BindingContainer = getBindings();
OperationBinding operationBinding;
operationBinding = bindings.getOperationBinding ("changeSalespersonsStatus") (OperationBinding);
operationBinding.getParamsMap () .put ("pId", vId.getValue ());
operationBinding.getParamsMap () .put ("pStatus", "A");
Object result = operationBinding.execute ();
dcStatus.setValue ("A");
} else {}
return;
}
}
Option B - the problem with this is that the value of input for status text appears in the Active form for all records in form regardless of its database.
{} public void confirmActivation (DialogEvent dialogEvent)
If (dialogEvent.getOutcome () == DialogEvent.Outcome.yes) {}
-no doubt this two lines are not needed here
DBSequence vId;
vId = dcId.getValue ((DBSequence));
dcStatus.setValue ("A");
BindingContainer links = getBindings();
OperationBinding operationBinding;
the operationBinding = bindings.getOperationBinding("Commit") (OperationBinding);
Object result = operationBinding.execute ();
} else {}
return;
}
}
Here's the code from the Fragment of shape for used buttons.
"< af:button text = 'Activate' id ="bActivate' icon="/icons/activate.png ' iconPosition = 'top '.
partialTriggers = "Bcreer bSaveInsert bCancelInsert dDeactivate dActivate".
Binding = "#{pageFlowScope.salespersonsForm.buttonActivate} '"
Disabled = ' #{bindings. " Status.inputValue! {= ' n '} ">"
< af:showPopupBehavior popupId = "pActivate" / >
< / af:button >
"< af:button text = 'Disable' id = 'bDeactivate' icon="/icons/deactivate.png ' iconPosition = 'top '.
partialTriggers = "Bcreer bSaveInsert bCancelInsert dDeactivate dActivate".
Binding = "#{pageFlowScope.salespersonsForm.buttonDeactivate} '"
Disabled = ' #{bindings. " Status.inputValue! {= 'A'} ">"
< af:showPopupBehavior popupId = "pDeactivate" / >
< / af:button >
Here's matching Popups for each of the buttons Activate and Deactivate.
< childCreation = "deferred" autoCancel af:popup = "disabled" id = "pActivate" >
< af:dialog id = "dActivate" type = "YesNo" title = 'Status of salespersons' closeIconVisible = 'false '.
affirmativeTextAndAccessKey = "& amp; Yes"cancelTextAndAccessKey ="& amp; (Cancel)
noTextAndAccessKey = "& amp; No '.
dialogListener = "#{pageFlowScope.salespersonsForm.confirmActivation}" >
< f: facet = 'buttonBar' name / >
< af:outputLabel value = "Are you sure you want to enable the seller?" id = "ol1" / >
< / af:dialog >
< / af:popup >
< childCreation = "deferred" autoCancel af:popup = "disabled" id = "pDeactivate" >
< af:dialog id = "dDeactivate" type = "YesNo" title = 'Status of salespersons' closeIconVisible = 'false '.
affirmativeTextAndAccessKey = "& amp; Yes"cancelTextAndAccessKey ="& amp; (Cancel)
noTextAndAccessKey = "& amp; No '.
dialogListener = "#{pageFlowScope.salespersonsForm.confirmDeactivation}" >
< f: facet = 'buttonBar' name / >
< af:outputLabel value = "Are you sure you want to disable the seller?" id = "ol2" / >
< / af:dialog >
< / af:popup >
Thanks in advance.
Best regards
Arif Khadas
If you bind components to a range of flow page bean. You must complete that it saves the State of the component longer than the life of the component.
To change the value of the GET value of the component of the link layer and change it.
In this way the changes are captured by the framework and you should see them.
Timo
Maybe you are looking for
-
Why my administrator stood account disappear?
I turned on my PC and where my name is usually to sign in with my password went along with my administrator rights. I lost programs, images and the basic access to my own PC. No, I have to open a session as a quest.
-
I might have a virus, but when I scan, there is nothing.
I have Trend Micro Internet Security Pro, and sometimes, when I'm on my computer, a notification appears saying blocked suspicious program. The editor is unknown, its activity was the modification of system files, and the risk was high. I did a scan
-
But I want to only print part of my email?
Just bought the HP Photosmart 7520 and downloaded Printer Control & HPePrint apps on my iPad. Everything is plugged in and running, but the print settings options in these two applications HP seems to be quite limited. For example, if I want to only
-
Hello I looked in the API fo this and not sure which one is all choose I'm trying to implement an edit field, but when I used the BasicEditField in the Simulator, when you press return it down all other components! Anyone know if there is an edit fie
-
original title: is it legal? I read on Internet that Linux users can download and run official Windows software on their computer using a program called wine.If the Windows program they want to run is something that is free, is Live Photo Gallery or