IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 7 replies
  • Latest Post - ‏2013-03-26T23:11:55Z by SystemAdmin
SystemAdmin
SystemAdmin
5837 Posts

Pinned topic Create user to db2 database

‏2013-03-23T04:35:14Z |
Create user to oracle is :
..... CREATE USER <USER NAME> IDENTIFIED BY <PASSWORD>

How to create user name to db2 database ???
Updated on 2013-03-26T23:11:55Z at 2013-03-26T23:11:55Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: Create user to db2 database

    ‏2013-03-23T04:46:10Z  
    The link (http://www.youtube.com/watch?v=7OtoswUgUDI) help me to create user name without password !!!
  • DATABASEARCHITECT
    DATABASEARCHITECT
    105 Posts

    Re: Create user to db2 database

    ‏2013-03-24T09:46:26Z  
    Hi there,

    In DB2 the concept is a bit different than other database platforms.

    It takes the operating system users as the user. You can add users from the OS of Choice, I will use Windows here as an example. From Computer Management --> Users and Groups --> Pick the user you wish to add to a db2 database via Data Studio.
    Best Regards
    Anil Mahadev
    IBM Champion
    http://db2hitman.wordpress.com
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: Create user to db2 database

    ‏2013-03-25T06:01:24Z  
    Hi there,

    In DB2 the concept is a bit different than other database platforms.

    It takes the operating system users as the user. You can add users from the OS of Choice, I will use Windows here as an example. From Computer Management --> Users and Groups --> Pick the user you wish to add to a db2 database via Data Studio.
    Best Regards
    Anil Mahadev
    IBM Champion
    http://db2hitman.wordpress.com
    Thanks !

    But, how can connect my project (asp) to database (DB2) useing this new user ???

    =======================================================================
    Connect without user :

    Dim Cn
    Set Cn = Server.CreateObject("ADODB.Connection")
    Cn.Open "Provider=IBMDADB2.DB2COPY1;Data Source=DB_MAN"
    =======================================================================
    Connect User :

    Dim Cn
    Set Cn = Server.CreateObject("ADODB.Connection")
    Cn.Open "Provider=IBMDADB2.DB2COPY1;User ID=U_DB_Man;Data Source=DB_MAN"
    =======================================================================
    Comment :

    OS User Name = MMA
    Password = 2013

    Example connect by user name ???!!!
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: Create user to db2 database

    ‏2013-03-25T06:11:09Z  
    Hi there,

    In DB2 the concept is a bit different than other database platforms.

    It takes the operating system users as the user. You can add users from the OS of Choice, I will use Windows here as an example. From Computer Management --> Users and Groups --> Pick the user you wish to add to a db2 database via Data Studio.
    Best Regards
    Anil Mahadev
    IBM Champion
    http://db2hitman.wordpress.com
    I'm sorry !!!
    I have not tested connect string !!!
    Very very very thanks
    Connect String :
    ===========

    Cn.Open "Provider=IBMDADB2.DB2COPY1;User ID=db2;password=0;Data Source=DB_MAN"
  • DATABASEARCHITECT
    DATABASEARCHITECT
    105 Posts

    Re: Create user to db2 database

    ‏2013-03-25T07:51:05Z  
    I'm sorry !!!
    I have not tested connect string !!!
    Very very very thanks
    Connect String :
    ===========

    Cn.Open "Provider=IBMDADB2.DB2COPY1;User ID=db2;password=0;Data Source=DB_MAN"
    Welcome :)

    Here is another example.

    http://www.hitsw.com/support/kbase/tools_applications/asp/ASPSample.htm
    Best Regards
    Anil Mahadev
    IBM Champion
    http://db2hitman.wordpress.com
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: Create user to db2 database

    ‏2013-03-25T09:14:51Z  
    Welcome :)

    Here is another example.

    http://www.hitsw.com/support/kbase/tools_applications/asp/ASPSample.htm
    Best Regards
    Anil Mahadev
    IBM Champion
    http://db2hitman.wordpress.com
    Thanks

    But what is benefit (User And Group Object --> DB Users) ???
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: Create user to db2 database

    ‏2013-03-26T23:11:55Z  
    Welcome :)

    Here is another example.

    http://www.hitsw.com/support/kbase/tools_applications/asp/ASPSample.htm
    Best Regards
    Anil Mahadev
    IBM Champion
    http://db2hitman.wordpress.com
    Thanks
    Understood benefits of (DB Users)

    Example :

    CREATE TABLE U_DB_MAN.XXX
    (
    A BIGINT,
    B VARCHAR(50)
    );

    SELECT * FROM U_DB_MAN.XXX;