oracle数据tsql,Tsql 下建立oracle数据库步骤

在向导下 建立数据库   sqlplus下 -- 用system用户登录 sqlplus system/oracle@orcl -- 创建表空间 create tablespace longs datafile 'D:\long.dbf' size 100M autoextend on; --创建用户hll 密码hll create user hll identified by hll default tablespace longs; --授权 grant dba to hll; -- 退出用hll用户登录 sqlplus hll/hll@orcl 创建表。 请按上面的步骤操作。 注意Oracle的一些基本概念。 表空间:是一个逻辑的概念,是属于所有用户共享的。 表:是属于创建他的用户的。 --查看表空间 select * from dba_tablespaces ; --查看用户下的表: select * from user_tables; --查字段数: select count(1) from user_tab_cols where table_name = 'HELP' select count(*) from help; select count(1) from help; --修改表的某一列名字 alter table test rename column DEPT to DEPT_OLD; --往表中增加新的一列 alter table tb3 add AGE number; select * from v$database;--看数据库名称 select * from v$instance;--看数据库名称 select name from v$database; select instance_name from v$instance; select name from v$controlfile; D:\oracle\product\10.2.0\oradata ===================================================== 备份导出:直接在cmd下面 D:\oracle\product\10.2.0\db_1\BIN>exp hll/hll@orcl file=C:\hll.dmp; 导入 D:\oracle\product\10.2.0\db_1\BIN>imp hll1/hll1@orcl  file= C:\hll.dmp; 报异常 Import: Release 10.2.0.1.0 - Production on 星期五 12月 9 10:20:31 2011 Copyright (c) 1982, 2005, Oracle.  All rights reserved. 连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 经由常规路径由 EXPORT:V10.02.01 创建的导出文件 警告: 这些对象由 HLL 导出, 而不是当前用户 已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入 IMP-00031: 必须指定 FULL=Y 或提供 FROMUSER/TOUSER 或 TABLES 参数 IMP-00000: 未成功终止导入 oracle dmp 要求是低版本导出,高版本导入 导入语句 dmp后要有 分号。 D:\oracle\product\10.2.0\db_1\BIN>imp hll/hll@orcl file= C:\hll.dmp; full=y; ========================================================== Plsql下tools下导入.dmp文件, Import Tables   导出成.dmp Export tables   导进.sql文件 Tools Import Tables SQL Inserts下

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值