Page 1 of 4 123 ... LastLast
Results 1 to 15 of 47

Thread: DB2 on Windows

  1. #1
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369

    Unanswered: DB2 on Windows

    Unfortunately, it looks like we might have to install and support DB2 on a Windows server. Can I install DB2 without using GUI tools? I don't think so. How can I install and support DB2 remotely? I think I used "Remote Desktop" to access Windows servers in the past. Is there anything else I can use?

  2. #2
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    Current versions of DB2 work just fine on properly configured Windows servers (64-bit).
    You can use response-file installs on Windows in the same way as other platforms
    You can use any supported remote-control tool for remote-desktop functionality, mstsc works just fine.
    Running DB2 on properly configured Windows servers is no big deal, although you will miss the scriptability of unix shells - although cygwin is available. But if you are a command-line person then
    db2 on windows is also easily administered from a command-line without any GUIs.

  3. #3
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    No one from our team wants to handle DB2 on Windows, so we will try to get the appl team to install/manage it themselves. However, if I end up doing it, then I may come back with more questions. If I remember correctly, db2admin account and instance "db2" is created during the install. What is this db2admin account used for? Let's say, I create a new instance "db2inst1". Do I need to login as db2admin in order to administer instance "db2inst1" (stop/start instance, create db, etc...)? One db2admin account is used to administer multiple instances? Once I'm logged in using the correct account and can execute db2 commands, I know what to do. The part I'm not sure about is the installation and account logon.

  4. #4
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    On DB2 on Windows the Unix db2-instance-owner concept does not really exist in the same form.

    On Windows, the db2-instance name and default administrator account are usually different , and the process-owner (of db2 services, aka the services-account) can be different again from both the db2-instance-name and the default administrator.

    By default when using a GUI installation, it will (conditionally) create local account db2admin to
    administer DB2 (and put that account into local group Administrators). That will be the account
    for the DAS if created - Control-Centre will ask for these credentials to perform administrative tasks if your own account lacks rights and you've not configured a SYSADM_GROUP for the instance witth yourself as a member.

    A response-file installation gives you freedom to override the defaults and set
    things up to suit the specific needs of the enterprise you are in.

    In Enterprise-environments with active-directory the installation requires careful planning as
    regards DB2 security, authentication details, password-handling, domain integration , the account(s) to use for running system-services , and the group-names to use for the groups like sysadm_group
    etc.

    You do not need to use the db2admin account to multiple instances (you can if you like, but I never do).
    If you configure a SYSADM_GROUP for an instance, you can put accounts into that group and they can administer any instance which has the same SYSADM_GROUP setting. You could have multiple SYSADM_GROUPS (e.g. one per instance) each with different members. db2admin is just there as a default to get you going, but you can discard that user account if you wish once you've set things up to suit yourself and give the admin roles to different accounts.


    As ever, it is best to study carefully the documentation.

  5. #5
    Join Date
    Jul 2004
    Posts
    306
    The install is pretty straightforward - wizard, next, next next for the most part.
    You can admin from the command prompt (I usually do most of it from there) but the GUI has actually come along in leaps and bounds in recent years. Working from the prompt becomes pretty frustrating, pretty quickly as things you could script up in 5 mins end up taking hours and requiring 3rd party software etc.

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Do you see any potential issue with the admin account and instance name being the same - db2inst1?

  7. #7
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    In many enterprise environments with Active-directory, the naming conventions for service-accounts, group-names and user-accounts prevent you from naming DB2-instances after user-accounts. (A db2 v9.7 instance-name has max 8 bytes, no hyphens...)

    But in trivial environments (with local users and groups) you might get away with it, though it's not a good idea to try to force a unix concept here because the mapping does not work.

  8. #8
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Thank you, db2mor.

  9. #9
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    I want to create the required accounts (to install and administer db2) ahead of time. As per IBM DB2 9.7 Information Center for Linux, UNIX, and Windows , I need:
    - installation account [whatever]
    - instance account [db2inst1]
    - don't need DAS/GUI tools

    What about db2admin? Can I create it ahead of time or use [whatever] instead? This is a very basic DB2 installation with local accounts.

    Another question is what can be used to schedule db2 maintenance scripts on Windows (no DB2 GUI tools)?

  10. #10
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Most of Windows accounts can be created at install time. The installation is recommended to be run as Administrator.

    Setup on windows is much easier than linux/unix counterpart. You can use db2inst1 if you want; but setup defaults to db2admin. Main service runs under credentials of this account.

    Also, db2 task center is a nice plus on windows system; this comes with standard install ( needs toolsdb ).

    Regards
    Last edited by DBFinder; 05-07-12 at 15:27.

  11. #11
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    I need to request all user accounts ahead of time - there is a tool that creates them.

    I understand that the instance account (the instance name will be [db2inst1] in my example) and db2admin account are for different purpose. Can I create this db2admin account prior to performing the install or can the installation account ( [whatever] in my example) be used instead of db2admin to administer db2? Basically, I need to know how many accounts to request in order to install/administer db2.

    I don't want to use any DB2 GUI tools for db2 administration. What can I use to schedule db2 batch files on Windows (something like crontab on Unix)?
    Last edited by db2girl; 05-07-12 at 17:03.

  12. #12
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by db2girl View Post

    I understand that the instance account (the instance name will be [db2inst1] in my example) and db2admin account are for different purpose.
    Not sure where you got that. You must install DB2 from an account with the Windows local administrator privileges. Once the software is installed, you will need an account to serve as the "instance owner".

    Quote Originally Posted by db2girl View Post
    Can I create this db2admin account prior to performing the install
    Yes.

    Quote Originally Posted by db2girl View Post
    can the installation account ( [whatever] in my example) be used instead of db2admin to administer db2?
    Technically, yes. You don't want to manage the DB2 instance as the Windows standard Administrator account. If you can ask that db2admin be added to the Local Administrators group, then you can perform installation from that account and also use it later to manage the instance.

    Quote Originally Posted by db2girl View Post
    Basically, I need to know how many accounts to request in order to install/administer db2.
    One.

    Quote Originally Posted by db2girl View Post
    What can I use to schedule db2 batch files on Windows (something like crontab on Unix)?
    It's called Windows Scheduler (Start->Control Panel->Scheduled Tasks). There's also a rudimentary command line interface to it, the at command.

  13. #13
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    By the way, don't forget about the local groups -- you'll need two (DB2ADMNS and DB2USERS) if you enable advanced security, which is the default.

  14. #14
    Join Date
    Jul 2004
    Posts
    306
    Quote Originally Posted by n_i View Post
    It's called Windows Scheduler (Start->Control Panel->Scheduled Tasks). There's also a rudimentary command line interface to it, the at command.
    Being a mostly AIX/LINUX guy and having used both I'd actually recommend Task Center.

    EDIT
    Although since it's now deprecated I guess Job Scheduler in Data Studio is the thing to look at... has anyone used that much?
    Last edited by meehange; 05-07-12 at 20:20. Reason: more info

  15. #15
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    To keep things simple for me (my team might not like this), I want to use the same user id, db2inst1, to install and adminster db2. This user id will be part of two groups: 1) Administrators and 2) db2iadm1 - new group. I will use this id to install db2 and create an instance called "db2inst1". I will then set sysadm_group to db2iadm1, start the instance, create db, etc...

    Will this work?

Posting Permissions

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