New to oracle database. Can you please help?

I click on Start > > sqlplus
I enter username System
Password then *.
* I leave the empty host string.

I hit connect system / *.
can * connect Alexandre / *.
then I Pat grant connect, resource of Alexander;

Then I type host and a command prompt window opens.

He has the command line C:\oracle\product\10.2.0\db_1\BIN >

All is well so far. I get connected and is also granted to connect.

Before this line I type edit xyz.sql

But I get a message that says * "Edit" is not recognized as internal or external command, an executable program or batch fichier.*

I AM NOT ABLE TO WRITE A PROCEDURE, BECAUSE I GET THE ABOVE MESSAGE.

I use Windows Vista Home Premium. I installed Oracle 10 g Exprees Edition for Vista (10.2.0.3)

Please help me.
Thank you.

sqlplus is what you want. Alternatively, the SQL Developer may be more intuitive if you're used to a GUI IDE, (that's another topic).

host is a sqlplus command that opens a command shell - you can get the world BACK on the Oracle database, where PL/SQL does not exist. It is used to temporarily leave the database and do something else at the system level without losing the current state of your sqlplus session.

Short answer: you need not order host for what you are trying to do. It is only adding to the confusion.

Example step by step (it's on Windows Vista Enterprise... Vista Home is the same)

I open a windows command shell

C:\Users\Brian>dir c:\
 Volume in drive C has no label.
 Volume Serial Number is 74D4-C846

 Directory of c:\

05/05/2009  10:31 PM              Autodesk
09/18/2006  04:43 PM                24 autoexec.bat
09/18/2006  04:43 PM                10 config.sys
10/05/2010  10:04 PM              inetpub
03/08/2009  04:47 PM              PerfLogs
10/11/2010  08:52 PM              Program Files
09/13/2010  06:55 PM              Users
10/05/2010  10:05 PM              Windows
               2 File(s)             34 bytes
               6 Dir(s)   3,747,790,848 bytes free

Clearly, I'm in the BACK at this point. Connect to the database using sqlplus

C:\Users\Brian>sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Feb 12 08:55:41 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: bbontrag
Enter password:

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------

XE

SQL>

Clearly I am now in the database

SQL> host
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Brian>dir c:\
 Volume in drive C has no label.
 Volume Serial Number is 74D4-C846

 Directory of c:\

05/05/2009  10:31 PM              Autodesk
09/18/2006  04:43 PM                24 autoexec.bat
09/18/2006  04:43 PM                10 config.sys
10/05/2010  10:04 PM              inetpub
03/08/2009  04:47 PM              PerfLogs
10/11/2010  08:52 PM              Program Files
09/13/2010  06:55 PM              Users
10/05/2010  10:05 PM              Windows
               2 File(s)             34 bytes
               6 Dir(s)   3,745,767,424 bytes free

The host of sqlplus command opens a new command shell and drops me it. I do order things (file system) Shell instead of being able to issue sqlplus commands until I have to leave the session host.

If you try to change xyz.sql NOW you are looking for a command on a computer named edit.exe or edit.cmd or something. My machine happens to have one - it is an old BACK (not Notepad) text editor

If you do not have edit.exe on your machine you get the DOS error ' 'Edit' is not recognized as internal or external command an executable program or batch file. "

C:\Users\Brian>exit

SQL>

I leave the shell and return to sqlplus. Here, I run the SQLPLUS to change the command, which opens your default text editor (usually Notepad)

SQL > edit xyz.sql

Notepad opens and I enter the following command:

create or replace procedure foo as
begin
 dbms_output.put_line('Hello, World');
end;
/

I save the file and exit in Notepad. I'm in sqlplus.

SQL> set serveroutput on size 1000000
SQL> @xyz.sql

Procedure created.

SQL> exec foo
Hello, World

PL/SQL procedure successfully completed.

SQL>

Tags: Database

Similar Questions

Maybe you are looking for

  • Vista on Portege M200 - some problems with nVidia display driver

    Hello I recently decided to update and perform a clean installation of Windows Vista on my Portege M200, now that Toshiba have released official drivers for this machine. Everything works fine, EXCEPT the nVidia display driver. I have the following q

  • Adding new address mail to permit red list - error 551

    Hello I just tried to add new e-mail addresses to the list of senders and always got error 551. I tried yesterday and today several times with different browsers. Please take a look at the screenshot (in German). Thank you!

  • How to open the file MRIMG

    I have documents saved on a hard drive, they are in what is called a MRIMGfile. Windows says itcan'topen it. What do do?

  • Clip + - Win XP - has worked at first, but now only shows connected, but no drive letter

    Yesterday I installed Sansa + 8 GB with success as well as Rhapsody and I could see the two drive letters for the Sansa. I loaded songs and played them. Today I can't see drive letters. Sansa appears as an icon on the desktop. As suggested, I tried u

  • It's going to be a Windows Media Player 13?

    They are working on a new Media Player?Finally added some useful 12 codecs, they tore the player... WHY?  I ask You can listen to, or watch a song and not do anything, it's so so DUMBthey would at least have so you could anchor the components to the