SQL & PL/SQL :: How To Check If The Cluster Exist In Database
Apr 27, 2010We can use the clause "CREATE CLUSTER mycluster.." to create a cluster.
How to check if the cluster exist in my database, so I don't have to create the cluster again.
We can use the clause "CREATE CLUSTER mycluster.." to create a cluster.
How to check if the cluster exist in my database, so I don't have to create the cluster again.
Usually we check 1 row of data in table and compare if they exist, i want to compare different set of row all together to comapre and take the decisions
eg.
emp table_source
d_key emp_no invol
1 103499 1
1 99262 2
2 103499 1
3 103499 1
3 99262 2
target table
emp_no invol
103499 1
99262 2
103499 1
in the above example i have to check for d_key for set of row exist in target or not, so by above example d_key 1 and 3 has save value in 2 different rows so i want to check if the combination of rows
103499 1
99262 2
as a set appear in source then do nothing else insert so first time d_key 1 both records will insert but for d_key has same set in 2 rows will not be inseted. the number of row can be more than 2 also . so for the given key if we have 3 rows in source then i have to compare all the 3 same set of row in target exist of . in the target i don't have any extra column.
We are in 11gR2 in windows 2008. Our database is 2 nodes rac. I got alert message below.
Host=xxxx.xxxx.xxxx.xx.xxTarget type=Cluster Target name=ora-scan Message=ora.registry.acfs has 1 instances in INTERMEDIATE State Severity=Warning Event reported time=Oct 17, 2013 6:40:45 AM EDT Operating System=Windows Platform=x64 Associated Incident Id=xxxx Associated Incident Status= New Associated Incident Owner=SYSMAN Associated Incident Acknowledged By Owner=No Associated Incident Priority=Low Associated Incident Escalation Level=0 Event Type=Metric Alert Event name=resource_status:crs_event_composite_status Metric Group=Resource StateMetric= State ChangeMetric value=PARTIALLY_INTERMEDIATEKey Value=resource_ora.registry.acfs.type_ora.registry.acfsKey Column 1=KeyRule Name=EDC - Metric Alert,Warning Rule Owner=SYSMAN Update Details:ora.registry.acfs has 1 instances in INTERMEDIATE State Incident created by rule (Name = EDC - Metric Alert, Warning; Owner = SYSMAN).
I did check the cluster resources by srvctl status resource -t and all of resources are in online and none of them i saw in intermediate state. Is there any other command and option to investigate this error?
I have to create a stored procedure having some 10 cursors and i have to display the data's fetched by select statement in cursors using dbms_output.put_line().
for ex:
-------
CREATE OR REPLACE PROCEDURE PROC AS
CURSOR C1 AS SELECT * FROM EMP;
BEGIN
FOR R IN C1
LOOP
[code].....
My question is while creating procedure i want to check if the object exist in database or not.
If EXIST
NO PROBLEM MY CODE CREATE THE PROC AND EXECUTED FINE
IF NOT EXIST
I don't want an exception to be thrown stating "OBJECT DOES NOT EXIST" I wanted PL/SQL engine not to execute the particular select statement itself and continue executing other select statements.
The reason why have such kind of wierd requirement is my program displays all the CEMLI objects in any 11.5.10 instance. I don't know whether they have installed discoverer or not. if they installed it no problem else my program have to eliminate.EXECUTE IMMEDIATE, REF CURSOR becoz i tried it and works fine.but not able to wrap in WRAPPER UTILITY 8.0 versions.
I have 20 or so tables, partitioned by range, indexed etc...soon these tables will be gone and i have to recreate them with the same definitions. I have to write a procedure(or script, it's up to me) which must:
1- check if table A exist in the scheme
2- if not create the table as the original ddl.
for 1 i've used smth like
-------------------------
SELECT count(*)
INTO a
FROM user_objects
WHERE object_name='A';
[code]....
so my question is how and what is the cleanest and fastest way to do this.? it's a lot DDLs,
How to migrate Oracle Standalone Database to Oracle Real Application Cluster?
View 1 Replies View RelatedI want to put one check box to check all the check boxes.how can i do this?
View 5 Replies View Relatedi am continuously inserting data to oracle database after some time like 2 hours oracle disconnects,it creates erros like
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Process ID: 0
Session ID: 0 Serial number: 0
after restarting the database with shutdown immediate ans startup if i start inserting records it will show erros like
ORA-01653: unable to extend table SYSTEM.GLT_PROT_TRAFFIC_SUM_VOIP by 8192 in tablespace GLCOMM
but i have created the Tablespace with BigFile Auto Extend and max size unlimited, i am having 400GB disk space created Redo logs with 15gb,i have tried serveral times reinstalling the oracle but problem is not solved.
same problem is happenging with small datafiles also,
operating system: windows server 2008 R2 standard
oracle server : 11g
oracle client : 64 bit
[oracle@localhost ~]$ sqlplus system/password
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 21 20:20:09 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
But when i am using SID name while connecting to database i am able to connect...
[oracle@localhost ~]$ sqlplus system/password@apple
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 21 20:21:42 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
I have only one database...
TNS.......
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
APPLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 72.0.0.11)(PORT = 1521))
[code]...
oracleDatabase version:11gR2
Os:solaris
how to check locks on database objects .it might be any lock? any select sql query to check database object levlel locks?what basis locks will occur?
i did the following steps for resolving.
1 alter database backup controlfile to trace;
2 startup nomount;
3 recover database using backup controlfile;//in this step generate error msg "database not mounted"
4 alter database open// this is also happend above error
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u01/app/oracle/oradata/DB11G/system01.dbf'
ORA-01207: file is more recent than control file - old control file
How to check the open http connections in the database as I am getting.
ORA-29270: too many open HTTP requests
I am running Oracle Database 10g R2 on windows 2003, I want to create a batch file to check if the database is idle or not, and if it is idle shut it down and start it up.
View 13 Replies View Relatedi have a field in my table office i got field office_code ,this field is been used in diffirent tables as foreign key is there a sql i can wirte to see all tables who have used this field as foreign key.
View 12 Replies View Relatedi want a query/function/procedure to check recently updated columns/tables in a database...
View -1 Replies View RelatedHow to check whether database is dedicated or shared ?
View 1 Replies View RelatedBy default the DBMS_STATS package runs once every 24 hours to collect statistics for database objects and Oracle collects new statistics when enough of the data (about 10%) has changed.
My question here is how to check the table has changed 10% in database?
Actually in our environment , sysadmins are upgrading java versions on Unix (HP & Solaris) Machines and they have asked the query whether oracle database uses Java or not?
If it uses then all the databases need to be shut down for their planned activities and if not no need to shutdown the databases.
provide me the query to check our database is running using spfile or running using pfile.
View 2 Replies View RelatedIs there a way where I can check users/IPs who connect to the database in a specific time 2 days ago?
View 5 Replies View RelatedWe have a primary and a standby (Physical Dataguard) site.
1. How do i check if the database is encrypted or not on primary as well as standby ?
2. If primary and standby are encrypted, does the data that gets replicated from primary to standby also in encrypted form ? If not, does it make sense to encrypt that ?
How to check the listener time zone settings/values in Oracle 10g database?
View 5 Replies View RelatedI wanted to make my11g cluster down along with high availability.Documents says, Stop the cluster stack by using crsctl stop cluster and then execute crsctl stop crs command to stop HA. What is the difference if I am using the following commands?
1. crsctl stop cluster
crsctl stop crs
OR
2. crsctl stop crs
As per my understanding, crsctl stop crs command stops entire cluster stach plus has.
We are going to setup a 4 node rac cluster. So i think we need to configure only one SCAN with 3IP's. And how the scan listeners are configured on these 4 nodes.
View 1 Replies View RelatedAre Oracle cluster and Oracle clusterware are same and has same in meaning in RAC ?
View 6 Replies View RelatedWe have few Solaris RAC Clusters. When I try to query the cluster name from server using the following command i get the same result for all the clusters.
soc02n02-oracle> cemutlo -n -w
ORA_CRS_01
2:1:
soc03n01-oracle> cemutlo -n -w
ORA_CRS_01
2:1:
While in the OEM Grid Console it shows the separate name given to each of them. Check the attached .pdf
Q.Why the cluster names are same from the OS level but different in the OEM console.
Q.Is there any way we can find out the individual cluster names other than cemutlo commands.
Q.In OEM why is the "Cluster" different from the "Cluster name"
Attached File(s)
SOC_Cluster.pdf ( 27.63K )
Number of downloads: 2
A basic select and group by query I am optimising for my Database course has returned results that indicate it will perform better on a clustered index when returning a smaller number of rows (5% of the largest table) and on a hash clustered index when returning higher volumes (50% and 80%). I understand that it is possible to use more than one index type on a table to improve performance, but I am struggling to understand how I might establish a hash cluster and a cluster on the same table? and then use hints to drive the query down one access path or the other.
Site admin - this site is a very useful resource.
I had installed grid infrastructure for a cluster, and RAC database. The ASM is the storage option. The configurations as follows:
Grid Home: /u01/grid/app
Oracle RAC Home: /oracle/db1/app/product/11.2/dbhome1
Can I have another RAC Database to use the existing Grid infrastructure ? The second RAC database will have different owner than db1.
The configurations as follows:
Grid Home: /u01/grid/app
DB1 Oracle RAC Home: /oracle/db1/app/product/11.2/dbhome1 and Database Name: RACDBA so the current instances are RACDBA1 and RACDBA2
DB2 Oracle RAC Home: /oracle/db2/app/product/11.2/dbhome2 and database name: RACDBB so the future instances will be RACDBB1 and RACDBB2
Steps for installing Oracle Cluster 10?
View 9 Replies View RelatedI have one table called posh, which has about 50,000 ids (millions of rows) so far. It is currently at about 50 gb. So each series of rows for a particular id is about 1 mb.
CREATE CLUSTER posh_cluster (id int)
SIZE 2M
STORAGE (initial 2000K next 2000K)
PARALLEL 4;
CREATE INDEX posh_cluster_index ON CLUSTER posh_cluster;
[code].......
According to the Oracle documentation size is "the average cluster key size", I am not really sure what that means. Is this the 1mb in posh table space I am using for each series of rows for an id, or the space used for the index? Secondly, the storage parameter for 'CREATE CLUSTER' should be what?