当前位置:网站首页>Oracle database import data steps
Oracle database import data steps
2022-06-11 12:27:00 【Three years old, funny】
When we import data into the database , The routine steps are as follows :
The logged in user system Administrators
–【 Steps must be taken : Create tablespace 】
create tablespace test datafile 'G:\app\zky\oradata\hsp\test01.DBF' size 1024M autoextend on;
create tablespace ESB datafile 'G:\app\zky\oradata\hsp\ESB.DBF' size 1024M autoextend on;
create tablespace LIS datafile 'G:\app\zky\oradata\hsp\LIS.DBF' size 1024M autoextend on;
create tablespace EMR datafile 'G:\app\zky\oradata\hsp\EMR.DBF' size 1024M autoextend on;
notes :G:\app\zky\oradata\hsp\ESB.DBF Path the path to store the table space for your database , The above is the personal path ,autoextend on Increase the size of the table space .
–【 It's not necessary : Create user 】
create user ESB_USER identified by ESB_USER default tablespace test;
–【 It's not necessary : Create the role 】
create role ESB_ROLE;
–【 It's not necessary : Authorize roles 】
grant ESB_ROLE to ESB_USER;
–【 Steps must be taken : Create Import Directory , After creation, you need to put DMP Put the backup files of into this directory 】
create directory dump_file_dir as 'd:\expdp1';
–【 Steps must be taken :cmd function 】
–impdp user name / password @ database schemas= To import a, Users to import b, Users to import c directory=dump_file_dir dumpfile= Backup file .DMP logfile= Import log _in.log;
impdp system/[email protected] schemas=hsp,lis,esb_user directory=dump_file_dir dumpfile=2020031901.DMP logfile=2020031901_in.log;
— Grant the user name dba Authority
–grant connect,resource,dba to user name ;
grant connect,resource,dba to hsp_cp;
— to grant authorization ( Sign in sys User authorization )
grant select on sys.v_$session to hsp_cp;
Methods described
grant SELECT ANY DICTIONARY jurisdiction ( For all dictionary tables and views );
Grant this user select on sys.v_ s e s s i o n power limit , and send use Yes power limit use Household Yes v session jurisdiction , And use authorized users to v session power limit , and send use Yes power limit use Household Yes vsession Create common synonyms ( If granted public select on sys.v_KaTeX parse error: Expected group after '_' at position 38: …select on sys.v_̲session jurisdiction , And create a pair under this user sys.v_ s e s s i o n Of private Yes Same as The righteous word ( Yes The use Household , also Yes The Depending on the chart ) . v session Private synonym for ( For this user , Also for this view ).v session Of private Yes Same as The righteous word ( Yes The use Household , also Yes The Depending on the chart ).vsession yes v_$session Another name for
–【 Steps must be taken 】
– After importing the database, you need to PL/SQL Compiling invalid objects in
impdp hsp/test directory=lis_file_dir dumpfile=LIS20200526.dmp logfile=LIS20200526.DMP_in.log full=y table_exists_action=replace
All right. , What is mentioned above is the operation of conventional data , Generally no problem , Let's talk about special circumstances !
1, When we don't need all the data of a library , When only the data of a certain module is required , We need to import this into our local database . There is a little pit !
2, First install the general operation , Create tablespace , user , And then execute imp command .
impdp system/[email protected] schemas=hsp directory = dump_file_dir dumpfile =TEST.DMP logfile=export.log
cmd Window error :SYS_IMPORT_FULL_01 Invalid operation scheme , Invalid object table .
reason : Maybe it's a user conflict or permission problem , The scene is not easy to restore , The statement... Is used
impdp system/[email protected] directory=DUMP_DIR dumpfile=TEST.DMP logfile=export.log remap_schema=hsp:HSP table_exists_action=replace transform=segment_attributes:n
An error is as follows :
The reason is that the user is not given tablespace permissions and dba jurisdiction
— Grant the user name dba Authority
--grant connect,resource,dba to user name ;
Finally, optimize imp command :
impdp HSP/[email protected] directory=DUMP_DIR dumpfile=TEST.DMP logfile=export.log remap_schema=hsp:HSP
Success is like this :
At last, I put up some common sentences :
– With system The user login , Find the user to delete :
– Find user
select * from dba_users;
– Find the path to the workspace
select * from dba_data_files;
– Delete user
drop user hsp cascade;
– Delete tablespace
drop tablespace HSP_BLOB including contents and datafiles cascade constraint;
– Change user password
alter user HSP identified by HSP;
– Query directory location
SELECT * FROM dba_data_files ;
– Inquire about dba Catalog
select * from dba_directories;
– Delete directory
DROP DIRECTORY Directory name ;
for example : Delete the user name as LYK, The tablespace name is LYK
– Delete user , And cascading relationships are also deleted
drop user LYK cascade;
– Delete tablespace , And the corresponding tablespace files are also deleted
drop tablespace HSP_CLS including contents and datafiles cascade constraint;
– Query tablespace
SELECT t.tablespace_name, round(SUM(bytes / (1024 * 1024)), 0) ts_size
FROM dba_tablespaces t, dba_data_files d
WHERE t.tablespace_name = d.tablespace_name
GROUP BY t.tablespace_name;
边栏推荐
- 一些比较的常用网站
- Acwing50+Acwing51周赛+Acwing3493.最大的和(未完结)
- You call this shit MQ?
- 科海融生&正航,以信息化驱动管理升级,携手共迎数智未来
- Redis data type daily use scenarios
- Flip window join, interval join, window cogroup
- General O & M structure diagram
- 记一次 mysql 主从不同步问题排查
- Splunk certificate expired, making kV store unable to start
- Some common websites
猜你喜欢

Splunk健康检查orphaned searches
![Harmonyos application development -- General app interface framework appgeneralframework[app general framework][api v6]](/img/b6/d1d7d0e670af9505a4fabee76211c6.jpg)
Harmonyos application development -- General app interface framework appgeneralframework[app general framework][api v6]

Unity 游戏保护“大练兵”,一文读懂游戏事前防御

12. AQS of abstractqueuedsynchronizer

2、CompletableFuture

美创科技数据安全管理平台荣获2022数博会“领先科技成果奖”

Redis数据类型日常使用场景

2. Completablefuture

ftp服务器:serv-u 的下载及使用

flink 多流转换(侧输出流分流、Union、Connect) 实时对账app 的支付操作和第三方的支付操作的双流 Join
随机推荐
Jerry's CMD_ SET_ BT_ Name command format [chapter]
2022 vmvare download and installation tutorial on the latest official website (ultra detailed)
oracle删除用户后,却还可以使用该用户登录
C event bus
记一次 mysql 主从不同步问题排查
4、LockSupport与线程中断
CMD of Jerry's AI protocol_ SET_ BLE_ Visibility [chapter]
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xc5 in position 13: invalid continuation byte
Wechat applet startup page automatically jumps
解决Splunk kvstore “starting“ 问题
近期使用nodejs pinyin包时遇到的问题
oracle数据库导入数据步骤
换种方式实现阖家团圆,2022旗舰投影坚果J10S被种草
中间人攻击之ettercap嗅探
罗景:连接效率优化实践
Jerry's aicmd command [chapter]
Problems encountered recently when using nodejs Pinyin package
Specflow环境搭建
Oracle 将数据导出到CSV(Excel)文件的方法
Acwing50+acwing51 weeks +acwing3493 Maximum sum (open)