Doubt about locking of record's in distributed environment...
i read kumar's comment in my previous thread, he haad mentioned the following code,
cursor <> is select * from <> where <> for update of <>, so that it will be locked if it was unlocked...
but assume i have the following part of code
cursor <> is select * from <> where <>
begin
update the records if some condition is found during runtime
end;
and this happens to be invoked in a distributed manner, so what will happen if two sessions run the code at the same time, and how is data integrity handled in this case???
also explain with regard to usage of sequence(S) in a distributed environment...
Thanks And Regards,
Vairavan.S
Oracle will prevent two transactions from simultaneously modifying a row. Oracle can ensure that the database is consistent.
Many applications need to enforce a more stringent constraint. They need to ensure that committed data isn't accidentally overwritten by another user.
Session 1
SELECT's a value of 5
Session 2
SELECT's a value of 5
UPDATE's the value to 6
COMMIT's
Session 1
UPDATE's the value to 7 <- most applications want to tell User 1 that he is overwriting someone else's changes here
COMMIT's
If you have an application where people open a record, work with it for a minute, and then save, there is plenty of opportunity for someone else to change the data before the user saves. Allowing the user to overwrite changes he's never seen is often a bad thing-- the user whose changes were overwritten often gets upset if they have to redo their work.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC
Similar Messages
-
A Question about ADF Faces, File Uploading in distributed environment
Hello,
I am using ADF Faces for my project. In my project members will be able to create their albums and upload their photos..
The problem is that i can do upload in a single server enviroment but i dont know what will happen when count of members will grow.. What is the best way
for managing these photos in clustered enviroment. 1 Server will not be enough if too many people upload their photos.
I do not have exact server number because i will add additional server nodes when it will be necessary, so i must think how to do that before production.
Do you advice me to use XML or keep addresses of photos in database? Or anything else? As i mentioned, i dont know how many servers i will have... maybe 1 maybe 5 maybe 10.
Thanks for your helps..Hi,
First of all, thanks for your replies..
Actually i do not want to keep all of videos and photos in database. Keeping them in directories will be better for me but i do not know how to share them between multiple server nodes..
This is the thing that i have never done before..
Can you please tell me the terms & keywords that i need look for? So i can find some documents about making this happen.
Thanks again.. -
Doubt about Bulk Collect with LIMIT
Hi
I have a Doubt about Bulk collect , When is done Commit
I Get a example in PSOUG
http://psoug.org/reference/array_processing.html
CREATE TABLE servers2 AS
SELECT *
FROM servers
WHERE 1=2;
DECLARE
CURSOR s_cur IS
SELECT *
FROM servers;
TYPE fetch_array IS TABLE OF s_cur%ROWTYPE;
s_array fetch_array;
BEGIN
OPEN s_cur;
LOOP
FETCH s_cur BULK COLLECT INTO s_array LIMIT 1000;
FORALL i IN 1..s_array.COUNT
INSERT INTO servers2 VALUES s_array(i);
EXIT WHEN s_cur%NOTFOUND;
END LOOP;
CLOSE s_cur;
COMMIT;
END;If my table Servers have 3 000 000 records , when is done commit ? when insert all records ?
could crash redo log ?
using 9.2.08muttleychess wrote:
If my table Servers have 3 000 000 records , when is done commit ? Commit point has nothing to do with how many rows you process. It is purely business driven. Your code implements some business transaction, right? So if you commit before whole trancaction (from business standpoint) is complete other sessions will already see changes that are (from business standpoint) incomplete. Also, what if rest of trancaction (from business standpoint) fails?
SY. -
Doubt about Tunning View Objects
Hi !. I have the following doubt about tunning View Objects:
If I have the following configuration on a VO:
All Rows
In Batches Of: 11
As Needed
Access Mode: Scrollable
Range Size: 10
Total Records On The Table: More than 100
What would happen is that while the initial render, the view cache is fetch with 11 rows from the table and the ui table shows 10. In subsequent scroll events, more queries again will be done but not when the user scrolls back. My doubt is this one: Why, while the initial render If I put a breakpoint in this overrided method executeQueryForCollection, the execution reachs there but in subsequent scroll events (forward) the execution doesn't reach there ?. I understand thast this should happen as the required rows are not yet in the cache. I would like to know a way to test this access mode and what method is executed in every roundtrip to the DB. Thankx !.I don't think ADF needs to execute the query again - it just needs to fetch the next set of records.
So if the cursor is already open, no need to issue another query.
You can use the HTTP Analyzer to watch network traffic
Monitoring ADF Pages Round-Trips with the HTTP Analyzer
And you can use the logging features of ADF to see the queries being executed.
Declarative View Objects (VOs) for better ADF performance -
Doubt about the sizing in the CPH
Hi gurus!
I have the following doubt about the sizing in the CPH. I'm going to implement the CCMS BI CONTENT, i read the Note 979581 - Installing and configuring the CCMS BI Content, but in the document called "IT Performance Reporting Using SAP NetWeaver Business Intelligence" you can see images in this link:
http://www.servidor-imagenes.com/show-image.php?id=050236bd91654e16c94a559350611dff
here said how I can calculate the sizing based in Data Record Size per each Metric stored, but in specific, about the example: 20 systems, 17 CPH metrics. are included SCM, BI, ECC, SOLMAN in this 20 systems? And about the 17 CPH Metrics is talking about ratios? what's mean the CPH metrics?, How can I know what is my CPH metrics?
I hope can help me
Best Regards
Ramon Sanchezthis theme has been closed on our enterprise
-
Doubt about Master-Child relationships.
Hello,
I've a doubt about master-child relationships.
Any row in the master table need to has at least one row in the child table. What do I guarantee that?
Please, any ideas.
Thnx.If im correct you are asking that any row in master table should have a corresponding child record in detail
(transaction) table.
WELL , There is no compulsion that the child table should have a record linking to record in master table.
Master table is not depended on child table. Child table is dependent on data reference on master table.
Pls note that Master table is independent of the child table ( in terms of data reference only) .
This doesnt mean that if you want to delete the master records when child records exists. it gives an error in that case.
check the following example
SQL> create table master(n number primary key);
Table created.
SQL> insert into master values(1);
1 row created.
SQL> create table child(t number references master(n));
Table created.
Hello,
I've a doubt about master-child relationships.
Any row in the master table need to has at least one row in the child table. What do I guarantee that?
Please, any ideas.
Thnx. -
Doubt about a null value assigned to a String variable
Hi,
I have a doubt about a behavior when assigning a null value to a string variable and then seeing the output, the code is the next one:
public static void main(String[] args) {
String total = null;
System.out.println(total);
total = total+"one";
System.out.println(total);
}the doubt comes when i see the output, the output i get is this:
null
nulloneA variable with null value means it does not contains a reference to an object in memory, so the question is why the null is printed when i concatenate the total variable which has a null value with the string "one".
Is the null value converted to string ??
Please clarify
Regards and thanks!
Carlosnull is a keyword to inform compiler that the reference contain nothingNo. 'null' is not a keyword, it is a literal. Beyond that the compiler doesn't care. It has a runtime value as well.
total contains null value means it does not have memory,No, it means it refers to nothing, as opposed to referring to an object.
for representation purpose it contain "null"No. println(String) has special behaviour if the argument is null. This is documented and has already been described above. Your handwaving about 'for representation purpose' is meaningless. The compiler and the JVM don't know the purpose of the code.
e.g. this keyword shows a hash value instead of memory addressNo it doesn't: it depends entirely on the actual class of the object referred to by 'this', and specifically what its toString() method does.
similarly "total" maps null as a literal.Completely meaningless. "total" doesn't 'map' anything, it is just a literal. The behaviour you describe is a property of the string concatenation operator, not of string literals.
I hope you can understand this.Nobody could understand it. It is compete nonsense. The correct answer has already been given. Please read the thread before you contribute. -
Locking multiple records in a database table at a time
Hi Experts,
I have a requirement to lock multiple records in the database table for writing. I have created lock object in SE11. But with this we have only 2 possibilities either lock entire table or lock a single record at a time.
My requirement is, i have table with key field PROJECTID. I want more than one project to be locked, but not the complete table. I dont have any other field in the table to compare.
Thanks in advance..
Regards,
AsrarHi ,
Try with FOR UPDATE in the SELECT sentence.
SELECT FOR UPDATE *
INTO Internal_Table
FROM Table
WHERE Conditions.
UPDATE "Table_name" FROM TABLE Internal_Table.
COMMIT WORK.
This sentence blocks only the records that satisfy of the WHERE conditions (not the entire table) and unlocks after commit work.
Hope this information is help to you.
Regards,
José -
Doubt about Select statement.
Hi folks!!
I have a few doubts about the select statements, it may be a silly things but its useful for me.
what is difference between below statment.
1)SELECT * FROM TABLE.
2)SELECT SINGLE * FROM TABLE
3)SELECT SINGLE FROM TABLE.
Hope i will get answer,thanks in advance.
Regards
Richie..Hi,
try this and if possible use sap help.i mean place the cursor on select and press F1.
Types of select statements:
1. select * from ztxlfa1 into table it.
This is simple select statement to fetch all the data of db table into internal table it.
2. select * from ztxlfa1 into table it where lifnr between 'V2' and 'V5'.
Thisis using where condition between v2 and v5.
4. select * from ztxlfa1 where land1 = 'DE'. "row goes into default table work Area
5. select lifnr land1 from ztxlfa1
into corresponding fields of it "notice 'table' is omitted
where land1 = 'DE'.
append it.
endselect.
Now data will go into work area. and then u will add it to internal table by
append statement.
6. Table 13.2 contains a list of the various forms of select as it is used with internal tables and their relative efficiency. They are in descending order of most-to-least efficient.
Table 13.2 Various Forms of SELECT when Filling an Internal Table
Statement(s) Writes To
select into table it Body
select into corresponding fields of table it Body
select into it Header line
select into corresponding fields of it Header line
7. SELECT VBRK~VBELN
VBRK~VKORG
VBRK~FKDAT
VBRK~NETWR
VBRK~WAERK
TVKOT~VTEXT
T001~BUKRS
T001~BUTXT
INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
FROM VBRK
INNER JOIN TVKOT ON VBRKVKORG = TVKOTVKORG
INNER JOIN T001 ON VBRKBUKRS = T001BUKRS
WHERE VBELN IN DOCNUM AND VBRK~FKSTO = ''
AND VBRK~FKDAT in date.
Select statement using inner joins for vbrk and t001 and tvkot table for this case based on the conditions
8. SELECT T001W~NAME1 INTO TABLE IT1_T001W
FROM T001W INNER JOIN EKPO ON T001WWERKS = EKPOWERKS
WHERE EKPO~EBELN = PURORD.
here selecting a single field into table it1_t001winner join on ekpo.
9. SELECT BUKRS LIFNR EBELN FROM EKKO INTO CORRESPONDING FIELDS OF IT_EKKO WHERE EBELN IN P_O_NO.
ENDSELECT.
SELECT BUTXT FROM T001 INTO IT_T001 FOR ALL ENTRIES IN IT_EKKO WHERE BUKRS = IT_EKKO-BUKRS.
ENDSELECT.
APPEND IT_T001.
here I am using for all entries statement with select statement. Both joins and for all entries used to fetch the data on condition but for all entries is the best one.
10. SELECT AVBELN BVTEXT AFKDAT CBUTXT ANETWR AWAERK INTO TABLE ITAB
FROM VBRK AS A
INNER JOIN TVKOT AS B ON
AVKORG EQ BVKORG
INNER JOIN T001 AS C ON
ABUKRS EQ CBUKRS
WHERE AVBELN IN BDOCU AND AFKSTO EQ ' ' AND B~SPRAS EQ
SY-LANGU
AND AFKDAT IN BDATE AND AVBELN EQ ANY ( SELECT VBELN FROM
VBRP WHERE VBRP~MATNR EQ ITEMS ).
Here we are using sub query in inner join specified in brackets.
Thanks,
chandu. -
Error - Unable to lock the record.
Error - Unable to lock the record. Cause: The record is being modified by another user.
Hi all,
I encountered the error above after deleting a record from a table then clicking the next button(train). Please help.
Thanks.
Maevethe two most probable possible reasons for this error:
1)When your program tried to delete the partiular record, somebody from back-end has deleted the record.
2)Your program is not commiting after doing the transaction.
Also,Check out this thread :
Re: save button - Unable to perform transaction on the record. stale data,
--Mukul -
How to lock a record in a database using java
hi,
i want to lock a record in a database. how could it be done.
if any body has idea pls share with meOk, then you can create a simple lock:
The idea is same, but this allow you to lock multiple id at the same time:
static Object LOCK_FLAG = new Object();
static Object[] locker = new Object[1000]; // assuming you have id 0-999 to lock
this function will wait until current thread succesfully
locks all the ids to lock.
public void lock( int[] idsToLock) {
while (true) {
synchronized(locker) {
boolean success = true;
for(int i=0; i<idsToLock.length; i++) {
if (locker[ idsToLock[ i ] ] != null )
success=false;
if (!success) break;
if (success) {
for(int i=0; i<idsToLock.length; i++)
locker[ idsToLock[ i ] ] = LOCK_FLAG;
locker.notify();
return;
locker.notify();
try { Thread.sleep(100); } catch (Exception ex) { }
this function will wait until all locks are released
public void releaseLock( int[] idsToLock) {
synchronized(locker) {
for(int i=0; i<idsToLock.length; i++)
locker[ idsToLock[ i ] ] = null;
locker.notify();
}How to use:
int[] recordToLock = new int[] { 1, 100, 55, 32, 25 };
lock(recordToLock); // lock before modify ..
try {
// do anything with your records ...
} catch (Throwable t) {
// if any exception ...
} finally {
releaseLock(recordToLock); // make sure this will always be executed
}rgds,
Alex -
Doubts about BP number in SRM and SUS
Hello everyone,
I have some doubts about the BP number, especially for Vendors.
I am working with the implementation of SRM 5.0 with SUS in an extended classic scenario. We will use one server for SRM and other for SUS. We will use the self registration for vendor (in SUS). My questions are:
- Can I have the same BP number in SRM and SUS?? Or is it going to be different??
- When a vendor accesses at the site to make a self registration in SUS, the information is sent to SRM as prospect (by XI) and there the prospect is changed as vendor? After that, is it necessary to send something from SRM to SUS again? (to change the prospect to vendor)
- When is it necessary to replicate vendors from SRM to SUS??
Thanks
IváDear Ivan,
Here is answer to all your questions. Follow these steps for ROS configuration:
Pls note:
1. No need to have seperate clients for ROS and SUS. Create two clients for EBP and (SUS+ROS).
2. No need of XI to transfer new registered vendor from ROS to EBP
Steps to configure scenario:
1. Make entries in SPRO --> "Define backend system" on both clients.
You will ahev specify logical systems of both the clients (ROS as well as EBP)
2. Create RFCs on both clients to communicate with each other
3. In ROS client create Service User for supplier registration service with roles:
SAP_EC_BBP_CREATEUSER
SAP_EC_BBP_CREATEVENDOR
Grant u201CS_A.SCONu201D profile to the user.
4. Maintain service user in u201CLogon Datau201D tab of service : ros_self_reg in ROS client
5. Create Purchasing and vendor Organizational Structure in EBP client and maintain necessary
attributes. create vendor org structure in ROS client
6. Create your ROS registration questionnaires and assign to product categories- in ROS client
7. To transfer suppliers from registration system to EBP/Bidding system, Supplier pre-screening has to be
defined as supplier directory in SRM server - EBP client.
Maintain your prescreen catalog in IMG --> Supplier Relationship Management u2192 SRM Server u2192
Master Data u2192 Define External Web Services (Catalogs, Vendor Lists etc.)
8. Maintain this catalog Id in purchasing org structure under attribure "CAT" - in EBP client
9. Modify purchaser role in EBP client:
Open node for u201CROS_PRESCREENu201D and maintain parameter "sap-client" and ROS client number
10.Maintain organizational data in make settings for business partner
Supplier Relationship Management -> Supplier Self-Services -> Master Data -> Make Settings for the Business Partners. This information is actually getting getting stored in table BBP_MARKETP_INFO.
11. Using manage Business partner node with purchasers login (BBPMAININT), newly registsred vendors are pulled from Pre-screen catalog and BP is created in EBP client. If you you have SUS scenario, ensure to maintain "portal vendor" role here.
I hope this clarifies all your doubts.
Pls reward points for helpful answers
Regards,
Prashant -
I have some doubts about the possible uses of OBIEE. It happens that using OBIEE sometimes users demand report of an "analytical" type, that is aggregated analysis through OBIEE’s Answers, selecting data from dimension tables and measures from fact tables. That’s the ordinary purpose of business intelligence tools!!!
Some other times though, users demand to perform through Answers analyses of an "operating" type, that is simple extractions of some fields belonging to dimension tables, linked between each other through joins, (hence without querying fact tables): that happens because some of the tables brought in the datawarehouse are not directly linked to any fact table. In this way users want to use Answers to visualize data even for this kind of extractions (or operating reports).
Is this a correct use of the tool or is it just a “twisted” way of using it, always leading eventually to incorrect extractions? If that’s the case, is it possible to use instead BI Publisher, extracting the dataset through the "Sql Query" mode in a visual manner? The problem of the latter solution, in my case, relies in the fact that users are not enough skilled from the technical point of view: they would prefer to use Answers for every extraction, belonging both to the first type (aggregations) and the second one (extractions), that I just described. Can you suggest a methodology to clarify this situation?Hi,
I understand your point... But I think OBIEE doesn't allow having dimension "on their own", they must be joined to a fact table somehow. This way, when you do a query in answers using fields of two dimension tables a fact table should be always involved. When dimensions are conformed, several fact tables may be used, and OBIEE uses the "best" one in terms of performance. However, there are some tricks that you can do to make sure a particular fact table is used, like using the "implicit fact column" in the presentation layer.
So back to your point, using OBIEE for "operational" reporting as you call it is a valid option in my experience, but you have to make sure that the underlaying star schema supports the logic that your end users expect when they use just dimension fields.
Regards, -
Question about Databases on a distributed environment...
Hi,
I have quick question. We have production in a distributed environment as follows
(a) SQL server, EPMA, and Calc Manager
(b) Workspace, and Shared Services
(c) Essbase
(d) Planning
Now we have multiple databases for each hyperion service i.e.
(1) HSS (using for hyperion shared service)
(2) BIPLUS (Using for workspace)
(3) AAS (Using for Essbase Administrator Services)
(4) CALCMGR (Using for calculation manager)
(5) EPMA (Using for EPMA)
(6) ERPI (Using for ERP Integrator)
(7) PLANSYS (Using for Planning)
Now, my question is ....is it necessary that we have that multiple database in a distributed environment or we can have one database for everything? What is main objective for creating databases for each application?
Please share your best knowledge and give me positive and negative about multiple database and single database for hyperion...
Thanks to all...
SafiI am going to be lazy and copy an extract from the install doc
For simplicity and ease of deployment, you can use one database repository for all products (with the exceptions noted below). When you configure multiple products at one time using EPM System Configurator, one database is configured for all selected products.
Caution!
To use a different database for each product, perform the “Configure Database” task separately for each product. In some cases you might want to configure separate databases for products. Consider performance, rollback procedures for a single application or product, and disaster recovery plans.
The following products and product components require unique databases:
Performance Management Architect interface data source
Extended Analytics for Financial Management and Extended Analytics for Strategic Finance
Planning – Each Planning application should have its own repository.
Performance Scorecard
FDM – Use an Oracle Database instance exclusively for FDM.
Data Relationship Management.
Cheers
John
http://john-goodwin.blogspot.com/ -
Doubts about use of REPORTS_SERVERMAP with Forms11g HA
Hi,
I'm configuring a Linux 64bits Forms/Reports 11g HA environment, the point is that i have two nodes, each one with its Forms and Reports servers, let's say FormsA and ReportsA for the first node and FormsB and ReportsB for the seconde node.
i want FormsA to be able to call reports from ReportsB and FormsB to be able to call reports from ReportsA.
I've been reading about REPORT_SERVERMAP
http://docs.oracle.com/cd/E12839_01/bi.1111/b32121/pbr_conf003.htm#autoId5
But i have some doubts about its use:
1. I will not use a shared cluster file system or any way of cache solution, i will only have my rdf files on each node, and i'm wondering if just by configuring this parameter i will be able to get the effect mentioned above ??
2. The link provided says "Using RUN_REPORT_OBJECT. If the call specifies a Reports Server cluster name instead of a Reports Server name, the REPORTS_SERVERMAP environment variable must be set in the Oracle Forms Services default.env file"
In fact i'm using RUN_REPORT_OBJECT but
what is the Reports Server cluster name ?? and where do i find that name ??
3. Is this configuration well defined:
REPORTS_SERVERMAP=clusterReports:ReportsA;clusterReports:ReportsB
4. At forms applications when using RUN_REPORT_OBJECT, can i assume that the report server name will be the cluster name specified at the REPORTS_SERVERMAP ??
5. Which files should i modify rwservlet.properties or default.env ??
Hope you can help me :)
Regards
CarlosHi,
1. I will not use a shared cluster file system or any way of cache solution, i will only have my rdf files on each node, and i'm wondering if just by configuring this parameter i will be able to get the effect mentioned above ??
--> In such case what could go wrong is
Suppose Run_report_object executed jobs successfully to ReportsA
But web.show_document command for getjobid failed ( as ReportsA went down by this time)
--> You will not get the output shown ( though job was successful)
If shared cache was enabled, then Even if ReportsA is down, other cluster member ( say ReportsB)
will respond back to web.show_document.
Point 2,
--> Under HA is it highly recommended to use web.show_document ( a servlet call) to execute reports. This is to help use all HA features at the HTTP , Webcache or load balancer level.
However if there is migrated code or Run_report_object is must, then the recommendations as you see in the pointed document is must.
REPORTS_SERVERMAP setting needs to be configured in rwservlet.properties file and also in default.env Forms configuration file to map the Reports Server cluster name to the Reports Server running on the mid-tier where the Load Balancer forwarded the report request.
For example FormsA, ReportsA, cluster name say rep_cluster
default.env file
REPORTS_SERVERMAP=rep_cluster:ReportsA
Where "rep_cluster" is the Reports Server cluster name and "ReportsA" is the name of the Reports Server running on the same machine as FormsA
rwservlet.properties file
<reports_servermap>rep_cluster:ReportsA</reports_servermap>
At default.env this is not a valid entry
REPORTS_SERVERMAP=clusterReports:ReportsA;clusterReports:ReportsB
what is the Reports Server cluster name ?? and where do i find that name ??
--> This is created via EM on the report server side.
Would recommend to refer following documents at the myoracle support repository
How to Setup Reports HA (High Availability - Clusters) in Reports 11g [ID 853436.1]
REP-52251 and REP-56033 Errors When Calling Reports From Forms With RUN_REPORT_OBJECT Against a Reports Cluster in 11g. [ID 1074804.1]
Thanks
Maybe you are looking for
-
Dashboards - More than one level deep
Is there a way to create a Dashboards more than one-level deep. Currently I can put a Dashboard within another Dashboard (Getting the flyout menu when I select the top-level dashboard in the Interface). However, what if I want to go one level deeper?
-
Problems with uploading files, lumia 920!
Hello, I'm having trouble uploading files in internet explorers browser. if I come to a website with a browse button , you can not explore the phone's contents. The Browswe button is gray marked I have tried on several different websites. For example
-
Viewing videos on the timeline
How can I view two videos at the same time, that I am editing on timeline. Am, color grading a clip, but I want to view the previous one I graded at the same time, to ensure that they match.
-
TS3367 How do I change the phone number in the veification of FaceTime for iPhone 4s?
How do I change the phone number in the veification of FaceTime for iPhone 4s?
-
Can Install & Configure Forms & Reports 11g on Windows XP SP2 (32-bit)
Hi All; can install & configure forms & reports 11g on windows xp sp2 (32-bit) regards