From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Help for sql-oracle mode Date: Fri, 29 Feb 2008 21:35:31 +1100 Organization: Rapt Technologies Message-ID: <87ve48yrrg.fsf@lion.rapttech.com.au> References: <87bq614hvo.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204282078 18122 80.91.229.12 (29 Feb 2008 10:47:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Feb 2008 10:47:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 29 11:48:21 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JV2mr-0007g4-D7 for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Feb 2008 11:48:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JV2mK-0008Q3-FR for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Feb 2008 05:47:48 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.news-service.com!feeder1.cambrium.nl!feed.tweaknews.nl!138.199.65.86.MISMATCH!sn-xt-ams-06!sn-xt-ams-03!sn-post-ams-01!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:yOngTbthe+H4PuihXtJPG000Q38= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 88 Original-Xref: shelby.stanford.edu gnu.emacs.help:156596 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51966 Archived-At: Misskiss writes: > Tim X writes: > >> >> Can you access the database just running SQL-Plus? Oracle is natorious >> for providing misleading error messages. For example, you will get that >> same error message if you specify the wrong SID. The first thing I wold >> do is try >> >> sqlplus DB1 >> >> and hit enter when prompted for the username and password. If that >> works, then we know the problem isn't with Oracle and have to look >> closer at sqlplus. >> >> Tim >> >> P.S. >> >> I've never seen an Oracle database that didn't require a username - the >> username determines the schema - I guess you can have one, just never >> come across it before. >> -- >> tcross (at) rapttech dot com dot au >> > > Thanks a lot for the help! I tried "sqlplus DB1", it's the same problem, > I still cannot login DB server. However, if I use a GUI tool to login > the server, leave both user name and password as blank, I can login the > server. It's really unconvininet for me... Is there any good solutions? > > Thanks a lot! > You could try starting sqlplus and then use its internal command to connect to a database (sorry, can't remember exactly what its called and I don't have sqlplus here). Another alternative would be to see if you can find out what/how the GUI tool is doing it - possible if youhave the sources. Apart from that, I would try specifying just the schema name for the username and a blank password. This might work as the username usually determines what schema within the database instance you access. It could be that if you don't specify a user, sqlplus doesn't know what schema to log you into. Oracle is a bit different from other databases in that different users normally have different schemas. To some extent, a 'database' in oracle speak is really an instance of the DBMS and each schema is similar to what other DBMSs would call a database. I've worked on sites where there is only one Oracle 'instance' which has many 'databases' and its the username that specifies the database. Of course, the real solution is to have a username and password. Its extremely unusual to have an Oracle database without either. I actually find it very unusual to be using Oracle and have a totally open database. Its not the sort of DBMS you would use for trivial jobs and most more serious jobs require som level of security. Are you certain there is no username and password? Is it possible that the GUI tool you use to access without one actually has a username/password configured somewhere and it just uses that if you don't provide one? The other thing to look at would be the sqlplus manual. Its possible that there is a way to put stuff in the rc file that will make this work. The other thing to look at is the database itself. Oracle has a number of settings that control who can create sessions and limits on those sessions. It is possible that the GUI tool uses a diffeent connection method to sqlplus (Oracle supports many different connection methods) and that you can only connect without a username/password if you are using a specific method. If your not the DBA, then I would definitely talk to the DBA regarding this. Oracle is a huge complex beast and you really need to know how it has been configured for the specific database your trying to use. HTH Tim > -- > > You are always busy. > I'm usually busy procrastenating - very tiring! > > -- tcross (at) rapttech dot com dot au