ORACLE游标问题(100分)

  • 主题发起人 主题发起人 jiabingli
  • 开始时间 开始时间
J

jiabingli

Unregistered / Unconfirmed
GUEST, unregistred user!
我在DELPHI中通过SQL语句处理ORACLE数据库时,尽管SQL语句中用了CLOSE并在
提交工作时用了COMMIT命令,但程序处理了14条工作后,总出现游标出现了最
大值的问题,使程序被迫中止。
特请教各位,如何处置游标问题。
 
具体代码???
 
there are a parameter max_open_cousor_count in init.ora file, you
can change it.
and cursor is normally closed by disconnecting the session
 
这不写着吗?在oracle初始化文件(init.ora)中的参数max_open_cousor_count设得太小,
改大一点就可以了。
 
我使用ORACLE8I版式本,在init.ora查找不到“max_open_cousor_count”参数,现将全文贴出如下,烦请各位分析解决:

##############################################################################

db_name = ORCL1

instance_name = ORCL1

service_names = ORCL1

db_files = 1024 # INITIAL
# db_files = 80 # SMALL
# db_files = 400 # MEDIUM
# db_files = 1500 # LARGE

control_files = ("c:/Oracle/oradata/ORCL1/control01.ctl", "c:/Oracle/oradata/ORCL1/control02.ctl")

db_file_multiblock_read_count = 8 # INITIAL
# db_file_multiblock_read_count = 8 # SMALL
# db_file_multiblock_read_count = 16 # MEDIUM
# db_file_multiblock_read_count = 32 # LARGE

db_block_buffers = 8192 # INITIAL
# db_block_buffers = 100 # SMALL
# db_block_buffers = 550 # MEDIUM
# db_block_buffers = 3200 # LARGE

shared_pool_size = 15728640 # INITIAL
# shared_pool_size = 3500000 # SMALL
# shared_pool_size = 5000000 # MEDIUM
# shared_pool_size = 9000000 # LARGE

java_pool_size = 20971520

log_checkpoint_interval = 10000
log_checkpoint_timeout = 1800

processes = 59 # INITIAL
# processes = 50 # SMALL
# processes = 100 # MEDIUM
# processes = 200 # LARGE

parallel_max_servers = 5 # SMALL
# parallel_max_servers = 4 x (number of CPUs) # MEDIUM
# parallel_max_servers = 4 x (number of CPUs) # LARGE

log_buffer = 32768 # INITIAL
# log_buffer = 32768 # SMALL
# log_buffer = 32768 # MEDIUM
# log_buffer = 163840 # LARGE

#audit_trail = true # if you want auditing
#timed_statistics = true # if you want timed statistics
max_dump_file_size = 10240 # limit trace file size to 5M each

# Uncommenting the line below will cause automatic archiving if archiving has
# been enabled using ALTER DATABASE ARCHIVELOG.
# log_archive_start = true
# log_archive_dest_1 = "location=c:/Oracle/oradata/ORCL1/archive"
# log_archive_format = "%%ORCL1%%T%TS%S.ARC"

# If using private rollback segments, place lines of the following
# form in each of your instance-specific init.ora files:
# rollback_segments = (r01, r02, r03, r04)

# If using public rollback segments, define how many
# rollback segments each instance will pick up, using the formula
# # of rollback segments = transactions / transactions_per_rollback_segment
# In this example each instance will grab 40/5 = 8
# transactions = 40
# transactions_per_rollback_segment = 5

# Global Naming -- enforce that a dblink has same name as the db it connects to
global_names = false

# Edit and uncomment the following line to provide the suffix that will be
# appended to the db_name parameter (separated with a dot) and stored as the
# global database name when a database is created. If your site uses
# Internet Domain names for e-mail, then the part of your e-mail address after
# the '@' is a good candidate for this parameter value.
# db_domain = us.acme.com # global database name is db_name.db_domain

# Uncomment the following line if you wish to enable the Oracle Trace product
# to trace server activity. This enables scheduling of server collections
# from the Oracle Enterprise Manager Console.
# Also, if the oracle_trace_collection_name parameter is non-null,
# every session will write to the named collection, as well as enabling you
# to schedule future collections from the console.
# oracle_trace_enable = true

oracle_trace_collection_name = ""
# define directories to store trace and alert files
background_dump_dest = c:/Oracle/admin/ORCL1/bdump
user_dump_dest = c:/Oracle/admin/ORCL1/udump

db_block_size = 2048

remote_login_passwordfile = exclusive

os_authent_prefix = ""

# The following parameters are needed for the Advanced Replication Option
job_queue_processes = 2
job_queue_interval = 10
open_links = 4

distributed_transactions = 500
mts_dispatchers = "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)"
# Uncomment the following line when your listener is configured for SSL
# (listener.ora and sqlnet.ora)
# mts_dispatchers = "(PROTOCOL=TCPS)(PRE=oracle.aurora.server.SGiopServer)"

mts_servers = 1
compatible = 8.1.0
[:)]
 
楼主,按楼上各位所说,将max_open_cursor_count加到你的初始化文件里(参数名是否正确不能保证)。
根据你的硬件条件,可以将其放大到千级别,缺省值很小。
另外,楼主的数据库在安装时选择的块大小太不合理了,只有2K。
不过楼主的程序还是需要注意的,在访问完数据库后,不再需要的控件一定要将其与数据库的关联断开,否则参数加的再大也有不够用的时候。
 
后退
顶部