关于在Windows上安装和使用Oracle数据库过程中遇到的一些问题

黄舟
Release: 2017-06-05 09:47:38
Original
2104 people have browsed it

1.安装Oracle

Oracle软件是免费的,可以去官网下载相应的安装包。但是如果用于商业用途需要购买License。官网上针对各种平台,32位和64位都有,如果在Windows一般会下载到两个文件。以Oracle 11g为例,有两个zip压缩文件,注意安装前将两个压缩文件的内容解压后合并。安装提示监视器配置至少必须显示256种颜色,可以忽略。其他安装前置项检查,可能会闪退,实在不知什么原因,只能更换操作系统。注意安装目录不能是带空格或特殊字符的目录名,可以如C:\Oracle\。目前本人在Server 2008 R2英文版和Sever 2012 R2 英文版正常安装。安装完成后可见如下。

Database Control可以通过网页查看和管理数据库,每个数据库都有一个,通过端口区分,网址如https://机器名:1158/em(em应该是Enterprise Manager的意思)。注意在Window Server 2008 R2上安装时,最后创建数据库会报错:Oracle 配置数据上载到资料档案库时出错,是由于Window Server 2008 R2通过网络访问本地机器名会返回IPv6地址,但是Oracle Enterprise Manager只接受IPv4地址,即https://机器名,不会获得IPv4的地址。需要在host文件加上:

127.0.0.1 localhost
IPv4地址 机器名
Copy after login

Database Configuration Assistant创建配置和删除数据库。

Net Configuration Assistant网络相关配置,如监听程序。

SQL Developer开发管理工具,安装64位Oracle Database打不开,提示找不到JDK,即使正确指向Oracle自带的JDK也不行,搜索结果是需要32位的JDK,暂时忽略。

SQL Plus命令行工具,熟悉MySQL即很快上手。

image

Oracle还有个Oracle Client即客户端,Server上就不用了安装了,可以在其他需要连接Server的机器上安装,安装后会出现如上图一样的管理工具。

2.Oracle后台服务

每增加一个数据库就会增加一个Oracle实例,如下图有两个数据库ORCL和WIND情况下的后台进程

image

3.登陆Oracle

可以使用SQL Plus登陆测试,如果在创建数据库时没有创建专门的用户,那么可以使用SYS或SYSTEM账号登陆系统进行配置。SYS是最高权限,不能使用SYS直接登陆,会闪退。可以使用如下几种方式登陆让SYS使用别名登陆

C:\sqlplus
Enter user-name:sys
Enter password: yourpassword as sysdbaor
C:\sqlplus /nolog
SQL> conn sys/yourpassword as sysdba

or
C:\sqlplus sys/yourpassword as sysdba
Copy after login

The above is the detailed content of 关于在Windows上安装和使用Oracle数据库过程中遇到的一些问题. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!