第一次连接到数据库需要很长时间.... [英] the first connection to the database takes a long time....

查看:394
本文介绍了第一次连接到数据库需要很长时间....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我们在一台机器(A)上为数据库创建了一个备份映像文件,并且

我们在另一台机器(B)上恢复了数据库,使用了备份图片

文件。一切都很顺利。但是当我们尝试连接到B上的数据库

时,如果它是数据库中的第一个连接

,它将永远(大约1分钟) 。以下任何连接都没有问题。如果我们关闭

所有连接,并再次建立连接,则需要大约1

分钟。 B上的数据库以前不存在。它直接从那个db2 restore db db-name创建了

。命令。

我们在这样的数据库中做错了吗?我们是否需要调整任何配置参数?

感谢您的帮助。

Hello,
We made a backup image file for a database on one machine (A), and
we restored the database on another machine (B), using the backup image
file. Everything went fine. But when we try to connect to the database
on B, it''s taking forever (about 1 minute) if it''s the first connection
to the database. Any following connections have no problem. If we close
all the connections, and do a connection again, it will take about 1
minute again. The database on B did not exist before. It was created
directly from that "db2 restore db db-name" command.
Did we do anything wrong in duplicate a database like that? Do we
need to tune any configuration parameters?
Thanks for any help.

推荐答案

mjf写道:
你好,
我们在一台机器(A)上为数据库制作了备份映像文件,并且我们在另一台机器上恢复了数据库(二),使用备份图像
文件。一切都很顺利。但是当我们尝试连接到B上的数据库时,如果它是数据库的第一个连接,它将永远(大约1分钟)。以下任何连接都没有问题。如果我们关闭所有连接,并再次建立连接,则需要大约1分钟。 B上的数据库以前不存在。它是直接从db2 restore db db-name创建的。命令。
我们做错了重复这样的数据库吗?我们是否需要调整任何配置参数?
感谢您的帮助。
Hello,
We made a backup image file for a database on one machine (A), and
we restored the database on another machine (B), using the backup image
file. Everything went fine. But when we try to connect to the database
on B, it''s taking forever (about 1 minute) if it''s the first connection
to the database. Any following connections have no problem. If we close
all the connections, and do a connection again, it will take about 1
minute again. The database on B did not exist before. It was created
directly from that "db2 restore db db-name" command.
Did we do anything wrong in duplicate a database like that? Do we
need to tune any configuration parameters?
Thanks for any help.




顺便提一下,我们使用的数据库是DB2 UDB V8 .2 for Linux。



By the way, the database we use is DB2 UDB V8.2 for Linux.


第一次连接成本通常由db全局共享内存发生

分配和日志文件分配。 br />
新系统在内存大小和磁盘子系统方面是否相同

结构?

您是否更改了新系统上的日志路径一个文件系统可能不会像旧那样高效。系统?

从一个系统到另一个系统的情况是否真的相同?


一旦第一次连接被支付后续连接应该始终是最短时间,除非你受到记忆的限制。

HTH,皮埃尔。


-

Pierre Saint-Jacques

SES顾问公司

514-737-4515

" mjf" < MI **** @ excite.com> écritdansle message de news:
11**********************@g49g2000cwa.googlegroups。 com ...
First connect costs are usually encurred by db global shared memory
allocations and log file allocations.
Is the new system the same in respect to memory size and disk sub system
structure?
Did you change the log path on the new system to a file system that may not
be as efficient as the one for the "old" system?
Are things really equal from one system to the other?

Once the first connect is "paid for" subsequent connections should always be
minimum time unless you are memory constrained.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"mjf" <mi****@excite.com> a écrit dans le message de news:
11**********************@g49g2000cwa.googlegroups. com...
mjf写道:
您好,
我们在一台机器(A)上为数据库制作了备份映像文件,并且
我们使用备份映像
文件在另一台机器(B)上恢复了数据库。一切都很顺利。但是当我们尝试连接到B上的数据库时,如果它是数据库的第一个连接,它将永远(大约1分钟)。以下任何连接都没有问题。如果我们关闭所有连接,并再次建立连接,则需要大约1分钟。 B上的数据库以前不存在。它是直接从db2 restore db db-name创建的。命令。
我们做错了重复这样的数据库吗?我们是否需要调整任何配置参数?
感谢您的帮助。
Hello,
We made a backup image file for a database on one machine (A), and
we restored the database on another machine (B), using the backup image
file. Everything went fine. But when we try to connect to the database
on B, it''s taking forever (about 1 minute) if it''s the first connection
to the database. Any following connections have no problem. If we close
all the connections, and do a connection again, it will take about 1
minute again. The database on B did not exist before. It was created
directly from that "db2 restore db db-name" command.
Did we do anything wrong in duplicate a database like that? Do we
need to tune any configuration parameters?
Thanks for any help.



顺便说一句,我们使用的数据库是DB2 UDB V8.2 for Linux 。



By the way, the database we use is DB2 UDB V8.2 for Linux.






" Pierre Saint-Jacques" < SE ***** @ invalid.net>在消息中写道

新闻:RO ******************* @ weber.videotron.net ...
"Pierre Saint-Jacques" <se*****@invalid.net> wrote in message
news:RO*******************@weber.videotron.net...
第一个连接成本通常由db全局共享内存分配和日志文件分配引起。
新系统在内存大小和磁盘子系统结构方面是否相同?
您是否将新系统上的日志路径更改为文件系统,该文件系统可能不如旧系统那样高效。系统?
从一个系统到另一个系统的情况是否真的相同?

一旦第一次连接被支付了后续连接应始终是最短时间,除非你受内存限制。
HTH,Pierre。
First connect costs are usually encurred by db global shared memory
allocations and log file allocations.
Is the new system the same in respect to memory size and disk sub system
structure?
Did you change the log path on the new system to a file system that may
not be as efficient as the one for the "old" system?
Are things really equal from one system to the other?

Once the first connect is "paid for" subsequent connections should always
be minimum time unless you are memory constrained.
HTH, Pierre.



如果连接延迟是使用远程类型2驱动程序,那么确保使用认证服务器编目

db。选项。


如果连接延迟也是从Linux实现本地连接

作为实例所有者,那么可能是因为内存<如皮埃尔所提到的那样初始化
,但1分钟听起来太长了。


If the connection delay is with a remote type 2 driver, then make sure the
db is catalogued with "authentication server" option.

If the connection delay is also when a local connection is made from Linux
as the instance owner, then it is probably because of the memory
initialization as mentioned by Pierre, but 1 minute sounds too long.


这篇关于第一次连接到数据库需要很长时间....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