Les Block wrote:
You will need to qualify your query "select * from LESB.VT08_Year". If
you don't want to do that, you can set the default schema to LESB by
setting the "CURRENT SCHEMA" special register when you did the connect.
I have just done an install on Windows XP. Version 8.1 DB2 UDB (warehouse) I have a talbe called VT08_Year Column one is Char(3), Column Two is Char(6) YearCode and Year Desc A90, 1999 A95, 1999.5 B00, 2000 B10, 2001 B20, 2002 When I ran the script to create the table, I was logged onto the computer as LESB with full administrator rights. Now, this table resides in schema LESB - for the moment I don't know how or why. But I've created another user SA, given them admin rights, and rights to the LESB.VT08_Year Table. However, with an ADO ...
I have just done an install on Windows XP.
Version 8.1 DB2 UDB (warehouse)
I have a talbe called VT08_Year
Column one is Char(3), Column Two is Char(6)
YearCode and Year Desc
A90, 1999
A95, 1999.5
B00, 2000
B10, 2001
B20, 2002
When I ran the script to create the table, I was logged onto the
computer as LESB with full administrator rights.
Now, this table resides in schema LESB - for the moment I don't know
how or why. But I've created another user SA, given them admin
rights, and rights to the LESB.VT08_Year Table. However, with an ADO
connect I cannot see this table with this query "SELECT * FROM
VT08_Year". I get an error stating that the server cannot find object
"SA.VT08_Year".
Can you help me understand what is happening here?
I am familiar with Oracle, and believe IBM Aliases are similar to
Oracle Synonyms but I don't want to have to create Aliases for all my
tables for the SA user. How is this solved?
Many thanks,
Les Block
Les Block wrote:
You will need to qualify your query "select * from LESB.VT08_Year". If
you don't want to do that, you can set the default schema to LESB by
setting the "CURRENT SCHEMA" special register when you did the connect.
>
Where is this "CURRENT SCHEMA" specail register and how do I set it?
If I were to use Aliases, does that mean that every user needs a
schema, in order to make aliases to the original schema? How do you
make many users have access to the same schema without having to make
schemas for each user and then making aliases? Is there a way to make
a group house the aliases, and then each user if part of the group. I
have a database with many tables, and 200 users, it seems a bit
peculiar that I would need to create 200 schemas for 200 users, and
then create all the aliases to the original schema?
Thanks for your response,
The whole schema thing is really baffling coming from an MS SQL server
background.
Les
Les Block wrote:
>
>
> Where is this "CURRENT SCHEMA" specail register and how do I set it?[/ref]
The statement: "set current schema lesb" would do it.
After executing this statement, any user executing the query
"select * from vt08_year" would read
Yes. DB2 does not provide the concept of a public synonym (alias). So,
your options are:
1) Use fully qualified table names (select * from lesb.vt08_year)
2) Use "set current schema" immediately after your application connects
Note: you can also set this in the db2cli.ini file on the client
workstations.
3) Create aliases for all users.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Bookmarks