I'm having some minor trouble with my sqlplus in Windows. Don't know which feature I accidentally edited by cosole seems to be in debug mode. Everything is ok, except that it print the old and new values of my variables. How can't I restore it to it's original behavior.
Below is the sample code working fine in 10g and not working now in 11g.
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "PSTest" AS import java.sql.SQLData; import java.sql.SQLException; import java.sql.SQLInput; import java.sql.SQLOutput; import java.util.List; [code]....
we got the below error: ORA-00932: inconsistent datatypes: expected an IN argument at position 1 that is an instance of an Oracle type convertible to an instance of a user defined Java class got an Oracle type that could not be converted to a java class
Current Oracle version is Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit and the version we are upgrading is Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
I have two tables : oa_membership_dtl(in this created_by field is varchar2(200 byte) ,oa_partner_usr_dtl(in this table partner_userid is number(8,0) i need to do join on above fields.
I am using following two queries:
select * from oa_membership_dtl membership join oa_partner_usr_dtl partner_user on to_char(partner_user.partner_userid,'9999')=membership.created_by select * from oa_membership_dtl membership join oa_partner_usr_dtl partner_user on rtrim(ltrim(partner_user.partner_userid||' '))=rtrim(ltrim(membership.created_by))
by using first data is not fetched but 2nd is working fine , i am getting the matched records using 2nd query.
when i enter a sql * plus session an do a rollback; (without performing anything), always a "rollback complete" message appears even if there is nothing to rollback.
I'm running a C++ program to call sqlplus to execute some sql scirpts. The program will accept arguments from users at the command line, and execute the script which the name will also be passed in as an argument to the program eg:
./MY_PROG.sh ABC.sql 23 (MY_PROG will call ABC.sql script and pass 23 as an argument to ABC.sql)
it works fine when the argument is passed in correctly, and my ABC.sql scirpt is able to execute correctly, however when the argument is not passed in, the program just hangs there, waiting for an input from the users. This is because "&1" in my script is expecting some value from users.
Because this program will be scheduled to run, and no one will be there to monitor the job, if so happens arguments were missing, the program will wait there for the entire night. Is there any way that I could make the program or the script to exit when there is no input to be found? I can't use timeout as I do not know how long does the script take to finish it operations, I could be updating millions of record from a script.
We have two database instances on the same server. One was left at 9.2.0.7 and one was upgraded to 10.2.0.3. Connecting externally (sqlplus '/as sysdba') to the 9.2.0.7 database is lightning fast. Connecting externally to the 10.2.0.3 database is very slow, comparatively speakiing. This is on an IBM AIX-5L (64-bit) machine. We are using "tnsnames".
I'm having issues with users logging into Oracle. I installed it on Ubuntu 12.04 running Oracle 11.2 XE. If i am root, i can run sqlplus just fine and log in. But when I use a regular user account and run sqlplus, it will just stay blank. No error messages or any feedback. I echo $ORACLE_HOME and echo $ORACLE_SID and they come back exactly as they do under the root account. My path is set up just like root has it.
It almost seems like a permission issue but even when i try sqlplus /nolog it stays blank.
I have installed oracle 10g on opensuse. After i logon as normal user and type sqlplus, it was display an error message as below:-
login: nv2am Password for nv2am: login: Configuration file does not specify default realm when parsing name nv2am Last login: Tue Aug 3 16:33:19 from 10.69.20.25 Have a lot of fun... Directory: /home/nv2am Tue Aug 3 17:36:23 MYT 2010 nv2am@ARMSDEV:/home/nv2am> sqlplus -ksh: sqlplus: not found [No such file or directory] nv2am@ARMSDEV:/home/nv2am> sqlplus "/ as sysdba" -ksh: sqlplus: not found [No such file or directory] nv2am@ARMSDEV:/home/nv2am> set ORACLE_SID="ARMSDEV" nv2am@ARMSDEV:/home/nv2am> svrmgrl -ksh: svrmgrl: not found [No such file or directory] nv2am@ARMSDEV:/home/nv2am>
Here is a simple sqlplus line command with & substitution run time variable.
set verify off; SQL> SELECT * FROM emp where sal >&SAL; Enter value for sal:
Now as you see, oracle asks to Enter Value for substitution variable in line just below the SQL>. I wonder if there is one or more line could be left there so to improve the readability. So it should look like:
set verify off; SQL> SELECT * FROM emp where sal >&SAL;
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
I don't want to log in any one as sqlplus / as sysdba.If they can able to login as sqlplus / as sysdba then they can see others schema in the database.Say if i set
SQLNET.AUTHENTICATION_SERVICES=none
no one can log in as sysdba were as later some one changes to
SQLNET.AUTHENTICATION_SERVICES=NTS After they changes to NTS they can log in and access other user details right ? how to restrict
"C:UsersKarthikeyan>sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Sat Sep 7 17:42:37 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. ERROR:ORA-12560: TNS:protocol adapter error Enter user-name:"
this is the first time i tried to open sql*plus and i didn't create any database connection before....so i don't have any username and password.......
running CENTOS 6 and oracle DB 11.2.0 and when i try to launch sqlplus i get the following error:
Error 6 initializing SQL*Plus SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
problem is, it's telling me to set ORACLE_HOME but I'm not sure where this is to set.
I'm trying to create a new table which has a date field (date of birth) and I want to include a constraint which will not allow me to add values if they are over 21 years old. I'm using SQLPlus .
I'm trying to perform a SELECT INTO in a SQL*Plus script.the script i'm working towards to, looks something like this;
set term on set echo off set serveroutput off set verify off ACCEPT ReportName PROMPT 'Please enter a report name; ' PROMPT PROMPT retrieving current settings for &ReportName: select STARTDATE, ENDDATE, SUFFIX into pStart, pEnd, pSuffix from MyTable where NAME = '&ReportName'; [code]....
I'm basically trying to perform a select into based in user input and then put the retrieved data back to the console with a prompt. Is this possible within a sql script running on SQL*Plus?
I have two identical tables from different DB's and I need to copy a row from db1 and insert into db2 if it does not exist or update it if it does(on the tables pk).
This is what i was trying until i realized replace drops the whole table where i thought it dropped the row and inserted the new.
copy from db1 to db2 replace table2 using select * from table1 where x = blah
we have a program that uses SQLPlus to run PLSQL scripts - this program then checks the return code of SQLPlus to determine whether the script ran successfully. Our PLSQL scripts often call other PLSQL scripts via "@@OtherScript.sql" - one problem we have is that if (due to an engineering mistake) the OtherScript.sql file is missing, SQLPlus throws an SP2 error stating that the file was not found. However, the return code of SQLPlus does not indicate any problem. I have found, by searching the internet, that I can simply add a line "whenever OS error exit failure" to our script which then allows our program to detect the failure... however, the error message is not as informative:
CODESQL*Plus: Release 11.1.0.7.0 - Production on Tue Oct 19 10:28:45 2010 Copyright (c) 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [code]....
is it possible to get BOTH types of error messages? With "oserror exit" set it does not tell you which file was not found.. which is useful information. I would like the SQL Plus session to return failure but also print out what file it did not find.
I have a series of sql files that I need to execute via sqlplus. What I do need is to immediately exit the sqlplus instance upon completion of the script. Now, I am not using a batch file, nor a file containing script files where I can add the EXIT command.
I have to effectively run each script from the command line as such:
Now this works, but once it runs the SQLPlus window is still open. Now I have an event handler (in a c# wrapper) that is supposed to fire once the process terminates...but of course, this even never fires since the sqlplus process doesn't terminate after running the script.
Is there any any any any way to get sqlplus to run this script and then self-exit??
I have no control of the sql script and cannot edit them to include an EXIT command. I need to run them as is.
I have some Oracle Databases and sometimes for me is easier to access to the databases with SQLPLUS instead SQLDEVELOPER or TOAD.
But i can't reach to a good configuration of command line prompt to do queries against the database, normaly if it returns a lot o rows and columns it is unreadable.
I am trying to create a batch file which will be executed with windows scheduled task. This batch file will have sqlplus script running Oracle query. I can run this query from the command prompt, no problem,
When I run sqlplus and try to loging as system/<admin passwd> I get information:
ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory Process ID: 0 Session ID: 0 Serial number: 0
I understand, that this is a common question and the common answer is don't have trailing slash in ORACLE_HOME and set ORACLE_SID. But I did this.
When I try to remotely connect to an Oracle schema using SQLplus, I consistantly get this error:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Yet I can connect to the same machine, from my own machine just fine using SQLDeveloper.Here are the details I have collected so far
- I am using the instantclient for OS X - export DYLD_LIBRARY_PATH=/Users/jeff/instantclient - export ORACLE_HOME=/Users/jeff/instantclient - export TNS_ADMIN=/Users/jeff/instantclient/tns
The command line i ran : ./sqlplus seam_classoft/seam_classoft@//oracle11gtest.terida.net:1521/orcl
Its behind a VPN, so I'm not worried about posting my info.
My /Users/jeff/instantclient/tns/tnsnames.ora that I copied directly from the server looks like this:
I've tried changing SERVICE_NAME to SID = orcl, no change inbehavior. My original guess was that the database wasn't registered with the listener, but that would mean sqlDeveloper should fail as well, but it works.Here is out put of lsnctrl status:
LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 07-JUN-2010 09:16:40 Uptime 42 days 0 hr. 58 min. 59 sec Trace Level off [code]....
I have taken some procedures code from SVN repository.These procedures are split into different schema. There are some client and common parameters used in the from clause of table in these sp.for example
select * from client.emp;
during the compling procedure, we replace the client value into some schema name.
select * from scott.emp;
The client and common parameter should be different for every schema.
Is any possible to create global varaible for client and common parameter and subsitute value in it.i.e without editing client and common parameter?
I am trying to do a case statement where I select to see if an ID exists or not and if it doesnt i want to run a .sql file but its not working properly.
select case when exists (select ID from VERSION where ID = '16.1') then 'ID Exists' else @script.sql end from dual;
Its not allowing me to run the @script.sql with the else statement.