Link to home
Start Free TrialLog in
Avatar of sniger
sniger

asked on

db2 connect on mac

I installed db2 express on mac, but how to connect to a remote database, i can't find db2connect command like on windows
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Did you read the Network Access section of the installation guide?

Access the database via the Terminal application.

Create the sample database:
>db2sampl

Start it up (assuming db2inst1 is the db2 user):
>sudo -u db2inst1 db2start

Test it:
>db2 connect to SAMPLE
>db2 list tables

YMMV depending on your OS X version. Seems that people have had difficulties installing on recent versions such Mavericks or Yosemite.
Avatar of sniger
sniger

ASKER

I'm reading this ,

when I tried to create an instance:   sudo ./db2icrt -u db2inst1 db2inst1
I got an error:  " The host name "server.local" is invalid. Specify a valid host name"

besides do you need to have a special db2 command interpreter to call "db2 connect" ?  Where is this command available ?
ASKER CERTIFIED SOLUTION
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial