Link to home
Start Free TrialLog in
Avatar of lcor
lcor

asked on

SQLPlus and Example Oracle Scripts

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?
Avatar of seazodiac
seazodiac
Flag of United States of America image

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>
ASKER CERTIFIED SOLUTION
Avatar of ishando
ishando
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Captive1180
Captive1180

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
Avatar of lcor

ASKER

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.