The start command on SQLplus
Hello everyone,
Working on 10g/windows
I opened a SQL*plus from a DOS prompt, to launch a file from a start command.
but when launching the command, nothing works.
Example:
SQL> start file_name.sql
nothing runs !!, surprising!!
With the same file, the start file_name.sql works for some databases 10g and behaves as above on some.
What could be the reason fot this?
Thanks
Sorry, I cannot provide the contents of the script
for copyright reason.Create a test case.
One might be to create a file called 'test.sql' in the same directory as the script you are running. The contents of the file would be
SELECT SYSDATE FROM DUAL;
Run the file by 'START TEST.SQL' and see what happens.
May I should contact the provider to look at?Good idea.
Similar Messages
-
A question about the SPOOL command in sqlplus
Dear all,
I have a question about the SPOOL Command and I would appreciate if you could kindly give me a hand. Consider the following sql script.
SPOOL result.txt
SELECT * FROM mytable;
SPOOL OFF;This works pretty well, and the whole content of the table "mytable" is exported to the text file "result.txt". However, sqlplus prints also the number of lines
printed after each query. As a result, after running this script, at the end of the file, I have always a line like
"20541 lines returned"How can I avoid this line (the number of returned lines) in my result file?
Thanks in advance,
DariyooshPeter Gjelstrup wrote:
Hi Dariyoosh,
As you are about to find out, SQL*Plus is a really powerful tool once the wonders of it are discovered.
You really should study the reference
http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/toc.htm
In your current case especially the SET command
http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/ch_twelve040.htm#BACGAJIC
Regards
PeterHello there,
Thank you very much for your attention to my problem and in particular the interesting links.
Kind Regards,
Dariyoosh -
Where can I find a list / explanation of the SHOW commands in SQLPlus?
Thanks,Hi,
Also, try this cool glogin script from Chris Foot to show the instance name in your SQL*Plus promt:
COLUMN file_name FORMAT a44
COLUMN tablespace_name FORMAT a20
COLUMN owner FORMAT a15
COLUMN segment_name FORMAT a20
set lines 132
set pages 100
set termout off
col dbname new_value prompt_dbname
select instance_name dbname from v$instance;
set sqlprompt "&&prompt_dbname> "
set termout on
set time on
Here are the set options:
APPI[NFO]ON
Application info for performance monitor (see DBMS_APPLICATION_INFO)
ARRAY[SIZE] {15|n}
Fetch size (1 to 5000) the number of rows that will be retrieved in one go.
AUTO[COMMIT] OFF|n}
Autocommit commits after each SQL command or PL/SQL block
AUTOP[RINT] OFF
Automatic PRINTing of bind variables.(see PRINT)
AUTORECOVERY ON
Configure the RECOVER command to automatically apply
archived redo log files during recovery - without any user confirmation.
AUTOT[RACE] OFF} [EXP[LAIN]] [STAT[ISTICS]]
Display a trace report for SELECT, INSERT, UPDATE or DELETE statements
EXPLAIN shows the query execution path by performing an EXPLAIN PLAN.
STATISTICS displays SQL statement statistics.
Using ON or TRACEONLY with no explicit options defaults to EXPLAIN STATISTICS
BLO[CKTERMINATOR] {.|c|OFF|ON}
Set the non-alphanumeric character used to end PL/SQL blocks to c
CMDS[EP] {;|c|OFF|ON}
Change or enable command separator - default is a semicolon (;)
COLSEP { |text}
The text to be printed between SELECTed columns normally a space.
COM[PATIBILITY] {V5|V6|V7|V8|NATIVE}
Version of oracle - see also init.ora COMPATIBILITY=
You can set this back by up to 2 major versions e.g. Ora 9 supports 8 and 7
CON[CAT] {.|c|OFF|ON}
termination character for substitution variable reference
default is a period.
COPYC[OMMIT] {0|n}
The COPY command will fetch n batches of data between commits.
(n= 0 to 5000) the size of each fetch=ARRAYSIZE.
If COPYCOMMIT = 0, COPY will commit just once - at the end.
COPYTYPECHECK OFF
Suppres the comparison of datatypes while inserting or appending to DB2
DEF[INE] {&|c|OFF|ON}
c = the char used to prefix substitution variables.
ON or OFF controls whether to replace substitution variables with their values.
(this overrides SET SCAN)
DESCRIBE [DEPTH {1|n|ALL}][LINENUM {ON|OFF}][INDENT {ON|OFF}]
Sets the depth of the level to which you can recursively describe an object
(1 to 50) see the DESCRIBE command
ECHO OFF
Display commands as they are executed
EMB[EDDED] OFF
OFF = report printing will start at the top of a new page.
ON = report printing may begin anywhere on a page.
ESC[APE] {\|c|OFF|ON}
Defines the escape character. OFF undefines. ON enables.
FEED[BACK] {6|n|OFF|ON}
Display the number of records returned (when rows > n )
OFF (or n=0) turns the display off
ON sets n=1
FLAGGER OFF|FULL}
Checks to make sure that SQL statements conform to the ANSI/ISO SQL92 standard.
non-standard constructs are flagged as errors and displayed
See also ALTER SESSION SET FLAGGER.
FLU[SH] OFF
Buffer display output (OS)
(no longer used in Oracle 9)
HEA[DING] OFF
print column headings
HEADS[EP] {||c|OFF|ON}
Define the heading separator character (used to divide a column heading onto > one line.)
OFF will actually print the heading separator char
see also: COLUMN command
INSTANCE [instance_path|LOCAL]
Change the default instance for your session, this command may only be issued when
not already connected and requires Net8
LIN[ESIZE] {150|n}
Width of a line (before wrapping to the next line)
Earlier versions default to 80, Oracle 9 is 150
LOBOF[FSET] n
Starting position from which CLOB and NCLOB data is retrieved and displayed
LOGSOURCE [pathname]
Change the location from which archive logs are retrieved during recovery
normally taken from LOG_ARCHIVE_DEST
LONG {80|n}
Set the maximum width (in chars) for displaying and copying LONG values.
LONGC[HUNKSIZE] {80|n}
Set the fetch size (in chars) for retrieving LONG values.
MARK[UP] HTML ON
[HEAD text] [BODY text] [TABLE text]
[ENTMAP {ON|OFF}][SPOOL {ON|OFF}]
[PRE[FORMAT] ON]
Output HTML text, which is the output used by iSQL*Plus.
NEWP[AGE] {1|n} NULL text
The number of blank lines between the top of each page and the top title.
0 = a formfeed between pages.
NULL text
Replace a null value with 'text'
The NULL clause of the COLUMN command will override this for a given column.
NUMF[ORMAT] format
The default number format.
see COLUMN FORMAT.
NUM[WIDTH] {10|n}
The default width for displaying numbers.
PAGES[IZE] {14|n}
The height of the page - number of lines.
0 will suppress all headings, page breaks, titles
PAU[SE] OFF
press [Return] after each page
enclose text in single quotes
RECSEP {WR[APPED]|EA[CH]|OFF}
Print a single line of the RECSEPCHAR between each record.
WRAPPED = print only for wrapped lines
EACH=print for every row
RECSEPCHAR {_|c}
Define the RECSEPCHAR character, default= ' '
SCAN OFF
OFF = disable substitution variables and parameters
SERVEROUT[PUT] OFF [SIZE n] [FOR[MAT] {WRA[PPED]|WOR[D_WRAPPED]|TRU[NCATED]}]
whether to display the output of stored procedures (or PL/SQL blocks)
i.e., DBMS_OUTPUT.PUT_LINE
SIZE = buffer size (2000-1,000,000) bytes
SHOW[MODE] OFF
Display old and new settings of a system variable
SPA[CE] {1|n}
The number of spaces between columns in output (1-10)
SQLBL[ANKLINES] ON
Allow blank lines within an SQL command. reverts to OFF after the curent command/block.
SQLC[ASE] {MIX[ED]|LO[WER]|UP[PER]}
Convert the case of SQL commands and PL/SQL blocks
(but not the SQL buffer itself)
SQLPLUSCOMPAT[IBILITY] {x.y[.z]}
Set the behavior or output format of VARIABLE to that of the
release or version specified by x.y[.z].
SQLCO[NTINUE] {> |text}
Continuation prompt (used when a command is continued on an additional line using a hyphen -)
SQLN[UMBER] OFF
Set the prompt for the second and subsequent lines of a command or PL/SQL block.
ON = set the SQL prompt = the line number.
OFF = set the SQL prompt = SQLPROMPT.
SQLPRE[FIX] {#|c}
set a non-alphanumeric prefix char for immediately executing one line of SQL (#)
SQLP[ROMPT] {SQL>|text}
Set the command prompt.
SQLT[ERMINATOR] {;|c|OFF|ON}|
Set the char used to end and execute SQL commands to c.
OFF disables the command terminator - use an empty line instead.
ON resets the terminator to the default semicolon (;).
SUF[FIX] SQL
Default file extension for SQL scripts
TAB OFF
Format white space in terminal output.
OFF = use spaces to format white space.
ON = use the TAB char.
Note this does not apply to spooled output files.
The default is system-dependent. Enter SHOW TAB to see the default value.
TERM[OUT] OFF
OFF suppresses the display of output from a command file
ON displays the output.
TERMOUT OFF does not affect the output from commands entered interactively.
TI[ME] OFF
Display the time at the command prompt.
TIMI[NG] OFF
ON = display timing statistics for each SQL command or PL/SQL block run.
OFF = suppress timing statistics
TRIM[OUT] OFF
Display trailing blanks at the end of each line.
ON = remove blanks, improving performance
OFF = display blanks.
This does not affect spooled output.
SQL*Plus ignores TRIMOUT ON unless you set TAB ON.
TRIMS[POOL] ON
Allows trailing blanks at the end of each spooled line.
This does not affect terminal output.
UND[ERLINE] {-|c|ON|OFF}
Set the char used to underline column headings to c.
VER[IFY] OFF
ON = list the text of a command before and after replacing substitution variables with values.
OFF = dont display the command.
WRA[P] OFF
Controls whether to truncate or wrap the display of long lines.
OFF = truncate
ON = wrap to the next line
The COLUMN command (WRAPPED and TRUNCATED clause) can override this for specific columns. -
@@ START command doesn't allow spaces in folder names
the initial start command:
START 'C:\Database\SQL Files\query.sql'
works, but within the query.sql file i have placed start commands that link other files:
@@ 'Formatting.sql'
When you run the start command, it locates the query file and executes fine, but when it tries to open the Formatting.sql file it seems to consider a space in the foldername as the end of the path, ie:
SP2-0310: unable to open file "C:\Database\SQL.sql"
Are there any ways to make the @@ command allow spaces like the original start command?
thanks for any repliesother than
START 'C:\DATABASE\SQLFIL~1\QUERY'
no
Message was edited by:
Laurent Schneider
get the 8.3 name with DIR /X -
Copy command of SQLPLUS is failing
Oracle Version 8i.
When trying to use the copy command -in SQLPLUS- to copy the data from one database to the other, I am encountering the following error.
Error: SP2-0027: Input is too long (> 2499 characters) - line ignored
Reason for using the copy command is: Allows me to set commit points as against Insert into ... select * from command.
The table, I am copying has lot of columns and the number of characters in the script are more than 3000.
Where is the restriction of 2499 characters set? Is there a way to alter this?
Thanks
nullYou can export the table(s) and import into your database.
-
Backgrounding a start() command in WLST Interactive mode
I was wondering if there is a way to background the start('managedserver') command.
I am starting a large number of managed servers and waiting for each one to start would take a very long time.
Is there any efficient way to issue the start() command for multiple managed servers?
TIVYou run it with block=false
> start("managedserver", "Server", block="false") -
At the start-up COMMAND-LINE interface ( :/ root# ) asking someting i don't
*Please Help!!!*
i was on the net at a safe website, then my computer froze couldn't use OptionControlEscape to close the browser or other apps; so restarted the computer by holding the power button, when it came back after a long wait A BLACK SCREEN WITH COMMANDS TO ENTER: later i found out it called COMMAND-LINE INTERFACE appeared asking:
*DARWIN USER LOG IN:*
PASSWORD:
i didn't know what it was, i inadvertently, hit the RETURN key
ever since i try to start the computer the same COMMAND-LINE written:
:/root#
What ever i did, couldn't pass this point, it keeps returning the same:
:/root#
I read and tryed to fix it by fsck by typing
*/sbin/fsck -fy*
but had to type it after the :/root# which i couldn't get rit of it. And when i hit the return ket same :/root# line was returned to me...notjing was fixed.
i can't find my system cd, so from the things i have read at the *apple support site*, i should be able to fix it by starting up in *SINGLE MODE* then using the COMMAND-LINE and typing */sbin/fsck -fy* and hitting the RETURN-KEY should repair the disk...but it can not get rit of the :/roor# line...it keps returning this:
:/root#
I KNOW I AM CLOSE TO FIXING IT, PLEASE HELP ME.
THANK YOU SO MUCH.
Message was edited by: ErikErensHyLoCk wrote:Did you change your runlevel to 5 in inittab? Or are you starting kdm as a daemon?
# /etc/inittab
# Runlevels:
# 0 Halt
# 1(S) Single-user
# 2 Not used
# 3 Multi-user
# 4 Not used
# 5 X11
# 6 Reboot
## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:5:initdefault:
rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p
# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 38400 tty6 linux
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >& /dev/null
# End of file
AEMONS=(syslog-ng hal network cpufreq crond alsa fam apcid) -
TS4006 is there a way to undo the "Erase" command before the deletion starts?
is there a way to undo the "Erase" command before the deletion starts while the phone is turned off. In my case the erase is pending the phone being turned on. Now that I have found the phone, I don't want the deletion to happen. How can I undo the command before turning on the iPhone?
There's no way to block the remote wipe. But once it's been wiped, you can perform a restore from your backup on either icloud or itunes.
-
I keep getting the start menu and various programmes opening when I use a series of keys when working in my accounting programme, I am not using the command key and is very frustrating, can anyone help me? I am working on a Mac OS X Version 10.6.8, just need to know if I can reprogram the keys to stop this happening?
Safari browser and menu shortcuts:
http://docs.info.apple.com/article.html?artnum=42951
Mac OS X keyboard shortcuts:
http://support.apple.com/kb/HT1343
http://docs.info.apple.com/article.html?artnum=75459
Changing behavious of Function Keys:
http://support.apple.com/kb/HT3399?viewlocale=en_US
and more useful information on keyboard shortcuts here:
http://www.myfirstmac.com/index.php/mac/articles/mastering-keyboard-shortcuts
How to re-map individual keys:
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=ukelele -
Default directory for SQLplus GET or START command
I have 10g Express Edition running fine on my Windows machine.
Previously I wrote a lot of SQL and PL/SQL code for a UNIX environment. I want to run that same code from the command line (SQLplus). The trouble is my installation doesn't seem to want to allow me to change directories on my C:\ drive and I don't want to dump all my code into the C:\SQL directory.
How can I run SQL programs that are in a different directory? Should be simple I hope...
I have tried "HOST cd" but that doesn't seem to help.
Thanks!The trouble is my installation doesn't seem to want to allow me to
change directories on my C:\ drive and I don't want
to dump all my code into the C:\SQL directory.??
I want to run that same code from the command line (SQLplus)
How can I run SQL programs that are in a different directory?You must explicitly define path to SQL scripts.
SQL> @D:\sqldir\testsql\myscript.sqlCheers! -
my macbook won't start up i have used the option command p r while holding down power button but not done.. please help guys
It not polite to repost asking fro more help three minutes after initial post.
Recovery mode is Command & R keys after depressing and releasing the Power button for a normal startup.
OS X: About OS X Recovery - Apple Support
That only works for Lion and later.
What exactly happens when your try to boot to Recovery?
Try starting in Safe Mode resetting the SMC and NVRAM/PRAM
OS X: What is Safe Boot, Safe Mode?
Intel-based Macs: Resetting the System Management Controller (SMC)
About NVRAM and PRAM
What model MacBook Pro and what OSX version was on the Mac?
Have you tried booting from an OSX install DVD?
When you try to start doe the Power light light?
This is the Mac Pro desktop forum. I requested your post be moved to the MacBook Pro laptop forum. -
pls help me how to reboot my macbook air,.. because starting it up was not successful. the screen just turns blue after the apple logo appeared.
i know loads of people who have had this problem including me. The Java script update apparently had some virus that has overloaded the start up disk. I took to apple who said i have to have the machine rebuilt but first i have to go to a data recovery company to get back everything that was on it. Data recovery company have quoted me nearly £1000.
-
The sceen is now blue. The dock, all applications and every icon on the screen is gone. What remains is the apple start button and the drop down menus of whatever application I choose as "recent items" from the start menu.
I've tried to restart but it opens back to this.
Thanks.I restarted holding down the D key and it rebooted with everything. Yippee!
-
Running unix commands from sqlplus
I will like to change my directory from sqlprompt. What is the command to do that?
SQL>Don't think you can do what you want. The 'host' or '!' command in sqlplus spawns another shell, as soon as it returns the settings are back to the parent shell "the one that started sqlplus".
-
Adding more statements to the sql commands window
Hi, I'm using oracle database express edition10g and I just started using oracle.
And I'm having a problem adding more then one statement inside the sql commands gui window.
I write:
CREATE TABLE "testTable" (
"field1" VARCHAR2(2),
"field2" NUMBER(2,0),
"field3" NUMBER(2,0),
CONSTRAINT "Test_PK" PRIMARY KEY("field1")
Oracle reports: table created
I write
DROP TABLE testTable;
CREATE TABLE "testTable" (
"field1" VARCHAR2(2),
"field2" NUMBER(2,0),
"field3" NUMBER(2,0),
CONSTRAINT "Test_PK" PRIMARY KEY("field1")
Oracle reports: ORA-00911: invalid character
I remove the ; char
ORA-00933: SQL command not properly ended
I look in the help files and it sais that ; / and nothing is allowed to end a operation.
I gues ; is a valid char so it's reporting something else?
I tried pasting my code inside wordpad and even retyping it. Mayby I have a hidden char? =>same error.
When I run drop and create seperatly it works.
When I run both sql statements inside sql+ it works
What m I doing wrong?To run multiple SQL in one shot, you need to save them as SQL batch file,
Save your statements as recreate.sql
DROP TABLE testTable;
CREATE TABLE "testTable" (
"field1" VARCHAR2(2),
"field2" NUMBER(2,0),
"field3" NUMBER(2,0),
CONSTRAINT "Test_PK" PRIMARY KEY("field1")
);Then call it from SQLPlus,
@recreate.sql
Maybe you are looking for
-
Setting up iCloud and then .... stuck in a loop!
About 6 months ago I wanted to setup iCloud, for easier syncing between my iMac and iPad2. Several things went wrong. My iPad got stolen during setup. I had to change my AppleID. A few months later I bought a new iPad3. I wanted to continu the iCloud
-
I would appreciate any suggestions on creating/editing the user account on my second-hand thinkpad X61 tablet (running Vista Business) edition. I bought the laptop from ebay in Germany/Austria. When I switched it on, there were no options to create o
-
Automatic PO for Mvt type 101 & 161
Hi All, I need to creates Automatic PO for Goods Receipt with movement type 101 & 161. I have set Automatic PO check for both the mvt types. Vendor Master & Material Master has Auto PO check. Let me know how do i use 101 mvt type, which T-code should
-
hi, i send this axl to CM 6.1 as in CM 4.2 <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3
-
Imovie imports different image into project
I'm trying to create a slideshow using only jpg images. Sometimes (now frequently) when I drag a picture into the slideshow from iphoto, desktop, Adobe Bridge, or even straight out of downloads, the image that actually shows up in imovie is a previou