Client Tools :: Logon Trigger Creates 2 Records?

Aug 5, 2010

why my logon trigger always creates 2 records with different timestamp. Also is this the proper way of excepting records to insert?

Script.

CREATE OR REPLACE TRIGGER TR_LOGON_AUDIT
AFTER LOGON ON DATABASE
BEGIN
If user<> 'DBSNMP' then -- don't want to insert this
if user <> 'SYS' then -- don't want to insert this

[code]....

Result when select.

OS_USERNAME LOGON_TIMESTAMP
----------- ----------------
GAN 2010-08-05 14:27:52
GAN 2010-08-05 14:27:55

View 12 Replies


ADVERTISEMENT

Client Tools :: Several Short Fetch To Retrieve Records

Dec 28, 2010

I have a big database, I want to retrieve its records in several tries; first I use "select * from dbname where rownum <1000" but for 2'th try how can I get next 1000 records but not previous records?

View 1 Replies View Related

Client Tools :: Insert 50 Million Records At A Time?

Jan 4, 2011

How can i insert 50 million records at a time

View 1 Replies View Related

Client Tools :: Debug Function Which Returns Table Of Records?

Apr 24, 2012

I want to debug a function which returns the table of records. When I try to add the parameters and run the debug it gives the error as

PLS-00653: aggregate/table functions are not allowed in PL/SQL scope

if there is any way to debug the function which returns table of records.

View 3 Replies View Related

Client Tools :: Audit Records From Specific Machine / Terminal Only?

Apr 11, 2011

Is there any tool available for audit records from a specific Machine/terminal Only?

View 1 Replies View Related

Logon Trigger Not Getting Updated

May 9, 2011

There is a xxxxx.sql file in the OS level which contains create or replace trigger script. I modified that file with the code below:

if(upper(USER)= 'U_USER') then

execute immediate 'alter session set current_schema=USER';

end if;

after that, I went to sqlplus
and logged in to U_USER like this
SQL>conn U_USER/U_USER;
connected.

SQL>@xxxxx

some numbers are getting generated if i press enter.

Then i press ctrl +c and get to sql prompt.

I issue

SQL>select SYS_CONTEXT('USERENV','CURRENT_SCHEMA') FROM DUAL;

I am getting the output as U_USER but I must get the output as USER and not as U_USER. Basically the trigger is not getting updated.

View 1 Replies View Related

Create After Logon Trigger

Jun 20, 2012

I'm looking to create an after logon trigger... my question is - can this trigger be created by any user (i.e. other than sys) and - if so - what's required to ensure it fires for EVERY other user that log's on to the database?

View 2 Replies View Related

SQL & PL/SQL :: Create A Trigger With After Logon Database?

Apr 28, 2011

i would like to trace some connexions on database, once compile the code , i have the issus following:

10/2 PL/SQL: SQL Statement ignored
11/20 PL/SQL: ORA-00942: table or view does not exist

this is the

DROP TABLE connect_user;
CREATE TABLE connect_user
(
nom_ora varchar2(15),
naom_os varchar2(15),
programme varchar2(20),
poste varchar2(20),

[code]...

View 3 Replies View Related

SQL & PL/SQL :: Which Privileges Required To Create A Trigger Like After Logon On Database

Mar 17, 2011

Which Privileges required to create a trigger like after logon on database. I have grant Create any trigger privilege to user but still not able to create and give me an error insufficient Privilege.

View 5 Replies View Related

SQL & PL/SQL :: Obtaining REMOTE ADDR Using Owa_util Package In After Logon Trigger

Nov 16, 2011

I am working in the company which is using PL/SQL to create web interface. Of course we are using mod_plsql. I was using OWA_UTIL get_cgi_env ('REMOTE_ADDR') in the packages and it was always properly returning the IP address of the client. But Now I want to use it in after logon on schema trigger and it is never initialized.

Maybe some other way to obtain the IP of the client machine just before calling the package which is showing the interface?

Here is the simplified code of the trigger:

CREATE OR REPLACE TRIGGER dev_debug_trg AFTER LOGON ON SCHEMA
DECLARE
l_ip VARCHAR2(200);
BEGIN

[Code].....

View 3 Replies View Related

SQL & PL/SQL :: How To Grep Client IP Address When LOGON

Aug 4, 2011

How to grep client's IP address when LOGON to database? I write a trigger , but when compile , it show Error , Here is code :

CREATE OR REPLACE TRIGGER On_Logon
AFTER LOGON ON The_user.Schema
DECLARE
v_addr VARCHAR2(11);
BEGIN
IF (ora_sysevent = 'LOGON') THEN
v_addr := ora_client_ip_address;
raise_application_error( '-20001', 'user IP: '||v_addr);
END IF;
END;
[code]....

View 13 Replies View Related

Client Tools :: Tools For Load Testing On Oracle - J2EE Application?

Jan 5, 2012

which are recommended Tool for load testing (for performance) on Oracle-J2EE, 3 Tier applications?

Is 'Oracle Application Test Suite' the best for such test where we can simulate numbers of users and their various actions?

Does it come with Oracle Database license or we have to buy it separately?

View 1 Replies View Related

Client Tools :: Basic Tools For Oracle Version Control

Aug 26, 2011

I'm looking for 3 simple things.

1) A reverse engineering tool that I can point to an Oracle schema and get a "baseline" script to re-create that schema from scratch, with decently formatted DDL files (1 per object) neatly organized in a directory tree (by object type) and called in the correct order. Icing on the cake would be an option to pass the tool a list of tables containing static data and get DMLs to populate (insert) those tables as part of the script.

