How To use the DB2 Control Center to Create Databases and Tables
Part 1 - Create a Database
1. Drill down hierarchy until you get to the "Databases" folder.
2. Right-click, Choose "Create..." --> "Database Using Wizard..."
3. In first screen, enter the new database name, next to the "Database name" label.
4. Skip the rest (taking defaults) and press the "Finish" button.
Part 2 - Create a Table using a SQL Script file (still in the Control Center).
a. Interactive Tab - Logon
1. Press the Command Center icon. (The icon looks like a command prompt dos window.)
2. In the "Interactive" tab, find the "Command" field area below the label.
3. Type the following:
connect to <databasename> user <db2admin>; (e.g. connect to mydb user db2admin;)
4. Press the top left Execute icon (The icon is two gears and should be the 1st one from left.)
5. Enter the admin password in the login promt and press the "OK" button.
6. Review the status mesages generated below the field and look for any errors.
b. Script Tab - Adding script to build table
1. Location your SQL script to use (via Windows folder/explorer).
2. Open your SQL script. Adjust the scheme using Find/Replace if necessary.
3. Do select all (<cntrl a>) and copy to clipboard (<cntrl c>).
4. Switch to the Command Center (should be still open from login steps above).
5. Paste the contents (<ctnrl v> -- there is no right click to paste) into the "Script" field area below the label.
6. Press the execute icon again.
7. Review the status mesages generated below the field and look for any errors.
previous page
|