MV for replication. No PK in the source table and the LOB column
I would like to replicate tables between 2 instances in 2 different hosts. Mixed 11 GR 1 material and Oracle 10 g 2. I have my doubts:1. some tables from the source is not PK, and I understand that MV with rowid is not supported. Is there no workaround known workaround on this case without changing the structure of the source table? Full/complete update is acceptable.
2 one of the table has the CLOB data type. Can I just ignore this column in MV? A known issue with this kind of approach?
#1. You must use WITH ROWID MV and I believe it is supported up to the latest version, unless you can find any document, please give me the code of Notes.
#2. CLOB column is supported in MV, so no need to jump.
Tags: Database
Similar Questions
-
Formulation of condition CQL with the source table and Javabean event
Hello
I managed to create a State in CQL that compares 2 values of TIMESTAMP between a source table and a Java bean.
I did this by complying with the standard DATETIME SimpleDateFormat in the docs.
But the format does not include milliseconds. Is there another way I can do this, without losing the value of millisecond of the Javabean?
The request is something like
Select table.*
table, beans
where table.sometimestamp < bean.startdate
and table.sometimestamp > bean.enddate
where bean.startdate and bean.enddate is a java.util.Date? (or all)
I tried all kinds of combinations like to_timestamp (bean.startdate.getTime ()) but it is not the correct timestamp.
Also tried to use types of java.sql. * but came through different CQL syntax errors.
Any tips?
Thank you!
JarellHello
I think you have two options:
(1) to use SimpleDateFormat the of ' pattern. For example: "' yyMMddHHmmssSS', where the last two are the number of milliseconds.
2) keep as a long (e.g. System.currentTimeMillis)
Best regards
Alex -
How to find the cumaltive for a distinct element in the same column
Hello
I wrote the following code,
Select msid, nvl(starttime,0) starttime, sessionvolume, sum (sessionvolume) on sum1 (order by starttime LINES UNBOUNDED PRECEDING)
of aaa_bill;
I have many MSID and I want to calculate the cumaltive for each of them, but my code calculate the MSID cumaltive regardless, sample output like below
Sum1 msid Starttime Sessionvolume
20110809162804-9734-9734 84A8E46E8BD1
20110809162804 45 9779 84A8E46E8BD1
84A8E46E8BD1 20110809162804 2813 12592
84A8E46E8BD1 20110809162804 21111 33703
20110809162804 13253 46956 84A8E46E8BD1
20110809162804 5919 52875 84A8E46E8BD1
5C4CA98EABF3 20110809204555 6149 59024
20110809204555 6739 65763 5C4CA98EABF3
5C4CA98EABF3 20110809204555 2001 67764
5C4CA98EAC00 20110809225314 1080 68844
5C4CA98EAC00 20110809225314 6188 75032
any help please,.Maybe
select msid, nvl(starttime,0) starttime, sessionvolume, sum(sessionvolume) over(partition by msid order by starttime) sum1 from aaa_bill
Concerning
Etbin
-
Problems with mappings when changing the type of source table field?
Hello world
one question.
Is it a problem when I change my types of fields in my table of source of char for example varchar2 with mapping that uses this table?
In the mapping of the source table field Types are defined as Char fields. Do I have to change all the fields of char to varchar2 (via Import again from the source table and synchronize in the map)?
Thanks in advance.
GreetingsHello
If your new data type (in the database is compatible and big enough) then you probably don't have to change the class in your other mapping wise you need.
It a good practice to import the last definition of table (metadata) in the repository of OWB and then synchronize incoming.
Thank you
Fati -
Why the location column is empty for all messages?
The location column header appears. but it has no content.
According to me, the location column is empty because it is not relevant when you view the Threads (message list) of a right folder pane - the location is highlighted in the folders pane. But if you select a message that for example is part of a thread, with items in the files box of received and sent, then Message/Open in the Conversation, the location column displays the name of the folder for each message. Similarly, if you search for edit/search/search messages, the location column displays the folder where the search result is stored.
-
Hi SQL & PL/SQL gurus...
A bit of advice please...
IM loading documents in the system... In this context, I have a routine that check the progress of loading (upload_records) against an existing table (supplier_records). If the details differ so it updates, and if the folder does not exist, it inserts a new record...
About 90% of the time, recording will be unchanged and the statement will do nothing...
The challenge I have is that I get the error above fairly regularly, because (I think) there are simultaneous users, loading documents in the system... so, both tables change regularly... The merge statement is below... but my question is: I would achieve anything by converting the merge statement into a PL/SQL loop that checks if the recordset contains a record that needs to either update or insertion? Would be the first simple quick check that reduction of 90% of the files works better, (with further processing if the folder must insert or update) and this would remove the error above, or the merge statement made the same thing anyway, and I should leave it as what? or is my incorrect merge statement and which contribute to the error? The merge statement, if it finds a match, updates the record anyway, even if she didn't need to... (which is not very effective)... However a pl/SQL loop will have to check if the record exists. check if it needs to be changed, change it if she does... Insert if the folder does not exist.
MERGE statement is:
MERGE INTO s suppliers
USING (select distinct (sup_provision_id),
provider,
sup_acc_holder,
sup_bank_acc,
sup_bank_name,
payments_upload sup_bank_branch
where csv_id =: P20_CSV_ID) could
WE (pu.sup_provision_id = s.supplier_id)
WHEN MATCHED THEN
GAME UPDATE
s.SUPPLIER = pu.supplier,
s.SUP_ACC_HOLDER = pu.sup_acc_holder,
s.BANK_ACC_NO = pu.sup_bank_acc,
s.BANK_NAME = pu.sup_bank_name,
s.BRANCH_NO = pu.sup_bank_branch
WHEN NOT MATCHED THEN
INSERT (s.SUPPLIER_ID,
s.SUPPLIER,
s.SUP_ACC_HOLDER,
s.BANK_ACC_NO,
s.BANK_NAME,
s.BRANCH_NO,
s.CAT)
VALUES (pu.sup_provision_id,
able. Beg,
Pu.sup_acc_holder,
Pu.sup_bank_acc,
Pu.sup_bank_name,
Pu.sup_bank_branch,
'S' );
Thank you very much
Richard
Hi, Richard,.
Richard Legge wrote:
Hello.. Thanks for the reply...... The reason for the 'distinct' to ensure that the query retrieves only one line (based on the extraction of the full line, as you point out)... (so why he would never get more than one?) Well Yes... know that the media are not quite relevant...
The reasoning is that out or 5000 records. 4000 will have the same provider... so want to retrieve a single record for what it (or other unique visitors who may be similar but have different criteria) and simply update the corresponding record, insert if there is no trace...
Rgds
Richard
SELECT DISTINCT guarantees that no 2 rows will be exactly alike. In other words, if you compare the 2 rows in the result set, either sup_provision_id supplier of GOLD supp_acc_holder for GOLD OR one of the other columns (or maybe 2 or more columns) will be different. It does not guarantee that any 1 column will be unique.
FUSION requires that, when a match is found, it should only be 1 line in the result set generated by the USING clause. Given that the matching condition is
WE (pu.sup_provision_id = s.supplier_id)
This means that pu_sup_provision must be unique. The ORA_30926 error occurs if it is not unique. SELECT DISTINCT to ensure that complete lines in pu are unique, but it does not guarantee that any single column will be unique.
Depending on your data and your needs, you may need to change the USING clause, so that sup_provision_id is unique. You may need to add more conditions to the WHERE clause, or do a GROUP BY or use an analytic function such as ROW_NUMBER.
If you need help, post a small example of data (that is, CREATE TABLE and INSERT statements for all the tables involved, as they are before the MERGER) and the exact results you want (that is, indicate which suppliers should contain after the MERGER).
Check out the Forum FAQ: Re: 2. How can I ask a question on the forums?
-
Looking for a keyword using as a query that could contain several appearance in the same column
I am facing a problem. A bunch of my JSP frontend code was stored in a few tables in my database (65 rows in a table), I have identified using a few queries. Now, I want to update a Href link, which is present in all of these motions. But since these entries in the column are very long (50 to 60 lines long) and it is possible that some lines may the link (which must be replaced), several times, I'm not sure if a query updated simple using a only as will work for her or not?
Any suggestion/ideas are welcome.
Please let me know if you need more info.
Hello
e5d4d744-cf66-4FE0-8353-bbd8fd826b21 wrote:
I am facing a problem. A bunch of my JSP frontend code was stored in a few tables in my database (65 rows in a table), I have identified using a few queries. Now, I want to update a Href link, which is present in all of these motions. But since these entries in the column are very long (50 to 60 lines long) and it is possible that some lines may the link (which must be replaced), several times, I'm not sure if a query updated simple using a only as will work for her or not?
Any suggestion/ideas are welcome.
Please let me know if you need more info.
Yes; whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements), so that people who want to help you can recreate the problem and test their ideas.
Also post the results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.
Simplify the problem as much as possible. For example, if your strings are sometimes up to 4000 characters, you don't have to display all of the data that is almost as long. You can probably show you want with strings that are 80 characters long.
Always say what version of Oracle you are using (for example, 11.2.0.2.0).
See the FAQ forum: https://forums.oracle.com/message/9362002#9362002
This statement:
UPDATE table_x
SET str = REPLACE (str
old_link
new_link
)
WHERE str LIKE "%" | old_link | '%'
;
will change all the occurrences of old_link to new_link. It will only change the lines where old_link occurs, but, aside from that, regardless of how many times old_link occurs in str: if it appears 2 times in the same str, two occurrences will be changed in new_link.
Watch out for the problem ' mother is in chemotherapy. If old_link is 'bar.com', the above statement will change "a". You may need to REGEXP_REPLACE or REGEXP_LIKE if you need to consider what (if any) comes immediately before "bar.com' to decide or not to change it.
-
How the order in the sort column
kjvfvl; v
Hello
1004386 wrote:
for example:
aa_12_gef
aa_1234_ab
aaa_12345_cde
o/p
aa_12_ab
aaa_12345_cde
aa_12_gef
Basically, I need to sort the letters ads = after the second "_".
Please help me. I get no idea
Is this really what you want, with
"aa_12_ab" in the output, even if the input has
"aa_1234_ab"?
If you want just to sort the rows and not change them, then you can do something like this:
SELECT str
FROM table_x
ORDER OF SUBSTR (str
, INSTR (str, '_', 1, 2).
)
;
What happens if a line in the entry has no 2 ' _?
I hope that answers your question.
If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
Point where the above statement is erroneous results, and explain, using specific examples, how you get the right result of data provided in these places. If you change the query at all, your postal code.
Always say what version of Oracle you are using (for example, 11.2.0.2.0).
See the FAQ forum: https://forums.oracle.com/message/9362002#9362002
-
Query - Gohan values in the following columns of aging
Oracle 11.2.0.3...
I have this query... working on it in SQL * Navigator.
We pay all suppliers with Net 20, 25 Net and Net 30 terms due date + 15 days. I'm developing an application that will tell me who is due now, which must be returned within next 7, then 10, then 14 and coming 21 days.
The following query returns not due, owed, due + 7, etc... but just what is due is also displayed in the + 7, + 10, etc - because if it's due, it will be always due in a week!
How can I remove these values if they are already due?
(or, if they are due in 7 days, how can I delete + 10, + 14, etc?)
SELECT
PV. $vendor_name "seller."
NPS.invoice_number "Bill."
NPS.invoice_date "Date of the invoice.
NPS.due_date "due date."
Inv.Terms "terms."
(TO_DATE (sysdate) - nps.invoice_date) "Days entries."
(CASE
When to_date (nps.due_date) < to_date (sysdate)
then (to_date (sysdate) - to_date (nps.due_date))
Another null
end) 'days overdue',
"Remaining amount", NPS.amount_remaining
--0-15
(CASE
WHEN (TO_DATE (sysdate) - nps.invoice_date) < 45
THEN nps.amount_remaining
ANOTHER NULL
END
) "Unmatured,"
(CASE
WHEN (TO_DATE (sysdate) - nps.invoice_date) > = 45
THEN nps.amount_remaining
ANOTHER NULL
END
) "Have."
(CASE
WHEN (TO_DATE (sysdate + 7) - nps.invoice_date) > = 45
THEN nps.amount_remaining
ANOTHER NULL
END
) '+ 7 days. "
(CASE
WHEN (TO_DATE (sysdate + 10) - nps.invoice_date) > = 45
THEN nps.amount_remaining
ANOTHER NULL
END
) '+ 10 days. "
(CASE
WHEN (TO_DATE (sysdate + 14) - nps.invoice_date) > = 45
THEN nps.amount_remaining
ANOTHER NULL
END
) '+ 14 days. "
(CASE
WHEN (TO_DATE (sysdate + 21) - nps.invoice_date) > = 45
THEN nps.amount_remaining
ANOTHER NULL
END
) "21 days".
Of
Inv,
PV,
NPS
WHERE
and nps.amount_remaining <>0
and inv.terms ("Net 20', ' Net 25', 'Net 30')
example of output:
Invoice date of invoice terms due Date day days entered late amount not remaining due not due 7 days + 10 days + 14 days + 21 days
seller 00470871 1 12/27/1 / 2012/2013 Net 30 12 126,62 126.62 26
provider 59355648 2 11/28/2012 12/28/2012 Net 30 41 11 538,75 538.75 538,75 538.75 538,75 538.75
the seller 3 75793062 12/4/1/3 of 2012/2013 Net 30 35 5 950 950 950 950 950
seller 4 52835 12/13/1 / 2012/2013 Net 30 26 298.92 13 298,92 298.92
seller 4 52814 12/4/1/3 of 2012/2013 Net 30 35 5 330 330 330 330 330
any sql gurus have ideas?
Published by: camforbes on January 8, 2013 13:24Hello
It's not very clear what you want, but I think something more or less like that will do what you want:
WITH got_grp AS ( SELECT pv.vendor_name , nps.invoice_number , nps.invoice_date , nps.due_date , inv.terms , SYSDATE - nps.invoice_date AS days_entered , CASE WHEN nps.due_date < SYSDATE THEN SYSDATE - nps.due_date ELSE NULL END AS days overdue , nps.amount_remaining , CASE WHEN nps.invoice_date > SYSDATE - 24 THEN 'Over 21 Days' WHEN nps.invoice_date > SYSDATE - 31 THEN '+21 Days' WHEN nps.invoice_date > SYSDATE - 35 THEN '+14 Days' WHEN nps.invoice_date > SYSDATE - 38 THEN '+7 Days' WHEN nps.invoice_date > SYSDATE - 45 THEN 'Due' ELSE 'Not Due' END AS grp FROM inv JOIN pv ON ... JOIN nps ON ... WHERE nps.amount_remaining != 0 AND inv.terms IN ('Net 20', 'Net 25', 'Net 30') ) SELECT pv.vendor_name , nps.invoice_number , nps.invoice_date , nps.due_date , inv.terms , days_entered , days overdue , CASE WHEN grp = 'Not Due' THEN amount_remianing END AS not_due , CASE WHEN grp = 'Due' THEN amount_remianing END AS due , CASE WHEN grp = '+7 Days' THEN amount_remianing END AS plus_7_days , CASE WHEN grp = '+14 Days' THEN amount_remianing END AS plus_14_days , CASE WHEN grp = '+21 Days' THEN amount_remianing END AS plus_21_days FROM got_grp ;
Whenever you have a question, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
If the results are dependent on when the query is run, give an exact time of execution, or better yet, give a couple of different run times and desired outcomes, the same sample for each data.
Explain, using specific examples, how you get these results from these data.
Always say what version of Oracle you are using (for example, 11.2.0.2.0).
See the FAQ forum {message identifier: = 9360002} -
Compare the value of the column with the previous column and Populate values
Hi all
Please help me to get the required sql
I have a table T1 as example below
Id1 Id2 Column1 Column2
1 1 name1 null
1 2 name2 XYZ
1 3 name3 null
1 4 name4 abc
1 5 name5 null
If the value is null, ishould then fill with the previous value. until he finds a following value.
The result should be as below
Id1 Id2 Column1 Column2
1 1 name1 null
1 2 name2 XYZ
1 3 name3 XYZ
1 4 name4 abc
1 5 abc name5
Please help me to get the required sql
Thanks in advanceHello
Here's one way:
SELECT id1 , id2 , column1 , LAST_VALUE (column2 IGNORE NULLS) OVER ( PARTITION BY id1 -- if needed ORDER BY id2 ) AS column2 FROM t1 ORDER BY id1, id2 -- if needed ;
I'm guessing only a few things, as what makes a line 'previous' or 'next '.
I hope that answers your question.
If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
Explain, using specific examples, how you get these results from these data.
Always tell what version of Oracle you are using. «LAST_VALUE...» IGNORE NULLS"requires that Oracle 10.1 or higher. -
table removed, but LOB appear, how do the cleaning?
table removed, but LOB appear again in sys.dba_segments, take a lot of space, how to clean the LOB segment?Then, you can be your RETENTION policy. You see for the segments of BUSINESS that they won't go to the TRASH as such. They remain in the LOB segment in order to be able to FLASHBACK. Look at the documentation... I don't know what version you're on, but check this one.
http://www.Stanford.edu/dept/ITSS/docs/Oracle/10G/AppDev.101/b10796/adlob_ta.htm#1015810
Check it out...
RETENTION
As an alternative to the PCTVERSION parameter, you can specify the RETENTION setting in the clause of the CREATE TABLE or ALTER TABLE statement LOB storage. In doing so, configure the LOB column to store old versions of LOB data for a period of time, rather than using a percentage of the table space. For example:CREATE TABLE ContainsLOB_tab (n NUMBER, c CLOB)
(c) STORE AS SEGNAME of LOB (TABLESPACE lobtbs1 CHUNK 4096
RETENTION
NOCACHE LOGGING
STORAGE (MAXEXTENTS 5)
*);*
The RETENTION setting is designed for use with the undo features of the database, such as Flashback Query of Versions. When a LOB column has the property of RETENTION set, old versions of LOB data are kept for the duration specified by the parameter UNDO_RETENTION.
Noted that in what concerns the RETENTION setting:
Undo SQL is not enabled for LOB columns as it is with other data types. You must set the property of RETENTION on a column LOB using SQL cancel the LOB data.
You cannot explicitly set the value of the RETENTION setting. The shelf life of determined by the parameter UNDO_RETENTION LOB versions.
Use of the RETENTION parameter is supported only in Automatic Undo Management mode. You must configure your table for use with automated cancel before you can configure RETENTION on a LOB column.
The LOB storage clause can specify RETENTION or PCTVERSION, but not both.
So your LOB is probably hanging out until you hit the UNDO_RETENTION... even while they will not be deleted but be reused "I think."
Concerning
Tim -
Strip column values, set the new column
I'm on 11G, need help with SQL.
I would like to use RegEx, I know 11G supports up to 5 functions, I think maybe REGEX_LIKE, not sure, let me explain.
I have a VARCHAR2 column in my Table which can have different combinations of values:
Example #1:
value (with or without spaces, I call this value0, without a delimiter), example:
Send
Infocourriel
WhiteSpace
More examples
value0 band where no delimiter is used in its own column
Example #2: (values separated by a delimiter <), example:
Gucci < watches < accessories
blah < blah < blabla
blah < blah #$ < blabla
so, I call these:
Value1, value2, value3
band value1 before 1 < in its own column
band value2 before the 2nd < in its own column
remove the 3 value after the 2nd < in its own column
The good thing is that when the separator is used, it is consistent, there are 2 of them: value1, value2, value3
Thank you.Hello
Whenever you have a problem, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) of all the tables.
Also post the results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.
If you ask on a DML statement, such as UPDATE, CREATE TABLE and INSERT statements need to re - create the tables as they are before the DML, and results will be the content of the or the tables changed when it's all over.Looks like you want something like:
UPDATE table_x SET value0 = CASE WHEN INSTR (value, '~') = 0 THEN value END , value1 = CASE WHEN INSTR (value, '~') > 0 THEN TRIM ( REGEXP_SUBSTR ( value , '[^~]+' , 1 , 1 ) ) END , value2 = TRIM ( REGEXP_SUBSTR ( value , '[^~]+' , 1 , 2 ) ) , value3 = TRIM ( REGEXP_SUBSTR ( value , '[^~]+' , 1 , 3 ) ) ;
You could use instead of INSTR REGEXP_LIKE, but is not really easier to code, and it will be less effective.
Published by: Frank Kulash, Sep 20, 2011 17:15
This site interprets the < signs such as markup, so I changed the delimiter to ' ~', just to make it clear. You must use < I used ~ above. -
Question: We have configured replication vsphere in our environment and when replication is triggered according to the OFR start us below the questions on the virtual machines that are configured for replication.
Version for esxi: Patch 5.1 level 7
Virtual center of version 5.1
Source of storage - IBM v7000
Destination storage - Hitachi
Questions:
Events of breach RPO
Consolidation for the VM disk failure
Delta abandoned events
Time change events
NTFS error and warning (event ID: 137, 57)
RDP disconnect and ping does matter
Standby error
Volsnap error
Stop the server and offline issue
Install vmtools emits automaticallywell, in this case, we need to disable the standby of the end of the replication.
So that everything in triggering replication does not trigger the snapshot of the suspension.
Then test the if you get these errors.
-
I need to install Microsoft silverlight to watch films from netflix, but it is impossible to install it; but in my programs, I have microsoft silverlight (old), I think that if I remove the old program, the new microsoft silverlight will be possible to insall it. The problem is when I try to remove the old silverlight (add or remove programs) do not remove and displays this dialog box "the installation source for this product is not available. Verify that the source exists and that you can access. I like you would help me in this matter. Thank you very much. Manuel Ortega.
Hello
I recommend you to ask your question in the Microsoft's Silverlight Installation and Setup forum for better support.
-
I can't remove Silverlight.
I want to update to Silverlight. When I try to download, the download fails and I get a message to uninstall the old version. When I try to do, I get a message that says "the installation source for this product is not available. Varify that the source exists and that you can access. »
I have been in this situation and tried the solution here:
"How to manually clean a broken Silverlight installation.
Who has not completely worked for me, however, if I pulled upward from Regedit
(Start-> Run-> 'Regedit')
and searched the whole registry "Silverlight", deleting keys of parenthood which contain this string. (There was a large number of them). When I did, I was finally able to reinstall Silverlight.Note that editing the registry is dangerous, so make sure that you first create a backup of the registry and know how to restore it in case things go very wrong.
"How do back up and restore the registry in Windows XP"
<>http://support.Microsoft.com/kb/322756 >HTH,
JW
Maybe you are looking for
-
photos of start-up cannot find system photo library
I saw this question in a number of other messages, but I don't see any solution. When I boot my MacBook Pro and then try opening the pictures, I get the "pictures don't find the photo library of the system". I am running 10.11.4 but this has happ
-
My TECRA A7 has a 100 GB hard drive, and I wonder if I can replace it for a larger.Is this possible and what should I do? Thanks for any help
-
What is easyserve status codes?
the status of the codes read repair machine "OS" and then "CX" Machine has been shipped worried these anyhitng? or just regular filing "Jargon"?
-
I have been using Outlook Express 6 for more than 20 years without a single problem so far. Value of a full year of emails has disappeared all of a sudden my box but all e-mail messages seem to be always in place of my sent folder. How can I recover
-
Well, my laptop, dv7-4296nr provided with the DVD - RW optical drive, but now I want to change it with the Bluray player, it's ok?