I have to use DB2 for a course at my faculty. I'm on Windows 10, installed DB2 express C, installed Data Studio. During the installation I've used 'db2admin' as the username and 'admin' as the password. Then I ran a series of SQL scripts provided by our faculty to generate all the tables that we need and to populate them. That apparently worked as well.
Here's the problem. All the tables were made under that schema 'aleksa' which happens to be my computer username.
From the command line I can do everything just fine. Data studio is the problem. When connecting to the database I use the uppermentioned db2admin and admin as the credentials. At first, when I tried to run any query I kept getting some authorization errors. So then I googled for a while and found that I needed to grant access to db2admin on those tables (why an admin account needs granting of anything beats me). So I've done that by connecting to the database from the command line (by the way, the command line never requires me to enter any credentials whatsoever), and running a series of
grant select on <table_name> to user db2admin
I've no idea whether I should have but I also, just in case, ran
grant all on <table_name> to user db2admin
all of those, of course, for each table that I have.
And each one of them ran successfully. After doing that I no longer get the authorization error in Data Studio when running queries. But I also don't get anything.
To repeat, running queries from the command line works fine which is why I know that the database is fine and that I actually have data in it. Which is also why I know that the output for the very same query ran from Data Studio instead of the command line shouldn't be just the query execution time and no results in the 'SQL results' window. In my case the queries that I've tried were simply 'select * from aleksa.table_name'. They produce a bunch of rows in the command line, but none in Data Studio.
So, any ideas?