How to stream one table twice (with different names) in another schema ?
hello guys,
i have to replicate one table (TAB_1) from one schema (SCH_1) on source database (DB_1) twice to schema (SCH_2) on target database (DB_2) with two different names (TAB_1 and TAB_1_SHORT). TAB_1_SHORT on target db should be a subset (eg. WHERE STATUS = 1) of TAB_1 !
how to do ? can anyone help me ?
i tried to realize that this way:
1) creating 1 capture process with 1 table rule on source db (without any subset rules to capture all changes) for table TAB_1
2) creating a propagation process without any rules
3) creating 1 apply process with a table rule for table TAB_1 without any subset_rule but with schema transformation from SCH_1 to SCH_2 (DBMS_STREAMS_ADM.RENAME_SCHEMA) => this works correct !
4) creating a subset_rule (WHERE STATUS = 1), a schema transformation from SCH_1 to SCH_2 (DBMS_STREAMS_ADM.RENAME_SCHEMA) and a tablename transformation from TAB_1 to TAB_1_SHORT (DBMS_STREAMS_ADM.RENAME_SCHEMA) for table TAB_1_SHORT => doesn`t work, no errors posted in dba_apply_error !
in another try, i tried to transform the table- and the schemaname in the capture process, with the effect, that my first table TAB_1 wouldn`t be streamed again.
i`m not sure, what is wrong. i think it must be possible to stream a table to two different targettables in the same schema on another db, isn`t it ?
hopefully greetings
Flo
Hello
Adding a normal table rule and also a subset rule would not work since the rule would be evaluated only once in the positive rule set. If the normal rule is evaluated first then the subset rule and rest of the rules would not be evaluated at all hence this would not work.
This can be done using either of the following methods:
Method 1:
1. Use the declarative transformation on the capture/apply and rename the schema from SCH_1 to SCH_2.
2. Now, on the apply site, set a DML Handler for SCH_2.TAB_1
3. In DML Handler perform the following:
a. get the column value for STATUS
b. check if the value for STATUS=1, if yes then modify the object name to TAB_1_SHORT and execute the LCR.
c. else do not modify the object name (leave it as it is, TAB_1) and execute the LCR.
Method 2:
1. Add a DML Handler for SCH_1.TAB_1
2. In the DML Handler perform:
a. use set_object_owner method of LCR$_ROW_RECORD to rename the owner to SCH_2
b. get the column value for STATUS
c. check if the value for STATUS=1, if yes then modify the object name to TAB_1_SHORT and execute the LCR.
d. else do not modify the object name (leave it as it is, TAB_1) and execute the LCR.
Please let me know if you need sample code.
Thanks,
Rijesh
Similar Messages
-
Slide duration - How to make one slide have a different duration to another slide?
Slide duration - How to make one slide have a different duration to another slide?
EG So one slide has 2 seconds, another 4 another 6
All I can see is how to make all slides have the same duration
Any help very much appreciated!
BrianSlide durations are not changeable on a slide-by-slide basis.
-
Export schema and import with different name
Hi ,
I need your assistance guys,
I need to export a schema from a database and then import it with different name to another database. How can I do that?
I export it with the following command:
exp userid=system/PW file=May_02_Export.dmp log=May_02_Export.log owner=schema_name statistics="none"
Now I want to import it but with different name (schma_name).
RegardsDid you try FROMUSER and TOUSER option ?
E:\oracle\product\10.2.0\db_1\install>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 2 20:01:09 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1247900 bytes
Variable Size 71304548 bytes
Database Buffers 92274688 bytes
Redo Buffers 2945024 bytes
Database mounted.
Database opened.
SQL> create user fromuser identified by fromuser;
User created.
SQL> grant resource, create table, create session to fromuser;
Grant succeeded.
SQL> create user touser identified by touser;
User created.
SQL> grant resource, create table, create session to touser;
Grant succeeded.
SQL> conn fromuser/fromuser
Connected.
SQL> create table export_table(a char);
Table created.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
E:\oracle\product\10.2.0\db_1\install>exp fromuser/fromuser file=e:\a.dmp
Export: Release 10.2.0.1.0 - Production on Sat May 2 20:03:06 2009
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
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user FROMUSER
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user FROMUSER
About to export FROMUSER's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export FROMUSER's tables via Conventional Path ...
. . exporting table EXPORT_TABLE 0 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
E:\oracle\product\10.2.0\db_1\install>imp help=y
Import: Release 10.2.0.1.0 - Production on Sat May 2 20:03:47 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
You can let Import prompt you for parameters by entering the IMP
command followed by your username/password:
Example: IMP SCOTT/TIGER
Or, you can control how Import runs by entering the IMP command followed
by various arguments. To specify parameters, you use keywords:
Format: IMP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
Example: IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
USERID must be the first parameter on the command line.
Keyword Description (Default) Keyword Description (Default)
USERID username/password FULL import entire file (N)
BUFFER size of data buffer FROMUSER list of owner usernames
FILE input files (EXPDAT.DMP) TOUSER list of usernames
SHOW just list file contents (N) TABLES list of table names
IGNORE ignore create errors (N) RECORDLENGTH length of IO record
GRANTS import grants (Y) INCTYPE incremental import type
INDEXES import indexes (Y) COMMIT commit array insert (N)
ROWS import data rows (Y) PARFILE parameter filename
LOG log file of screen output CONSTRAINTS import constraints (Y)
DESTROY overwrite tablespace data file (N)
INDEXFILE write table/index info to specified file
SKIP_UNUSABLE_INDEXES skip maintenance of unusable indexes (N)
FEEDBACK display progress every x rows(0)
TOID_NOVALIDATE skip validation of specified type ids
FILESIZE maximum size of each dump file
STATISTICS import precomputed statistics (always)
RESUMABLE suspend when a space related error is encountered(N)
RESUMABLE_NAME text string used to identify resumable statement
RESUMABLE_TIMEOUT wait time for RESUMABLE
COMPILE compile procedures, packages, and functions (Y)
STREAMS_CONFIGURATION import streams general metadata (Y)
STREAMS_INSTANTIATION import streams instantiation metadata (N)
The following keywords only apply to transportable tablespaces
TRANSPORT_TABLESPACE import transportable tablespace metadata (N)
TABLESPACES tablespaces to be transported into database
DATAFILES datafiles to be transported into database
TTS_OWNERS users that own data in the transportable tablespace set
Import terminated successfully without warnings.
E:\oracle\product\10.2.0\db_1\install>imp system/oracle fromuser=fromuser touser=touser file=e:\a.d
Import: Release 10.2.0.1.0 - Production on Sat May 2 20:04:20 2009
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
Export file created by EXPORT:V10.02.01 via conventional path
Warning: the objects were exported by FROMUSER, not by you
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
. importing FROMUSER's objects into TOUSER
. . importing table "EXPORT_TABLE" 0 rows imported
Import terminated successfully without warnings.
E:\oracle\product\10.2.0\db_1\install>sqlplus touser/touser
SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 2 20:04:36 2009
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> desc export_table
Name Null? Type
A CHAR(1)
SQL>HTH
Aman.... -
Unable to copy database with different name in the same instance
I had a huge database and wanted to try some change optimization changes.
So wanted to make a copy of the database along with data in the same instance.
I have tried copy database wizard several times but always see the error as in attachment.
Can someone let me know how to troubleshoot further?
If this is not the correct way please suggest how do i copy a database with different name in the same instance along with data.Hi Nandu,
From the screenshot, the error 1813 happens when corrupt database log is attempted to attach to the SQL Server. To work around this issue, please preform the following steps, for more details, please review this
blog.
1. Create a new database with same name which you want to recover. Make sure that the MDF file and LDF file have same name with previous database data and log file.
2. Stop SQL Server. Move original MDF file from old location to new location by replacing just created MDF file. Delete the LDF file of new location just created.
3. Start SQL Server. At this point, the database is in suspect status.
4. Make sure that system tables of Master database allows to update the values. Please note that you will be performing this in query window.
Use Master
go
sp_configure 'allow updates',1
reconfigure with override
go
5. Change database mode to emergency mode.
SELECT *
FROM sysdatabases
WHERE name = 'DatabaseName'
BEGIN
UPDATE sysdatabases
SET status = 32768
WHERE name = ' DatabaseName '
COMMIT TRAN
6. Restart SQL Server. Then execute the following DBCC command in query window to create new log file.
DBCC TRACEON (3604)
DBCC REBUILD_LOG(databasename,'c:\yourdatabasename_log.ldf')
GO
7. Reset the database status using following command.
sp_RESETSTATUS yourdatabasename
GO
8. Turn off the update to system tables of Master database running following script.
USE MASTER
GO
sp_CONFIGURE 'allow updates',0
RECONFIGURE WITH OVERRIDE
GO
9. Reset the database status to previous status.
BEGIN
UPDATE sysdatabases
SET status = (value retrieved in first query of step 5)
WHERE name = 'DatabaseName‘
COMMIT TRAN
GO
Make sure that you have done all the steps in order and restarted SQL Server where it is mentioned. Also run SQL Server Management Studio as administrator.(Right click-> Run as Administrator)
Thanks,
Lydia Zhang -
I seem to have 2 iCloud accounts with different names - a free storage that came with my MacBook and one I used when I bought some iCloud space. How can I cancel the free account? Because of this I can't access iMatch and the ICloud account I paid for on my MacBook
Any ideas cos its frustrating that I can't access something I paid for!Sign out of the account you do not wish to use, sign into the one that you do wish to use.
-
How to sync two IPhone with one PC , but with different applications
How to sync two IPhone with one PC , but with different applications ?
We have two IPhones , but one PC , we want to sync separately , is that possible ?Absolutely, connect each phone, select what content you want on each phone, then hit the sync button. iTunes will keep everything straight, by device, upon subsequent syncs, including separate backups.
-
How to reject external table rows with some blank columns
How to reject external table rows with some blank columns
I have an external table and I would like to reject rows when a number of fields are empty. Here are the details.
CREATE TABLE EXTTAB (
ID NUMBER(10),
TSTAMP DATE,
C1 NUMBER(5,0),
C2 DATE,
C3 FLOAT(126)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY EXT_DAT_DIR
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
LOAD WHEN (NOT (c1 = BLANKS AND c2 = BLANKS AND c3 = BLANKS))
LOGFILE EXT_LOG_DIR:'exttab.log'
BADFILE EXT_BAD_DIR:'exttab.bad'
DISCARDFILE EXT_BAD_DIR:'exttab.dsc'
FIELDS TERMINATED BY "|"
LRTRIM
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL
FIELDS (
ID,
TSTAMP DATE 'YYYYMMDDHH24MISS',
C1,
C2 DATE 'YYYYMMDDHH24MISS',
C3
) LOCATION ('dummy.dat')
REJECT LIMIT UNLIMITED
So, as you can see from the LOAD WHEN clause, I'd like to reject rows when C1, C2 and C3 are empty.
The above statement works fine and creates the table. However when I am trying to load data using it, the following error is produced:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "not": expecting one of: "double-quoted-string, identifier, (, number, single-quoted-string"
KUP-01007: at line 1 column 41
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
It seems that external tables driver does not understand the "NOT (...)" condition. Could anyone suggest how I can achieve what I want in a different way?
Thank you.
DenisAnother method would be to simply remove the "LOAD WHEN condition" and create a view on the external table which filters the data.
CREATE EXTTAB_VIEW AS
SELECT * FROM EXTTAB
WHERE not (c1 is null and c2 is null and c3 is null); -
How do Illstrator recognize if same plug-in will place with different name.
Hi All,
We are developing an Illutrator CS4 plug-in. we have source code of the plug-in. we need to add some extra features to that plug-in and build with new name. older one will work as it was. and newer one will work with new features. So both plug will resides same place with different name. the problem is, when I compile older soruce code and change the plug-in name. I'm getting error while loading plug-in it looks "older and newer version get conflict while name is different.
Is Illustrator maintain any unique ID for each plug-in. if so, then where should i look for in my code?
How do Illstrator recognize if same plug-in will place with different name?
Any help would be appriciated.
Thanks in advance,
JohirulI don't believe Illustrator has anything like a UID for plugins. If you want them to co-exist, either make them named differently or put them in different sub-folders.
On a related note, you CAN optionally set a plugin's name. You could then iterate over the plugin list at start up (before you set your name) and see if there's already a plugin with the same name. We do this to *prevent* our plugin from loading twice, but you don't seem to want that. I only mention this because this is about as close to 'unique identifiers' that AI gets, and frankly nothing stops you from having multiple plugins with the same name. -
Hi All, I am using iphone in UAE and ipad in India usinging same apple id. Earlier I could do imessage to my Ipad with different name but with software update,I am unable to do, as signing id for the iphone and ipad is same.How to restore back
I believe because you migrated from a Nokia to an iPhone you need to register the Bn phone number with your Apple ID so it can be used for iMessage. The Pn number seems to be the only one registered
Go here > https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
Manage your Apple ID and see if that does the trick
Hope that helps -
How can I edit multiple clips with different frame rates on the same timeline
how can I edit multiple clips with different frame rates on the same timeline
You do not want to edit material from different frame rates on one timeline. You CAN do this, but it is a very bad idea - and this is why.
Once you establish the sequence frame rate - lets say it is PAL material at 25fps, any material that you drop into the sequence other than 25 fps will have to be changed to play at 25 fps. If the material you add is NTSC (29.97), FCP will DROP 5 frames per sec to bring the frame rate down to 25 fps. Which 5 get thrown away? Every 6th one. This yields a funky cadence that becomes even more complex as as there are also interlaced fields (DV/NTSC is an interlaced format). Oh, and by the way, the image sizes are different as well. DV/PAL has 576 lines of resolution and DV/NTSC has 480. FCP has to scale up the NTSC to fit the PAL frame.
You do not want FCP adjusting these things on the fly. You want to do a thoughtful (and time consuming) conversion so that you end up with all your material in one format with the best possible image from the conversion process. Compressor can do an adequate job with Frame Controls turned on. The Natress Standards Conversion FCP plugin is another way to go. A third option is to find a post house that can do the conversion for you using a hardware based process.
The good news is, once everything is in the same format, editing it will be painless and the output process very quick.
Whatever frame rate/ image size you select, I'd suggest using ProRes for the codec. It is 4:2:2 color and will withstand color correction and composting with much more grace than any variant of DV based codecs.
Have fun.
x -
how can i import tables from a different schema into the existing relational model... to add these tables in the existing relational/logical model? plss help
note; I already have the relational/logical model ready from one schema... and I need to add few more tables to this relational/logical model
can I import the same way as I did previously??
but even if I do the same how can I add it in the model?? as the logical model has already been engineered..
please help ...
thanksHi,
Before you start, you should probably take a backup copy of your design (the .dmd file and associated folder), in case the update does not work out as you had hoped.
You need to use Import > Data Dictionary again, to start the Data Dictionary Import Wizard.
In step 1 use a suitable database connection that can access the relevant table definitions.
In step 2 select the schema (or schemas) to import. The "Import to" field in the lower left part of the main panel allows you to select which existing Relational Model to import into (or to specify that a new Relational Model is to be created).
In step 3 select the tables to import. (Note that if there are an Foreign Key constraints between the new tables and any tables you had previously imported, you should also include the previous tables, otherwise the Foreign Key constraints will not be imported.)
After the import itself has completed, the "Compare Models" dialog is displayed. This shows the differences between the model being imported and the previous state of the model, and allows you to select which changes are to be applied.
Just selecting the Merge button should apply all the additions and changes in the new import.
Having updated your Relational Model, you can then update your Logical Model. To do this you repeat the "Engineer to Logical Model". This displays the "Engineer to Logical Model" dialog, which shows the changes which will be applied to the Logical Model, and allows you to select which changes are to be applied.
Just selecting the Engineer button should apply all the additions and changes.
I hope this helps you achieve what you want.
David -
How to add one column value with grand total
hi,
this is my perform.i am just here multipling menge and gpres value and stores into G_total variable and displing into output.
this is my output in main window.
ex:mat. 1 77.00(g_total value)
mat 2 55.00(g_total value)
now the requirement is to add the column and display the output as grand total ex: 77.00 +55.00 = 132.00
how to do the syntax please help me......???
FORM get_total TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA: lv_menge(20),
lv_gpreis(20),
g_total(20),
g_total1(20).
DATA:lc1 TYPE string,
lc2 TYPE string,
ls_tab TYPE itcsy,
l_tabix TYPE sy-tabix.
READ TABLE in_tab WITH KEY name = 'RESBD-MENGE'.
IF sy-subrc EQ 0.
lv_menge = in_tab-value.
ENDIF.
READ TABLE in_tab WITH KEY name = 'RESBD-GPREIS'.
IF sy-subrc EQ 0.
lv_gpreis = in_tab-value.
ENDIF.
REPLACE ',' INTO lv_gpreis WITH ''.
CONDENSE lv_gpreis NO-GAPS.
READ TABLE out_tab WITH KEY name = 'G_TOTAL'.
IF sy-subrc EQ 0.
g_total = lv_menge * lv_gpreis.
out_tab-value = g_total.
CONDENSE g_total.
lc1 = g_total+0(2).
lc2 = g_total+2(3).
CONCATENATE lc1 lc2 INTO g_total SEPARATED BY ','.
out_tab-value = g_total.
CLEAR ls_tab.
LOOP AT out_tab INTO ls_tab.
l_tabix = sy-tabix.
CASE ls_tab-name.
WHEN 'G_TOTAL'.
ls_tab-value = G_TOTAL.
MODIFY out_tab FROM ls_tab INDEX l_tabix.
ENDCASE.
ENDLOOP.>
asissahu wrote:
> hi.
>
> nobody is replying my question???
>
> please help me
Hi, Asissahu
Because may be some one have problem to read your code
Please have a look at the following link and past code this way.
[How to post code in SCN|How to post code in SCN, and some things NOT to do...;
@Naga Please you too
Regards,
Faisal -
Create one tables from 2 different tables
Hi,
How I can create one table from 2 different tables. Source tables have data and I want to include it in new table.
I try this:
create table NEW_ONE
select * from OLD_ONE
union
select * from OLD_ONE2;
But it didn't work correctly :/I don't have any error. This syntax create table NEW_ONE, but this table have columns only from OLD_ONE table :/ There aren't any column from OLD_ONE2 :/ Any suggestions?
I don't forget about "as" in my query, only in this post.
Edited by: tutus on Sep 8, 2008 6:36 AM -
How to restore one table from the previous backup in 9.2.0.8 version.
Hi,
How to restore one table from the previous backup in 9.2.0.8 version.
Thanks
-GangaHi,
What is the table you want to restore?
Using export/import is supported with Oracle Apps database (for full database exp/imp, and certain schemas like custom ones). For the Apps schema, I believe it is not supported due to object dependencies and integrity constraints.
Regards,
Hussein -
How to display smartforms table lines useing different background colour
Hi all:
How to display smartforms table lines useing different background colour .
for example:
line1:green
line2:red
line3:green
line4:red
line5:green
line6:red
line7:green
line8:red
Any help is highly appreciated!!
启明星Hi,
Create a two lines one for header and second for data in the table.
1)In table painter we can find the pencil mark.
2)select the pencil mark
3)now select the line which you need to shade
4) now select the shading colour in the table painter and the provide the resolution up to 100% and select table pattrn for that line.
5) Now you can use this for the header now only the header gets shaded and the remaining gets unshaded.
reward points if useful
Thanks and Regards,
Nishant
Maybe you are looking for
-
Customizing Request while Hiring an employee using PA40
Hi All 1. I am hiring an employee using Hiring Action (PA40) , once i enter the data in Infotype 0000 (Actions) & Infotype 0001 (Org Assignment) while saving it is asking for a Customizing Request . Pls let me know why is it asking for the request &
-
Importing AR Invoice + Payment through DTW
Dear all, Please advise on which templates to use to import AR Invoice + Payment (cash Sales) through SAP B1 DTW. Kind Regards, Asif
-
Can't run application via Web Start 7 if there is query string in href
Java Web Start 7 cannot run application if there is query string in href attribute in jnlp file. For example: <jnlp spec="1.0+" codebase="http://localhost:8080/" href="Test.jnlp?query_string"> </jnlp> There are no any errors. Web Start just does not
-
Why is Flash Media Live showing multiple windows?
When you look into a mirror, and there is one is in front and behind you, you see them seeming to loop forever. That's what's going on with me right now in Flash. How do I stop this, or adjust the focus to one spot without that effect? For context, I
-
Common cost allocation to assets in service at different times
Hi, My client constructs large assets that typically go into service over a period of several months. They track some asset costs on tasks assigned to a grouping level of specific assets, while other "general" costs are coded to a task assigned to a