Extracting a database name from a file
databaseName is a pointless local variable: you can simply delete all lines using it.

The same goes for sourceFile.



Arrline and s are poorly named variables, and s is lowercased twice:


String[] Arrline = line.split(" ");
for (String s : Arrline) {
    if (!s.toLowerCase().equals("create") &amp;&amp; !s.toLowerCase().equals("database")) {
        return s;
    }
}



Cleaning these up the code becomes:

String[] segments = line.split(" ");
for (String origSegment : segments) {
    String segment = origSegment.toLowerCase();
    if (!segment.equals("create") &amp;&amp; !segment.equals("database")) {
        return origSegment;
    }
}




The current method of extracting the database name is quite awkward and inefficient. Look at these steps:


lowercase the line
check if it contains a string
split the line to tokens
for each token


if the lowercased token is neither "create" nor "database" then return it



You can do much better using regular expressions:

Pattern DBNAME_PATTERN = Pattern.compile("create +database +(\\w+)", Pattern.CASE_INSENSITIVE);

private String extractDatabaseName(String input) {
    Matcher matcher = DBNAME_PATTERN.matcher(input);
    if (matcher.find()) {
        return matcher.group(1);
    }
    return null;
}




The initialization of line is unnecessary,
because it gets assigned on the next line anyway:


String line = null;



So a simple declaration is enough:

String line;