日期:2014-05-16  浏览次数:20491 次

Mac下连接远程Oracle数据库

基本步骤

1.打开终端,输入ssh看看

chenmatoMacBook-Pro:~ Nono$ ssh
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-I pkcs11] [-i identity_file]
           [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-W host:port] [-w local_tun[:remote_tun]]
           [user@]hostname [command]

2.连接远程服务器

chenmatoMacBook-Pro:~ Nono$ ssh root@10.1.1.1
root@10.1.1.1's password: 
用户名@ip地址:远程主机的用户名,ip地址后面不需要端口号。

tips:第一次链接是会提示一个什么RSA key什么的,输入“yes”回车就好了,然后输入登陆密。

3.登陆后进入数据库

Last login: Wed Apr  3 16:19:24 2013 from 10.1.1.1
[root@mydbtest ~]# su - oracle
[oracle@mydbtest ~]$ 

tips:     su空格-空格。


4.登陆数据库

[oracle@mydbtest ~]$ sqlplus 用户名/密码 

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 3 16:36:37 2013

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> 


5.执行sql语句准备装niubility。。。。


6

SQL> select *from my_user where userName = 'test';

    MARKID
----------
USERNAME
--------------------------------------------
PASSWD
--------------------------------------------
    SOURCE MEMBERTYPE
---------- ----------------------------------------
PROVINCE
----------------------------------------
SAFEEMAIL
--------------------------------------------
CREATEIP		       TRUENAME
------------------------------ ----------------------------------------
  CERTTYPE CERTCODE
---------- ----------------------------------------
PHONE					 LASTIP
---------------------------------------- ------------------------------
USERPHONE
----------------------------------------
USEREMAIL
..........

毫无格式。。

坑爹到此结束

请下载可视化界面客户端。。