2) a diff tool that I can point to a pair of Oracle instances (source and target) containing a given schema and get a "delta" script to alter the target schema so that it becomes identical to the source schema. If data loss occurs on the target instance (i.e. drop a column) I would like to find a warning comment inserted in the script (e.g. "-- Attention: data migration DML needed here?"). Icing on the cake would be an option to pass the tool a list of tables containing static data and get DMLs to update (delete, update and insert) the data in the target tables to become identical to the contents in the source tables *without* deleting and re-inserting all rows (or dropping, recreating and repopulating the table).

3) I would like the above two tools (that, as you will have recognized, are basic to putting your database design under version control) to be open-source, with a command-line interface and a vibrant community backing them.

View 9 Replies View Related

Client Tools :: Cannot Connect Using JDBC Oracle Thin Client With (New Method)?

Feb 21, 2013

The problem is that this connection errors when I try to connect using my SQuirreL client. My developers want to connecting using the SID or the SERVICE_NAME and by using the "New Method" syntax, not the "Old Method" syntax. According to the documentation the "New Method" syntax works with the SERVICE_NAME or the SID. The "Old Method" only works with the SID.

# Host name is vmwwin7634.na.SAS.com
# SID is sting2
# SERVICE_NAME is sting2.na.sas.com

PROBLEM using SID errors ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2
THIS WORKS using SERVICE_NAME ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com

I am using SQuirreL Client version 3.4.0

