当前位置:网站首页>Record the problems encountered in importing the DMP file into Oracle database (on the local wire) and the solutions
Record the problems encountered in importing the DMP file into Oracle database (on the local wire) and the solutions
2022-06-09 04:33:00 【If time comes again】
install oracle Environmental Science (instantclient)
Because... Has been installed on the line oracle Complete version database , Then you only need to install instantclient You can import data
Please refer to :https://blog.csdn.net/admin_web/article/details/125103786
Use navicat Tool View oracle data
open navicat After the tool, select... In the menu bar file -> make new connection ->oracle, Enter the address of the connection 、 port 、 service name 、 User name, password .
Service name is installation oracle It's set at , The default is ORCL
If you want to use sysdba After selecting advanced, the user selects the role as sysdba
Ready to start importing
1. Log in to the online server oracle database , Use sqlplus / as sysdba Create a new tablespace after the superrule role enters 、 Users and assigning permissions to users
Create tablespace
( Every self increment of table space 200m)
create tablespace MY_TAB datafile 'D:\oracle\oradata\DANTE_TEMP.DBF' size 4096M AUTOEXTEND ON NEXT 200M
Configure multiple storage files for the same tablespace
-- Add a certain number of data files as needed
alter tablespace MY_TAB add datafile 'D:\oracle\oradata\DANTE_TEMP2.dbf' size 320m autoextend ON next 100 m maxsize unlimited;
alter tablespace MY_TAB add datafile 'D:\oracle\oradata\DANTE_TEMP3.dbf' size 300m autoextend ON next 100 m maxsize unlimited;
alter tablespace MY_TAB add datafile 'D:\oracle\oradata\DANTE_TEMP4.dbf' size 300m autoextend ON next 100 m maxsize unlimited;
Create users and allocate tablespaces to them
create user mytest( user name ) identified by 123456( password ) default tablespace MY_TAB( Table space name );
Assign permissions to users
GRANT CONNECT,RESOURCE,DBA TO c##mytest;
Connect role
Is a typical right granted to end users , The most basic rights , Be able to connect to Oracle In the database , And when you have access to other users' tables , do SELECT、UPDATE、INSERTT Wait for the operation .
Alter session– Modify session ;
Create cluster– Build clusters ;
Create database link– Establish a database connection ;
Create sequence– Set up a sequence ;
Create session– Establish a conversation ;
Create synonym– Build synonyms ;
Create view– Create view .
Resoure role
It's for developers , Be able to create tables in your own solution 、 Sequence 、 View etc. .
Create cluster– Build clusters ;
Create procedure– Establishment process ;
Create sequence— Set up a sequence ;
Create table– Build table ;
Create trigger– Set up the promoter ;
Create type– Build type .
DBA role
It's for the system administrator , Users with this role can become system administrators , It has all the system permissions .
2. Use imp The order will be local dmp File import to online oracle in
Use imp -help Command to view all parameters
imp user name / password @ip Address : Port number / service name file= To import dmp file full=y indexes=N log= journal statistics=none
full=y : Import all data of the file ,
indexes=N : Whether to import table index N no Y yes , Default Y
rows=N : Import data lines (Y) ,N Only import table structures
statistics=none : Do not import or re count database statistics
DATA_ONLY=Y : Just import data
imp mytest/[email protected]:1521/ORCL file=D:\upload_file\orcl1.dmp full=y indexes=N log=D:\upload_file\orcl.log statistics=none
Export table mechanism only
exp mytest/[email protected]/orcl file=D:\tablejg.sql rows=n // Derived table structure
Use bat The batch will dmp File import to server
Pictured : To import dmp Files are placed in the same directory 
a.bat
@echo off
setlocal EnableDelayedExpansion
set localPath=./
set host=xx.x.xx.xxx
set user=mytest
set pwd=123456
set num=0
for /r %localPath% %%i in (*.dmp) do (
set /a num+=1
imp %user%/%pwd%@%host%/ORCL file=%%i full=y statistics=none indexes=N DATA_ONLY=Y log=%localPath%\!num!_s2.log
)
pause
Problems encountered during import
problem ------------

Cause analysis : After inquiry , It is found that the cause of this error is the database statistics . But the deeper reason , It's not clear . For the time being, I understand that , Because the default import policy is statistics=always, This strategy requires that the original database statistics must be imported , This strategy , I still think there is something wrong , Database statistics , Because the new database version is used , Original statistics , Basically 80% The left and right statistics should be incorrect , So why should the import policy default to statistics=always Well . therefore , My decision is not to import or recalculate database statistics .
Reference resources :https://blog.csdn.net/weixin_35986494/article/details/116441481
resolvent : Add... To the import statistics=none
problem ------------
Cause analysis : It may be due to permissions or imported dmp The table fields in the file are inconsistent with those on the server ( What I met was the latter )
resolvent :
1. Re export after unifying the required table fields
2. Append the missing fields to the imported data table , Pictured above : take "DATASRC" Fields are appended to the imported table
边栏推荐
- Hisi3559av100, Mipi camera input interface debugging
- 数据库连接问题,换版本后无法获取连接
- 2022安全员-C证考试练习题模拟考试平台操作
- 17billion parameters, 28 open test sets SOTA, the industry's largest unified visual multi task model
- MMdet修改检测框字体大小、位置、颜色、填充框
- 微信小程序开发的页面组件
- golang---并发Goroutine
- hisi3559av100,MIPI相机输入接口调试
- proteus仿真Arduino
- 模板:常系数齐次线性递推(线性代数、多项式)
猜你喜欢

API 网关 Apache APISIX 在 AWS Graviton3 上的安装与性能测试

微信小程序:(异常)Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ 解决方案和分析流程(这里一定有你要的答案)

Database connection problem, unable to obtain connection after version change

Dart: Foundation

openGL_01-創建窗口

Golang - - paquet d'exécution simultané

golang---并发Goroutine

JVM interview

"Diwen Cup" electronic design competition of Hunan University of Arts and Sciences was successfully concluded

openGL_05 Shader的简单应用
随机推荐
P5354 [Ynoi2017] 由乃的 OJ(树剖、位运算)
Template: constant coefficient homogeneous linear recurrence (linear algebra, polynomial)
[SWPU2019]ReverseMe
Audio power amplifier circuit (used voice scheme circuit record)
Applets have become a must for super apps, competing for private domain "reserve"
big. js、bignumber. JS and decimal JS differences
How is the little red dot that you can't help but click when you see it on the app realized?
Win10注册表无法保存对权限所作的更改拒绝访问
My creation anniversary
软件测试(二)
Mysql 查询数据库中哪个表的字段个数最多
(3) Data binding instructions
(5) 双向数据绑定
(2) V-cloak instruction
2022年R2移动式压力容器充装考试模拟100题及模拟考试
API 網關 Apache APISIX 在 AWS Graviton3 上的安裝與性能測試
Lua operator
状态模式模拟电梯运行
PHP e-signature SaaS API docking process
Principle analysis of the bottom plate of Ruixin micro rk3399 development board