今天在使用12C进行虚拟恢复目录测试的时候遇到这样的问题
在使用虚拟恢复目录用户连接我们我们的catalog的时候,报了如下的错误
[07:06:38 oracle(db)@kiwi admin]$ rman target sys/oracle@enmo catalog kiwi/kiwi@testdb
Recovery Manager: Release 12.1.0.2.0 - Production on Thu Oct 22 07:06:42 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ENMO (DBID=735078679)
connected to recovery catalog database
RMAN-07540: Cleanup is required for the VPC user schema
关于RMAN-07540的报错,我们查看12.1的官方文档 RMAN-07540: Cleanup is required for the VPC user schema
Cause: The VPC user specified in the connect string does have extra privileges granted.
Action: Execute '?/rdbms/admin/dbmsrmanvpc.sql' after connecting to a catalog database as SYS to cleanup VPC users schemas.
说是我们vpc的用户的权限过多,这个时候我们需要回收一部分的权限,我们可以通过下面的脚本来进行回收,按照它的提示来进行操作,不行,出现如下的提示
Usage: dbmsrmanvpc.sql <base catalog schema name> [...]
dbmsrmanvpc.sql -all
This script performs an upgrade of RMAN base catalog and corresponding
VPC users schemas to a new VPD model. RMAN base catalog schema names
have to be supplied as command line parameters. Up to 10 schema names
can be supplied per script execution. When -all is specified the
script attempts to detect the RMAN base catalog schemas automatically
and perform the upgrade.
我们还需要在后面添加一个-all的参数
@?/rdbms/admin/dbmsrmanvpc.sql -all
然后我们再连接catalog数据库的时候,问题排除
[07:13:44 oracle(db)@kiwi admin]$ rman target sys/oracle@enmo catalog kiwi/kiwi@testdb
Recovery Manager: Release 12.1.0.2.0 - Production on Thu Oct 22 07:13:45 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ENMO (DBID=735078679)
connected to recovery catalog database