Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6731061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:29:00+00:00 2026-05-26T10:29:00+00:00

Using Java schemacrawler , why is it scanning every table in my database? Shouldn’t

  • 0

Using Java schemacrawler, why is it scanning every table in my database? Shouldn’t it just be scanning the database I specified on the command line: -database=openfire ???

:: schemacrawler batch launcher
@echo off
C:\JDK\bin\java.exe -classpath jtds-1.2.4.jar;schemacrawler-8.8.jar; \
schemacrawler-sqlserver-8.8.jar schemacrawler.tools.sqlserver.Main \
-user=sa -password=password -database=openfire -port=1433 -host=localhost \
-table_types=TABLE -command=schema -schemas=.*\.dbo.* -infolevel=standard \
-loglevel=FINE
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:29:01+00:00Added an answer on May 26, 2026 at 10:29 am

    Ok, I figured it out. The -database flag only gives the sql driver a connect path, it doesn’t affect the filter for the database name. In other words:

    -database=openfire  DOES NOT EQUAL  -schemas=openfire.dbo.*
    

    So, the answer is:

    :: schemacrawler batch launcher
    @echo off
    C:\JDK\bin\java.exe -classpath jtds-1.2.4.jar;schemacrawler-8.8.jar; \
    schemacrawler-sqlserver-8.8.jar schemacrawler.tools.sqlserver.Main \
    -user=sa -password=password -database=openfire -schemas=openfire.dbo.* \
    -port=1433 -host=localhost -table_types=TABLE -command=schema \
    -infolevel=standard -loglevel=FINE
    

    My finished batch script:

    @ECHO OFF
    SETLOCAL ENABLEDELAYEDEXPANSION
    :: first get timestamp of this script
    SETLOCAL
    FOR /F "skip=1 tokens=2-4 delims=(-)" %%a IN ('"echo.|date"') DO (
        FOR /F "tokens=1-3 delims=/.- " %%A IN ("%DATE:* =%") DO (
            SET %%a=%%A&SET %%b=%%B&SET %%c=%%C))
    SET /A "yy=10000%yy% %%10000,mm=100%mm% %% 100,dd=100%dd% %% 100"
    FOR /F "tokens=1-4 delims=:. " %%A IN ("%time: =0%") DO @SET \
    UNIQUE=%yy%%mm%%dd%-%%A%%B
    
    SET TITLE=Schema Crawler
    TITLE=%TITLE%
    :: supports DBNAME as argument
    IF NOT "%1"=="" (
      SET DBNAME=%1
      C:\JDK\bin\java.exe -classpath jtds-1.2.4.jar;schemacrawler-8.8.jar; \
      schemacrawler-sqlserver-8.8.jar schemacrawler.tools.sqlserver.Main -user=sa \
      -password=password -database=!DBNAME! -schemas=!DBNAME!.dbo.* -port=1433 \
      -host=localhost -table_types=TABLE -command=schema -procedures= \
      -infolevel=lint -loglevel=OFF > !DBNAME!_schema_!UNIQUE!.txt
      GOTO :END
    )
    
    :: run minimized
    ::IF NOT DEFINED PIL (
    ::    SET PIL=1
     ::   START /MIN "" %~0 %1
     ::   EXIT /B
    ::)
    
    :: script start
    ECHO Working...
    OSQL.exe -E -Slocalhost -h-1 -Q"SET NOCOUNT ON;SELECT LTRIM(RTRIM(name)) \
    FROM sysdatabases WHERE name NOT IN ('master','tempdb','model','msdb');" \
    >dblist.txt
    FOR /F "tokens=* delims= " %%I IN (dblist.txt) DO (
      IF NOT "%%I"=="                                                      " (
        SET DBNAME=%%I
        SET DBNAME=!DBNAME: =!
        ECHO !DBNAME!
        C:\JDK\bin\java.exe -classpath jtds-1.2.4.jar;schemacrawler-8.8.jar; \
      schemacrawler-sqlserver-8.8.jar schemacrawler.tools.sqlserver.Main -user=sa \
      -password=password -database=!DBNAME! -schemas=!DBNAME!.dbo.* -port=1433 \
      -host=localhost -table_types=TABLE -command=schema -procedures= \
      -infolevel=lint -loglevel=OFF > !DBNAME!_schema_!UNIQUE!.txt
      )
    )
    DEL /Q dblist.txt
    GOTO :EXIT
    
    :END
    ECHO Finished processing %1 .  Closing in 20 seconds...
    ECHO.
    FOR /l %%a in (20,-1,1) do (TITLE %TITLE% -- closing in %%as&ping \
    -n 2 -w 1 127.0.0.1>NUL)
    
    :EXIT
    EXIT
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started using Java's enums in my own projects (I have to use
I'm using Java but I guess this question applies to whatever language. I just
Just started using Java (for Android, if that matters) and all I want is
I'm using Java Studio Creator with a MySQL dataBase to build my new small
When using Java applications, every time I open a dialog box, the starting directory
Using Java, how can I test that a URL is contactable, and returns a
Using java, minus the exception handling, it is as simple as FileOutputStream ostream =
Using java I am trying to develop a method using recursion to analyze a
Using Java (1.6) I want to split an input string that has components of
By using java reflection, we can easily know if an object is an array.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.