首页 > 数据库 >Oracle Db Export and Import in Windows

Oracle Db Export and Import in Windows

时间:2022-09-20 10:44:27浏览次数:58  
标签:name db comfort Db Export user Oracle password

1: Export db from oracle server

exp SYSTEM/[email protected]:1521/XE owner=SYSTEM file=C:\Temp\test.dmp

SYSTEM is db admin user name

password is db admin user pw

127.0.0.1 is local address, 1521 is listen port, XE is service name

test.dmp is exported file

 

2: Make sure the new PC installed Oracle DB server first, and try below command do import

imp comfort/password@XE file=C:\Temp\XEPDB1.dmp log=C:\Temp\impXPDB1.log full=y

If hit any error here, eg: user name is not created.

ORA-65096: invalid common user or role name | SOLUTION with TERMINAL

So we start to create a user named comfort with below command:

step 1:
SYS /AS SYSDBA
step 2:
ALTER SESSION SET"_ORACLE_SCRIPT"=TRUE;
step 3(user name: comfort, pw: password):
CREATE USER comfort IDENTIFIED BY password;
step 4("comfort" is user name):
grant dba to comfort;

3: do import again with same command(use new create account):

imp comfort/password@XE file=C:\Temp\XEPDB1.dmp log=C:\Temp\impXPDB1.log full=y

 

4: connect to db with new account "comfort" and check db data

That is all for Oracle DB migration

 

Some additional infor here:

change default Oracle db listen port:

1. From your PC, click Start | Run
2. In the Run dialog box, type "regedit" and press Return
3. The registry will now be displayed
4. Expand the folder called [HKEY_LOCAL_MACHINE]\SOFTWARE\ORACLE

From my labtop i can find listener.ora & tnsnames.ora, change port here:
C:\app\SkyR\product\18.0.0\dbhomeXE\network\admin

Modify oracle db service name
run sqlplus from command windows, key in user name and pw: comfort/password
SQL> show parameter service_name;
SQL> alter system set service_names='XEPDB1';

 

标签:name,db,comfort,Db,Export,user,Oracle,password
From: https://www.cnblogs.com/renren0113/p/16710215.html

相关文章

  • StoneDB 亮相中国信通院OSCAR开源产业大会,石原子科技正式加入科技制造开源社区!
    2022年9月16日,由中国信息通信研究院(以下简称“信通院”)主办的“2022OSCAR开源产业大会"活动于北京成功举办。会上宣布,StoneDB发起厂商杭州石原子科技有限公司正式......
  • MongoDB 用户与权限
    1、创建查询role:custom_role,对dbidap_zl下的collection:tab1、tab2只有查询权限1)使用trs用户登录数据库2)切换到db:idap_zl创建role,替换示例中的collection,如果......
  • oracle时间增加一年、一月、一天
    目录oracle时间增加一年、一月、一天1、增加一年2、增加一月3、增加一天oracle时间增加一年、一月、一天numtoyminterval只能传年和月份的参数,也可以使用ADD_MONTHS对月......
  • oracle设置查询显示时间格式
    oracle设置查询显示时间格式当我们使用plsql客户端查询oracle数据库时间时,格式为带AM、PM,如果是中文环境,则会显示上午、下午,当我们需要导出insert语句时,会提示时间格式有......
  • 【数据库】OLE-DB、ODBC、ADO.NET、ADO、sql sever .net、 sqlite .net是什么
    概览OLE-DB、ODBC、ADO.NET、ADO、sqlsever.net、sqlite .net面像对象的数据库访问技术,可以将他们比喻为数据库应用程序和数据源之间的桥梁ODBC:访问关系型数据库OL......
  • MongoDB09-索引
    MongoDB的索引用于查询(find、findOne)和排序。如果倾向于在集合中大量使用排序,那么应该根据排序的需求添加索引。如果在一个没有索引的集合中对目标字段使用sort(),并且......
  • Oracle 11g第一次启动SQL Developer所出现的问题
    Oracle11g第一次启动SQLDeveloper提示缺少快捷方式1)问题复刻当第一次启动SQLDeveloper的时候提示我:“Windows正在查找SQLDEVELOPER.BAT。如果想亲自查找文件,请单击"......
  • Spring基础 02 | JdbcTemplate
    JdbcTemplateSpring对Jdbc的Api简单封装开发步骤1.导入Spring-jdbc、spring-tx坐标2.创建数据库表和实例3.创建jdbcTemplate对象4.执行数据库操作导入坐标<de......
  • Oracle同义词
    同义词概念Oracle的同义词(synonyms)从字面上理解就是别名的意思,和视图的功能类似,就是一种映射关系。它可以节省大量的数据库空间,对不同用户的操作同一张表没有多少差别;它......
  • Spring JDBC的使用
    概述​ Spring的JDBC模块负责数据库资源管理和错误处理,大大简化了开发人员对数据库的操作,使得开发人员可以从烦琐的数据库操作中解脱出来,从而将更多的精力投入编写业务逻......