[转帖]如何新建oracle数据库,图文流程。_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
2
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 1803 | 回复: 1   主题: [转帖]如何新建oracle数据库,图文流程。        上一篇   下一篇 
Richarddype
注册用户
等级:新兵
经验:66
发帖:1
精华:0
注册:2016-10-4
状态:离线
发送短消息息给Richarddype 加好友    发送短消息息给Richarddype 发消息
发表于: IP:您无权察看 2019-9-18 16:39:05 | [全部帖] [楼主帖] 楼主

系统环境:Windows server 2008 R2 企业版 SP1

软件版本:oracle 11g  win64位

默认oracle 11g 安装配置完成,我们该如何创建数据库?

我们就介绍最基本的方法,通过 DataBase Configuration Assistant 来创建一个新的数据库。

Database Configuration Assistant简称是DBCA,是创建、配置以及管理数据库的一个工具。

具体步骤如下:

1) 桌面点击“开始”--“所有程序”--“Oracle”--“配置和移植工具”--“Database Configuration Assistant”

或者  win+R--运行--cmd--dbca

北京联动北方科技有限公司

2)默认选择创建数据库--下一步

北京联动北方科技有限公司

3)默认选择一般用途或事务处理

北京联动北方科技有限公司

4)设置数据库的名称和实例名,两者可设置相同,也可以不同,默认为相同。单击“下一步”;

北京联动北方科技有限公司

5)默认选项--下一步

北京联动北方科技有限公司

6)此例为了实验测试,勾选了所有账户使用同一口令。(如正式数据库,推荐使用不同管理口令)

忽略口令安全提示--是

北京联动北方科技有限公司

7)默认选项:存储类型(文件系统)存储位置(使用模板中的数据库文件位置)--下一步

北京联动北方科技有限公司

8)默认指定快速恢复区

北京联动北方科技有限公司

9)数据库内容,根据需要,选择是否添加示例方案--下一步

北京联动北方科技有限公司

10)初始化参数,设置内存、字符集等。根据自己pc硬件情况调整内存大小。(由于我用的是VMware虚拟机,划分的内存比较小)--下一步

北京联动北方科技有限公司

11)默认选项--数据库存储,控制文件、数据文件、重做日志文件位置设置--下一步

北京联动北方科技有限公司

12)创建数据库、生成数据库创建脚本。--完成

北京联动北方科技有限公司

13)数据库-概要--确定

北京联动北方科技有限公司

14)数据库配置完成

北京联动北方科技有限公司

15)耐心等待

北京联动北方科技有限公司

安装过程中提示错误信息:

1)ORA-12154:TNS:无法解析指定的连接标识符

可能就是Oracle的服务没有开启。先检查一下他们。
首先右击桌面上的计算机(我的电脑)图标,点击管理。
在左边栏,展开“服务和应用程序”,点击“服务"选项。

也可以快捷键 WIN+R--services.msc
在中间的列表中找带有Oracle字样的服务,找到如图标志的两个服务,名字中的”ORA“可能会因数据库名字的不同而有所差异。右击-启动这两个服务
此时再尝试,如果仍然找不到主机。在打开开始菜单,在Oracle目录中找到”Net Manager“,打开它
依次展开 本地->服务命名->orcl66(数据库名)
检查右侧的主机名,如果是本机的话,填127.0.0.1或localhost,如果是连接到远程计算机的话,填入目标主机的IP。
Net Manager中的端口保持默认的1521即可

2)ORA-00922:原因:一般是语句的语法有问题。比如命名不对,关键字写错等等。对于非标准的命名,一般采用双引号来创建。

北京联动北方科技有限公司

具体原因:就是开始的用户密码的设置不符合规则,当时并不会报出。
解决办法:
标识符命名规则:
1、必须以字母开始。
2、长度不能超过30个单字节字符。
3、只能包括A-Z,a-z,0-9,_,$和#。
4、不能在相同用户下建立两个同名的对象。
5、不能使用保留字和关键字

选择“忽略”,也有可能出现ORA-28000: the account is locked(账户锁定),如图:

北京联动北方科技有限公司

3)ORA-28000

解决方法:

第一步:使用PL/SQL,登录名为system,数据库名称不变,选择类型的时候把Normal修改为Sysdba;
第二步:选择myjob,查看users;
第三步:选择system,右击点击“编辑”;
第四步:修改密码,把“帐户被锁住”的勾去掉;
第五步:点击“应用”再点击“关闭”;
第六步:重新登录就可以通过验证了;

4)ORA-13516 错误代码如下:

ORA-13516:AWR 操作失败:CATPROC not valid
ORA-06512:在"SYS.DBMS_SWRF_INTERNAL".line 206
ORA-06512:在"SYS.DBMS_SWRF_INTERNAL".line 239
ORA-06512:在line 1

测试机上安装11.2.0.4数据库进度到快80%的时候报ORA-13516: AWR Operation failed: CATPROC not valid.
当时在设置密码的时含有@符号。

上面讲到密码中包含空格或是特殊字符就可能会在dbca时出现以上错误.在建库的时候要避免使用空格或是特殊字符.

当然和密码中特殊字符相关的错误,也可能出现在rman中等.

个人觉得,oracle的密码,最好是只包含数字,字母,和($,#,_)这三个特殊字符,并且以字母开头会比较好.

将数据库对应的实例都启动起来。

链接 orcl66

cmd
SQLPLUS SYS/SYS@ORCL66  AS SYSDBA


北京联动北方科技有限公司




赞(0)    操作        顶端 
联动大白
注册用户
等级:列兵
经验:91
发帖:0
精华:0
注册:2015-5-27
状态:离线
发送短消息息给联动大白 加好友    发送短消息息给联动大白 发消息
发表于: IP:您无权察看 2019-11-14 0:30:00 | [全部帖] [楼主帖] 2  楼

为了方便大家阅读,我对文章中错误号来解释一下吧!

Error Id: ORA-12154

Title: TNS:could not resolve the connect identifier specified

Description:

TNS:could not resolve the connect identifier specified

Action:

- If you are using local naming (TNSNAMES.ORA file): - Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA) - Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible. - Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file. - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable. - If you are using directory naming: - Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA). - Verify that the LDAP directory server is up and that it is accessible. - Verify that the net service name or database name used as the connect identifier is configured in the directory. - Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier - If you are using easy connect naming: - Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA). - Make sure the host, port and service name specified are correct. - Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.

Cause:

A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.


Error Id: ORA-06512

Title: at stringline string

Description:

at stringline string

Action:

Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.

Cause:

Backtrace message as the stack is unwound by unhandled exceptions.


Error Id: ORA-13516

Title: AWR Operation failed: string

Description:

AWR Operation failed: string

Action:

check the above conditions and retry the operation.

Cause:

The operation failed because AWR is not available. The possible causes are: AWR schema not yet created; AWR not enabled; AWR schema not initialized; or database not open or is running in READONLY or STANDBY mode.


Error Id: ORA-28000

Title: the account is locked

Description:

the account is locked

Action:

Wait for PASSWORD_LOCK_TIME or contact DBA

Cause:

The user has entered wrong password consequently for maximum number of times specified by the user’s profile parameter FAILED_LOGIN_ATTEMPTS, or the DBA has locked the account


也许你已明白,但对一个人有用也是我存在的理由!^_^ By:持之以恒的大白

-- 来自: 北京联动北方科技有限公司



赞(0)    操作        顶端 
总帖数
2
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论