Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Sep 2012
    Posts
    16

    Unanswered: Find the user who installed the db2

    I have a need to find out the user name who installed the db2 on machine by a java program, so i need a query/statement which returns me the user name without being connect with any database.

    Thank you

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    I have many needs...
    Can you be more specific.. and explain in more detail the scenario .....
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Sep 2012
    Posts
    16
    ok, i have a java program which check the user name who have installed the db2 as username and password and want to process only with that user name which he use in profile thats it.. i hope it would be enough to understand.

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    the user that installed db2 is part of admin group on windows.. (as you don't specify the platform ???) - root on unix..
    probably in the installation log created by install procedure..
    do you need the password of this user ? because the purpose of your question is still not clear for me...
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Sep 2012
    Posts
    16
    No i don't need password i only need username with the user made profile while install the db2

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    "i only need username with the user made profile while install the db2"
    what does this mean : can you explain this .. username with the user made profile
    profile ??? the user will be in the installation log of db2
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  7. #7
    Join Date
    Sep 2012
    Posts
    16
    O i think it become complex, I don't want to depend on the log as it can be delete by user... can i have not get a command that returns the username with which db2 copy has the login profile.
    Last edited by rahulsri; 09-06-12 at 08:35.

  8. #8
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    rahulsri - your English is very poor.

    You should take more time to write your requirement and explain the reason why you think you have this need for knowing the userid that installed DB2.

    Why do you need to know the userid that installed DB2 - this can be 'root' on unix systems, and you certainly do NOT want to "process" anything in DB2 using that account.

    Similarly , in an enterprise environment that uses DB2 on Windows, a special domain account might install DB2 - but that account might never again use the DB2.

    So try to clearly explain the problem you want to solve, not the solution that you *think* is correct.

  9. #9
    Join Date
    Sep 2012
    Posts
    16
    ok i will see what i made wrong..
    Last edited by rahulsri; 09-06-12 at 09:04.

  10. #10
    Join Date
    Sep 2012
    Posts
    16
    Quote Originally Posted by db2mor View Post
    rahulsri - your English is very poor.

    it could be the reason that we are not getting what we are saying to each other, may be we have not exchanged the reply over exact point as you assume my question wrong in first thread.
    Last edited by rahulsri; 09-06-12 at 09:09.

  11. #11
    Join Date
    Sep 2012
    Posts
    16
    Working on an application, which creates DB2 database at runtime by prividing username/password. But need to put a check that database creation must be allowed to the user who is authorized to do this (i.e. whose profile used in DB2 installation dialog).

    Otherwise DB2 returns the error:
    "SQL1092N The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation"

    Reason: CREATE DATABASE command is not user specific.

    As per the previous thread discussion I use db2attch command but it gives the authority to the user to create the database (rest of the machine users, those are not the part of DB2).

    This is the reason I want to check the user authority before creating database.

  12. #12
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    for each specific command - you need a specific authority
    not because you can connect to a db or attach to instance, that you can execute the needed command
    the infocenter states which authority is needed for a command
    eg create db : you need to be part of sysadmin group defined in db2 at o/s level
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  13. #13
    Join Date
    Sep 2012
    Posts
    16
    Thanx przytula for understanding my problem.

    My DB2 user is 'DB2ADMIN' and I logged-in as different user 'GUEST'. When I run the CREATE DATABASE command on db2 command prompt, The command executed as user 'GUEST'. So how to run the same command by 'DB2ADMIN'??

  14. #14
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    depending on the platform (not indicated)
    if you login as guest (windows ??) - how do you attach to instance (the complete command) - local/remote ?
    attach to db2 as db2admin/pw and execute ....
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  15. #15
    Join Date
    Sep 2012
    Posts
    16
    I am using windows XP/7.

    yes attach command runs for 'DB2ADMIN' successfully. but

    attach to db2 as GUEST/pw

    when i run the above command for 'GUEST' , it runs successfully which is not desired (since 'GUEST' is not a valid Db2 user).

    So how to protect 'GUEST' user.
    Last edited by rahulsri; 09-06-12 at 10:04.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •