If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > dbaccess command line help for newbie.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-30-09, 10:42
moses_the_red moses_the_red is offline
Registered User
 
Join Date: Nov 2009
Posts: 1
dbaccess command line help for newbie.

Hi,

I'm starting a new job and have no informix experience whatsoever. I'm trying to map common things I'd do in postgres to informix, and I'm not having much luck.

The #1 thing I'm having a problem with is getting to be able to pipe in SQL commands contained in .sql files from the command line.

If I do:

$ dbaccess database_name testfile.sql

I get back:

951: Incorrect password or user username@mymachine-dat is not known on the database server.

Is there some kind of configuration file I could use to fix this? It seems to be getting a network based username. I've talked to various people at my company, and no one seems to know how to get this working (or sees the utility in being able to execute sql files at the command line). Any help is much appreciated. I'm on my own here.

Thanks in advance.

Moses
Reply With Quote
  #2 (permalink)  
Old 11-30-09, 11:27
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
1) Informix use the OS user as default to authentication
2) if executed the dbaccess from a remote machine, they use your logged user to connect, if they don't exists, you got this error 951)
Quote:
>finderr 951
-951 User username is not known on the database server.

The database server that you tried to access does not accept either
your user ID, the login name that is specified for the desired server
host in your ~/.netrc file, or the user name that is specified in the
USER clause of a CONNECT statement. If you are explicitly specifying
your user name in the ~/.netrc file or in a CONNECT statement, check
that the name is correct. If you do not have a valid user ID on the
server computer, see your system administrator. This message appears
with Version 6.0 and later.
3) dbaccess have some limitations with conection authentication...
4) Have a several ways to solve this..
a) configure a .netrc (client side)
b) configure a hosts.equiv (server side)
c) use the commando "connect" in your script and don't specify the database on the command: dbaccess - yourscript.sql
check the manual for more information: CONNECT
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #3 (permalink)  
Old 12-24-09, 21:03
jgeety jgeety is offline
Registered User
 
Join Date: Dec 2009
Posts: 1
Thanks for your solution. It identified that I left out one important piece of information
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On