---
title: "设置sga和pga的值"
author: "wanglihu"
date: "2009-05-27T01:05:49Z"
tags: []
slug: "sga-pga"
draft: false
lastmod: "2009-05-27T01:05:49Z"
id: 397030
url: "https://wanglihu.iteye.com/blog/397030"
---

--设置sga的值
1)alter system set sga_max_size=256m scope=spfile; &&写入SPFILE,重启生效
2)alter system set sga_max_size=256m scope=memory; &&写入内存区,立即生效
3)alter system set sga_max_size=256m scope=both; &&即写入内存区,又写入SPFILE,默认为BOTH
--设置pga的值
1)alter system set pga_aggregate_target=10G;
2)alter system set sga_target=8G sid='fyweb' scope=both;