Archive for the ‘DB2’ Category

Database War Extend To Hardware Market

星期日, 09月 13th, 2009

 

sun_performance_lg

Oracle 收购SUN以后,通常认为Sparc + Oracle  Vs pSeries + DB2 会成为市场竞争的焦点。Oracle 在10月14日的 Oracle OpenWorld 上会努力证明Sun+Oracle的组合的竞争力。

在服务器市场开始成萎缩趋势的现在,不知道Oracle这种卖数据库+硬件的策略是否能成为一个黄金搭档。随着云计算的兴起,越来越多的客户并不希望自己来购买硬件服务器,而是更多的透过通过从ISV租赁服务的方式来实现传统的IT服务。

随着IBM Informaiton Ageda版图的日趋完整,IBM 与 Oracle 的战争将愈演愈烈。

Oracle 的战书:

PERFORMANCE

Sun + Oracle is faster.

Oracle and Sun together are hard to match. Just ask IBM. Its fastest server now runs an impressive 6 million TPC-C transactions, but on October 14 at Oracle OpenWorld, we’ll reveal the benchmark numbers that prove that even IBM DB2 running on IBM’s fastest hardware can’t match the speed and performance of Oracle Database on Sun systems. Check back on October 14 as we demonstrate Oracle’s commitment to Sun hardware and Sun SPARC.

深入学习DB2

星期三, 08月 5th, 2009

 

1/ Everything You Wanted to Know About DB2 Universal Database Processes

Summary:  Ever wonder what all those DB2 processes actually do? This article describes the processes that DB2 UDB uses on Linux, UNIX and Windows, discusses why you might need to understand these processes, and details their functions.

2/ DB2 9 self-tuning memory management

Starting in IBM® DB2® 9, a new memory-tuning feature, self-tuning memory management, simplifies the task of memory configuration by automatically setting values for several memory configuration parameters. When enabled, the memory tuner dynamically distributes available memory resources among several memory consumers, including sorts, the package cache, the lock list, and buffer pools. In this tutorial, walk through a series of exercises to understand and learn how to administer this new feature.

本来是想把看过好多DB2深入学习文章给摘录一下的,最近忙于培训,无暇做了,先扔着吧

如何得到DB2 Instance Owner Name

星期四, 04月 23rd, 2009

Unix:

InstName is Represents the name of instance. The name of the instance must be the same as the name of the instance owning user. Specify the name of the instance owning user you created. The instance will be created in the instance owning user’s home directory.

echo $DB2INSTANCE 能得到 owner name

 

Windows:

到v95还是未知,据说v97的db2iinfo 可以得到,没实验过。

DB2INSTOWNER

Operating system: Windows

  • Default: NULL
  • The registry variable created in the DB2 profile registry when the instance is first created. This variable is set to the name of the instance-owning machine.

Solid DB

星期四, 04月 16th, 2009

 

我原来一直以为Solide DB是关系型数据库的一种类型的名字,今天才知道这个Solid和DB中间有应该是连着的,称之为solidDB. 此数据库产品是solid公司开发的,该公司2008年被IBM收购,所以成为IBM solidDB。最近Lab里面做了好几次这样的讲座,都没有去听。最近听一个v97的培训的时候,老师特别单独拿出来给BP讲,也没听到,只有过了过PPT。

solidDB是所谓的内存数据库产品,特点是绝对的快,绝对的可接触和低投入。 貌似现在在DB2 z/OS 那边在加速使用这种技术来提高传统关系型数据库的性能。不知道有没有在MP上开始。有机会了解一下。

How To Collect DB2 JCC Trace

星期四, 02月 12th, 2009

Please collect a JCC Trace. Here are the instructions how to do this:

1) If you are using the datasource, then use the datasource.setTraceFile(TRACEFILE) to enable tracing.

2) If you are using DriverManger, the easiest way will be to set the logWriter on DriverManager before obtaining a connection.
    For example:
         DriverManager.setLogWriter(new PrintWriter(new FileOutputStream("trace.txt")));

3) You can also set the traceFile property on the URL. If traceFile property is specified, by default traceLevel is TRACE_ALL
    String databaseURL = "jdbc:db2://hal:50000/sample:traceFile=c:/temp/foobar.txt;" ;

Please see the following URLs for additional assistance :
http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/ad/cjvjcdig.htm
http://www.ibm.com/software/data/pubs/papers/sqlj (Section 3.4 – Trace)

How To Collect a DB2 Trace

星期四, 02月 12th, 2009

Please collect a DB2 trace. Here are the instructions how to do this:
1) Minimize activity on the server.  Ideally, only the application or query required should be performed while the trace is on.
2) Rename the db2diag.log and if possible upgrade diaglevel to 4 in the DBM CFG:
    db2 update dbm cfg using diaglevel 4

3) Start the trace:
    db2trc on -t -f XXXXX.dmp

4) Recreate the error   -   call the Stored procudure.

5) Turn off the trace:
    db2trc off

6) Format and flow the trace files:
    db2trc flw XXXXX.dmp XXXXX.flw
    db2trc fmt XXXXX.dmp XXXXX.fmt
    db2trc fmt -c XXXXX.dmp XXXXX.fmtc
         (At this stage, the traces should not wrap.)
         Example of a good trace:
              Trace truncated     : NO
              Trace wrapped       : NO
         if trace continues to wrap, please contact me and we can determine whether the trace is usable or not.

7) From the above files generated, you would need to provide us with the .dmp, .flw, .fmt, .fmtc, and db2diag.log files.

8) Tar or zip the files.  To tar do:
       tar -cvf xxxxx.yyy.zzz.files.tar  <list of files separated by spaces>
       compress xxxxx.yyy.zzz.files.tar
       Then send the xxxxx.yyy.zzz.files.tar.Z

DB2 Programming Considerations

星期一, 12月 1st, 2008

The capabilities that you need to consider include:

  • Accessing the data using:
    • Embedded SQL
    • Call Level Interface (CLI)
    • Restructured Extended Executor Language (REXX)
    • Query products
  • Controlling data values using:
    • Data types (built-in or user-defined)
    • Table check constraints
    • Referential integrity constraints
    • Views using the CHECK OPTION
    • Application logic and variable types
  • Controlling the relationship between data values using:
    • Referential integrity constraints
    • Triggers
    • Application logic
  • Executing programs at the server using:
    • Stored procedures
    • User-defined functions
    • Triggers.

如何确定DB2 instance 对应的fence user

星期三, 11月 19th, 2008

$ more ~db2inst1/sqllib/ctrl/.fencedID
db2fenc1

DB2 1042c Error

星期四, 09月 25th, 2008

db2 start 遇到 SQL1042c 错误,检查发现打了Fixpack后,没有升级instance.

* To update the instance to acquire a configuration or access to
function run DB2IUPDT <InstName>.

* If the error occurred while trying to connect to a database, get a
trace (instructions below) and call IBM support.

DB2 环境 设置

星期一, 08月 4th, 2008

设置 DB2 环境

恰当地设置 DB2 环境非常重要,这是因为它控制着 DB2 操作和活动的方式。DB2 环境由以下几部分构成:

  • DB2 配置文件注册库
  • 操作系统环境变量
  • DB2 数据库管理器配置参数
  • DB2 数据库配置参数

(阅读全文……)