crystal reports 2d barcode font Executing SQL Scripts in SQL*Plus in Font

Creator Denso QR Bar Code in Font Executing SQL Scripts in SQL*Plus

Executing SQL Scripts in SQL*Plus
Quick Response Code Generation In None
Using Barcode creation for Font Control to generate, create QR Code JIS X 0510 image in Font applications.
www.OnBarcode.com
ANSI/AIM Code 39 Encoder In None
Using Barcode creator for Font Control to generate, create Code 3 of 9 image in Font applications.
www.OnBarcode.com
If you want to execute a SQL script, you have two choices: If you don t intend to make any changes before execution, just invoke the script by using the at sign (@). If the file containing the script is in the directory from which you started SQL*Plus, all you have to do is type the name of the file. If the command file is in a different directory, you have to give the full path for the file in order to run it in SQL*Plus. On UNIX systems, you can configure an environment variable called ORACLE_PATH to tell SQL*Plus where to look for a script. This way, you can put all your routine SQL scripts in one location, and you don t need to specify the complete path for the file each time you want to execute an existing script. On my UNIX servers, for example, this is how I set the variable: $ export $ORACLE_PATH=/u01/app/oracle/admin/dba/sql On Windows systems, you can edit the Windows registry to specify the ORACLE_PATH variable.
GS1 - 13 Generator In None
Using Barcode drawer for Font Control to generate, create EAN 13 image in Font applications.
www.OnBarcode.com
QR Code Printer In None
Using Barcode drawer for Font Control to generate, create QR Code 2d barcode image in Font applications.
www.OnBarcode.com
CHAPTER 12 USING SQL*PLUS AND iSQL*PLUS
UPC Code Drawer In None
Using Barcode creation for Font Control to generate, create UPCA image in Font applications.
www.OnBarcode.com
Barcode Encoder In None
Using Barcode creation for Font Control to generate, create Barcode image in Font applications.
www.OnBarcode.com
Listing 12-9 shows a script called status.sql being run it is in the directory from which SQL*Plus was invoked. Listing 12-9. Using the at (@) Command to Execute a Script SQL> @status.sql USERNAME STATUS PROCESS SID SERIAL# -----------------------------------------------------------ACTIVE 2076 1 1 ACTIVE 2080 2 1 ACTIVE 2084 3 1 ACTIVE 2088 4 1 ACTIVE 2092 5 1 ACTIVE 2096 6 1 SYSTEM ACTIVE 1856:444 8 58 7 rows selected. SQL> The status.sql script is run in Listing 12-9 without any path information, because it is located in the same directory from which you logged into SQL*Plus. You can run a script located in a different directory by entering the complete path of the script s location, as in @/u01/app/oracle/admin/dba/ sql/status.sql. You can also execute the status.sql script by just typing the command run status.sql. The RUN command will execute the contents of the specified file. Or, if your SQL commands are actually listed on the screen (that is, stored in the SQL*Plus buffer), you can use the / command to execute the SQL code. Listing 12-10 shows the use of the / command. Note that when you use the / command to execute a script, the commands aren t listed again. Instead, the / command executes the contents of the SQL*Plus buffer. Listing 12-10. Using the / Command to Execute a Script SQL> / USERNAME STATUS PROCESS SID SERIAL# -----------------------------------------------------------ACTIVE 2076 1 1 . . . 7 rows selected. SQL> You could also have used the RUN command instead of the / command, and your SQL would have been executed the same way. The RUN command lists the contents of the script it just executed, unlike the / command, which doesn t show the code in the SQL*Plus buffer that it s executing. The RUN command is shown in Listing 12-11. Listing 12-11. Using the RUN Command to Execute a Script SQL> RUN status.sql 1 SELECT username,status 2* FROM v$session USERNAME STATUS ------------------------------ -------ACTIVE ACTIVE ACTIVE ACTIVE ACTIVE
PDF-417 2d Barcode Creation In None
Using Barcode drawer for Font Control to generate, create PDF-417 2d barcode image in Font applications.
www.OnBarcode.com
Code 93 Extended Creator In None
Using Barcode encoder for Font Control to generate, create Code 93 Full ASCII image in Font applications.
www.OnBarcode.com
CHAPTER 12 USING SQL*PLUS AND iSQL*PLUS
Making QR Code JIS X 0510 In Objective-C
Using Barcode generation for iPhone Control to generate, create Denso QR Bar Code image in iPhone applications.
www.OnBarcode.com
Printing QR Code 2d Barcode In None
Using Barcode creation for Office Excel Control to generate, create QR Code image in Microsoft Excel applications.
www.OnBarcode.com
SYSTEM 7 rows selected. SQL>
Barcode Creation In None
Using Barcode encoder for Office Excel Control to generate, create Barcode image in Microsoft Excel applications.
www.OnBarcode.com
Decoding Code 128B In .NET Framework
Using Barcode decoder for Visual Studio .NET Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
ACTIVE ACTIVE
Create Barcode In Java
Using Barcode drawer for Android Control to generate, create Barcode image in Android applications.
www.OnBarcode.com
DataBar Encoder In .NET Framework
Using Barcode generator for Visual Studio .NET Control to generate, create GS1 DataBar Expanded image in VS .NET applications.
www.OnBarcode.com
Caution When you invoke a script with the RUN command, the SQL is shown on the screen before it s executed. The / command won t show the SQL, but executes it right away. Because of this, you have to exercise extreme caution when you use the / command. The script in the buffer might not be what you intended to run.
GTIN - 12 Printer In Java
Using Barcode maker for Android Control to generate, create UPC-A Supplement 2 image in Android applications.
www.OnBarcode.com
Code39 Scanner In Visual Basic .NET
Using Barcode reader for .NET Control to read, scan read, scan image in VS .NET applications.
www.OnBarcode.com
Creating a Windows Batch Script
Painting ANSI/AIM Code 128 In None
Using Barcode generation for Online Control to generate, create Code 128 Code Set C image in Online applications.
www.OnBarcode.com
Barcode Printer In .NET
Using Barcode drawer for Reporting Service Control to generate, create Barcode image in Reporting Service applications.
www.OnBarcode.com
You can easily create a batch script in a Windows system to run your SQL*Plus commands. For instance, say you have a script file called testscript.sql that provides information about the users in your database. If you want to schedule this script to run at a specified time, you must first create a Windows batch file that invokes the testscript.sql script file. You can then use the Windows at scheduling utility, if you wish, to schedule the batch script. Here s a simple example. First create a batch file, named testbatch.bat, containing the following: sqlplus username/password@connect_identifier @C:\temp\testscript.sql notepad.exe C:\temp\output.txt The preceding batch file will start a SQL*Plus session, run the testscript.sql script, and output the results of the testscript.sql file into the output.txt file using the notepad executable.
QR Code Printer In Objective-C
Using Barcode printer for iPhone Control to generate, create QR Code 2d barcode image in iPhone applications.
www.OnBarcode.com
Create Barcode In VS .NET
Using Barcode drawer for Reporting Service Control to generate, create Barcode image in Reporting Service applications.
www.OnBarcode.com
Copyright © OnBarcode.com . All rights reserved.