# Here is the tnsnames.ora entry on the server.
STING2 =
(DESCRIPTION =

[code]...

# In this documentation it says, "On new syntax SERVICE may be a oracle service name or a SID."You can find this on the orafax wiki under JDBC#Thin_driver.

# I was able to connect with the "old method" using the SID only, SERVICE_NAME errors jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2.na.sas.com
(SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2 (this works)

# "New Method"
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com (this works)
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 (this errors)
(SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")

View 10 Replies View Related

Client Tools :: Can Use Oracle Client Version To Create A Database In That Server

Jan 13, 2011

can we use oracle client version to create a database in that server.

View 3 Replies View Related

Client Tools :: How To Connect From Client To Oracle Database In Unix

Dec 11, 2012

I have new virtual UNIX machine and I installed oracle client on /usr/lib/oracle. Also I have a oracle database and I am able to connect to this database from my desktop sql developer.

So now I am trying to connect from new UNIX machine. Where I created tnsnames.ora file under /usr/lib/oracle/network/admin and before connecting did export the following

export TNS_ADMIN=/usr/lib/oracle/network/admin
export ORACLE_HOME=/usr/lib/oracle/
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$HOME/bin:/sbin:$ORACLE_HOME/bin
export ORACLE_SID=VFIODSD1

when I try

# sqlplus
username :xxxxxxx
password : xxxxxxx

ORA-12545: Connect failed because target host or object does not exist. Not sure what I missed here. using same tns file I am able to connect from sql developer on windows.

View 1 Replies View Related

Client Tools :: Oracle Client 32 Bit On Windows Server 2008 R2 64 Bit

Jul 20, 2012

Can i install Oracle 10g Client 32 bit on our Windows Server 2008 R2 64 bit?

View 1 Replies View Related

Client Tools :: Install Oracle To Get Latest SQL Plus Working On Client PC

Jul 11, 2012

I need to install Oracle client to get latest sql plus working on client pc as the problem is, i am not able to find out where i can download this , i just need the sql plus as i am not able use many commands because when i installed oracle forms 6i client tool , sql plus 8.0 got installed.

View 4 Replies View Related

Client Tools :: BR*Tools Appearance Not Complete

Jan 16, 2013

I want to use BR*Tools to administer an Oracle database. I have installed BrGUI local, set the JAVA Home variable and edited the brgui.properties file accordingly.I am able to login, but the menues are mising. The login screen is incomplete.

View 5 Replies View Related

Client Tools :: Command Line Tools

Jan 22, 2011

I usually work in oracle using the different editors like toad, plsql developer etc. I felt command line is good utility because of various supporting points. I am not sure what kind of command line tools is available/used. I am using pretty straight command line
(run->cmd, then enter username and password).

The best command line tools available. What is generally used command line tools.

View 1 Replies View Related

Client Tools :: ODBC Instant Client Oracle 10g

Jun 28, 2010

The version is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi. for Unix AIX 5

I install the ODBC Driver Manager, Basic Instant Client, ODBC Instant Client packages (libsqora.so, odbc_update_ini.sh).

The error:

[oracle@d4 oracle] $ isql OracleODBC-10g user passtemp -v
[01000][unixODBC][Driver Manager]Can't open lib '/home/oracle/instantclient_10_2/libsqora.so' : file not found
[ISQL]ERROR: Could not SQLConnect

Configuration

odbcinst.ini
[Oracle10gODBCdriver]
Description = Oracle ODBC driver for Oracle 10g
Driver = /u01/app/oracle/product/10.2.0/db_1/lib/libsqora.so
Setup =
FileUsage =
CPTimeout =
CPReuse =

The documentation explic with exists the file libsqora.so.10.1 but not exists in the ODBC Instant Client packages.

I applied ln -s libsqora.so.10.1 libsqora.so but the connection not function

odbc.ini
[oradns]
Application Attributes=T
Attributes=W
BatchAutocommitMode=IfAllSuccessful
CloseCursor=T
[code].......

View 1 Replies View Related

Client Tools :: How To Connect To Oracle 7 Using Client

Dec 15, 2011

I have Oracle 7 database on Server1. I need to connect this using Oracle client from windows XP.

I have downloaded Oracle client 3.0 and when I am trying to connect it saying "Unable to connect: Unsupported Oracle version".

View 8 Replies View Related

Client Tools :: Identify Oracle Client

Oct 3, 2011

I would like to know if there is some specific file who identifies the installation of Oracle Client in some machine.

View 4 Replies View Related

Client Tools :: How Can Isqlplus Available For Windows Client

Sep 23, 2010

I have an Oracle server on CentOS 5.4, I can visit isqlplus on server, but I can't visit isqlplus on a windows client. ping works between server and client. I remember client doesn't need to install software via isqlplus, but I am not pretty sure.

View 2 Replies View Related

SQL & PL/SQL :: Trigger Not Inserting The Records?

Jun 21, 2012

I have written a trigger which insert and update on same table and the select statement for update and insert is same. My trigger update the record but doesn't insert data and doesn't throw error as well.

if i substitue all the where condidion value of insert statement then it return row and insert data but doesn't insert when trigger fire so there is no issue with the syntex.

create or replace
TRIGGER SRVCCLLS_RVW
AFTER INSERT OR UPDATE OR DELETE ON SD_SERVICECALLS
REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
DECLARE

[Code]....

if i substitue all the where condidion value of insert statement then it return row and insert data but doesn't insert when trigger fire so there is no issue with the syntex

View 2 Replies View Related

SQL & PL/SQL :: Trigger To Move Records To History?

Mar 23, 2010

I have a table CISCOWORKS that contains dumps from Ciscoworks. Now I want to make a history table CISCOWORKS_HISTORY that contains all information I no longer need actively (entries that have the same CISCOWORKS_MAC as newer entries).

The two tables are like this, exactly the same.

DROP TABLE CISCOWORKS IF EXISTS;
CREATE TABLE CISCOWORKS
(
CISCOWORKS_IDNUMBER(9,0),
CISCOWORKS_MACVARCHAR2(20 BYTE),
CISCOWORKS_SWITCHVARCHAR2(10 BYTE),
CISCOWORKS_PORTVARCHAR2(10 BYTE),

[code].....

I guess I will have to check the INSERTED table and check every entry to see if there is a entry in the CISCOWORKS table with the same CISCOWORKS_MAC. If so, insert an entry in CISCOWORKS_HISTORY with the attributes of the CISCOWORKS entry, and then delete the CISCOWORKS entry. how would I check every entry separately?

View 4 Replies View Related

Create A Trigger That Adds Corresponding Records Into MessageRecipient

Dec 10, 2012

Relevant tables:

create table messages
(
msgID number(10),
fromID number(10),
message varchar2(1024),
ToUserID number(10) default NULL,
ToGroupID number(10) default NULL,
dateSent date,
constraint messages_pk primary key(msgID),
constraint messages_fk1 foreign key(fromID) references profile(userID) on delete cascade,
constraint messages_fk2 foreign key(ToUserID) references profile(userID) on delete cascade
);
[code]....

I need to create a trigger that adds corresponding records into messageRecipient when a message is sent to a group. So, for example, the sql statement

insert into messages values(1, 2, 'message sent to group 3 from user 2', NULL, 3, currentdate);

should add records of the form (1, userID) into messageRecipient for every (3, userID) pair in groupMembership. Here are two triggers I've tried, neither of which works.

create or replace trigger SendGroupMessage
after insert on messages
FOR EACH ROW
when (new.ToUserID is NULL)
BEGIN
insert into messageRecipient(msgID,UserID)
[code]....

View 6 Replies View Related

PL/SQL :: Action Of Trigger To Create Records In Table

May 14, 2013

Using oracle 11.2.0.3 and wish to do the following.

Have trigger on table a on database a.

When a record is inserted into table a a record should be written first to table1 on database b , committed then a record written to table2 on database b as table2 has fk dependency on table 1.

How can we best achieve this.

Getting problems with the commit inside the trigger have tried pragma autonous transaction as well.

Get ora-02064 distributed transaction not supported when use the following code

create or replace trigger por_TRG_POP_IKNOW_MULTIPLE2

after INSERT OR UPDATE or delete   on por_MULTIPLE

for each row

-- tO ENSURE I-KNOW KEPT UP-TO-DATE WITH HOMIS MULTIPLE
-- delib not delet form i-know as if has been used by customer cannot delete
-- due to referential inetgrity constraints in i-know
-- Note parent_num updated on IKW via support.maintain_latest_dim_version.update_multiple until
-- When IKW becomes master of multiple info, this trigger can be removed
-- and support.maintain_latest_dim_version.update_multiple removed

declare
PRAGMA AUTONOMOUS_TRANSACTION;
v_dml_type varchar2(1);
begin
IF INSERTING OR UPDATING

[Code]....

--when matched THEN update set
--      a.MGRP_NUM b.mult_link_multiple_num,
--      MGRP_DESCRIPTION = (select mult_name from por_multiple
  --     where mult_code = mult_link_multiple_code

when not matched

then insert
(
a.MGRP_NUM,
a.MGRP_DESCRIPTION

)

[Code]...

View 7 Replies View Related

Forms :: Updating Records Values And Post Trigger

Jul 15, 2013

I have a multi record block based on a view. All records in the view are displayed in the block by use of Post-Query trigger when entering the form.

The block has 5 items as follows:

1) RECORD_STATUS = a non-base table column which is a checkbox.
2) ITEM_TYPE = a text-item which has an LOV attached.
3) ITEM_TEXT = a text-item which is free format text.
4) LAST_UPDATE_DATE a date column
5) STATUS = a text item either 'Open' or 'Closed'

