Re: Counterpart to MS Enterprise Manager?

From: Charles Hooper <hooperc2000_at_yahoo.com>
Date: Sun, 6 Sep 2009 06:12:48 -0700 (PDT)
Message-ID: <99eee832-2196-45cc-b8d3-a724ca66aa07_at_q35g2000vbi.googlegroups.com>



On Sep 6, 3:06 am, "Siegfried Heintze" <siegfr..._at_heintze.com> wrote:
> Hmmm... I'm looking all over and I cannot find this script window. It would
> be logical to have one!
>
> How about sqlplus? That should do the job? How do I specify my newly created
> database called SQLPOCKETGUIDE? Thru google searching I have learned how use
> the connect statement to switch users but I just cannot figure out how to
> switch databases. The MySQL command line client has a "use" command to
> specify the database and a "show database" command to show which database
> you are connected to.
>
> Does SQLPlus have similar commands? I've been searching and cannot find
> them.
>
> > If you want assistance in typing the SQL itself, then
> > SQL Developer is the tool to use.  Read on the help
> > about the connection string, it's really not very hard.
>
> Help where? Interenet google search? I clicked help on the Oracle
> Administration Assistant for Windows\Oracle Managed objects and searched for
> "connection strings" and it said "no topics found".
>
> > You'll need "netmgr" as well to create the connection
> > string.
>
> Huh? What is netmgr?
>
> Yeah but there are all flavers of connection strings! OLEDB, .NET and JDBC
> are just a few. For the SQL Developer do I use java connection string? Do I
> have to download the oracle JDBC drivers and set up the class path first?
> Which JDBC driver do I want? I think I want the KPRB driver but I'm not
> sure. There are several thin and thick JDBC drivers  to pick from!
>
> And what tool would I use to experiment with stored procedures?
>
> Will SQLPlus execute PL/SQL statements?
>
> I'm studyinghttp://www.orafaq.com/wiki/JDBCand I'm surprised I cannot find
> the explanation on how to specify the database in the connection string. I
> want to connect to my newly created databases and execute the script athttp://examples.oreilly.com/9780596526887/so I can play with the SQL
> examples in the book SQL Pocket Guide
> (http://oreilly.com/catalog/9780596526887/)
>
> Thanks,
> Siegfried

I have not experimented with the free version of Oracle's database product, but I believe that it is limited to a single database per computer. That might make it easy for you. When you open a Windows command prompt in preparation for starting SQL*Plus, you are able to specify the database name to connect to by setting the ORACLE_SID environment variable (this may be permanently set using the System Control Panel in Windows). For instance: C:\> SET ORACLE_SID=SQLPOCKETGUIDE Now when you connect to the database in SQL*PLus it will connect to the database (you will actually be connecting to the database instance) that you created (C:\> is the Windows command line prompt,

SQL> is the SQL*Plus command line prompt):
C:\> SQLPLUS /NOLOG
SQL> CONNECT MyUserName/MyPassword

There is another method, which might work without using the SET ORACLE_SID syntax:
C:\> SQLPLUS /NOLOG
SQL> CONNECT MyUserName/MyPassword_at_SQLPOCKETGUIDE

You could manually type the examples from the link that you provided, or process the whole script in a single command. For instance, assume that you unzipped the files from O'Reilly into the folder C:\Sample. A file named db2_sample_data.sql is included in the download from O'Reilly. To execute that script, enter the following in SQL*Plus: SQL> _at_C:\Sample\db2_sample_data.sql

Yes, SQL*Plus allows executing PL/SQL code blocks. You might also want to browse through this link:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm

The Oracle documentation also contains a reference for SQL*Plus.

I was impressed with the "Mastering Oracle SQL and SQL*Plus" book, which might be everything that you need to get started once you are able to make it into SQL*Plus:
http://www.amazon.com/Mastering-Oracle-SQL-Plus/dp/1590594487

A couple hints. Do not create objects while connected to the database as the SYS, SYSTEM, or internal users. Instead, create a user account, connect to that database, and create objects while logged in as that user.

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. Received on Sun Sep 06 2009 - 08:12:48 CDT

Original text of this message