Surely you've answered your own question.
If it relates to the use of the database then it's a SO question.
If it relates to the maintenance of the database then it's a SF question.
Programmers are (usually) going to be looking for the former type of question and so will look on SO.
Sys admins and DBAs are going to be looking for the latter type of question and so will look on SF.
Occasionally programmers will be looking for the latter and will tend to look on SO first. If they don't know about SF they might ask their question, but it will be closed as "belongs on SF" so they will be directed to SF.
The only thing that might be useful could be to detect SQL in the title or tags and put up a notice about looking on SF for non-programming SQL questions.