The LOV is based on a table of Item Types with values say, 'Type1', upto 'Type9'.

I have a Wnen-New-Record-Instance trigger which 'Posts' changes to the database. This has been included as i want to limit the values of the ITEM_TYPE column to values which have not been previously used.

Consider this scenario...

The block has 3 records.

record 1 has 'Closed' status so no updates are allowed.
record 2 has 'Open' status so updating of Item_Text is allowed.
record 3 has 'Open' status so updating of Item_Text is allowed.

I check the RECORD_STATUS checkbox on record2.

(This sets the RECORD_STATUS checkbox to a checked value and changes the STATUS column to 'Closed' by When-Checkbox-Changed trigger.) At this point the record has not been saved so if you uncheck the checkbox , then the STATUS column will go back to 'Open'. However at this point i will leave it as Checked (Closed).

I then insert a new record, only values Item4 to Item 9 are correctly shown in the LOV. I select Item4.

I then go back to the previous record and uncheck the Checkbox to say that i wish to leave it 'Open' after all (in effect no changes have occurred), then the STATUS column correctly reverts back to 'Open' by my WCC trigger. If i then SAVE the changes, the new record has been inserted on the database correctly, however the LAST_UPDATED_DATE from the record which was checked and then unchecked has also been updated incorrectly even though no net changes have actually occurred.

(because i am using WNRI trigger to limit the List of Values on the LOV column, this has incorrectly set the previous records LAST_UPDATED_DATE column to be Sysdate.)

How can i stop this from happening?

View 1 Replies View Related

PL/SQL :: Create Trigger If Any Insertion In TAB1 Then Records Get Inserted Into TAB2?

Oct 30, 2012

i have requirement like this i don't know abt trigger

create trigger with the below:
Tables: TAB1 TAB2
Create a trigger, if any insertion in TAB1 then records should get inserted into TAB2
create a trigger, if any updation in TAB1 then record should get inserted into TAB2
Create a trigger, if any deletion in TAB1 then record should get inserted into TAB2

TAB1 and TAB2 can be any table.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved