Recent

Author Topic: SQL Server Schema database as sql File.  (Read 2968 times)

BSaidus

  • Hero Member
  • *****
  • Posts: 542
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
SQL Server Schema database as sql File.
« on: September 12, 2017, 02:36:19 pm »
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.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

nummer8

  • Full Member
  • ***
  • Posts: 108
Re: SQL Server Schema database as sql File.
« Reply #1 on: September 12, 2017, 03:18:40 pm »
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

  • Hero Member
  • *****
  • Posts: 542
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: SQL Server Schema database as sql File.
« Reply #2 on: September 12, 2017, 03:22:13 pm »
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.

lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

nummer8

  • Full Member
  • ***
  • Posts: 108
Re: SQL Server Schema database as sql File.
« Reply #3 on: September 12, 2017, 03:48:20 pm »

BSaidus

  • Hero Member
  • *****
  • Posts: 542
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: SQL Server Schema database as sql File.
« Reply #4 on: September 12, 2017, 04:17:36 pm »
Thanks , I install it but do not works
Code: Pascal  [Select][+][-]
  1. C:\Python27>mssql-scripter.bat -S 10.0.0.3\BIGSOFT -d master -U sa -P sql2005  --schema-and-data > epb2011.sql
  2. usage: mssql-scripter [-h] [--connection-string  | -S ] [-d] [-U] [-P] [-f]
  3.                       [--file-per-object] [--data-only | --schema-and-data]
  4.                       [--script-create | --script-drop | --script-drop-create]
  5.                       [--target-server-version {2005,2008,2008R2,2012,2014,2016,vNext,AzureDB,AzureDW}]
  6.                       [--target-server-edition {Standard,Personal,Express,Enterprise,Stretch}]
  7.                       [--include-objects [[...]]] [--exclude-objects [[...]]]
  8.                       [--include-schemas [[...]]] [--exclude-schemas [[...]]]
  9.                       [--include-types [[...]]] [--exclude-types [[...]]]
  10.                       [--ansi-padding] [--append] [--check-for-existence] [-r]
  11.                       [--convert-uddts] [--include-dependencies]
  12.                       [--exclude-headers] [--constraint-names]
  13.                       [--unsupported-statements]
  14.                       [--disable-schema-qualification] [--bindings]
  15.                       [--collation] [--exclude-defaults]
  16.                       [--exclude-extended-properties] [--logins]
  17.                       [--object-permissions] [--owner]
  18.                       [--exclude-use-database] [--statistics]
  19.                       [--change-tracking] [--exclude-check-constraints]
  20.                       [--data-compressions] [--exclude-foreign-keys]
  21.                       [--exclude-full-text-indexes] [--exclude-indexes]
  22.                       [--exclude-primary-keys] [--exclude-triggers]
  23.                       [--exclude-unique-keys] [--display-progress]
  24.                       [--enable-toolsservice-logging] [--version]
  25. 'ascii' codec can't decode byte 0x96 in position 24: ordinal not in range(128)
  26.  
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

 

TinyPortal © 2005-2018