Solved

SQLPlus and Example Oracle Scripts

Posted on 2004-09-16
4
3,952 Views
Last Modified: 2012-06-27
Tutorials on Oracle's website assume that I'm already in SQL*Plus.  They tell me to execute some script.  The script then does a
CONNECT system@orc1.world

First of all how do I get into SQL*Plus when it prompts me for a username and password?   Which account should be used to run these examples?
0
Comment
Question by:lcor
4 Comments
 
LVL 23

Expert Comment

by:seazodiac
ID: 12079225
what sqlplus are you talking about?  GUI version (it's called sqlplusw only for windows) or command-line?

they are using Command-line sqlplus to do script execution.


you can execute script in one of two ways :

1. first log in to database via sqlplus

I assume you are in windows:

C:\>sqlplus "system/manager@orcl.world"

then

SQL>@<file_path_to_script_file>


2. you can also execute a sql script directly

C:\>sqlplus "system/manager@orcl.world" @<script_file_name>
0
 
LVL 15

Accepted Solution

by:
ishando earned 500 total points
ID: 12079918
Do:

c:\> sqlplus /nolog
SQL> @script

or

c:\> sqlplus /nolog @script
0
 

Expert Comment

by:Captive1180
ID: 12083356
If you say ,you are in oracle then, you must be getting a dialog box which asks for a username ,password and host string

So enter username-  scott  
password- tiger
host string - enter server name if you are on a client machine else leave it blank


or

So enter username-  system
password- manager
host string - enter server name if you are on a client machine else leave it blank

OR


Try executing the following command on the command prompt  depending on where oracle is installed ----

c:\ connect scott/tiger@servername

or

c:\ connect system/manager@servername

All the best
0
 

Author Comment

by:lcor
ID: 12086778
ishando's solution was what I was looking for because I needed a way to log into SQLPlus without specifying username and password.  The Oracle example scripts do that for me.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question