SQL Server Schema database as sql File. lazarus / 16-Databases ---------------------------------------------------------------------- BSaidus · 2017-09-12 12:36 Hi,  Is there any one who can help me to get MS-SQLServer schema database as SQL File. Even a commande line to do this. Thanks. ---------------------------------------------------------------------- nummer8 · 2017-09-12 13:18 You could try MS SQL management Studio Select database Rightclick mouse (menu) Tasks -> Generate Scripts.... Next -> Next -> Next. Somewhere along the line you can see a button advanced. Click on it to set the option to include the data. For further info a MS-SQL forum can give you probably more info. Jos ---------------------------------------------------------------------- BSaidus · 2017-09-12 13:22 Yes ! I know this, But I want to create application With LAZARUS/FPC that can run some command line (example : SQLCMD.Exe or other ) and then get schema. I've searched the net but ..... nothing about that !! Thanks. ---------------------------------------------------------------------- nummer8 · 2017-09-12 13:48 This is what I found on google. https://blogs.technet.microsoft.com/dataplatforminsider/2017/05/17/try -new-sql-server-command-line-tools-to-generate-t-sql-scripts-and- monitor-dynamic-management-views/ I never used it so I don't know if it is usable for you. Jos ---------------------------------------------------------------------- BSaidus · 2017-09-12 14:17 Thanks , I install it but do not works Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i C:\Python27>mssql-scripter.bat -S 10.0.0.3\BIGSOFT -d master -U sa -P sql2005  --schema-and-data > epb2011.sqlusage: mssql-scripter [-h] [--connection-string  | -S ] [-d] [-U] [-P] [-f]                      [--file-per-object] [--data-only | --schema-and-data]                    [--script-create | --script-drop | --script-drop-create]                    [--target-server-version {2005,2008,2008R2,2012,2014,2016,vNext,AzureDB,AzureDW}]                    [--target-server-edition {Standard,Personal,Express,Enterprise,Stretch}]                      [--include-objects [[...]]] [--exclude-objects [[...]]]                    [--include-schemas [[...]]] [--exclude-schemas [[...]]]                    [--include-types [[...]]] [--exclude-types [[...]]]                    [--ansi-padding] [--append] [--check-for-existence] [-r]                      [--convert-uddts] [--include-dependencies]                    [--exclude-headers] [--constraint-names]                    [--unsupported-statements]                      [--disable- schema-qualification] [--bindings]                      [--collation] [--exclude-defaults]                      [--exclude-extended- properties] [--logins]                      [--object-permissions] [--owner]                      [--exclude-use-database] [--statistics]                      [--change-tracking] [--exclude- check-constraints]                      [--data-compressions] [--exclude-foreign-keys]                      [--exclude-full-text- indexes] [--exclude-indexes]                      [--exclude-primary- keys] [--exclude-triggers]                      [--exclude-unique- keys] [--display-progress]                      [--enable- toolsservice-logging] [--version]'ascii' codec can't decode byte 0x96 in position 24: ordinal not in range(128)