- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- the problem about oracle logical backup
Operating System - OpenVMS
1753322
Members
6287
Online
108792
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2008 11:56 PM
04-30-2008 11:56 PM
the problem about oracle logical backup
there is two tables, test_bak and test
when i insert a record such as:
insert into test values('backup test_bak');
after insert a record into test,the table test_bak will be backuped auto(use exp/expdp)
i want to use trigger,but don't know how to write.
any body can help me,thank you.
when i insert a record such as:
insert into test values('backup test_bak');
after insert a record into test,the table test_bak will be backuped auto(use exp/expdp)
i want to use trigger,but don't know how to write.
any body can help me,thank you.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 07:07 AM
05-01-2008 07:07 AM
Re: the problem about oracle logical backup
Might want to check with Oracle and with the Oracle Metalink resources and the Oracle product documentation over there.
http://www.oracle.com
http://www.oracle.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2008 10:50 AM
05-01-2008 10:50 AM
Re: the problem about oracle logical backup
As Hoff points out, this is really a pure Oracle question, with no OpenVMS specific compontent.
What have you tried so far?
The best place to start this quest is the Oracle SQL Ref Manual under "CREATE TRIGGER".
It points to several other manuals for foundation knowledge.
Typically you would hook up some "anonymous PL/SQL" to the trigger.
CREATE TRIGGER my_schema.copy_test_insert
AFTER INSERT ON test
BEGIN
-- plsql stuff...
INSERT INTO test_bak(test_column)
VALUES ( :new.test_column);
END
Good luck!
Hein.
What have you tried so far?
The best place to start this quest is the Oracle SQL Ref Manual under "CREATE TRIGGER".
It points to several other manuals for foundation knowledge.
Typically you would hook up some "anonymous PL/SQL" to the trigger.
CREATE TRIGGER my_schema.copy_test_insert
AFTER INSERT ON test
BEGIN
-- plsql stuff...
INSERT INTO test_bak(test_column)
VALUES ( :new.test_column);
END
Good luck!
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2008 07:14 AM
05-05-2008 07:14 AM
Re: the problem about oracle logical backup
Just FYI, the SQL code below, copied from a SQLdeveloper session against an Oracle XE server on my laptop running Windoze XP, worked as expected to clone inserts.
Hein.
CREATE TABLE "HEIN"."TEST"
( "X" VARCHAR2(20 BYTE),
"Y" VARCHAR2(20 BYTE)
)
CREATE OR REPLACE TRIGGER "HEIN"."DUPLICATE_TEST_INSERTS"
after insert on test
for each row
BEGIN
insert into test_duplicate ( insert_date, x, y )
VALUES ( sysdate, :new.x, :new.y );
END;
/
ALTER TRIGGER "HEIN"."DUPLICATE_TEST_INSERTS" ENABLE;
CREATE TABLE "HEIN"."TEST_DUPLICATE"
( "X" VARCHAR2(20 BYTE),
"Y" VARCHAR2(20 BYTE),
"INSERT_DATE" DATE
);
insert into test values ('hello', 'world');
select x,y,to_char(insert_date,'dd/mm/yy hh:mi:ss') from test_duplicate;
Hein.
CREATE TABLE "HEIN"."TEST"
( "X" VARCHAR2(20 BYTE),
"Y" VARCHAR2(20 BYTE)
)
CREATE OR REPLACE TRIGGER "HEIN"."DUPLICATE_TEST_INSERTS"
after insert on test
for each row
BEGIN
insert into test_duplicate ( insert_date, x, y )
VALUES ( sysdate, :new.x, :new.y );
END;
/
ALTER TRIGGER "HEIN"."DUPLICATE_TEST_INSERTS" ENABLE;
CREATE TABLE "HEIN"."TEST_DUPLICATE"
( "X" VARCHAR2(20 BYTE),
"Y" VARCHAR2(20 BYTE),
"INSERT_DATE" DATE
);
insert into test values ('hello', 'world');
select x,y,to_char(insert_date,'dd/mm/yy hh:mi:ss') from test_duplicate;
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP