IBM Data Studio can't browse data on SAMPLE (DB2 Express-C)

梦想的初衷 提交于 2019-12-03 17:32:48

Your issue is that you are logging in to the command line as Nenad (you can tell that by the default schema), and that you are logging into the DB through DataStudio as db2admin. You either need to log in to Data Studio as Nenad. Or as Nenad you need to grant the appropriate permissions to user ID db2admin.

EDIT: To add to better explain things as well as your question in the comments below.... DB2 doesn't use created user ids like other databases do. It looks to the underlying operating system or LDAP for authentication. In the Unix/Linux environment, the instance Id that is the highest ID administratively is what ID the instance is set up to run as. Your db2admin account is this account. That being said....Windows introduces a different security scheme. Even though the instance ID exists, whoever installed the product (their user ID) tends to be granted high administrative powers in DB2. And when you issue the CREATE DATABASE statement, you are doing it with your Windows user ID. Therefore, it becomes the owner of the database and has DBADM, SECADM, DATAACCESS, and ACCESSCTRL granted to it. db2admin will generally have DBADM WITHOUT DATAACCESS WITHOUT ACCESSCTRL. So you would need to log in as Nenad (the ID with SECADM) and grant (to be safe) DBADM, SECADM, DATAACCESS, ACCESSCTRL to user db2admin. Now that ID should have what you are looking for.

I don't recommend those privileges for just any ID. If all you need is access to read/write to tables then DATAACCESS alone should do it.

I've the same problem to create a new Database, and I've resolved by running this command: db2set DB2_CREATE_DB_ON_CHANGE=YES With DB2 Command Window (as administrator): (1) stop the database (2) run db2set DB2_CREATE_DB_ON_CHANGE=YES (3) start the database

Now you can create a new database with Data Studio by specifying local storage, database name......

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!