Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Server > Re: Work with S...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 9 Topic 16531 of 17418
Post > Topic >>

Re: Work with SQL*Plus through command prompt windows

by "fitzjarrell@[EMAIL PROTECTED] " <oratune@[EMAIL PROTECTED] > May 8, 2008 at 11:13 AM

Comments embedded.
On May 8, 11:58=A0am, hpcasal...@[EMAIL PROTECTED]
 wrote:
> On May 8, 11:34=A0am, "fitzjarr...@[EMAIL PROTECTED]
" <orat...@[EMAIL PROTECTED]
> wrote:
>
>
>
>
>
> > On May 8, 11:17=A0am, hpcasal...@[EMAIL PROTECTED]
 wrote:
>
> > > Dear All,
>
> > > I have big problems trying to access a database using SQL*Plus
through=

> > > command prompt. I am a beginner DBA, and my first challenge is to
make=

> > > a backup and recovery of an Oracle9i database.
> > > I tried to access through SQL*Plus windows but it showed me "TSNames
> > > No listener"...

And the command you attempted which produced that output was ...

To verify if you're using a correct TNS alias you would type, at the
command prompt:

tnsping <whatever alias you want to use>

and see what tnsping re****ts.  Some sample successful output follows:

c:\sql>tnsping smudgepot

TNS Ping Utility for 32-bit Windows: Version 10.2.0.3.0 - Production
on 08-MAY-2008 13:06:39

Copyright (c) 1997, 2006, Oracle.  All rights reserved.

Used parameter files:
\\apps\database\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION =3D (ADDRESS_LIST =3D (ADDRESS =3D
(PROTOCOL =3D TCP)(Host =3D ZINGBOT.COM)(****t =3D 1529))) (CONNECT_DATA
=3D
(SID =3D SMUDGEPOT)))
OK (10 msec)

As you can see a successful ping returns a plethora of information; an
unsuccessful ping produces:

c:\sql>tnsping smort

TNS Ping Utility for 32-bit Windows: Version 10.2.0.3.0 - Production
on 08-MAY-2008 13:09:55

Copyright (c) 1997, 2006, Oracle.  All rights reserved.

Used parameter files:
\\apps\database\sqlnet.ora

TNS-03505: Failed to resolve name

which should be telling you the alias isn't defined in the
tnsnames.ora file.  This informative bit of text:

Used parameter files:
\\apps\database\sqlnet.ora

provides the networked location of a common tnsnames.ora file (the
sqlnet.ora and tnsnames.ora files are located in the same directory).
One would then investigate the tnsnames.ora file with any common  text
editor and find the proper alias for the database in question.

> > > and accessing using SQL*Plus through command prompt I
> > > could, but now...I can do anything else, I can't use RMAN, V$ .... I
> > > got completely lost..and I will appreciate so much any help.
>
> > > Thanks in advance for your time.
>
> > > Bets regards,
> > > BeginnerDBA
>
> > Since you won't supply the command you attempted to use to access an
> > Oracle database through SQL*Plus tell us why we should take our time
> > to try and solve an issue where no real information is available.
>
> > Post what you did and what error messages you received.
>
> > David Fitzjarrell
>
> Ok, I apologize....this is my first day as a real DBA after I finished
> college, no more practice...nothing ...this is real. Also, this is the
> first time using this tool to try to contact someone who could help
> me.

Understood.

> Well, after I launch SQLPlus in the command prompt I tried to see the
> blocks that I got corrupted after a hot backup, and I ran v
> $backup_corruption...and the only message I got was "unknown
> command".....

You cannot simply 'launch' SQL*Plus and expect to be able to do
anything worthwhile as you have yet to connect to a database.  One
presumes this is a client machine, and that your database of interest
is NOT local:

c:\sql>sqlplus /nolog

SQL*Plus: Release 10.2.0.3.0 - Production on Thu May 8 12:57:22 2008

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

SQL> connect ####/*********@[EMAIL PROTECTED]
>

At this point you are successfully connected to a database; one
wonders how you passed your courses without knowing HOW to connect to
an Oracle database.

Queries can now be executed from the SQL> prompt:

SQL> select * from v$backup_corruption;

no rows selected

SQL>

I am concerned that you are convinced that a database backup can be
taken from SQL*Plus;  nothing could be further from the truth.  RMAN,
a separate utility, is used for such tasks; it would be a wise person
who bookmarks the following link:

http://tahiti.oracle.com

and uses it religiously to learn the various aspects of Oracle and its
management.
=2E
> the thing is that if you could help me giving me some
> help what should I do...or may be some link where I can read ...I will
> do it....I just want to know which is the best way to make a backup
> and recovery by using the SQLPlus through command prompt
> window.........

The best way is to not make such an attempt; RMAN is the supplied tool
of choice for backups.

> Thanks- Hide quoted text -
>
> - Show quoted text -


David Fitzjarrell
 




 9 Posts in Topic:
Work with SQL*Plus through command prompt windows
hpcasalino@[EMAIL PROTECT  2008-05-08 09:17:32 
Re: Work with SQL*Plus through command prompt windows
"fitzjarrell@[EMAIL   2008-05-08 09:34:52 
Re: Work with SQL*Plus through command prompt windows
hpcasalino@[EMAIL PROTECT  2008-05-08 09:58:56 
Re: Work with SQL*Plus through command prompt windows
sybrandb@[EMAIL PROTECTED  2008-05-08 19:18:40 
Re: Work with SQL*Plus through command prompt windows
Arch <send.no@[EMAIL P  2008-05-08 15:53:04 
Re: Work with SQL*Plus through command prompt windows
hpcasalino@[EMAIL PROTECT  2008-05-08 10:31:51 
Re: Work with SQL*Plus through command prompt windows
joel garry <joel-garry  2008-05-08 10:33:14 
Re: Work with SQL*Plus through command prompt windows
hpcasalino@[EMAIL PROTECT  2008-05-08 10:39:38 
Re: Work with SQL*Plus through command prompt windows
"fitzjarrell@[EMAIL   2008-05-08 11:13:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 14:56:22 CST 2008.