正确关闭db2的方法 [英] proper way to shutdown db2

查看:208
本文介绍了正确关闭db2的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在寻找完全关闭db2的正确方法,以便我可以对所有数据库进行冷备份。


谢谢!


---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全Usenet新闻== - -
http://www.newsfeed.com #1新闻组服务在世界上! > 100,000新闻组

--- = 19东/西海岸专业服务器 - 通过加密的总隐私= ---

Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

推荐答案

查看quiesce命令。通常,它应该简单如下:


db2强制应用程序所有

db2连接到数据库<<<>>>独占模式

db2备份数据库......


请注意,这是在数据库级别。如果你在一个实例中有多个数据库,那么Quiesce也可以在

实例级别工作。


Tim B.写道:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
您好,

我正在寻找完全关闭db2的正确方法,以便我可以对所有数据库进行冷备份。
谢谢!

---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全的Usenet
新闻== ----
http://www.newsfeed.com 世界排名第一的新闻组服务! > 100,000
新闻组
--- = 19东/西海岸专业服务器 - 通过加密的总隐私= ---
Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---






感谢您的回复。这是我将要运行的脚本。

听起来不错:


#!/ bin / bash


#UDB DB2添加了以下三行。

if [-f~ / sqllib / db2profile];然后

。 〜/ sqllib / db2profile

else

退出1

fi


#踢出所有人

db2强制应用程序全部


db2以独占模式连接到数据库db1

db2" backup database db1 to / opt / BACKUP" ;


db2以独占模式连接数据库db2

db2"备份数据库db2 online to / opt / BACKUP"


db2以独占模式连接到数据库db3

db2" backup database db3 online to / opt / BACKUP"

我需要做些什么来确保没有人尝试对数据库进行任何读/写操作,以及如何将数据库重新上线?

Blair Adamache写道:
Thanks for your response. This is the script that I will be running.
Does this sound decent:

#!/bin/bash

# The following three lines have been added by UDB DB2.
if [ -f ~/sqllib/db2profile ]; then
. ~/sqllib/db2profile
else
exit 1
fi

# kick out everyone
db2 force applications all

db2 connect to database db1 in exclusive mode
db2 "backup database db1 to /opt/BACKUP"

db2 connect to database db2 in exclusive mode
db2 "backup database db2 online to /opt/BACKUP"

db2 connect to database db3 in exclusive mode
db2 "backup database db3 online to /opt/BACKUP"
What do I have to do to ensure that no one attempts any read/writes to
the database and also, how do I put the database back online?
Blair Adamache wrote:
看看quiesce命令。通常,它应该如下这样简单:

db2 force applications all
db2 connect to database<<<>>>独占模式
db2备份数据库......

请注意,这是在数据库级别。如果实例中有多个数据库,Quiesce也可以在
实例级别工作。

Tim B.写道:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
你好,
我正在寻找完全关闭db2的正确方法,以便我可以对所有数据库进行冷备份。

谢谢!
< br => ---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全的Usenet
新闻== ----
http://www.newsfeed.com 世界排名第一的新闻组服务!
Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World!
> 100,000新闻组
>100,000 Newsgroups


--- = 19东/西海岸专业服务器 - 通过加密全面隐私= ---


---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---





---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全使用网新闻== ----
http://www.newsfeed.com 世界排名第一的新闻组服务! > 100,000新闻组

--- = 19东/西海岸专业服务器 - 通过加密的总隐私= ---



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


此外,如何完全关闭db2并获取原始数据库文件

进行备份?换句话说,我不想使用db2

命令进行备份,我可能只是想把整个事情搞砸了。


Blair Adamache写道:
Also, how can I completely shutdown db2 and grab the raw database files
for the backup? In other words, I don''t want to backup using db2
commands, I might simply want to tar up the whole thing and go.

Blair Adamache wrote:
看看quiesce命令。通常,它应该如下这样简单:

db2 force applications all
db2 connect to database<<<>>>独占模式
db2备份数据库......

请注意,这是在数据库级别。如果实例中有多个数据库,Quiesce也可以在
实例级别工作。

Tim B.写道:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
你好,
我正在寻找完全关闭db2的正确方法,以便我可以对所有数据库进行冷备份。

谢谢!
< br => ---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全的Usenet
新闻== ----
http://www.newsfeed.com 世界排名第一的新闻组服务!
Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World!
> 100,000新闻组
>100,000 Newsgroups


--- = 19东/西海岸专业服务器 - 通过加密全面隐私= ---


---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---





---- ==通过Newsfeed.Com发布 - 无限制 - 未经审查 - 安全使用网新闻== ----
http://www.newsfeed.com 世界排名第一的新闻组服务! > 100,000新闻组

--- = 19东/西海岸专业服务器 - 通过加密的总隐私= ---



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


这篇关于正确关闭db2的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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