我正在尝试从远程主机克隆Oracle 12c可插拔数据库,但是我收到的内部错误代码很少用于调试:
SQL> CREATE PLUGGABLE DATABASE CLONED_PDB FROM SRC_PDB@RCDB;
CREATE PLUGGABLE DATABASE CLONED_PDB FROM SRC_PDB@RCDB
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], [], [],
[], [], []
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], [], [],
[], [], []
两台机器都安装了Oracle 12c,并且我都有管理员访问权限。我也能够在远程主机上本地克隆,这让我觉得这是一个文件权限问题,但我不知道我需要chmod
。编辑过的脚本,在SQL * Plus中从localhost作为sysdba运行:
---------- REMOTE HOST ----------
-- Connect to remote host
CONN sys/password@//remotehost:1521/cdb0 AS SYSDBA
-- Drop existing user
DROP USER C##NEW_RCU;
-- Create user in remote PDB
CREATE USER C##NEW_RCU IDENTIFIED BY new_rcu;
-- Grant privileges to remote user
GRANT CONNECT, RESOURCE, DBA, CREATE SESSION, CREATE PLUGGABLE DATABASE TO C##NEW_RCU;
-- Connect to source PDB
ALTER PLUGGABLE DATABASE SRC_PDB CLOSE IMMEDIATE;
ALTER PLUGGABLE DATABASE SRC_PDB OPEN READ WRITE;
ALTER SESSION SET CONTAINER=SRC_PDB;
-- Grant create privileges to remote user
GRANT CONNECT, RESOURCE, DBA, CREATE SESSION, CREATE PLUGGABLE DATABASE TO C##NEW_RCU;
-- Connect to CDB
ALTER SESSION SET CONTAINER=CDB$ROOT;
-- Open source PDB in read-only mode
ALTER PLUGGABLE DATABASE SRC_PDB CLOSE IMMEDIATE;
ALTER PLUGGABLE DATABASE SRC_PDB OPEN READ ONLY;
---------- DESTINATION HOST ----------
-- Connect to destination host
CONN sys/password@//localhost:1521/cdb0 AS SYSDBA
-- Drop existing DB link
DROP DATABASE LINK RCDB;
-- Drop database if it exists
DROP PLUGGABLE DATABASE CLONED_PDB;
-- Create database link in root container
CREATE DATABASE LINK RCDB CONNECT TO C##NEW_RCU IDENTIFIED BY new_rcu USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=remotehost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=SRC_PDB)))';
-- DEBUGGING ONLY
SELECT SYSDATE FROM DUAL@RCDB;
-- Clone remote PDB
CREATE PLUGGABLE DATABASE CLONED_PDB FROM SRC_PDB@RCDB;
-- Open new PDB in read/write mode
ALTER PLUGGABLE DATABASE CLONED_PDB OPEN;
除最后2个命令外,所有内容(包括select sysdate from dual@rcdb
- 都按预期工作。
知道如何调试这个,或者我可以尝试让这个克隆工作的任何步骤?