This shows user=1 has permission on Account=4 , user=2 does not have access priviledge on Account_id=5.Now my requirement is to write a SQL query such that If user has permissions on a given leaf node then all the parent / grand parent nodes should also be returned.
Eg:
SELECT * FROM (.......) where USER_ID=2;
I've the following data and i need the parent and leaf most child,including their id's
Create table par_chld (id,p_id,c_id) as (select 1,900,501 from dual union all select 2,900,502 from dual union all select 3,900,503 from dual union all select 4,100,900 from dual union all select 5,200,900 from dual union all select 6,300,400 from dual union all select 7,101,500 from dual union all select 8,102,500 from dual union all select 9,103,500 from dual union all select 10,201,600 from dual union all select 11,201,601 from dual union all select 12,201,602 from dual )
In the above data p_id =100 has c_id 900 , and this 900 acts as a parent which has child 501 , 502 ,503
And the output should be in the following format , Where i don't need the middle level data. I need parent and its leaf child along with the id's of parent and child
I tried the following query where i got the p_id,id_c,c_id columns , but unable to get the column id_p
select connect_by_root p_id p_id ,id id_c,c_id from par_chld where connect_by_isleaf =1 start with p_id not in (select c_id from par_chld where c_id is not null) connect by nocycle p_id =prior c_id
i'm trying to duplicate my RAC database with ASM and 2 nodes to a single node, non ASM with rman duplicate database for standby with active database on windows. The problem is i dont know how to remove RAC configuration when duplicating the database.
Here is the procedure:
On standby i've: - installed database software, - configured listener and tnsnames, - added instance service (oradim -new -sid STANDBY -intpwd PASSWORD -startmode M), - configured initora (with only db_name = STANDBY) - configured orapwd file - startup nomount
on RAC node1:
rman target sys/PASSWORD@RAC connected to target database RMAN> connect auxiliary sys/password@STANDBY connected to auxiliary database: STANDBY (not mounted)
now for the duplicate command:
RMAN> duplicate target database 2> for standby 3> from active database 4> spfile 5> parameter_value_convert = '+DATA/RAC','D:\oracle\11.2.0\DATAFILES\DATA\STANDBY' 6> set db_unique_name='STANDBY' 7> set log_file_name_convert = '+DATA/RAC','D:\oracle\11.2.0\DATAFILES\DATA\STANDBY' 8> set db_file_name_convert = '+DATA/RAC','D:\oracle\11.2.0\DATAFILES\DATA\STANDBY';
i have tried adding this parameter - set cluster_database='false' but no luck.
[oracle@server03 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME CLUSTER_NODES="" -local Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 20127 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/app/oraInventory 'UpdateNodeList' was successful.then I executed:
To deinstall the Oracle home from the node you are deleting, run the following command from the Oracle_home/oui/bin directory:
Checking swap space: must be greater than 500 MB. Actual 20127 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-06_12-05-36PM. Please wait ...[oracle@server03 bin]$ Oracle Universal Installer, Version 11.1.0.7.0 Production Copyright (C) 1999, 2008, Oracle. All rights reserved.
[code]....
When I arrive to the point 5 I see one resource ora.DPCTTest.db ONLINE on one server (server02 or server03 that are the nodes I want to remove). If I execute:
crs_relocate ora.db_name.db
I obtain: [oracle@server03 bin]$ ./crs_relocate ora.DPCTTest.db Attempting to stop `ora.DPCTTest.db` on member `server02` Stop of `ora.DPCTTest.db` on member `server02` succeeded. Attempting to start `ora.DPCTTest.db` on member `server03`
I have a parent table EMPLOYEE which includes columns (sysid, serviceno,employeename...) sysid is Primary key, serviceno is Unique key and I have child table DEPENDENT includes columns (sysid,employee_sysid,name,dob...) here again SYSID is primary key for DEPENDENTS table, employee_sysid is Foreign key of EMPLOYEE table.
Now I want to change SYSID (using sequence) in EMPLOYEE table which need to be update in DEPENDENTS table as well
Note: I have 10000 records in EMPLOYEE table as well as I have 5 more child tables which need to update new SYSID.
I am trying to use rollup for a total, but it doesn't work because what I'm totaling is too conditional. I even tried adding on the totals to the end using a union and a specialized function, but for some reason, the order by stops working when I do the union (all field aliases and types are the same).I know the structure of the query itself probably isn't the best, how I can get the grand total, The subtotals from the rollup work fine, though.
The order by query runs fine against both parts of the union when they are run individually, but once I make it part of the union - the first part of the order by is an unknown field and the second is not a SELECTed list expression. I've commented out the union here. The statement works fine without it except for the grand total being all 0s. I kind of understand why it's all 0s, but not how to get around that.This is running in Oracle 10g2. I am trying to get totals for decisions by each of the four component values: ex_land, ex_imp,tx_land,tx_imp and then subtotals for each component values.
That works for the following query, but I cannot get a grand total through the rollup.
Below is the statement I am working with. When I get the result the under the Tester column it is a empty space after the total has been done. How can I add the word "Grand Total" under the tester column after the rollup.
SELECT BG_detected_by Tester, CONCAT(Round(count(bg_target_rcyc) / count(bg_status)* 100), '%') Percentage_Compeleted,count(BG_Target_RCYC) Total_Target_Cycle,count(bg_status) Total_Defects From Bug where BG_STATUS = 'Open' GROUP by Rollup(BG_DETECTED_BY,BG_STATUS) having (grouping(bg_detected_by) = grouping(bg_status))
Tester Percentage_completed Target Defects empty space --->Grand Total
Oracle VM 2 Node RAC cluster Oracle 11G 11.2.0.3.0 Oracle 11g rel 2 GI
on current 2 node cluster we have GI and RAC db configured Nodes: vmorarac1,vmorarac2
we shutdown vmorarac1 to clone it to vmorarac5
on new node I have changed the hostname to vmorarac5 In /etc/sysconfig/network-scripts/ifcfg-eth0 change ip to new ip and same for /etc/sysconfig/network-scripts/ifcfg-eth1 152.144.199.210,152.144.199.211
mad echanges to /etc/hosts on vmorarac1/2 for 2 new IP address assigned to vmorarac5
I believe, in a multiple RAC Physical Standby nodes only one node applies the archivelogs to the standby database. How you can find which node is the APPLY NODE using a SQL query?
I know you can veiw this information by querying the standby configuration using DGMGRL but how would you find out this information from a remote client using SQLPlus/PLSQL?
We have oracle database 10g(10.2.0.4) running on AIX 5.1. we have installed 2-node RAC on another server AIX 6.1 . Now we want to migrate our single node database to new 2-node rac environment. how we can move/migrate/cluster-aware our single node database to 2-node rac?
In a classic report, I'm using the Sum functionality and breaks by First Column to get subtotals and report total. I Repeat Headers on Break which works great for the subtotals but I would like for the report to display the column headers above the report total for easier reading. If the last grouping has a lot of data, the user needs to scroll up to read the column headers when looking at the Grand Total.
Is there a way to Repeat Headers prior to report total?
I am installing Oracle 10g Clusterware in RHEL 5 Server. When i run root.sh in the second node the last step Running vipca(silent) for configuring nodeapps failed. Then i run VIPCA manually in second node and configured vip configuration successfully,but when i checked the post-checks for cluster services the Checking existence of VIP node application,Checking existence of ONS node application and Checking existence of GSD node application in second node failed. I am able to ping both the servers one another with vip name successfully and the CSS,CRS and EVM appears healthy in both nodes. 1. Does the vip configuration is proper? If no what is causing this error and how to rectify it? Find the output below
I would like get more details about single node RAC.. What is single Node RAC?..
1). just configure only one server instead of two node... same RAC installation.. cluster installation and shared disk configuration in single server itself.. in future we can add node to this ... 2). in 11gR2 having new feature Single Node RAC.. Multiple instances running on same node and configure using Cluster...
is there any advantage using single node rac(other than online upgrade to full RAC).
wanted to grant dbms_scheduler permission to the system user in oracle 11.2.0.3,but it is showing insufficient privileges, but my System has Sysdba rights.
SQL> SELECT * FROM v$pwfile_users WHERE sysdba='TRUE'; USERNAME SYSDB SYSOP SYSAS ------------------------------ ----- ----- ----- SYS TRUE TRUE FALSE
[code]....
Revoke succeeded.
SQL> conn system Enter password: Connected.
[code]...
while i ran this query " SQL> select * from session_privs;"
for system user i have 202 rows of different privileges,but the same query for sysdba has 208 rows...
I'm trying to add the third node to my existing two node cluster. In fact i succeded adding the node but i have the following problem:
-when i start node 1 and 2, everything is ok, but on node 3 startup one of the other nodes fails -this happens in any combination: start 1 and 3, everything is ok. when i start node 2, node 3 fails
The asm configuration (disks, permissions, etc) is the same on all three nodes.find below the asm and crsd log details from the failure time:
alert_ASM.log NOTE: enlarging ACD for group 1/0x124851d1 (DATA) WARNNING: cache read a corrupted block group=DATA dsk=4 blk=1 from disk 4 +NOTE: a corrupted block from group DATA was dumped to /u01/app/oracle/diag/asm/+asm/+ASM3/trace/+ASM3_rbal_4109.trc+ WARNNING: cache read(retry) a corrupted block group=DATA dsk=4 blk=1 from disk 4 [code]...
un-documented parameter _trace_files_public / I want to set this to true so my app team can review trace files. better way to proceed to open read permissions for non oracle users.
I have created and role in my database and assign privileges as per following query.
Select 'Grant select on'||' user.'||object_name||' '||'to MyRole ;' from all_objects where object_type in ('TABLE','VIEW') and owner='username';
After granting role to new user everything work fine.I want to know a way to sync role with any newly created object.
Should I create a job that may execute above sql store results in a file and then execute to ensure all privileges are up to date for role or there any other optimal way exist ?
I've noticed that the backup files produced by RMAN (Database is 11.2.0.2.0 Enterprise Edition) )on a RHEL5.5. server which is running ASM have group permissions assigned to ASMADMIN (so the file permissions are assigned to ORACLE:ASMADMIN) as opposed to OINSTALL or any other group.
While this is not an issue (it's not currently impacting us in any way) I'm curious as to how and why this happens. I suspect it is related to the fact that the oracle executable has these permissions also but I can't find any material to confirm my suspicion.
i am using datapump to import database from 10g to 11g . all the tables and users everything got transferred but some grant permissions (create session) on users ,not importing to 11g. but same process imports grant if if do datapump to another 10g db .
I have an automated process which runs on an Oracle 8i database server as user abc.This process creates views/tables in other schemas, on the same database server, which point to objects owned by the abc user.
The issue I'm getting is that when I try to execute GRANT SELECT ON xyz.view123 TO PUBLIC as the abc user, I get an insufficient privileges.I should add that the abc user created the xyz.view123 table/view.
What grants/priviliges or whatever do I have to do to the abc schema?
Initial situation: Oracle 10g database single instance on Windows 2008 (datafile within NTFS partition) Final situation: same database upgraded to Oracle 11g r2 on a two nodes RAC on Windows 2008 (datafile within ASM)
In your opinion, is this the best way to achieve the job ?
1) on the two nodes install grid 11gr2, asm, rdbms 11g r2 (SE) 2) export full from 10g 3) create a new empty 11g r2 database in the RAC 11g r2 infrastructure with the same tablespace layout of 10g database 4) import full from 10g to 11g r2
I'm trying to install 2 nodes oracle RAC 11gR2 on SLES11. I configured DNS for public,virtual, private and scan IPs. when I check with nslookup, everything seems ok. but when I run runcluvfy.sh, it says that:
" PRVF-5636 : The DNS response time for an unreachable node exceeded 15000 ms on following nodes: rac1,rac2"