Solved

SQLPlus and Example Oracle Scripts

Posted on 2004-09-16
4
3,929 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
Comment Utility
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
Comment Utility
Do:

c:\> sqlplus /nolog
SQL> @script

or

c:\> sqlplus /nolog @script
0
 

Expert Comment

by:Captive1180
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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 syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now