This is a example on my laptop. I work with Oracle on my local machine:
Needs["DatabaseLink`"]
Needs["JLink`"]
$connection=OpenSQLConnection[JDBC["Oracle","localhost:1521/aaaa"],"Username"->"bbbb","Password"->"cccc"]
'aaaa' is the name of the database
'bbbb'/çcc' is my password & username to connect to my local database.
And then I can make my first SQL statement:
var=SQLExecute[$connection,"select * from tabelname WHERE ROWNUM <= 972"];