Question concerning executing of sql
Hallo,
I have a question concerning the execution of sql-statements.
I have a database and different applications that work with this database. When I now have a session and this session sends statements that should be executed.
I want to ensure that the application can not execute all statements. What I want is a possibility that before a statement is executed there is a warning.
Is there something in oracle database. Something that I can tie down to a table or a view.
Any help appreciated.
Thanks
Hi,
I have a question concerning the execution of sql-statements.
I have a database and different applications that work with this database. When I now have a session and this session sends statements that should be executed.
I want to ensure that the application can not execute all statements. What I want is a possibility that before a statement is executed there is a warning.
As per my understanding see, Does your application is executing the series of Queries directly from the Frontend environment for Calling any Stored procedure to do the necessary Job.
In case of queries, then say try to use some schema, where and what ever you want to keep the restrictions on certains table / Access grant respective Rights to some role and assign to the required schema.
So, In case if you want restrict some thing make your application to connect with respect user.
Else the above option is not possbile from your end then I think at table you can not restrict or raise any alerts or warnings, until the user don't have access to table. Other check with DBMS_ALERT, yoy might find any relavant thing for your problem.
If you are using stored procedures, then you can able achive that, that Send an Additional parameter Is_Access or Is_Executable. This parameter send the boolean values true or false or 1 or 2 as per your checking feasibility, at code level, make sure than when ever you need send the warning send appopriate boolean value and which return the message from stored procedure (out parameter ) to application and will not execute the Code, If appopriate Boolean value is send from application call , then perform the Business transaction as per requirement.
If I am missing from your requirement perspective, then I am sorry...
- Pavan Kumar N
Similar Messages
-
How do i get a output in CSV of a SQL query executed via SQL Command prompt
Hi All,
I have a question with reference to SQL command prompt. I have a sql query which runs properly and gives proper execution in SQL Management console in GUI.
This report is used to pull the free disk space report of our servers
As i want to schedule it as a report so i want to script it to run via SQL command prompt. I made the script and it works fine if i enter it in SQL command prompt. When i try to extract the output to a CSV File it fails. Below is the details of the command
i am using to query to pull the data. Can anyone help me in getting the output of this query in SQL command prompt.
sqlcmd -W -s , -S Servers FQDN
use operationsmanager
Go
Query:"select Path, InstanceName, SampleValue
from PerformanceDataAllView pdv with (NOLOCK)
inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
order by countername, timesampled" -s "," -o "C:\DataSqlCmd.csv"
Go
When i enter the command without the quotes when the query is starting and ending and also without the output command (-s "," -o "C:\DataSqlCmd.csv") it is working and shows the output in the command prompt. Below is the screen shot for
your reference.
Due to security reasons i have to erase the server names:
But when i add the line to extract the output ( -s "," -o "C:\DataSqlCmd.csv") It gives me this error:
The exact command would be:
sqlcmd -W -s , -S CINMLVSCOM01.e2klab.ge.com
use operationsmanager
Go
"select Path, InstanceName, SampleValue
from PerformanceDataAllView pdv with (NOLOCK)
inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
order by countername, timesampled" -s "," -o "C:\DataSqlCmd.csv" -h-1
Go
saying the syntax is not correct or some thing as per the below screenshot.
Can any one please help. Below is just the query whi i use to get the output in SQL management studio.
Can any one make a command for the below quer so i can directly execute and test for getting the output.
select Path, InstanceName, SampleValue
from PerformanceDataAllView pdv with (NOLOCK)
inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
order by countername, timesampled
Gautam.75801Can you try the below query?
select Path, InstanceName, SampleValue
from PerformanceDataAllView pdv with (NOLOCK)
inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
where SampleValue < 20 and CounterName like '% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
order by countername, timesampled
-- replace the below query part in the below SQLCMD C:\>SQLCMD -S SERVERNAME -E -d operationsmanager -Q "select * from sys.databases ds with (nolock) where name='master'" -s "," -o "F:\PowerSQL\MyData.csv" -h -1
SQLCMD -S SERVERNAME -E -d OperationsManager -Q "select Path, InstanceName, SampleValue
from PerformanceDataAllView pdv with (NOLOCK)
inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
order by countername, timesampled" -s "," -o "c:\MyData.csv" -h -1
Refer for the other ways
http://dba.stackexchange.com/questions/23566/writing-select-result-to-a-csv-file
--Prashanth -
Execute multiple sql queries in plsql
Hello All,
I have two queries, How to execute multiple sql queries in plsql. Once the query completed in sql+ that report/output has to come in html.
Please guide to how to do that.
Thanks and Regards,
Muthu
[email protected]There are several ways to do what you are wanting, but you should consider posting your question in the correct forum (PL/SQL). This forum is for question about Oracle Forms! :)
As to your question, take a look at this: How to output query results as HTML.
Craig... -
Question concerning sap script
Hi all experts! I have a question concerning sap script
First some background information:
Ive created a sap script that is called from a function module and from an executable program, when I run the executable program the sap script work fine, but when I run the function module, all the variables in the sap script dont have value
In the function module the variables are defined in the top include
I dont know why these variables dont take his value from the function module
Any ideas?
Thanks in advance.
Message was edited by: Gerardo hernandezI think that sapscript expects its variables to be in the program which calls the fm <b>by default</b>. When you test via SE37 the framework itself is the calling program and it's unlikely that it will have a variable named kunnr-name1.
To over-ride this default, inside your fm pass the 'options' parameter(type itcpo) to 'open_form' and set the 'tdprogram' value to sy-repid in the function module.
I have tested this in my own environemnt and initially got the same error as you. When I set the tdprogram variable it started working! -
Executing multiple SQL statements fails using ODBC
Executing multiple SQL statements will fail with error 'ORA-00911 invalid character' when connecting to an Oracle database using ODBC driver version 8.01.07.00.
When I use either my application or the Oracle ODBC Test client utility connecting using ODBC driver version 8.01.07.00 I can only get a single CALL statement (as shown below) to execute:
CALL BHInsert (TO_DATE('2003.07.23 10:04:28','YYYY.MM.DD HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','
','Event File
Name','\\KILLIANS\BATCHCTL\SampleDemo1\JOURNALS\1.evt','','AREA1','','','','','','1','','','','','',' ','');
When I try to execute the following string with multiple CALL statements (as shown below) it fails with the following error being returned - ORA-00911: invalid character
CALL BHInsert (TO_DATE('2003.07.23 10:04:28','YYYY.MM.DD HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','
','Event File
Name','\\KILLIANS\BATCHCTL\SampleDemo1\JOURNALS\1.evt','','AREA1','','','','','','1','','','','','',' ','');
CALL BHInsert (TO_DATE('2003.07.23 10:04:28','YYYY.MM.DD
HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','Version','Recipe Header','1.0','','AREA1',' ','
','','','','1','','','','','',' ','');
CALL BHInsert (TO_DATE('2003.07.23 10:04:28','YYYY.MM.DD
HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','Version Date','Recipe Header','5/18/2001 1:28:32
PM','','AREA1',' ',' ','','','','1','','','','','',' ','');
CALL BHInsert (TO_DATE('2003.07.23
10:04:28','YYYY.MM.DD HH24:MI:SS'),'BATCH_ID','1:CLS_FRENCHVANILLA-1','Author','Recipe Header','Mark
Shepard','','AREA1',' ',' ','','','','1','','','','','',' ','');
I've tried adding a line feed in addition to the space at the end of each call but that doesn't seem to help. Also have tried unsuccessfully to change the seperator used between each call using various valid continuation characters.
Executing multiple CALL statements from within Oracle's SQL Worksheet connecting as the same user and password, as my application executes successfully. However when I try this from within the Oracle ODBC test client, it fails with the same ORA-00911 error that I'm seeing in my application.
I'm currently trying the more recent ODBC drivers, however any ideas or suggestions would be greatly appreciated.Can you take the begin ... end block and run it using SQL*Plus?
I can't think of any documentation that would specifically answer this question. I'm sure if you read & absorbed the ODBC Programmers Reference (2000+ pages) you'd be able to find out, but I don't know of a quick way to find out.
You can enable SQL*Net tracing. There are a fair number of options for enabling this tracing-- http://tahiti.oracle.com has all the Oracle manuals online, which should give you enough info to configure exactly what you want.
I would suggest, however, that you look into more performant/ scalable alternatives rather than going too far down this path. A block with lots of SQL statements with literals isn't going to make your database happy even if you get it to work.
Justin -
Execute PL/SQL statement on rendered report column only (APEX 4.02)
Hello,
i have a classic report which selects approx. 100.000 rows. For one of the columns in the sql i am executing
a rather complex PL/SQL function which generates additional html. This function slows down the query
by a tremendous amount (over one hour for the select, without this function it's 30 seconds) so i don't
want to execute it for each selected row but for the rendered ones only (15 per page).
Is it possible to do so in a report?Steven Mark wrote:
So if APEX does not give us the option to execute PL/SQL scripts on actually rendered columns onlyI have long thought that this is a major limitation of APEX. We know from Marc's post Re: Reports/Tabular Form and number of executions of a Lov Query that built-in column display operations are only performed for the rows rendered on the current page. However, there are many requirements (even relatively simple ones like row-level conditional display) that are impossible to meet using the built-in Display As/LOV, HTML Expression, Tabular Form Element, and Column Link display options. The alternatives are inefficient (context switching to user-defined functions) or poor practice (losing the separation of concerns by generating HTML/links in report queries).
The ability to call user-defined functions at the same rendering point as built-in column display operations, and to apply row-level conditions to built-in display options are long overdue enhancements. -
Dreamweaver cs6 suite development questions/concerns
Hello,
I am new a new creative cloud subscriber. I have past experience with programming a java environments and SQL. I am new to HTML5/CSS3 and have read a book on the subject to understand the design concepts in effort to find a good environment to develop mobile applications. I like what I see using fireworks to create HTML5/CSS3 to create code for more complex objects/elements.
Additionally, watched all the videos and am ready to roll up my sleeves and get started. As I have watched the videos and goggled allot of forums regarding DM CS6 and web applications I have a few questions and concerns. I will preface this with the understanding that this involves new features/ technologies and will suffer some growing pains.
Questions/ Concerns:
1) Fluid Grid Layout tool:
Can I create a mobile application with this tool that will work on both tablets and smart phones (not desktops) compiling a single optimized site using the phone gap tool; or do I have to create 2 separate site and compile?
2) Phone Gap
I have read that there are allot of issues with compiling applications. Even watching the adobe road show video, they could not get it to work (yikes).I have also read that I phone product code need to be compiled using xcode(tools); needed to have an apple subscription (which I have access to) What are the known issues compiling mobile applications for the different device platforms?
3) Sever-Side Mobile Applications
a) As I understand it, this cannot be accomplished with this environment without a web service that communicates to the server-side scripting/ Database server.
b) Reading about local storage, what are the limitations and how do they effect mobile applications if there is more complex scripting and large record sets?
C) Are there ways to create user/ security roles (I would imagine the integrity issues with security would be staggering)?
4) Responsiveness
I have played around DM, I have noticed it crashing and being very sluggish. I know its not memory or processing issues as I have read several posts on the topic.
It seems that adobe is making it easier to design and develop within one product/suite. These tools seem very powerful. The direction makes sense as I like elements of both development and design. I am concerned that I will hit walls and want to avoid banging my head. I am still new to this environment and the mistakes may be mine. With that being said, do you think Adobe will get these issues resolved out and have a great environment and development model.
Thanks in advance for the light anyone can shed on these subjects as I am eager to get started (but a bit worried).
ErichHi
To add to Davids reply -
Item 3:
Are you talking about apps. or web pages on mobile devices, (they are not the same thing)?
If web pages then the server/database side is no different to a normal web page which does require a server supporting these. As for local storage, (works whilst off-line) this is normally done via javascript and a local database, but I would not use this feature for anything too complicated as the database is stored on the users computer/device, and only 'communicates' with your server/database when the user is once again on-line and connected to your web page.
As for item 3.c. - Doing this for off-line use is a complete waste of time, as the user has access to any encryption code and the database entry's, which they can then use when on-line again. A simpler solution would be to require just the users credentials and store this locally, (still not ideal, but at least all the users DB is not downloaded).
Regarding item 4. Some users have reported problems, but for me personally 99.9% of them I have not experienced with the release version of CS6, and performance issues for me all vanished when I upgraded my PC to an i7 processor with 16Gb memory, an extreme solution for many I admit, but your computers speed and memory will have a dramatic effect on the user experience.
PZ -
Nub question concerning threads.
I recently completed my first Comp Sci. class in Java and have decided to try to continue learning on my own. I am now trying to make a pong game, using a turorial. Unforunately my course did not cover threads in any way, shape, or form. I am able to get the beginning of the program to work (code posted below) and have no problems with it; however, I do have a few questions concerning what certain elements of the code do.
1. Can someone please give a definition of a Thread in "Dummy" speach? I've looked up definitions and I can't seem to really grasp what they are and what they are used for.
2. In my program there are two lines (32 & 79) where the thread priority is changed. Can someone explain what that means and how it affects my applet?
import java.applet.*;
import java.awt.*;
public class BallApplet extends Applet implements Runnable
//Declare variables to change posistion
int x_pos = 10;
int y_pos = 100;
int radius = 20;
boolean rWall = false,
//The second image of the ball
private Image dbImage;
private Graphics dbg;
public void init() {}
public void start()
Thread th = new Thread(this);
th.start();
public void stop() {}
public void destroy() {}
public void run ()
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
while(true)
while (rWall == false )
if (x_pos == 700)
rWall = true;
else
x_pos= x_pos + 5;
// repaint the applet
repaint();
try
// Stop thread for 20 milliseconds
Thread.sleep (20);
catch (InterruptedException ex)
// do nothing
// set ThreadPriority to maximum value
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
while (rWall == true)
if (x_pos == 0)
rWall = false;
lWall = true;
x_pos = x_pos - 5;
repaint();
try
Thread.sleep(20);
catch (InterruptedException ex)
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
public void update(Graphics g)
//initialize buffer
if (dbImage == null)
dbImage = createImage(this.getSize().width,this.getSize().height);
dbg = dbImage.getGraphics();
//clear screen in background
dbg.setColor (getBackground());
dbg.fillRect (0, 0,this.getSize().width,this.getSize().height);
//draw elements in background
dbg.setColor (getForeground());
paint(dbg);
//draw image on screen
g.drawImage(dbImage,0,0,this);
public void paint (Graphics g)
g.setColor (Color.red);
g.fillOval(x_pos - radius,y_pos - radius,2*radius,2*radius);
}Thanks for any help, it is greatly appreciated.Questie,
Please control yourself. Please.??
As the program runs it is one thread. (You canthink
of each thread as an independent program if youlike.
This is not 100% accurate but close enough that
it
might help you understand)
It will only confuse the OP
You are a flat out wrong for a number of reasons.
1) You seemed to miss the part where I did say that a
doubling in peformance is fictious and is dependent
on a number of factors.As i was telling that would only confuse the OP.Its better to be 100% precise when you explain to an OP
2) You don't understand how a multi-process OS works
in the least.Assumptions as usual
3) You don't understand how processors work in the
least.Well,what was i saying?
2 and 3 are important because your point about
context switching is not valid. First of all because
this happens anyway because your program is not the
only thing running the processor. Second because of
the first point each thread gets a timeslice, you may
with multiple threads each get a timeslice and these
slices may (and often do) add up to more total time
then the first got by itself.When you consider a solution to a problem the average and the worst case has more weightage than the best case.You are taking the best case assumption here-"because ofthe first point each thread
gets a timeslice, you may with multiple threads each
get a timeslice and these slices may (and often do)
add up to more total time then the first got by itself".Now dont stop whining that you werent.Never take the best case always coz its the average and worst case which checks if the system festers to a condition beyond rectification
For example (these numbers are fictional but I am
trying to explain it so don't go off all half-cocked
again please)
Program with one thread. Each thread gets 100 cycles
per second.
Program with four threads. Each thread gets 50 cycles
per second.
The second program will finish in half the time as
the first. Because even though each thread is slower
as a whole the program is getting twice the cycles
of the processor as before. You are taking the best case again and moreover its the cpu scheduling algo which decides the time slice and not you sitting on the CPU.I have a vague feeling that you have an idea that you are sitting on the CPU deciding the Time Slice.
You need to understand something important here. Alot
of the time when you are doing things in a program,
and this doesn't just apply to IO here, you don't
have to use the processor for each step. There is
some shifting around of things to get them ready to
be executed by the processor. A more advanced
representation of this is to be found with
Hyperthreading. Hyperthreading processors (single
core) are of course single core but they act as if
they were multi-core (multi processes) because while
only one process is actually executing at one time
the others are pipelined in such a way to make sure
that the executing core of the processor has the
least amount of idle time possible.Digression
So that means on a basic processor each time you add
2 numbers it takes 5 steps. And the processor core is
idle 80% of the time.
From where did you get that 80%?Stop coming up with your own numberes.This is no number game
So for example while some data is being placed in the
outbox new data is also being collected and is at
step 2 already. In this model while we are still on a
single core the core is now idle only 60% of the time[b]From where did you get 60% now
So yes threading is very useful for IO and other
operations that may block your program but they have
more use than just that. Parallel execution can and
will have some performance advantages (if designed
properly) even on a single core processor without
hyperthreading. In a well written multithreaded
program when you add hyperthreading and multiple
cores or multiple processors to the mix then you
really have something.I never said it wont.Read properly what i have posted.I told dont take the best case always.You need to consider that too but the other two carries more weightage
Please don't feel you ever have to post to correct me
again thanks.^^
Get ride of this self conceited attitude.Even if you have it dont make it public.Its not that you are always right cotton.I am not saying that you are wrong.If you have read my first reply i mentioned that i knew that you gave that example just to make the OP understand.The problem with that is that if the OP is unable to fathom out what you mean he is going to misconstrue whatever you have said and that propogates -
Executing a SQL Inseert as a DB User instead of htmldb_public_user
Hi,
There are quite a few posts on this topic, but no direct answer.
In one of Scott's posts, he says:
'If you use HTML DB Account/LDAP/SSO/roll-your-own authentication and your named HTML DB session user is MIKE, HTML DB will execute your SQL or PL/SQL as the application's schema connected as HTMLDB_PUBLIC_USER and everything your code does inside the database will be as user HTMLDB_PUBLIC_USER .... '
In same post he says that if you use DB_authentication, the SQL is executed as the DB user.
We are putting the finishing touches on an application that needs to write to a DB which contains a trigger on it enforcing a rule that the insert user has to be a database user.
The problems/background to the issue we have are:
1. We want to use ldap - so we don't have to register everyone on that DB
2. Even if we didn't want to use LDAP, we can't get people to log onto the database anyway - as the application has a weird setup where the database username = application userame, but application password <> database password - and no user knows their database password (so they can't sneak around the back end).
3. We can't create a user htmldb_public_user on that database as it has a 10 char restriction on usernames
I guess It's the same question as:
How to execute a plsql with another db user but not HTMLDB_PUBLIC_USER?
but this was never expanded/answered.
What are my options?
A. Can I change htmldb_public_user to another username that is on the database?
or preferably
B. Can I somehow get the SQL to be run using the username that logged into htmldb?
...David.Hi Scott,
1) If you cannot create database users > 10 chars, how did you install HTML DB with its default schemas FLOWS_010600, FLOWS_020000, or FLOWS_FILES? We can create these users directly on the database for htmldb, but the application that we have on that same database does not let us create usernames > 10 char - and it is this application (a 3rd party system we have no control over) that enforces the database trigger for the user to be registered on their system when we try and update some of their data.
ie - we have a 3rd party database structure that we are sitting html db on top of to do reports and some updates where that system is inefficient. We have to work around that 3rd party's security as we have no way of changing it or getting them to change it.
2) You cannot safely use an alternative user to HTMLDB_PUBLIC_USER. Okay. That's nice to know as we were about to try that option.
Scott: having seen hopefully a bit more detail in the reply to 1 above - can you see what the question is now? ie - if we authenticate in htmldb using ldap, can we run a insert or update sql somehow within the htmldb application using a different account to htmldb_public_user so that we can fit in with the security restraints of this 3rd party system?
As I have said, we cannot use database authentication as the setup on this 3rd party system is very strange - it has a separate application based password for users compared to the user's database password , and we cannot give the users the database password (so they can log into htmldb) as it constitutes a security risk.
I am toying with the idea of creating a staging table that contains triggers to update the real table owned by the 3rd party application's schema, but haven't managed to get it working yet. -
Error while executing a sql query for select
HI All,
ORA-01652: unable to extend temp segment by 128 in tablespace PSTEMP i'm getting this error while i'm executing the sql query for selecting the data.I am having 44GB of temp space, while executing the below query my temp space is getting full, Expert please let us know how the issue can be resolved..
1. I dont want to increase the temp space
2. I need to tune the query, please provide your recomendations.
insert /*+APPEND*/ into CST_DSA.HIERARCHY_MISMATCHES
(REPORT_NUM,REPORT_TYPE,REPORT_DESC,GAP,CARRIED_ITEMS,CARRIED_ITEM_TYPE,NO_OF_ROUTE_OF_CARRIED_ITEM,CARRIED_ITEM_ROUTE_NO,CARRIER_ITEMS,CARRIER_ITEM_TYPE,CARRIED_ITEM_PROTECTION_TYPE,SOURCE_SYSTEM)
select
REPORTNUMBER,REPORTTYPE,REPORTDESCRIPTION ,NULL,
carried_items,carried_item_type,no_of_route_of_carried_item,carried_item_route_no,carrier_items,
carrier_item_type,carried_item_protection_type,'PACS'
from
(select distinct
c.REPORTNUMBER,c.REPORTTYPE,c.REPORTDESCRIPTION ,NULL,
a.carried_items,a.carried_item_type,a.no_of_route_of_carried_item,a.carried_item_route_no,a.carrier_items,
a.carrier_item_type,a.carried_item_protection_type,'PACS'
from CST_ASIR.HIERARCHY_asir a,CST_DSA.M_PB_CIRCUIT_ROUTING b ,CST_DSA.REPORT_METADATA c
where a.carrier_item_type in('Connection') and a.carried_item_type in('Service')
AND a.carrier_items=b.mux
and c.REPORTNUMBER=(case
when a.carrier_item_type in ('ServicePackage','Service','Connection') then 10
else 20
end)
and a.carrier_items not in (select carried_items from CST_ASIR.HIERARCHY_asir where carried_item_type in('Connection') ))A
where not exists
(select *
from CST_DSA.HIERARCHY_MISMATCHES B where
A.REPORTNUMBER=B.REPORT_NUM and
A.REPORTTYPE=B.REPORT_TYPE and
A.REPORTDESCRIPTION=B.REPORT_DESC and
A.CARRIED_ITEMS=B.CARRIED_ITEMS and
A.CARRIED_ITEM_TYPE=B.CARRIED_ITEM_TYPE and
A.NO_OF_ROUTE_OF_CARRIED_ITEM=B.NO_OF_ROUTE_OF_CARRIED_ITEM and
A.CARRIED_ITEM_ROUTE_NO=B.CARRIED_ITEM_ROUTE_NO and
A.CARRIER_ITEMS=B.CARRIER_ITEMS and
A.CARRIER_ITEM_TYPE=B.CARRIER_ITEM_TYPE and
A.CARRIED_ITEM_PROTECTION_TYPE=B.CARRIED_ITEM_PROTECTION_TYPE
AND B.SOURCE_SYSTEM='PACS'
Explain Plan
==========
Plan
INSERT STATEMENT ALL_ROWSCost: 129 Bytes: 1,103 Cardinality: 1
20 LOAD AS SELECT CST_DSA.HIERARCHY_MISMATCHES
19 PX COORDINATOR
18 PX SEND QC (RANDOM) PARALLEL_TO_SERIAL SYS.:TQ10002 :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1
17 NESTED LOOPS PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1
15 HASH JOIN RIGHT ANTI NA PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,098 Cardinality: 1
4 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 63 Bytes: 359,283 Cardinality: 15,621
3 PX SEND BROADCAST PARALLEL_TO_PARALLEL SYS.:TQ10001 :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
2 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
1 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
14 NESTED LOOPS ANTI PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 40,256,600 Cardinality: 37,448
11 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 6,366,160 Cardinality: 37,448
8 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1002
7 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 1 Bytes: 214 Cardinality: 2
6 PX SEND BROADCAST PARALLEL_FROM_SERIAL SYS.:TQ10000 Cost: 1 Bytes: 214 Cardinality: 2
5 INDEX FULL SCAN INDEX CST_DSA.IDX$$_06EF0005 Cost: 1 Bytes: 214 Cardinality: 2
10 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448
9 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448
13 TABLE ACCESS BY INDEX ROWID TABLE PARALLEL_COMBINED_WITH_PARENT CST_DSA.HIERARCHY_MISMATCHES :Q1002Cost: 0 Bytes: 905 Cardinality: 1
12 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT SYS.HIERARCHY_MISMATCHES_IDX3 :Q1002Cost: 0 Cardinality: 1
16 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT CST_DSA.IDX$$_06EF0001 :Q1002Cost: 1 Bytes: 5 Cardinality: 1 -
SQL error 3113 occurred when executing EXEC SQL.
Hi,
We are facing one typical problem, One background is failing regularly with
below dump. as we now got all notes giving information, if database restarted
taking backup, these type of failures occur, but our database is only down for backup once in a week, but it is failing with frequenly.
in this two servers are located in different place, in this job tries to connect
another server to get material statistics.
It is giving some error message in sm21 with
SQL error 3113 occurred when executing EXEC SQL.
work procees in reconnect mode.
all notes saying these types of dump occur when database restared, but this dump
even though database is up.
below is short dump, please can anyone help me from this problem.
ABAP runtime errors DBIF_DSQL2_SQL_ERROR
Occurred on 08.01.2007 at 00:30:28
>> Short dump has not been completely stored. It is too big.
SQL error 3113 occurred when executing EXEC SQL.
What happened?
The error occurred in the current database connection "AZ1".
What can you do?
Note the actions and input that caused the error.
Inform your SAP system administrator.
You can print out this message by choosing "Print". Transaction ST22
allows you to display and manage termination messages, including keeping
them beyond their normal deletion date.
Error analysis
How to correct the error
Database error text........: "ORA-03113: end-of-file on communication channel#"
Triggering SQL statement...: "select mara.groes, mara.brgew, mara.ntgew,
mara.gewei, mara.volum, mara.voleh, mara.mstae, mara.mstde, mara.prdha,
marc.matnr, marc.werks, marc.mmsta, marc.mmstd from sapr3.mara, sapr3.m
where sapr3.mara.mandt = sapr3.marc.mandt and sapr3.mara.matnr =
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
If the error occurred in a non-modified SAP program, you may be
able to find a solution in the SAP note system.
If you have access to the note system yourself, use the following
search criteria:
"DBIF_DSQL2_SQL_ERROR"
"ZM2431216 " or "ZM2431216 "
"EXTRACT_GENERAL_DATA"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in th
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error o
or which actions and input led to the error.
System environment
SAP Release.............. "46C"
Application server....... "essceu3"
Network address.......... "172.19.119.198"
Operating system......... "AIX"
Release.................. "5.3"
Hardware type............ "00C7ADBD4C00"
Database server.......... "ukblx176"
Database type............ "ORACLE"
Database name............ "EU3"
Database owner........... "SAPR3"
Character set............ "es_ES.ISO8859-1"
SAP kernel............... "46D"
Created on............... "Jul 9 2006 20:26:33"
Created in............... "AIX 1 5 00447C4A4C00"
Database version......... "OCI_920__OCI_7_API "
Patch level.............. "2257"
Patch text............... " "
Supported environment....
Database................. "ORACLE 8.0.5.., ORACLE 8.0.6.., ORACLE
8.1.6.., ORACLE 8.1.7.., ORACLE 9.2.0.., ORACLE 10.2.0.."
SAP database version..... "46D"
Operating system......... "AIX 1 4, AIX 2 4, AIX 3 4, AIX 1 5, AIX 2 5, AIX 3
5, , System build information:, , LCHN :
841480"
User, transaction...
Client.............. 600
User................ "MPZMMES"
Language key........ "S"
Transaction......... " "
Program............. "ZM2431216 "
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Information on where termination occurred
The termination occurred in the ABAP/4 program "ZM2431216 " in
"EXTRACT_GENERAL_DATA".
The main program was "ZM2431216 ".
The termination occurred in line 980
of the source code of program "ZM2431216 " (when callin
The program "ZM2431216 " was started as a background jo
Source code extract
009500 mara.ntgew,
009510 mara.gewei,
009520 mara.volum,
009530 mara.voleh,
009540 mara.mstae,
009550 mara.mstde,
009560 mara.prdha,
009570 marc.matnr,
009580 marc.werks,
009590 marc.mmsta,
009600 marc.mmstd
009610 into :w_ops-groes,
009620 :w_ops-brgew,
009630 :w_ops-ntgew,
009640 :w_ops-gewei,
009650 :w_ops-volum,
009660 :w_ops-voleh,
009670 :w_ops-mstae,
009680 :w_ops-mstde,
009690 :w_ops-prdha,
009700 :w_ops-matnr,
009710 :w_ops-werks,
009720 :w_ops-mmsta,
009730 :w_ops-mmstd
009740 from sapr3.mara, sapr3.marc
009750 where sapr3.mara.mandt = sapr3.marc.mandt
009760 and sapr3.mara.matnr = sapr3.marc.matnr
009770 and sapr3.mara.mandt = :p_mandt
009780 and sapr3.mara.matnr = :w_ebs-matnr
009790 and sapr3.marc.werks = :p_owerks
> ENDEXEC.
009810 endform. " extract_general_data
009820 *&
009830 *& Form append_i_ops
009840 *&
009850 * Appends W_OPS to I_OPS
009860 *
009870 form append_i_ops.
009880 append w_ops to i_ops.
009890 endform. " append_i_ops
009900 *&
009910 *& Form extract_material_description
009920 *&
009930 * Extracts a Material Description from the remote database an
009940 * modifies the current record in I_OPS.
009950 *
009960 * >P_SPRAS Language Key
009970 *
009980 form extract_material_description using p_spras.
009990 EXEC sql performing set_langauge.
Contents of system fields
SY field contents..................... SY field contents............
SY-SUBRC 0 SY-INDEX 0
SY-TABIX 1 SY-DBCNT 1
SY-FDPOS 18 SY-LSIND 0
SY-PAGNO 0 SY-LINNO 1
SY-COLNO 1
Chosen variables
Name.......................... Contents.1........2........3....+..
W_EBS-PRAT4
2
0
W_OPS-GROES
22222222222222222222222222222222
00000000000000000000000000000000
W_OPS-BRGEW #######
0000000
000000C
W_OPS-NTGEW #######
0000000
000000C
regards,
krishnaiah.Hi,
This is usually a SERVER SIDE DATABASE PROBLEM or SQLNET LISTENER (server side) PROBLEM. The client side should initially be ignored and instead the server should be investigated. In rare cases, this can be caused by client
side memory or other resource problem, or a DLL version mismatch, but this is
unlikely.
Enlist the assistance of your DBA. Then reproduce the ORA-3113 error on your
client application. Ask your DBA to look at the database side Alert.log and
trace files and look for ANY activity. Any activity that coincides with your
ORA-3113 will be a clue.
REgards
Vinod -
How to execute a sql query in VO????
Hi every body.
Can you show me the way to execute a sql query in VO.
For example: I have a viewobject1, and I add a new method void execSQL() before the last '}' of the java file of viewobject1 like this:
public void execSQL() {
String strSql = "Select sysdate from dual";
I want to execute strSql query and return a Resultset, how can I perform ???
Thanks a lot.The executeQuery method in ViewObjectImpl does not return a ResultSet.
ViewObjectImpl voImpl;
voImpl.setQuery(strSql);
voImpl.executeQuery(); -
Error while parsing or executing XML-SQL document
friends,
my scenario is based on file to jdbc.i am facing an error in receiver CC in RWB.
The error states that '
Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'MATMAS' (structure 'STATEMENT'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.'
My SOAP xml message is
- <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP:Header>
- <sap:Main xmlns:sap="http://sap.com/xi/XI/Message/30" versionMajor="3" versionMinor="0" SOAP:mustUnderstand="1" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
<sap:MessageClass>ApplicationMessage</sap:MessageClass>
<sap:ProcessingMode>asynchronous</sap:ProcessingMode>
<sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
<sap:TimeSent>2008-02-06T22:30:21Z</sap:TimeSent>
- <sap:Sender>
<sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
<sap:Service>ECC</sap:Service>
</sap:Sender>
- <sap:Receiver>
<sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
<sap:Service>BS_JDBC</sap:Service>
</sap:Receiver>
<sap:Interface namespace="http://file_to_jdbc">MI_JDBC_RECEIVER</sap:Interface>
</sap:Main>
- <sap:ReliableMessaging xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
<sap:QualityOfService>ExactlyOnce</sap:QualityOfService>
</sap:ReliableMessaging>
- <sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">
sapecc50\sapmnt\trans</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">UTF-8</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">matmas1.txt</sap:Record>
</sap:DynamicConfiguration>
- <sap:HopList xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
- <sap:Hop timeStamp="2008-02-06T22:30:21Z" wasRead="false">
<sap:Engine type="AE">af.e6e.sapecc6eval</sap:Engine>
<sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
<sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
<sap:Info />
</sap:Hop>
- <sap:Hop timeStamp="2008-02-06T22:30:21Z" wasRead="false">
<sap:Engine type="IS">is.01.sapecc6eval</sap:Engine>
<sap:Adapter namespace="http://sap.com/xi/XI/System">XI</sap:Adapter>
<sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
<sap:Info>3.0</sap:Info>
</sap:Hop>
- <sap:Hop timeStamp="2008-02-06T22:30:22Z" wasRead="false">
<sap:Engine type="AE">af.e6e.sapecc6eval</sap:Engine>
<sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
<sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
</sap:Hop>
</sap:HopList>
- <sap:Diagnostic xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
<sap:TraceLevel>Information</sap:TraceLevel>
<sap:Logging>Off</sap:Logging>
</sap:Diagnostic>
</SOAP:Header>
- <SOAP:Body>
- <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
- <sap:Payload xlink:type="simple" xlink:href="cid:[email protected]">
<sap:Name>MainDocument</sap:Name>
<sap:Description />
<sap:Type>Application</sap:Type>
</sap:Payload>
</sap:Manifest>
</SOAP:Body>
</SOAP:Envelope>
and payload message is
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_JDBC_RECEIVER xmlns:ns0="http://file_to_jdbc">
- <STATEMENT>
- <ROW action="INSERT">
<TABLE>MATMAS</TABLE>
- <access>
<MATNR>38</MATNR>
<MTART>HALB</MTART>
<MATKL>00107</MATKL>
<MEINS>pc</MEINS>
<ERSDA>2008.04.05</ERSDA>
<BRGEW>10</BRGEW>
<NTGEW>12</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>88</MATNR>
<MTART>FERT</MTART>
<MATKL>02004</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2008.04.05</ERSDA>
<BRGEW>12</BRGEW>
<NTGEW>13</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>89</MATNR>
<MTART>FERT</MTART>
<MATKL>02004</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2008.03.02</ERSDA>
<BRGEW>12</BRGEW>
<NTGEW>14</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>98</MATNR>
<MTART>HALB</MTART>
<MATKL>2</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2006.09.01</ERSDA>
<BRGEW>12</BRGEW>
<NTGEW>12</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>170</MATNR>
<MTART>NLAG</MTART>
<MATKL>4</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2005.03.02</ERSDA>
<BRGEW>2</BRGEW>
<NTGEW>3</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>178</MATNR>
<MTART>NLAG</MTART>
<MATKL>4</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2007.03.06</ERSDA>
<BRGEW>3</BRGEW>
<NTGEW>4</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>188</MATNR>
<MTART>NLAG</MTART>
<MATKL>5</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2007.05.02</ERSDA>
<BRGEW>2</BRGEW>
<NTGEW>3</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>288</MATNR>
<MTART>HALB</MTART>
<MATKL>101</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2006.02.11</ERSDA>
<BRGEW>5</BRGEW>
<NTGEW>4</NTGEW>
<GEWEI>KG</GEWEI>
</access>
- <access>
<MATNR>358</MATNR>
<MTART>HAWA</MTART>
<MATKL>2</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2007.09.09</ERSDA>
<BRGEW>500</BRGEW>
<NTGEW>500</NTGEW>
<GEWEI>G</GEWEI>
</access>
- <access>
<MATNR>359</MATNR>
<MTART>HAWA</MTART>
<MATKL>2</MATKL>
<MEINS>PC</MEINS>
<ERSDA>2007.08.01</ERSDA>
<BRGEW>20</BRGEW>
<NTGEW>10</NTGEW>
<GEWEI>G</GEWEI>
</access>
</ROW>
</STATEMENT>
</ns0:MT_JDBC_RECEIVER>
Could anybody help me in sorting out this issue.My advance thankshi,
ypur structure is bad defined.
if you want to do an insert, the DT should be
<ns0:MT_JDBC_RECEIVER xmlns:ns0="http://file_to_jdbc">
___<StatementName>
______<dbTableName action=INSERT>
_____<table>MATMAS</table>
_______ <access>
___________<MATNR>38</MATNR>
___________<MTART>HALB</MTART>
___________<MATKL>00107</MATKL>
___________<MEINS>pc</MEINS>
___________<ERSDA>2008.04.05</ERSDA>
___________<BRGEW>10</BRGEW>
___________<NTGEW>12</NTGEW>
___________<GEWEI>KG</GEWEI>
______</access>
_____</dbTableName>
__ </StatementName>
</ns0:MT_JDBC_RECEIVER>
the ROW field is used when you wait receive data from DB for example you execute and SQL Query from Sender communication channel "SELECT name FROM TABLE Names"
so, the result of this query would be, for example:
<row>
____<name>joge</name>
</row>
<row>
____<name>pepe</name>
</row>
<row>
____<name>nicola</name>
</row>
See this link
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
Thanks
Rodrigo
Edited by: Rodrigo Pertierra on Feb 8, 2008 8:40 AM
Edited by: Rodrigo Pertierra on Feb 8, 2008 8:42 AM -
Option to execute one sql at a time
Hi,
I have 10 sql's according to parameter value i have to execute one sql at a time.Currently i am using union all for all 10 sql and according to parameter it is executing one sql.I am getting performance issue while using this approach.It is executing all the 10 sql ,getting result for 1 sql .
As per requirement i can not use ref cursor or procedure.
Is there any other options for this requirement.
Thanks in advance.is this a duplicate of this thread:
Re: problem with union all queries --urgent ?
if so, did you learn anything from the people who tried to help you? -
How to execute a sql script in dbms_job?
how to execute a sql script in dbms_job?
See my response to Re: how to execute a sql script file in procedure or trigger.
Cheers, APC
Maybe you are looking for
-
Is it possible using PowerShell to compare the contents of two text files line by line and if a line is found output that line to a third text file? Lets say hypothetically someone asks us to search a text file named names1.txt and when a name is fou
-
Recommendations for 3rd party AC adapters?
In the year that we've had this powerbook we've gone through 2 Apple brand AC adapters (one broke where the cord meets the brick - smoking! and the other one broke where the cord meets the notebook - sparking!) and we bought a 3rd party replacement f
-
Mac upgrade to IOS 10.10 won't let me open pscs5.1, help?
After upgrading to MAC 10.10 I can't open pscs5.1, Can anyone help?
-
Email receiving but not sending, from mail AND entourage
Mail and Entourage on my MacBook Pro have both stopped sending mail from all of the accounts set up, although they are receiving okay. There doesn't seem to be a problem with the smtp server as my G5 iMac is sending mail no problem through the same s
-
Need help on image for my business.
hi. I'm Mike Gambino, admin/founder of my own website called http://gambinoarmy.co.cc/. I've been using macromedia for this stuff but apparently, y'all have better stuff than macromedia and I started using the schools. I have a trial on my computer f