SMOscript Usage

smoscript 0.40.7341.34495 (c) by devio.at 2008-2020

    list and script databases and database objects.

    usage: smoscript [options (leading '-' or '/')] [command]

    commands:

    l           list databases on server (implied by -s)
                list objects in database (implied by -s -d)
    s           script all objects (implied by -s -d -F/-f)
                script single object (implied by -s -d -o)
    db          list database properties
    dep         list object dependencies (-o)
    fs          find string literals
    f string    find string in modules
    chk         check objects (ex CheckTSql)

    connection options:

    -s server       server name
    -d database     database name
    -u username     username (default: integrated authentication)
    -p password     password (if -u is missing, password for sa)
    -c connection   connection string (sets -s, -d, -u, -p)

    scripting options:

    -o [schema.]object  object name

    -r              generate DROP statements
    -i              include IF NOT EXISTS statements
    -use            generate USE [database]
    -ct             generate Change Tracking clause

    -f filename     output to file
    -fa             append to file if exists
    -F directory    output to directory

                    encodings for output to file:

    -A              current ANSI codepage
    -O              ASCII
    -T              Unicode
    -U              UTF8

    listing options:

    -l[x]a          list [in]accessible databases
    -l[x]ro         list databases [not] read-only
    -l[x]sys        list [non-] system databases
    -ls             list database status

    dependency options:

    -depth          max. recursion depth
    -dxt            exclude tables in result

    find options:

    -fx string      exclude this string literal (multi)
    -fxs string     exclude strings starting with this literal (multi)
    -fi             find string case-insensitive
    -fc             find string and display code

    check options:

    -fmtonly        check using SET FMTONLY ON
    -tio int        check timeout in seconds
    -ce             only list objects raising errors

    sort options:

    -obsn           ORDER BY schema and name
    -obtsn          ORDER BY type, schema, and name
    -st types       sort by type names (comma-separated)