Home  >  Article  >  Database  >  Oracle 修改schemas的方法一

Oracle 修改schemas的方法一

WBOY
WBOYOriginal
2016-06-07 15:53:211403browse

由于业务的要求需要对其中的一个schemas进行更名,通过搜索发现从Oracle 11.2.0.2后提供了两种更名的方法。

由于业务的要求需要对其中的一个schemas进行更名,通过搜索发现从Oracle 11.2.0.2后提供了两种更名的方法。

方法一:通过导入导出的方法修改schemas的步骤。
•Do a user-level export of user A
•create new user B
•import system/manager fromuser=A touser=B
•drop user A

测试环境:数据库有schemas ADM_IDCS,需要更名为 ADM_JDCS

操作步骤:

a)创建ADM_JDCS用户,,权限需要一样

CREATE USER ADM_IDCS

IDENTIFIED BY 'ADM_IDCS'

DEFAULT TABLESPACE USERS

TEMPORARY TABLESPACE TEMP

PROFILE DEFAULT

ACCOUNT UNLOCK;

b)adm_idcs的导出

expdp  system/oracle  directory=dir  dumpfile=full1.dmp schemas=adm_idcs

c)进行adm_idcs的导入

impdp system/oracle  directory=dir  dumpfile=full1.dmp  fromuser=adm_idcs touser=adm_jdcs

d)删除原来的adm_idcs用户

drop user adm_idcs cascade;

经过以上操作便完成了修改adm_idcs成adm_jdcs。

本文永久更新链接地址

Statement:
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 admin@php.cn