If you want a Task to retrieve data from a database then you will first need to add a Connections entry for the database.
...
To add a new Connection right click on the Connections node in the tree and select New Connection.
Select from one of the above options and click OK.
...
The database connection dialog has the following available properties; whether these properties are required is defined by the particular database type.
Connection
Name
This is the unique name that you wish to give your database connection. It is advisable to call is something relevant as this name will be used to populate list box selections when creating Tasks.
Server
This is the name of the server where the database resides.
Instance
This is the name of the instance and is only required for SDE databases.
Database
This is the actual name of the database. In the case of an Oracle database this should match the entry in your TNSNAMES.ora.
Port
The port number being used.
Username
This is the Username for the Workflow to access the database.
Password
This is the password for the above Username.
...