• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Prayer

            在一般中尋求卓越
            posts - 1256, comments - 190, trackbacks - 0, articles - 0
              C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

            How do I determine is a table is locked

            Posted on 2009-08-06 19:10 Prayer 閱讀(609) 評論(0)  編輯 收藏 引用 所屬分類: DB2
            db2 get snapshot for tables on <database>

            When I run your commaned, I get the following error:

            SQL1427N  An instance attachment does not exist.

            Do you know what this means?  I verified that I was connected to the database.  What is an instance attachment?

            Every database will belong to an instance. AFAIK you can have only 1 instance on a server.
            Usually the attachment is implicit and you need not specify it first.
            If you're on an other node then you may need to attach first:

            db2 attach to nodeX
            db2 list applications
            db2 force application all
            db2 detach

            x= node

            Ties Blom

             

             

             

            issue:

            db2 list database directory

            among other data there is something like:

            Node name = ??????
            Directory entry type = Remote (local)
            Catalog node number = x

            If it is listed as remote, then you may need to

            CATALOG NODE

            Ties Blom




            Thanks Ties.  I'm getting closer.  I've successfully attached the node.  Now when I try any of the other commands you listed, I'm told I don't have enough authority.

            SQL1092N  "DDIAMOND" does not have the authority to perform the requested command.

            I should have complete authority for the database prod.  Do I need additional authority to run intance level commands?


            Good question.
            If you have an installation out of the box, then you should probably use the db2admin account (administrator)
            Check within operating system if the password has been changed (DB2 loans passwords from the operating system)

            In all probability it should be like:

            attach to db2 user db2admin using <password>
            <command 1>
            <command 2>

            ....

            I used to work directly from the server console which circumvents these type of problems..

            Ties Blom


            DB2 GET AUTHORIZATIONS

            should give a list of the levels for the current user.

            also dba view: SYSCAT.DBAUTH

            Ties Blom



            I use DB2 on AIX and in my testing systems I have many instances, all  containing many databases, all on the same server.

            Just thought it worth pointing out.

            Cheers
            Greg

            AFAIK this is not possible on Windows, but then my knowledge is from DBA courses before recent versions were released.

            Ties Blom

            You can have multiple instances on Windows also.

            You set which isntance to attach to using the environment variable DB2INSTANCE. I'm not aware of any other setting, but my experience of DB2 on Windows is limited to non-production systems. So, I may have not noticed some other settings.

            Regarding, ddiamond  problem, check which Operating System group you are in ?

            Also check for the dbm configs,

            db2 get dbm cfg

            for SYSADM_GROUP and SYSMAINT_GROUP.

            If the SYSMAINT_GROUP does not have any value, you can set the group (or your dba can) ti the windoews group you are in.

            If you want SYSADM rights (db2admin likeuy will have), then add your user to the SYSADM_GROUP group. If this value is also null, then it means administrator group is the SYSADM_GROUP. Add yourself to administrator group

            HTH

            Sathyaram

            CODE

             Direct SYSADM authority                    = NO
             Direct SYSCTRL authority                   = NO
             Direct SYSMAINT authority                  = NO
             Direct DBADM authority                     = YES
             Direct CREATETAB authority                 = YES
             Direct BINDADD authority                   = YES
             Direct CONNECT authority                   = YES
             Direct CREATE_NOT_FENC authority           = YES
             Direct IMPLICIT_SCHEMA authority           = YES
             Direct LOAD authority                      = YES
             Direct QUIESCE_CONNECT authority           = YES
             Direct CREATE_EXTERNAL_ROUTINE authority   = YES
             Direct SYSMON authority                    = NO

            Do I need SYSADM, SYSCTRL, and SYSMAINT authority?  If so, how do I set them to YES?  Does my network administrator have to put me in the window's SYSADMIN group?

            sathyarams (IS/IT--Management)
            21 Sep 06 9:46
            My previous post had a typo .. I meant SYSMON_GROUP and not SYSMAINT_GROUP ..

            Yes, to list snapshot and applications, the minimum authority required is SYSMON

            You will have to add your username to relevant operating system groups and set the value of the sysmon_group or sysadm_group

            HTH

            Sathyaram


            Great to hear. I wish I would be in the position of working with DB2 again. Really missing it. Have a succesful 2007 by the way!

            Getting back to the original questions. You can find out if a table is locked either by typing:-

            "db2 get snapshot for locks on <database>" which will show you all of the locks on the database

            or

            1. You could do a select on the table you suspect is locked.

            If your select hangs then:-

            2. Type "db2 list applications show detail" and look for your connection which will be in "lock wait" state.

            3. Type "get snapshot for application <agentid>" where <agentid> is the id of your connection which you found in step 2. At the bottom of the output, you'll find which agent holds the lock on the table.


            macehill,

            Thanks for the tip.  I will give it a try the next time I run into a potential locking problem.

            - Dan
            久久午夜羞羞影院免费观看| 亚洲国产成人精品女人久久久| 91精品婷婷国产综合久久| 精品伊人久久大线蕉色首页| 无码人妻久久一区二区三区蜜桃| 久久精品国产精品亚洲精品 | 久久精品成人影院| 久久99国产精品久久99果冻传媒| 亚洲va久久久噜噜噜久久男同| 久久人人爽人人爽人人av东京热| 手机看片久久高清国产日韩| 欧美亚洲国产精品久久| 亚洲AV伊人久久青青草原| 久久婷婷五月综合色奶水99啪| 性做久久久久久久久| 久久久www免费人成精品| 香蕉久久av一区二区三区| 久久免费的精品国产V∧| 狠狠色丁香婷婷综合久久来| 激情综合色综合久久综合| 热综合一本伊人久久精品| 精品综合久久久久久97| 精品一区二区久久久久久久网站| 大蕉久久伊人中文字幕| 亚洲精品国产综合久久一线| 色婷婷综合久久久久中文一区二区| 国产亚洲精品自在久久| 国产精品99久久精品爆乳| 久久人人爽人人爽人人片AV东京热 | 中文国产成人精品久久不卡| 国产精品99久久久久久董美香| 亚洲а∨天堂久久精品| 亚洲狠狠婷婷综合久久蜜芽| 久久99国产精品99久久| 久久久久久亚洲精品影院| 99久久777色| 精品一二三区久久aaa片| 久久久九九有精品国产| 久久人妻无码中文字幕| 国产99久久精品一区二区| 久久久久免费精品国产|