Client Tools :: SQLPLUS Windows In Oracle 11g
Feb 27, 2011the reason for not availability of ISQLPLUS & SQLPLUSW window from oracle 11g.
View 3 Repliesthe reason for not availability of ISQLPLUS & SQLPLUSW window from oracle 11g.
View 3 RepliesI am using Windows 7 and oracle 10g; From sqlplus* I can not use editor (using ed). but when I see the variable from DEFINE.. It shows that default editor is notepad..
I can use editor in winxp.How to get (use) editor ?
I have a shells script which invokes a SQL file. However even with AUTOCOMMIT OFF and on SQLERROR EXIT ROLLBACK. Sqlplus fails to rollback.
My sql file has 3 lines 3 are correct and 1 is incorrect. For example:
INSERT INTO TEST_ROUTING VALUES (24, 'ROUTING');
INSERT INTO TEST_ROUTING VALUES (25, 'ROUTING');
INSERT INTO TEST_ROUTING VALUES (26, 'ROUTING);
Lets say file is called 1.sql
My shell script invokes this SQL as follows: (Where $File1 = 1.sql)
$SQLPLUS_PATH/sqlplus -s /nolog <<-EOF>> ${LOGFILE}
connect $DB_USER/$Password1@$Database1
SET AUTOCOMMIT OFF
@$File1
WHENEVER SQLERROR EXIT ROLLBACK;
EOF
[code]......
So tried SET AUTOCOMMIT, tried SQLERROR ROLLBACK and tried few variations.
when i try to connect with sqlplus or toad then i get an error
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:Users>sqlplus
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
C:Users>
and i want to tell what i do before it-my all files were be converted in .FLT then i shorted out this problem after that when i tried to connect with sqlplus or toad then i get above error.and i have restarted my system but throwing same error.
i am using oracle 11.2.0.1 on windows 7
Can i install Oracle 10g Client 32 bit on our Windows Server 2008 R2 64 bit?
View 1 Replies View Relatedfind in the menu of Oracle SQL Developer how to display the result of explain plan for .. I have just "Succès de l'élément plan FOR".
View 3 Replies View RelatedI want to add a value from sqlplus.
My scenario is like that i want to add the following value
select count(*) x from tab1
i need to connect several database, and each time i need to add with previous one. like that
connect a/a@db1;
select count(*) x from tab1;
then when i connect another db
connect b/b@db2;
select count(*) x from tab1;
x will add with previous one.
Env destination-linux:2.6.18-308.13.1.el5,oracle:10.2.0.1 ,source:windows.mssql v:8.00760
I was try migrate one sample database from mssql "Pubs" using Oracle SQL Developer Tool.
After migraton i've got prefixes in tables like MD_<table_name> but i can not see tables from Pubs only a lot of tables like :
MD_COLUMNS
MD_GROUPS
etc...
can u give me link from where i have to learn step by step how to install oracle develor suit 10g on windows 7 32 bit
View 4 Replies View RelatedI 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.
I have a scenario where I want to exit out of SQLPLUS.
SQL> declare
2 x number(10) :=1;
3 y number(10) :=2;
4 begin
5 if x=y then
[code]...
I recently got a new PC at work which is Windows 7 64 bit.
We run lots of crystal reports(1000's) that pull data from an oracle back end.
I have installed the Oracle Client 32 bit on this machine and have no problem connecting to the database and pulling back data.
However, when I use crystal to access the TNS Name it gives me the following error.
[URL]
My path variable on the PC has "C:oracleproduct10.2.0client_1BIN;".
I also tried to create and ODBC using the 32bit ODBC on the machine and that connects fine, but when you try to access the DSN from Crystal, I still get the 12154 error.
I work with oracle 10g, on windows 7. sometime when i try to start my sqlplus in prompt command this message display.
C:UsersSony>sqlplus
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
But the solution people have proposed into the forum are:
1 - check the environment variable Oracle_home and modify if it ending by ""
2 - or try tho run my promt command as Administrator.
I try the both, but only the second works. while now i don't understand why it works when i start the promt command as Administrator and why it no works when i don't run it like administrator. Another thing is i am the only user of my computer, i have only one session (administor session).
I have newly installed Oracle 11g R2 64 bits to window 8 PRo 64 bits. Able to connection successfully Oracle NEt Configuration Assistant service name.
But when I try to connect it Toad 9.6 32 bits its show error message
ORA-06413: Connection not open
Oracle client version whether it is of 32-bit or 64-bit.
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:>sqlplus -v
SQL*Plus: Release 10.2.0.1.0 - Production
C:>
it shows me only version not bit information.is there any other command to get it.
I have a requirement to get a delimited output file by executing a select query.
For e.g.
select id, name, age from customers;
i need the output as,
id,name,age
123,devi,23
34,abi,20
4900,infy,23
i tried select id||','||name||','||age from customers;
but am getting the following output....
id||','||name||','||age
123,devi,23
34,abi,20
4900,infy,23
But i want to remove those pipes in between the column name.
I tried colsep also... but there am getting the output as.,
id,name,age
123, devi, 23
34, abi, 20
4900, infy, 23
some unwanted spaces in between...but i want the output as this...
id,name,age
123,devi,23
34,abi,20
4900,infy,23
the query which am using is stored in a .sql file.
I used the following command :
-------------------------------------------------
D:oracleproduct10.1.0Db_2jdkinjava -Djava.security.properties=D:oracleproduct10.1.0Db_2sqlplusadminiplusprovider -jar D:oracleproduct10.1.0Db_2oc4jj2eehomejazn.jar -user "iSQL*Plus DBA/admin" -password welcome -shell
--------------------------------------------------------
Output as follows:
--------------------------------------------
oracle.security.jazn.JAZNRuntimeException: Configuration file "configjazn.xml" does not exist. Check your JAAS configuration settings.at oracle.security.jazn.JAZNConfig.getJAZNProperties(Unknown Source)
... ... ...
Realm [iSQL*Plus DBA] does not exist in system.
-----------------------------------------------
what may be the reason for this error?
I need generate a script like this.
spool loadvalues.sql
INSERT INTO SALES(column1, column2, column2) SELECT( COLUMN1, COLUMN2, COLUMN3) FROM TABLE_NAME;
spool off;
I would like to substitute TABLE_NAME with each value from the following query;
select table_name from user_tables
where table_name like 'SALES%'
so there are about 45 SALES tables ex: SALES_IDAHO,SALES_MICHIGAN etc.so my spool file(loadvalues.sql) should look like this ex:
INSERT INTO SALES(column1, column2, column2) SELECT( COLUMN1, COLUMN2, COLUMN3) FROM SALES_IDAHO;
sales_michingan should have script like
INSERT INTO SALES(column1, column2, column2) SELECT( COLUMN1, COLUMN2, COLUMN3) FROM SALES_MICHIGAN;
I m currently written a sqlplus query and executing as below
sqlplus -s << !
set head off pages off trimspool on termout off
spool sysdate.txt
select sysdate from dual;
spool off
!
With this query the sysdate is getting written in the sysdate.txt but it is also getting printed in the screen/terminal., which I don't need to. Is their any options available for that.
Note: I came to know that "Termout off" will work only when we execute the query from a file and as a result I can still see the sysdate getting displayed in the screen.
In my sql*plus when i am writing the command ed .It was showing the error as \
SQL> ed
SP2-0110: Cannot create save file "afiedt.buf"
i tried to define the editor by using the command define_editor=notepad;
But still my problem was not solved.
How to find user name in sqlplus?
View 5 Replies View RelatedI need to parse .sql file to tree and I can't find how to do it.
(We apply sql files by sqlplus and we have some problems with '/': after anonymous blocks - it haven't applied without '/'; Also not-anonymous block applied twice when we have both ';' and '/'. I need to report about problems before file will apply.) I've tried to use ANTLR with it grammar but it build awful tree.
I am able to start SQLPLUS from Start | Program files | Oracle - OraHome92 | Application development |
Unfortunately, when trying to start it from the "command prompt" window with the following command SQLPLUS, it generates the infamous error message like
"... unknown etc... "
Any variables i need to change on my client machine ?
I have some problem with '/' into the .sql files: after anonymous blocks - it haven't applied without '/'; Also not-anonymous block applied twice when we have both ';' and '/'. I need to report about problems before file will apply.)
how to handle these cases by a SQLPlus?
I have a .sql file that is used as a wrapper file that when executes within sqlplus (9.2.0.1.0), executes a bunch of .sql files within it. Example below:
WRAPPER.SQL
START D:ScriptsA.sql "'04-01-2012 00:00:00'"
START D:ScriptsB.sql "'04-01-2012 00:00:00'"
START D:ScriptsC.sql "'04-01-2012 00:00:00'"
START D:ScriptsD.sql "'04-01-2012 00:00:00'"
START D:ScriptsE.sql "'04-01-2012 00:00:00'"
EXIT;
Each of the .sql file (A,B,C,D,E) Spools individual output of sql statment within them. Each of the indv .sql file queries different tables with different filters(where) clause.
I would like to capture any error (OS,SQL,DB) into indv error file (A_ERROR.log). The reason being is because later in the process we need to validate if there were any errors before processing and loading the data into our SQL database
I try to login as SYS@sid AS SYSDBA When I login via TOAD, I am able to. However, as in (1), all my attempts to login from command-line SQL *Plus fails. The error I get is ORA-1031 Insufficient Privileges Even if I am on the physical server and try to run the SQL *Plus, I get the same error -- Insufficient Privileges
Here are the environment details:
Server: Windows Server 2008 R2
Server: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
Client: Windows 7 Professional
Client: SQL*Plus: Release 11.2.0.1.0 Production
From within a DOS batch file I make the following call:
sqlplus [User]/[password]@[server] @batch_script.sql [Server] [User]
Within the file batch_script.sql I have the following lines:
spool output_batch.lst
connect &&2/[password]@&&1;
@SomeOtherFile.sql
I want to change the last line to something like this:
if &&1 = 'Something' then
@SomeOtherFile1.sql
else
@SomeOtherFile2.sql
end if;
I get the following result
SQL> if &&1 = "something" then
SP2-0734: unknown command beginning "if &&1 = "..." - rest of line ignored.
I took a shot at using the "If" statement and missed.
i do have a set of monthly process, where i need to run query one after the other. Some query will take one hours time to complete but some will take 10 hours or more to execute. My problem is that we have wait or machine shouldn't hang or log off during that time ...
I am executing the query in TOAD and windows SQL*Plus. Query can run Parallel at a time.
Is the there anyway to run the query in the background like what we do in the unix nohup command in toad?
I have a script which connects to Oracle and return 2 date value. few days back the database was down and when the script execute and return same garbage value in the spool file.
I added a exception handler WHENEVER SQLERROR EXIT 1 befor the connection start and after connection start. But in both the case it is also writing to the spool file.
I would like to exit the connection with a value <> 0 if any connection issue happens like (user id, password, database down error type of issue.) No information should go to the spool file
Output=`$ORACLE_HOME/bin/sqlplus -S /nolog << EOF
CONNECT $Usr/$Pwd@$Server
WHENEVER SQLERROR EXIT 1
spool ${ROOT_DIR}/.delta_date.tmp
[code]....
I'm trying to change a password. I can connect to the db then at the SQL prompt I'm using:
alter user <name> identified by <new password>
The dos window comes back with '2' - then just sits there