这几天使用Oracle的总结
如何创建表空间? 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>
好使了。。。汗

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.
