修改oracle参数设置 - ashorefish/-software-test GitHub Wiki

SQL> alter system set sga_max_size=4096M scope=spfile; System altered. SQL> alter system set sga_target=4096M scope=spfile; System altered. 如果是RAC环境,需要这样增加sid='': alter system set sga_target=20G scope=spfile sid='';

SQL> alter system set shared_pool_size=0 scope=spfile;---系统自动管理 System altered.

oracle scope=both和scope=spfile区别

scope=both
scope=spfile
Oracle spfile就是动态参数文件,里面设置了Oracle 的各种参数。所谓的动态,

就是说你可以在不关闭数据库的情况下,更改数据库参数,记录在spfile里面。更改参数 的时候,有4种scope选项,scope就是范围。 scope=spfile 仅仅更改spfile里面的记载,不更改内存,也就是不立即生效,而是等 下次数据库启动生效。 有一些参数只允许用这种方法更改,scope=memory 仅仅更改内存,不改spfile。也就是下次 启动就失效了 scope=both 内存和spfile都更改,不指定scope参数,等同于scope=both。 show parameter sga; show parameter shared_pool;

ORACLE在10g以后的版本中提供了新的迁移工具EXPDP/IMPDP,此工具无需设置客户端字符集,而是由ORACLE自动去识别并完全字符集的转换。这是因为EXPDP/IMPDP并不是完整意义上的客户端,它和EXP/IMP/sqlplus并不完全一样。它只是向oracle传输了一个命令,oracle在内部生成一个任务,文件只能导出在服务器上,而不能像exp/imp一样将文件导出到远程端。但前提依然是,目标数据库的字符集应是源数据库字符集的超集。

expdp system/orcl@导出数据库网络服务名 impdp system/orcl@导入数据库网络服务名

或者你set Oracle_Sid= 切换一下,连网络服务名都不用配了

IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'Oracle_Database returns one entry for each database that is managed by Oracle Enterprise Manager. View entries are created using the databases that are known to the Enterprise Manager Management Repository. Note: A Real Application Cluster is presented... IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'Oracle_DatabaseInstance contains one entry for each Oracle Instance that is centrally managed. A Real Application Cluster has one entry for each of the instances that manipulate it. Instances of Oracle_DatabaseInstance are created using the database ... IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'An Oracle_DatabaseSystem represents the existence of an Oracle database environment as a manageable entity. Instances of Oracle_DatabaseSystem are used to navigate to the software characteristics of the database environment that are modeled within the... IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'The AssociatedDBSystem association identifies the database system that was used to create the database.This association links an Oracle Database with thedatabase system elements that are related.' IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'The InstanceAvailableToDB association relates an Oracle database and its instances.' IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'Oracle_DBInstanceStatistics contains statistics for a database instance. These are retrieved from the Oracle Managment Repository that is managing the database upon request from a managment client.' IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'Oracle_DatabaseStatistics provides current information about the statistics for a database. Database statistics pertain to the database and have the same value regardless of the database instance that is used.' IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'Oracle_CurrentDBInstanceStats is an association that relates a Oracle database instance to its current statistical information.' IMP-00032: SQL statement exceeded buffer length IMP-00008: unrecognized statement in the export file: 'Oracle_CurrentDBStatistics is an association that relates a Oracle database to its current statistical information.' 导入语句后面加个 buffer=100000000 重导吧