SQL * more command line
Hello, is there a way to run a SQL directly from the sqlplus command line? For example:sqlplus usr1/usr1@srv1 select sysdate double
Thank you
~ David
Another way in Windows:
c:\>echo select * from dual; | sqlplus scott/tiger@test_db
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Mar 25 14:41:17 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
D
-
X
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
c:\>
Tags: Database
Similar Questions
-
How to specify the instance in SQL * more command line?
Hello
I'm learning to Oracle. I currently have 2 instances of database running. I wanted to connect to one of the bodies and used the following command from the command line:
When I run the command above, SQL * more ask me the password. I do not understand why he asks me the password because I provided on the command line.sqlplus system as sysdba/abc123@ocp11gsid where 1234 is the password for the system user in the ocp11gsys instance.
What is the correct command line, so he asks me the password? (without defining the variable ORACLE_SID of environment - basically, I want to know how to specify the user, his password and sid, all in the sqlplus command line, without being prompted to enter the password that I mentioned.)
Thank you for your help,
John.John,
This is how it works.
E:\Documents and Settings\aristadba>sqlplus system/oracle as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 2 22:49:25 2010 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL>
And now it ask the password,
E:\Documents and Settings\aristadba>sqlplus system as sysdba/oracle SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 2 22:50:42 2010 Copyright (c) 1982, 2010, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL>
Spot the difference?
The user name and password must unite. What you are to provide the password with the role where it will not be considered.
Update
I missed that part,What is the correct command line, so he asks me the password? (without defining the variable ORACLE_SID of environment - basically, I want to know how to specify the user, his password and sid, all in the sqlplus command line, without being prompted to enter the password that I mentioned.)
The only thing that you can specify is the user name and password. The SID must be defined by you, either explicitly using the export or oraenv command if you are on the local system and do not use the TNS to connect to the instance. If you use the TNS, then an appropriate entry should be there which would connect to the required database.
HTH
Aman...Published by: Aman... on August 2, 2010 22:54
-
SQL * call command line loader with spaces in the path
I need to call a remote file and try this:
He always tells me that the file is not found, but it is there! How should I write it so that it can find the file?sqlldr USER/password@SERVER \\servername\drivename\Folder Name Messing Me Up\PLACE\Programs\QC2\Data\StandardRawFileRAW.ctl
Thank you very much!Wrap your name in path in single quotes
sqlldr USER/password@SERVER '\\servername\drivename\Folder Name Messing Me Up\PLACE\Programs\QC2\Data\StandardRawFileRAW.ctl'
Kind regards
Phiri -
SQL * more syntax to connect to Apex 3.1 workspace
How to connect to a particular application of workspace Apex using SQL * MORE?
In the tenth Summit, Sql * more command is: "sqlplus username/password" to connect and connect to the base.
However, at the Apex 3.1 "sqlplus username/password" is no longer the correct syntax to connect and connect to the database is created in the workspace Apex.
I created a table called "Sample" in the workspace Apex. I can run the sql query on the "Sample" in the GUI Apex SQL Workshop table. Type "sample to describe" workspace for SQL workshop gives me the desired result.
However, when I come out to the command prompt and use sqlplus to issue "sample", I get "table or view does not exist.
Is there any documentation on how to use SQL * PLUS to connect to the tables created in the workspace Apex?
TIA1. If no database not created in a workspace
2. There are schemas attached to a workspace (or created by it)
3. you must connect to sql more like this:
C:\Users\Denes Kubicek>sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Di Okt 14 22:19:28 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. Benutzernamen eingeben: dkubicek@xe Kennwort eingeben: Verbunden mit: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production SQL> desc emp; Name Null? Typ ----------------------------------------- -------- ----------------- EMPNO NOT NULL NUMBER(4) ENAME VARCHAR2(10) JOB VARCHAR2(9) MGR NUMBER(4) HIREDATE DATE SAL NUMBER(7,2) COMM NUMBER(7,2) DEPTNO NUMBER(2) SQL>
This has nothing to do with the apex.
I would say, your workspace has several patterns that are entrusted to him. You were probably asking a particular schema and he gave you the correct results. In SQL more trying to describe a table that is not there.
This should give you some results:
SELECT object_name, object_type FROM all_objects WHERE owner = 'DKUBICEK';
where you replace "DKUBICEK" with the name of schema, you log into SQL Plus.
To see the schema that you use for SQL Workshop / SQL commands, see the dropdown in the top right corner - schema.
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------- -
I installed Oracle Developer with success, but having bad connect to Sql more than command line, also unable to connect via the developer tools, I get a TNS: Connect timeout occurred. This happens also for the "Plus" Sql for Windows.
However, I can connect via the Sql Plus command window when it is executed from "Start-> all programs", but not when I first run the command window:
I have a good Oracle 11 g install on Windows 7 and a good developer Sql install so I can connect to databases, but something does not work when you try to connect through these tools. Although Sql Plus works when called from 'Start-> all programs'
sqlplus scott/tiger - don't use SQL * Net, you can connect like this even with the listener is stopped.
Developer SQL can ONLY connect using SQL * Net & can be blocked by the firewall
to connect using sqlplus & SQL * Net, you need to invoke it as below
sqlplus scott/tiger@orcl
-
Integrate a command-line sql in oracle
Due to licensing issues, we will have to avoid the access to our database of customer production other than the application developed in forms and reports.
Do you know if there is an easy way to integrate a command-line sql in a form, using the existing connection? a bean pjc?
juliojgs wrote:
The application is ours. We also provide support services, not only the development, but still help them with data in their database of production (updates massive, backdoor... fixing data errors)
The dba just told me that, with the new licensing scheme, we cannot even login sqldeveloper of our client machines to this support for data, then to look for a new way to do. What we can do is to run the application, is the reason for the requirement of the incorporation of a tiny sql Forms client.
Sounds like licenses incorporated. Your customer is only allowed to use the Oracle software in conjunction with your product and is not allowed to use * any * oracle configuration / administration tool (SQL * more / expdp / rman / dbca / dbua...), but only the tools you provide.
However; providing a text box where the end user is again able to enter simple SQL statements certainly is not respect the integrated license agreement.
see you soon
-
SQL * more to wrap the set command - doubt
Hello
I have a stupid question on the set "WRAP" command in SQL * more. I put A500 for column F2, linesize 100 and wrap is disabled.
The result is clear, it truncates exactly the 100th character. When I put the envelope, for the header of column F2, I couldn't see
the '-' character the hyphen for 500 times, but only for 100 characters. With the release, with few characters of column F2, how do I
confirm that it printed 499 seats for 2 ranks and 495 white space for the last line.
Please provide details on the envelope and TRIMOUT/TRIMSPOOL in this context.
Also, when I increase the linesize 1000 and desc T1, it goes for a draw, it is documented in Oracle, but why is it?
It is possbile to get the result without changing the linesize. Thank you.
SQL > column f1
F1 COLUMN WE
FORMAT OF 999.99
SQL > column f2
COLUMN f2 WE
FORMAT a500
SQL > show linesize
linesize 100
SQL > set wrap off
SQL > select f1, f2 from t1;
F1 F2
------- --------------------------------------------------------------------------------------------
1.00 IS
2.00 Y
3.00 three
SQL > wrap value on
SQL > show wrap
Wrap: lines will be wrapped
SQL > SELECT F1, F2 FROM TEST1;
F1
-------
F2
----------------------------------------------------------------------------------------------------
1.00
THERE
2.00
THERE
3.00
ThreeHello
845956 wrote:
HelloI have a stupid question on the set "WRAP" command in SQL * more. I put A500 for column F2, linesize 100 and wrap is disabled.
The result is clear, it truncates exactly the 100th character. When I put the envelope, for the header of column F2, I couldn't see
the '-' character the hyphen for 500 times, but only for 100 characters.Exactly. If LINESIZE is 100, the maximum display width of any column is 100, even if the column is actually longer, and/or you have an explicit order of the COLUMN in this way it will be longer. Nothing after that 100 characters will be encapsulated, if the package is enabled.
With the release, with few characters of column F2, how do I
confirm that it printed 499 seats for 2 ranks and 495 white space for the last line.Save the output in a HOLD file and change the file to see exactly what it contains. If TRIMSPOOL is activated, it does not contain the final spaces.
>Please provide details on the envelope and TRIMOUT/TRIMSPOOL in this context.
See the SQL * Plus Manual:
http://docs.Oracle.com/CD/B28359_01/server.111/b31189/ch12040.htm#i2683480Also, when I increase the linesize 1000 and desc T1, it goes for a draw, it is documented in Oracle, but why is it?
It is possbile to get the result without changing the linesize. Thank you.Describe automatically adjusts the width of each column to use all the space available with the LINESIZE current. I don't think there is a way to change this. If you cannot change LINESIZE, then write your own query on all_tab_columns and use it instead of sql * over order DESC.
Published by: Frank Kulash, 5 March 2012 10:20
-
Could not connect to command line SQL Oracle XE
Hello
I use Oracle Xe on windows XP... I can connect to SQLPLUS using the windows shell with each of them to the account user and password as
--------------------------------------------------------------------------------------------------------------
Microsoft Windows XP [Version 5.1.2600]
Copyright (C) 1985-2001 Microsoft Corp.
H:\ > SQLPLUS MAYA/MARCO
SQL * more: Release 10.2.0.1.0 - Production Thu Jun 30 17:28:12 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL >_
---------------------------------------------------------------------------------------------------------------
but when I use the command line SQL Oracle to start-> all programs/Oracle Database 10 g Express Edition / * execute SQL Command Line * it brings the command SQL line with a quick line of SQL, but it connects to the database.
---------------------------------------------------------------------------------------------------------------
SQL * more: Release 10.2.0.1.0 - Production Thu Jun 30 17:36:12 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL > Select * from cat.
SP2-0640: not connected
SQL >
----------------------------------------------------------------------------------------------------------------
and I met with the error "not connected". I'm sure that the database has already started successfully.
Can you please let me know I'm doing wrong or what is problem with Oracle SQL Command Line?
Thank youHello
What is
connect MAYA/MARCO
You can issue a query later?
Kind regards
-
SQL * more the "prompt" command does not display a semicolon (;)
In a script, I have a command prompt which wrote a useful message in a queue. The final character to be displayed by the command is a semicolon (;). The semicolon is not displayed. The same thing happens when I run the command from a SQL * over the command line. Here is the command and its output:
SQL > PROMPT seeks access: SELECT * FROM < table_name > WHERE rowid = '< rowid > ';
seeks access: SELECT * FROM < table_name > WHERE rowid = '< rowid >.
Can someone tell me why the semicolon is not shown, and what I need to do to make it appear?
Thank you
BillTry
SQL > PROMPT seeks to access: SELECT * FROM
WHERE rowid=' ';; seeks to access: SELECT * FROM WHERE rowid=' '; SQL * more is likely to interpret the single semicolon as the terminator of sql.
-
Sql XE over procedures run command line
Greetings experts,
I am trying to familiarize themselves with the command-line of XE and PL/SQL procedures, so what I do, I wrote a simple script that creates a procedure that prints its input value. Then I compile and run it via the command line.
The following is the script (small_proc.sql):
Question:create or replace procedure sproc (printthis in number) is begin dbms_output.put_line('the value is' || printthis); end; /
1. I compile the script by:@small_proc
then I run:run sproc (4);
It is said that the procedure is carried out, but it's not printing anything (I think that "the value is 4").
Something wrong with my code or my step?
2. How can I change the path environment so that I can't copy the script in the bin every time
I want to run it?
3. How can I check environment path in this command line?
Forgive my ignorance.
Kind regards
ValerieHi, you have to sent in SQL * more:
Set serveroutput on;
exec sproc (4);
Roberto.
-
Hello
I can t open Google Earth or Microsoft Office programs because I get this message - the application could not start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe for more details.
A few days ago I could open all what programs. I put t know what is the problem.
I did sxstrace and that's what I have-
=================
Launch the activation context generation.
Input parameter:
Flags = 0
ProcessorArchitecture = Wow32
CultureFallBacks = en-US; en
ManifestPath = C:\Program Files (x 86) \Google\Google Earth\client\googleearth.exe
AssemblyDirectory = C:\Program Files (x 86) \Google\Google Earth\client\
Application configuration file =
-----------------
INFO: File analysis shows C:\Program Files (x 86) \Google\Google Earth\client\googleearth.exe.
INFO: Manifest definition identity is (null).
INFO: Reference: Microsoft.VC80.CRT, processorArchitecture = "x 86" publicKeyToken = "1fc8b3b9a1e18e3b", type = "win32", version = "8.0.50727.4053"
INFO: Resolving reference Microsoft.VC80.CRT, processorArchitecture = "x 86" publicKeyToken = "1fc8b3b9a1e18e3b", type = "win32", version = "8.0.50727.4053".
INFO: Resolving reference for ProcessorArchitecture WOW64.
INFO: Resolving reference for the neutral culture.
INFO: Application binding policy.
INFO: No found publisher policy.
INFO: No redirect political connection is found.
INFO: Start the detection of assembly.
INFO: Can't find the assembly in WinSxS.
NEWS: Try to detect manifest to C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT\8.0.50727.4053__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
INFO: Found no manifesto for the neutral culture.
INFO: End detection of assembly.
INFO: Resolving reference for ProcessorArchitecture x 86.
INFO: Resolving reference for the neutral culture.
INFO: Application binding policy.
NEWS: Control strategy of the Publisher C:\Windows\WinSxS\manifests\x86_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.5592_none_517247830f45081d.manifest
INFO: Start the detection of assembly.
INFO: End detection of assembly.
ERROR: Activation context generation failed.
End activation context generation.Help, please!
This type of error can be caused if the Visual C++ library runtime components are missing or because of a third-party software.
Follow the steps below:
Method 1:
If the problem is caused by the lack of Visual C++ libraries, you can download and install the Runtime components of Visual C++ libraries from the link below:
This error can occur when the Microsoft .NET Framework installation on the computer is damaged or is missing.Try it out below step to reinstall and repair installation of Microsoft .NET Framework on the computer, then check if you can install the software.
(a) click the Start button, select Control Panel, click programs and then click on 'Turn Windows has or not.' If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
(b) search for Microsoft .NET framework 3.5.1 uncheck, click OK and restart the computer.
(c) after the reboot, open again "Turn Windows features on or off" and place a check next to Microsoft .NET framework 3.5.1 and restart the computer.
Step 2
If the previous step fails, then I suggest that you manually download and install Microsoft Visual C++ 2005 and 2008 Redistributable Package and check to see if you can install the software.
In programs and features, you do not show that you have installed Microsoft Visual C++ 2005 Redistributable and Microsoft Visual C++ 2008 Redistributable? If this is not the case, download the links here.
Package redistributable Visual C++ 2005 (X 86)
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en
Visual C++ 2005 (x 64) redistributable package manager
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=eb4ebe2d-33c0-4A47-9dd4-b9a6d7bd44da&displaylang=enPackage redistributable Microsoft Visual C++ 2008 (x 86)
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en
Package redistributable Visual C++ 2008 SP1 (x 64)
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=BA9257CA-337F-4B40-8C14-157CFDFFEE4E&displaylang=enI hope this helps.
-
I have QQ (an international chat program) installed on the laptop. Then my hard drive crashed. Now when I try to reinstall it on my new hard drive I get the following message:
"Error: the application failed to start because the side by side configuration is incorrect, please see the application event log or use the command-line sxstrace.exe for details"
-how can I solve this problem? I have Windows 7.Hello
Thanks for choosing Microsoft Community to post your question.
It seems that you can not install application QQ, you get an error: "the application could not start because the side by side configuration is incorrect, please see the application event log or use the command-line sxstrace.exe for more details.
We're here to help and guide you in the right direction. This problem could be caused when the computer is missing the correct C++ run time for your type of system components. (x 86 or x 64).
Here are a few troubleshooting steps that you can try to solve this problem.
Method 1: we will install Microsoft Visual C++ for your computer package.
Note: If you use the 32-bit operating system, download and install 32-bit edition(X86).
If you use the 64-bit operating system, download and install edition(X64) 64-bit.
Microsoft Visual C++ 2008 SP1 Redistributable Package (x 86)
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=enMicrosoft Visual C++ 2008 SP1 Redistributable Package (x 64)
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=BA9257CA-337F-4B40-8C14-157CFDFFEE4E&displaylang=enPackage redistributable Microsoft Visual C++ 2010 (x 86)
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=a7b7a05e-6de6-4D3A-A423-37bf0912db84
Package redistributable Microsoft Visual C++ 2010 (x 64)
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=bd512d9e-43c8-4655-81bf-9350143d5867
Method 2: Run the fixit available at the following link.
Solve problems with programs that cannot be installed or uninstalled
http://support.Microsoft.com/mats/Program_Install_and_Uninstall
Also, check the event log using Event Viewer.
Please see the link below for more information on how to use Event Viewer to check the error message or information,
http://Windows.Microsoft.com/en-us/Windows7/what-information-appears-in-event-logs-Event-Viewer
If you have additional problems, please reply to this post and we will be happy to help you further.
-
«WINDOWS 7 error the application failed to start because the side by side configuration is incorrect, please see the application event log or use the command-line sxstrace.exe for more details.»
This cams almost for all the applications that I try to open. I read all kinds of things to solve problems, but I can't install anything because it is constantly on the screen.
I think it's like that because my computer shuts off when I was doing the system restore, because he has not started.
I don't know what to do.
Hello
You can view the event log by using Event Viewer. See the link below for more information about how to use Event Viewer to check the error message or information,Please check the information in Event Viewer and let us know the problem more briefly for a better solution.
Method 1:However, try the SFC (System File Checker) scan on the computer. Check out the following link to do the same thing:
How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
http://support.Microsoft.com/kb/929833Method 2:You try to run the fixit given in the following link and check if it works:Method 3:You have recently updated with Microsoft Visual C++?I hope this helps! -
SQL * more the 'timing' in SQL Developer command
I installed SQL Developer version 4.1.1.19. In the sql worksheet, how can I use SQL * more order 'timing' in a script to see a time elapsed SQL? The "Timing" on 'set' did not return any info after running SQL, and 'calendar beginning mon_timer' back 'command Timing is obsolete. Help, please.
Thank you
- As you can see, there is no calendar information in the script output log.
- Then I tried on the discussion forum, found it can be enabled in "tool > preference > Database > startup script" and set as startup script:
Set serveroutput on
set timing on
- However, 2 questions are:
- the calendar that he returned is NOT the elapsed time of my stored procedure to run. He simply choose the 2 time points its time, before and not after MS point run. Set timing on is therefore not a solution for me.
- He did not follow the instructions in the startup script. After that I put the calendar in the startup script, stop & restart SQL Developer, same laptop charging, timing still on. The only way to turn off now is to configure it to NOT use
any startup script.
- Then I developed my own coding as a solution:
3. control of the COIL
VAR bv_start_ts VARCHAR2 (30)
VAR bv_end_ts VARCHAR2 (30)
VAR bv_elps_ts VARCHAR2 (30)
DECLARE
v_start_ts VARCHAR2 (30);
BEGIN
SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_start_ts FROM DUAL;
: bv_start_ts: = v_start_ts;
END;
/
IMPRESSION bv_start_ts
EXEC pmsmmi.rpt.rpt_ethncty_race_smry (15);
DECLARE
v_end_ts VARCHAR2 (30);
BEGIN
SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_end_ts FROM DUAL;
: bv_end_ts: = v_end_ts;
END;
/
IMPRESSION bv_end_ts
EXEC: bv_elps_ts: = TO_CHAR (TO_TIMESTAMP (: bv_end_ts, 'yyyymmddfxDyhh24miss.ff6')-TO_TIMESTAMP (: bv_start_ts, 'yyyymmddfxDyhh24miss.ff6'), 'hh:mi:ss.ff6');
IMPRESSION bv_elps_ts
SPOOL OFF
- Then I got what I want, the answer is in the 'PRINT ': bv_elps_ts
SQL > VAR bv_start_ts VARCHAR2 (30)
SQL > VAR bv_end_ts VARCHAR2 (30)
SQL > VAR bv_elps_ts VARCHAR2 (30)
SQL > DECLARE
v_start_ts VARCHAR2 (30);
BEGIN
SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_start_ts FROM DUAL;
: bv_start_ts: = v_start_ts;
END;
/
PL/SQL procedure successfully completed.
Elapsed time: 00:00:00.031
SQL > PRINT bv_start_ts
BV_START_TS
-----------
20150702Thu112617.775545
SQL > EXEC pmsmmi.rpt.rpt_ethncty_race_smry (15)
PL/SQL procedure successfully completed.
SQL > DECLARE
v_end_ts VARCHAR2 (30);
BEGIN
SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_end_ts FROM DUAL;
: bv_end_ts: = v_end_ts;
END;
/
PL/SQL procedure successfully completed.
Elapsed time: 00:00:00.062
SQL > PRINT bv_end_ts
BV_END_TS
---------
20150702Thu112630.805786
SQL > EXEC: bv_elps_ts: = TO_CHAR (TO_TIMESTAMP (: bv_end_ts, 'yyyymmddfxDyhh24miss.ff6')-TO_TIMESTAMP (: bv_start_ts, 'yyyymmddfxDyhh24miss.ff6'), 'hh:mi:ss.ff6')
PL/SQL procedure successfully completed.
SQL > PRINT bv_elps_ts
BV_ELPS_TS
----------
+ 00:00:13.030241000 000000
SQL > SPOOL OFF
-
PL/SQL in Sql Developer 4 script, works not sqlplus command line.
Hello guys, Xev here.
I hope I meet new people there into that in this space. I hope this is the appropriate space to ask this, I see that others have asked about sqlplus and they where permitted to post...
I have a pl/sql script that runs in sql developer 4, but the exact same script will not run in the sqlplus command line?
When I run the script, it gives me this, but as you can see with this script that works fine with sql developer, he is not running sqlplus command line.
ERROR at line 3:
ORA-06550: line 3, column 28:
PLS-00201: identifier 'DYNAMIC_COUNTS' must be declared.
ORA-06550: line 3, column 4:
PL/SQL: Ignored Element
ORA-06550: line 39, column 17:
PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.
ORA-06550: line 39, column 1:
PL/SQL: Statement ignored
ORA-06550: line 41, column 17:
PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.
ORA-06550: line 41, column 1:
PL/SQL: Statement ignored
ORA-06550: line 43, column 17:
PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.
ORA-06550: line 43, column 1:
PL/SQL: Statement ignored
ORA-06550: line 45, column 17:
PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.
ORA-06550: line 45, column 1:
PL/SQL: Statement ignored
ORA-06550: line 82, column 15:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 82, column 3:
PL/SQL: SQL statement ignored
Here is the script I use... You define a type of thing in the sqlplus command line?
Set serveroutput size unlimited
run the DBMS_OUTPUT. ACTIVATE (buffer_size = > NULL);
DECLARE
TYPE nt_tab IS TABLE OF dynamic_counts % ROWTYPE;
v_nttab nt_tab: = nt_tab();
FND_LOOK INTEGER.
v_incr NUMBER: = 0;
------------------------------------------------------------------------------------------------------------------------
BEGIN
FOR t IN (SELECT master, table_name, column_name
From all_tab_columns
Owner WHERE = UPPER ('& SCHEMA_NAME'))
------------------------------------------------------------------------------------------------------------------------
LOOP
BEGIN
EXECUTE IMMEDIATE ' with an ACE (select case when REGEXP_LIKE (' | t.column_name |))
-This search 1 letter and 12 figures-
', "^ ([[: alpha:]] |) [[: alpha:]] ({3}) [0-9] {12} $")
then "match"
another "no matches found" end up as output of ' | t.Owner | '.' || t.table_name | ')
Select count (*) in a where a.output = "Match Found" clause '
IN FND_LOOK;
------------------------------------------------------------------------------------------------------------------------
IF FND_LOOK > 0 THEN
v_incr: = v_incr + 1;
v_nttab. EXTEND;
v_nttab (v_incr) .t_owner: = t.owner;
v_nttab (v_incr) .t_table_name: = t.table_name;
v_nttab (v_incr) .t_column_name: = t.column_name;
v_nttab (v_incr) .fnd_govids: = FND_LOOK;
END IF;
------------------------------------------------------------------------------------------------------------------------
/ * This is for DBMS output, thus we have 2 different ways, one can see the results in the table dynamic_counts
and in the dbms_output
*/
IF FND_LOOK > 0 THEN
Dbms_output.put_line (t.owner |) '.' || t.table_name | ' ' || t.column_name | ' ' || FND_LOOK);
END IF;
------------------------------------------------------------------------------------------------------------------------
/ * Exception Handeling * /.
EXCEPTION
WHILE OTHERS
THEN
Dbms_output.put_line)
"Generic error".
|| t.column_name
|| "from".
|| t.Owner
|| '.'
|| t.table_name);
END;
END LOOP;
------------------------------------------------------------------------------------------------------------------------
FORALL i IN 1.v_nttab. COUNTY
INSERT INTO dynamic_counts (t_owner,
t_table_name,
t_column_name,
fnd_govids)
VALUES (v_nttab (i) .t_owner,
v_nttab (i) .t_table_name,
v_nttab (i) .t_column_name,
v_nttab (i) .fnd_govids);
COMMIT;
END;
/
Are you sure that you are connected to the database to the same user with both clients?
Maybe you are looking for
-
I deleted firefox and then re-installed, but it says there is an instance that is already running. I looked all over trying to fine .parentlock (causes of this problem that other Web sites) and cannot locate this file. I am running Mac OSX 10.6
-
Skype with webcam Logitec C615
I just made a call for the first time using Skype with a webcam Logited C615. I was able to activate the audio output with the contact using Skype audio/video preference settings. I can't activate my outgoing video because the camera selection button
-
The Toshiba recovery cd contains a copy of the Windows CD
Hello The restore cd contains a copy of winows? Also if this is the case, it has a repair option. I hesitate to use the CD because I don't want to lose all my data. I know that when I used a cd of windows in the past that he has a repair option as we
-
I'm a little confused on the merger a system partition and recovery.
Dear Sir, I deleted my recovery partition (D :). and then it merges with the C: partition, as my C: drive is running out of space done. Remove recovery partition affects operating system or computer or my drive hard. can reinstall the operating syste
-
Base device system (missing in the scanning device manager) _
Last week I upgraded my laptop from Windows XP to Windows 7 Enterprise. I use IBM Lenovo 3000/n100 laptop model. After installing the operating system and windows udpate alll my required drivers and updates and patches installed correctly. But by che