192.168.2.1访问192.168.3.126的数据库服务器(Linux下的oracle)
使用SSH Secure File (SSH Secure File Transfer Client互相传文件免去了DOS下FTP上传文件、SSH Secure Shell Client登录)
1.SSH Secure File Transfer Client
使用DOS命令FTP上传文件给另一台服务器
2.SSH Secure Shell Client登录进入另一台服务器的oracle(用户名密码oracle)
创建表空间,用户密码
--创建表空间
create tablespace elearning
logging
datafile ‘elearning.dbf' --物理存放位置
size 100m --初始大小
autoextend on --自动增长
next 10m maxsize 1000m --最大大小
extent management local --其他属性默认 extent-范围
--创建用户指定密码
create user elearning identified by elearning
default tablespace elearning --指定默认表空间
grant connect, resource, dba to elearning --赋予权限
以下步骤是导入的
2、 连接数据库:sqlplus sys/orcl@orcl as sysdba
3、 创建表空间 create tablespace egg datafile 'C:\/egg.dbf' size 100M autoextend onmaxsize unlimited;
4、 创建用户 create user egg identified by orcl default tablespace egg accountunlock;
5、 用户授权 grant connect,resource,dba to egg;
6、 imp egg/orcl@orcl file=c:\/egg.dmp fromuser=egg touser=egg ignore=y(此句直接用于CMD命令下,注意,fromuser是数据导出时的用户名,touser是你现在导入数据要使用的用户名)
7、 连接数据库:sqlplus egg/orcl@orcl as sysdba
可以使用select语句对egg的table进行查询。成功了。
imp elearning/elearning@orcl file=c:\/elearning.dmp full=y ignore=y
Failed to open expat.dmp for read出错后,(学习一下Linux命令)
pwd显示当前目录
ls打印出当前目录的清单