Detect I/O before running sql statement
Hi all,
how do I detect I/O before running sql statement?
do you mean:
how do I know how much I/O is occurring before running a query?
or
how do I know how much I/O will be used to retrieve the data for this query?
Which OS? You can look at OEM and "top" to see your current I/O. Detecting and deciding on whether or not you want to continue to submit the query is another problem.
The question is: what problem are trying to solve? Is it really a problem or just something you imagine might occur???
Don't try to fix a non-existent problem.
Similar Messages
-
Run SQL statements from a textbox
Hi
I'm trying to execute multiple insert/update or Delete statements from a textarea of a page. I'm basically trying to replicate the same functionalility as SQL Workshop for users to access and run sql statements for it.
I know in SQL workshop you can run multiple insert/update or delete statements using the following syntax:
begin
insert into table_1 (col1,col2)values('WER','QWE');
Insert into table_1 (col1,col2)values('ABC','DEF');
End;
I have created a textarea called :P1_SQL with a submit button which when pressed it runs the execute immediate :P1_SQL. It works if its a single insert command. I've tried the begin...end option which bring up the following error message:
ORA-06550: line 1, column 6: PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe The symbol "begin was inserted before "" to
Any ideas how I could get this to work?
Message was edited by:
Funkymonkey2The process code that I have is as follows:
Declare
l_sql varchar2 (4000);
begin
l_sql := :P3_SQL;
execute immediate l_sql;
End;
in the textarea I had entered the following
begin
insert into TBL_TEST_SQL(name,useR_id)values('abc','erf' );
insert into TBL_TEST_SQL(name,useR_id)values('dec','erf');
end;
I was actually hoping to concatanate the 'begin...' part and the 'end;/' part on to the beginning and end of the sql statements.
Any ideas?? -
RMAN-10006: error running SQL statement: alter session set remote_dependenc
Backups are failing with following error
RMAN-00554: initialization of internal recovery manager package failed
RMAN-12001: could not open channel default
RMAN-10008: could not create channel context
RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
Not able to change to signature
SQL> alter session set remote_dependencies_mode=signature;
ERROR:
ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
be from among MANUAL, AUTO
I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
Parameter type
String
Syntax
REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
Default value
TIMESTAMP
Parameter class
Dynamic: ALTER SESSION, ALTER SYSTEM
=======================================
I believe it could be because of following bug
"A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
I appreciate your effort in fixing this issue.
Edited by: user10610722 on Nov 25, 2008 4:37 PMHi:
It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe). -
Where to run SQL statements in Oracle Database 11gR1 ?
Folks,
Hello. I have just installed Oracle Database 11gR1 and login to Database Control page. There are 4 tabs on the top: Database, Setup, Preference, Help and Logout.
I just create a table "table1" in "Database" tap. But I don't see anywhere to run SQL statement such as Select, Insert, Update.
Can any folk tell me where to run SQL statements in Oracle Database 11gR1 ?
Or
Can any folk provide a User Manual for Oracle DB 11gR1 ?You can run from a terminal or install an SQL client and connect from there.
http://www.articlesbase.com/databases-articles/how-to-install-oracle-11g-client-1793770.html
Best Regards
mseberg
Assuming you have an oracle OS user on Linux you can try typing sqlplus at you OS command prompt. Generally you will have a .bash_profile with setting like this:
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0
#export DISPLAY=localhost:0.0
export TZ=CST6CDT
export ORACLE_SID=ORCL
export ORACLE_TERM=xterm
#export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN;
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
# Set shell search paths
PATH=/usr/sbin:$PATH; export PATH
export PATH=$PATH:$ORACLE_HOME/bin
# CLASSPATH:
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export EDITOR=vi
set -o vi
PS1='$PWD:$ORACLE_SID >'Edited by: mseberg on Jul 11, 2011 3:18 PM -
Run sql statements in PL/Sql Developer without installing Oracle database?
Hi all,
I wish to ask is there any possibility to run Run sql statements in PL/Sql Developer without installing Oracle database?
Regards.Hello Jimmy,
this is the forum for the tool SQL Developer and, as the title says, *(Not for general SQL/PLSQL questions)*.
PL/Sql Developer is not an Oracle tool, but from allound allroundautomations.
And you need access to a database to run SQL statements. This does not need to be one installed by yourself.
Regards
Marcus -
Current running sql statement in procedure?
How to identify the current running sql statement in procedure or package? From the v$sqlarea, i can see the only procedure name with parameters, but not current execution statement? is there any dba view to know the current execution statement in 9i & 10g ?
hi
u can also use dba_source view to know which sql statement issued by which user -
Run sql statement in green screen
dear as/400 guru,
i wonder how to execute sql statement in green screen ?
my statement would be something as below
select mandt from sapr3.usr02 where bname='kent';
basically i want to check my id "kent" is available in which clients in an instance. and i was advised to run above sql statement.
comment and advice will be highly appreciated.
thanks
regards,
kent
as/400 newbieHi Kent,
if you are looking for something, that reminds the old SQLs and uses a "/" for the delimiter, get the free STR(CON)SQL tool :
http://www.easymarketplace.de/strsql-sqlutil.php
If you do not receive a mail within 15 minutes, please drop me a mail, I will then reply with the user & pwd ...
Regards
Volker Gueldenpfennig, consolut international ag
http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de -
Is it that we cannot run sql statement in main??
Hi all,
sorry to bother again. But i have some problems. I had a program that have main method and some other small methods that contains some sql statement that call the db to retrieve info. But it keep on prompting me error: "Connection refused. Check that the hostname and port is correct, and that the postmaster is running with the -i flag, which enables TCP/IP networking.".
My program reside in the server but i really don't why i cannot run it. Is it because the main program cannot run with database and sql statement.
Please reply asap. Thank You!This sound very much that your postgress isn't running (or if it isn't it wasn't started with the -i flag)
Are you sure postgres (=postmaster) is running
Thomas -
Hello
I have SQL statement with parameters and I want client to run it from APPS.
What should I do for this.What client are you talking about? Something like sql*plus? Or do you mean the Oracle Apps GUI front end?
The best way is to properly set this up as a concurrent request. That will allow the user to enter any parameters and run it whenever. But that's an issue for a different forum.
Whatever you do, don't give out the apps password <shudder> -
Run sql statement from batch file
How can we execute SQL Statement using Batch file???
I did a test.
create batch file test.bat
sqlplus "username@db /pass" @\script.sql
script.sql file has following statement
select sysdate from dual;
exit
it is working but I want to call sql statement in the same batch file instead of calling .sql script file. how can I do that any idea..This is very easy in unix shell scripting, but AFAIK, not available with Windows. It's a function of how the shell/command processor handles input redirection.
-
How do I run SQL statements with my GUI ?
Hello,
i created a simple GUI with a status text box on top and a text box on the bottom to type in sql commands. Can somebody help me modify my code so that I can at least run a create table command and give the status of "successful create table" in the top text box?
One other question I have is that I already have a login screen gui that creates the sql connection and that gui calls this gui. Do I have to pass this connection to this new class or not? and if so, how do i do it? thanks again!
import java.awt.*;
import java.awt.event.*;
import javax.swing.JFrame;
import javax.swing.*;
import java.sql.*;
public class SqlGui extends JFrame {
public SqlGui() {
super("Oracle SQL Application");
setDefaultCloseOperation(EXIT_ON_CLOSE);
JTextArea outputArea = new JTextArea("output here",20, 0);
outputArea.setLineWrap(true);
JScrollPane scrollOutputArea = new JScrollPane(outputArea);
JTextArea inputArea =
new JTextArea("enter commands here",2, 20);
inputArea.setLineWrap(true);
JScrollPane scrollInputArea = new JScrollPane(inputArea);
JPanel buttonPanel = new JPanel();
JButton executeButton = new JButton("Execute Command");
buttonPanel.add(executeButton);
// do work here?
JButton exitButton = new JButton("Exit");
exitButton.addActionListener(new ActionListener() {
public void actionPerformed(
ActionEvent ae) {
dispose();
buttonPanel.add(exitButton);
JPanel sqlPanel = new JPanel(new BorderLayout());
sqlPanel.add(scrollInputArea);
sqlPanel.add(buttonPanel, BorderLayout.SOUTH);
JSplitPane mainsplit =
new JSplitPane(JSplitPane.VERTICAL_SPLIT,
scrollOutputArea, sqlPanel);
getContentPane().add(mainsplit);
setSize(800, 500);
setLocationRelativeTo(null);
setVisible(true);
}Hello,
There are two ways to execute the SQL command in GUI , one by passing the connection object from other scree as specified by you is logic screen (write a constructor which takes connection parameter as input) else create the connection in this present GUI screen also as shown by me.
import java.awt.*;
import java.awt.event.*;
import javax.swing.JFrame;
import javax.swing.*;
import java.sql.*;
public class SqlGui extends JFrame implements ActionListener{
String url; // url providing the database details
Connection connect;
JTextArea inputArea;
JButton executeButton;
JTextArea outputArea;
public SqlGui() {
super("Oracle SQL Application");
setDefaultCloseOperation(EXIT_ON_CLOSE);
try
url = "jdbc:odbc:dsnName";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// url , userid, pwd of database like scott,tiger
connect = DriverManager.getConnection(url,"userid",
"password");
System.out.println("Connection Sucessful \n") ;
catch (ClassNotFoundException cnfex)
cnfex.printStackTrace();
System.out.println("Connection Failed " + cnfex.toString());
catch (SQLException exp)
System.out.println(exp);
outputArea = new JTextArea("output here",20, 0);
outputArea.setLineWrap(true);
JScrollPane scrollOutputArea = new JScrollPane(outputArea);
inputArea = new JTextArea("enter commands here",2, 20);
inputArea.setLineWrap(true);
JScrollPane scrollInputArea = new JScrollPane(inputArea);
JPanel buttonPanel = new JPanel();
executeButton = new JButton("Execute Command");
executeButton.addActionListener(this);
buttonPanel.add(executeButton); // do work here?
JButton exitButton = new JButton("Exit");
exitButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
dispose();
buttonPanel.add(exitButton);
JPanel sqlPanel = new JPanel(new BorderLayout());
sqlPanel.add(scrollInputArea);
sqlPanel.add(buttonPanel, BorderLayout.SOUTH);
JSplitPane mainsplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, scrollOutputArea, sqlPanel); getContentPane().add(mainsplit);
setSize(800, 500);
setLocationRelativeTo(null);
setVisible(true);
public void actionPerformed(ActionEvent ae) {
if (ae.getSource() == executeButton) {
// To clear the fields
create(inputArea.getText());
public static void main(String args[]) {
SqlGui app = new SqlGui();
public void create(String SQLCommand) {
String query = SQLCommand;
outputArea.setText("The Result of Executing the query" + query );
try{
Statement st = connect.createStatement();
st.executeQuery(query);
JOptionPane.showMessageDialog(null,"Command Executed Sucessfully");
catch (SQLException sqlex) {
System.err.println("Unable to Execute Command :");
outputArea.setText("Unable to Execute Command :" +query);
sqlex.printStackTrace();
Hope this sucessfully works for you. -
Sql statements in v$sqlarea
Hi
When I get the sqls from v$sqlarea, does these sqls already executed, or currently runnıng?I suggest you check the Oracle Document,
While showing similar content, you might also note there are difference between V$SQLAREA and V$SQL view
V$SQL
V$SQL lists statistics on shared SQL area without the GROUP BY clause and contains one row for each child of the original SQL text entered. Statistics displayed in V$SQL are normally updated at the end of query execution. However, for long running queries, they are updated every 5 seconds. This makes it easy to see the impact of long running SQL statements while they are still in progress.
V$SQLAREA
V$SQLAREA lists statistics on shared SQL area and contains one row per SQL string. It provides statistics on SQL statements that are in memory, parsed, and ready for execution. -
Executing multiple SQL statements
I'm using the SQL worksheet in JDeveloper to run SQL statements. JDeveloper won't run more than one statement at a time. Here's an easy example:
SELECT COUNT(*)
FROM TABLE1
WHERE PRICE IS NULL;
SELECT COUNT(*)
FROM TABLE1
WHERE PRICE > 0;
I get the following error when I submit multiple statements: ORA-00911: invalid character. I'm using the studio edition version 10.1.3.2.0.
Does Anybody know how to go around this or it is just that JDeveloper doesn't handle multiple statements?Hi,
I don't have a 10.1.3 instance to check currently. I suppose there would be an option to run script (along with run option).
Try this.
Open the SQL worksheet.
Type the statements.
SELECT COUNT(*)
FROM TABLE1
WHERE PRICE IS NULL;
SELECT COUNT(*)
FROM TABLE1
WHERE PRICE > 0;Select all (Ctrl+A), right click and see if you have a Run Script option in the context menu. If yes, select and it would work fine.
-Arun -
Calling SQL statements from Shell scripts
Hi,
I want to call external package procedures, declare some variables & do some oracle validations in the shell script.
How SQL environment is set in shell script & is this one time process or I have to write few statements before every SQL statement.
Please explain with an example.
Thanks..is this one time process Yes. Example :
$ cat script.sh
export ORACLE_HOME=/home/oracle/base/OraHome10
export ORACLE_SID=db102
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus -s / as sysdba << EOF
select to_char(sysdate,'dd/mm/yyyy hh24:mi:ss') date_time
from dual;
exit
EOF
sqlplus -s / as sysdba << EOF
col global_name for a60
select * from global_name;
exit
EOF
$ ./script.sh
DATE_TIME
27/02/2008 11:11:27
GLOBAL_NAME
DB102
$ -
Error Running SQL Insert Statement with & in it
Eclipse: 3.5 Galileo on Window Vista
OEPE: 11gR1 11.1.14
I get "invalid character" error when running this query in Eclipse:
INSERT INTO RECIPE (recipeId, name1, name2, recipeCategoryId) VALUES (2, 'Chunky Chicken Egg Rolls', 'No take–out joint can compare!', 1);
I've tried multiple ways trying to escape the & character, but nothing worked. What is the right way of executing SLQ via OEPE plugin that have special characters in them.
FYI, the following worked fine in Oracle 10g iSQL*Plus:
SET DEFINE ~;
INSERT INTO RECIPE (recipeId, name1, name2, recipeCategoryId) VALUES (2, 'Chunky Chicken Egg Rolls', 'No take–out joint can compare!', 1);
Thanks,
Dmitri.Very interesting case. I tried your insert stmt and got the same error. I finally got it to work by removing the ";" in the end. It looks like the jdbc driver choked up while there is ";" in the middle of the pl/sql statement and ";" in the end. If you remove ";" in the "No take–out joint can compare!" string and leave the ";" in the end, it also works!
I don't quite understand why Oracle JDBC dirver behaves like that. I'll investigate it more and we may need to do some preprocessing on the pl/sql statement before sending it to the driver. At the mean time, just remove the ";" in the end if your string literal contains ";".
Please let me know whether this workaround works for you. Thanks!
Shenxue
Maybe you are looking for
-
Macbook and HP 2510i monitor display problem - help
Hello, I am having display problem with my Macbook (Intel) and my 25'' HP 2510i monitor via DVI.. Until last monday I do not have any problems and my monitor was working flawless with my macbook.. Last monday I used the monitor with my HP Notebook to
-
Problem with backing up my FCPX file
Hi all, my FCPX "library file" is 1.5 terrabyte and I can't back it up. Every time I try and do it, it stops after approximately 100 gigabytes (the HD I'm trying to copy it to has more than enough free space. It's between two 4TB G-raids with approxi
-
Problems Reading SSL server socket data stream using readByte()
Hi I'm trying to read an SSL server socket stream using readByte(). I need to use readByte() because my program acts an LDAP proxy (receives LDAP messages from an LDAP client then passes them onto an actual LDAP server. It works fine with normal LDAP
-
I am unable to open videos....a pop up says it is running on the tv. Where and what is this tv thing?
-
Where to find ODBC setup information to run reports?
I'm getting an error when I try to run reports against the Inventory DB, it says cannot connect, ensure that ODBC is setup properly. I looked through the documentation and cannot find out how to set this up. Does someone have any instructions?