Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3057372
  • 博文数量: 206
  • 博客积分: 3409
  • 博客等级: 中校
  • 技术积分: 4066
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-24 10:21
个人简介

● ITPUB名人堂嘉宾 ● ChinaUnix社区博客专家 ● ChinaUnix社区Oracle板块版主 ● 优酷网认证音乐牛人:EricGuitar ● SDOUG 核心成员 ●E-mail:gaoqiangdba@163.com

文章分类

全部博文(206)

文章存档

2021年(11)

2020年(7)

2019年(7)

2016年(5)

2015年(36)

2014年(23)

2013年(15)

2012年(23)

2011年(61)

2010年(18)

分类: DB2/Informix

2015-01-12 12:04:22

  


报错:
db2 => select count(*) from test
1          
-----------
SQL0290N  Table space access is not allowed.  SQLSTATE=55039




查看表空间状态:
Tablespace ID                        = 3
 Name                                 = music
 Type                                  = Database managed space
 Contents                             = All permanent data. Regular table space.
 State                                  = 0x4080                         ----状态异常
 Detailed explanation:
 Roll forward pending
 Offline


查看容器信息:


$ db2 list tablespace containers for 3


            Tablespace Containers for Tablespace 3


 Container ID                         = 0
 Name                                 = /dev/music
 Type                                 = Disk



查看容器文件的属主和读写权限:
$ ls -lt /dev/music
crw-rw----    1 root     system       48, 14 Nov 20 16:09 /dev/music             ----属主有问题


修改属主和权限:
root@eric/# chown db2inst1.db2iadm1 /dev/music
root@eric/# chmod 777 /dev/music
root@eric/# su - db2inst1

重启数据库实例:

$ db2stop force
12/29/2014 14:30:38     0   0   SQL1064N  DB2STOP processing was successful.
SQL1064N  DB2STOP processing was successful.

$ db2start
12/29/2014 14:30:43     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.


连接数据库:
$ db2 connect to music

 Database Connection Information


 Database server          = DB2/AIX64 9.5.6
 SQL authorization ID   = DB2INST1
 Local database alias     = MUSIC

执行查询语句:
db2 => select count(*) from test


1          
-----------
 9821


  1 record(s) selected.











阅读(11833) | 评论(0) | 转发(0) |
0

上一篇:感谢!一路有你~

下一篇:AIX静态路由配置

给主人留下些什么吧!~~