oracle10g

Oracle - How does Oracle manage transaction specific DML statements

六月ゝ 毕业季﹏ 提交于 2020-01-11 10:49:26
问题 Imagine I have this simple table: Table Name: Table1 Columns: Col1 NUMBER (Primary Key) Col2 NUMBER If I insert a record into Table1 with no commit... INSERT INTO Table1 (Col1, Col2) Values (100, 1234); How does Oracle know that this next INSERT statement violates the PK constraint, since nothing has yet been committed to the database yet. INSERT INTO Table1 (Col1, Col2) Values (100, 5678); Where/how does Oracle manage the transactions so that it knows I'm violating the constraint when I

Oracle - How does Oracle manage transaction specific DML statements

狂风中的少年 提交于 2020-01-11 10:48:09
问题 Imagine I have this simple table: Table Name: Table1 Columns: Col1 NUMBER (Primary Key) Col2 NUMBER If I insert a record into Table1 with no commit... INSERT INTO Table1 (Col1, Col2) Values (100, 1234); How does Oracle know that this next INSERT statement violates the PK constraint, since nothing has yet been committed to the database yet. INSERT INTO Table1 (Col1, Col2) Values (100, 5678); Where/how does Oracle manage the transactions so that it knows I'm violating the constraint when I

Configuring the connection between client and server Oracle 10g

烈酒焚心 提交于 2020-01-10 06:06:33
问题 I've installed the oracle server and it's working properly. However, the client which is installed in another machine is not working. The error TNS-12541: TNS:there is no listener appears. My TNSNames.ora: SCP = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.39)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DatabaseIO) ) ) In server machine I can connect to the databaseIO. Are there other configurations to do? 回答1: In a comment you have an extract from lsnrctl

Configuring the connection between client and server Oracle 10g

橙三吉。 提交于 2020-01-10 06:05:12
问题 I've installed the oracle server and it's working properly. However, the client which is installed in another machine is not working. The error TNS-12541: TNS:there is no listener appears. My TNSNames.ora: SCP = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.39)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DatabaseIO) ) ) In server machine I can connect to the databaseIO. Are there other configurations to do? 回答1: In a comment you have an extract from lsnrctl

Configuring the connection between client and server Oracle 10g

蹲街弑〆低调 提交于 2020-01-10 06:05:06
问题 I've installed the oracle server and it's working properly. However, the client which is installed in another machine is not working. The error TNS-12541: TNS:there is no listener appears. My TNSNames.ora: SCP = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.39)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DatabaseIO) ) ) In server machine I can connect to the databaseIO. Are there other configurations to do? 回答1: In a comment you have an extract from lsnrctl

Date type without time in Oracle

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-09 10:36:16
问题 In Oracle 10g I got a problem when using DATE type in my table. I just want my DATE field store only DATE without time automatically. There's so much solution, I know it like using TO_CHAR and TO_DATE or TRUNC but I faced that I'm using so much procedures to insert or update data and have no time to update all of them. How could I resolve this problem? 回答1: The best solution would be to: remove all times from your DATE column ( update yourtable set yourdatecolumn = trunc(yourdatecolumn) )

How to create cluster index in Oracle

元气小坏坏 提交于 2020-01-07 07:44:13
问题 I search many links on google to find out how to create cluster index in oracle but none were satisfactory in explaining. Can anybody please explain how to achieve this in oracle. 回答1: An equivalent to a SQL Server Cluster Index in Oracle would be an Index Organized Table. Here is some info: http://use-the-index-luke.com/sql/clustering/index-organized-clustered-index 来源: https://stackoverflow.com/questions/37610771/how-to-create-cluster-index-in-oracle

Different record count values in one query

本小妞迷上赌 提交于 2020-01-07 06:48:11
问题 My goal is to achieve a result set like the following CODE | TOTAL1 | TOTAL2 1 | 56 | 34 2 | 12 | 15 3 | 90 | 3 There are 2 tables e.g tableA and tableB The counts are different by tableB.type SELECT code, COUNT (*) AS total1 FROM tableA a WHERE a.ID IN (select ID from tableB where type = 'XYZ') GROUP BY code SELECT code, COUNT (*) AS total2 FROM tableA a WHERE a.ID IN (select ID from tableB where type = 'ABC') GROUP BY code I'd like to display the count for each code per type in the same

I have a trigger autonomous but only execute one time in the same session

余生颓废 提交于 2020-01-07 04:00:56
问题 I have a trigger autonomous but only execute one time in the same session, then do nothing CREATE OR REPLACE TRIGGER tdw_insert_unsus BEFORE INSERT ON unsuscription_fact FOR EACH ROW DECLARE PRAGMA AUTONOMOUS_TRANSACTION; v_id_suscription SUSCRIPTION_FACT.ID_SUSCRIPTION%TYPE; v_id_date_suscription SUSCRIPTION_FACT.ID_DATE_SUSCRIPTION%TYPE; v_id_date_unsuscription SUSCRIPTION_FACT.ID_DATE_UNSUSCRIPTION%TYPE; v_suscription DATE; v_unsuscription DATE; v_live_time SUSCRIPTION_FACT.LIVE_TIME%TYPE;

SQL Error: ORA-00907: missing right parenthesis in Oracle 10g

强颜欢笑 提交于 2020-01-06 15:01:31
问题 Please find the below query. When I run this query I am getting an ORA-00907: missing right parenthesis error. I am unable to understand the problem on this query. Please give me the solution for this error. I have read some related topics on this topic. but, I didn't get the right solution. I am using Oracle 10g version. The query: SELECT A.City||'.' AS AAddress, M_InOut_Header_v.Org_Location_ID AS Org_Location_ID, M_InOut_Header_v.ContactName, M_InOut_Header_v.Title, M_InOut_Header_v.EMail,