SMOscript Usage
smoscript 0.50.7370.29881 (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)
dd list or display diagrams
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)
object filters (l, s, f, fs, chk):
-o [schema.]object object name
-ol [like] [schema.]object must match LIKE [like]
scripting options:
-r generate DROP statements
-i include IF NOT EXISTS statements
-use generate USE [database]
-ct generate Change Tracking clause
-td separate files for table and table details
-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
database 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)
data diagram options:
-o name list tables in data diagram
-dt list dropped tables only