如何创建表空间? create tablespace test logging datafile 'D:\oracle\oradata\orcl\test.ora' size 50m autoextend on next 50m maxsize unlimited extent management local; 如何创建用户? create user username profile default default tablespace te
如何创建表空间?
create tablespace test logging datafile 'D:\oracle\oradata\orcl\test.ora' size 50m autoextend on next 50m maxsize unlimited extent management local;
如何创建用户?
create user username profile default default tablespace test;
如何给用户赋相应的权限?
grant dba,connect,resource to username;
如何往创建的表空间里导入dmp数据?
imp username/userpassword@orcl file=D:/oracle/oradata/some.dmp full=y ignore=y
相应的导出如何操作?
exp username/userpassword@orcl file=D:/oracle/oradata/outputdata.dmp owner=username
视图的使用?发生视图丢失???我完善的一个模块其中的bug就是因为视图的丢失
数据库视图丢失。
晚上 11 点,我的 Oracle 又发生了一些事情。过程是这样的
白天我的项目部署后显示的数据不完全,所以想回家重新导入数据。但是我把用户相关的删除之后,删不掉 ora 文件,所以我就到 windows 的服务里关闭了所有的 Oracle 服务,然后把相关的 ora 文件删除了。但是之后在登录重新创建表空间时,总是提示: ORA-01033:ORACLE initialization or shutdown in progresss 即初始化或关闭正在进行中 , 登录不了。我启动 Oracle 服务也不行,还是报这个错误!重新启动也还是没有作用,还是不行。
20120717Oracle 使用报错 ora-01033 Oracle 初始化或关闭进行中
一下是网上搜索的文章,成功解决了这个问题
在此之前需要先连接上数据库
进入 cmd 命令模式,输入命令 sqlplus /NOLOG
进入到 sqlplus 模式,然后 connect 到 Oracle 用到的命令是
SQL>connect sys/change_on_install as sysdba
提示:已成功
使用一下命令删除相应的文件就好了。
SQL> startup
ORACLE instance started.
Total System Global Area 914358272 bytes
Fixed Size 2088184 bytes
Variable Size 528483080 bytes
Database Buffers 377487360 bytes
Redo Buffers 6299648 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 8 - see DBWR trace file
ORA-01110: data file 8: '/var/opt/gssyneeadb/gssy_neeadb.dbf'
SQL> ALTER SYSTEM SET "_allow_resetlogs_corruption"=TRUE SCOPE=SPFILE;
System altered.
SQL> shutdown
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 914358272 bytes
Fixed Size 2088184 bytes
Variable Size 528483080 bytes
Database Buffers 377487360 bytes
Redo Buffers 6299648 bytes
Database mounted.
SQL> alter database datafile '/var/opt/gssyneeadb/gssy_neeadb.dbf' offline drop;
Database altered.
SQL> shutdown
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 914358272 bytes
Fixed Size 2088184 bytes
Variable Size 528483080 bytes
Database Buffers 377487360 bytes
Redo Buffers 6299648 bytes
Database mounted.
Database opened.
SQL>
好使了。。。汗