SQL Scripter
Welcome to SQL Scripter - The data scripting and reporting utility for Microsoft SQL Server

Installing Instructions       Download Reporting Services files
Generate T-SQL Data Scripts       Templates
Export Data to Text/CSV file       Command line processing
Quick Scripter       Version/Limitation/Guarantee
Create Reports - Export to PDF/Excel       FAQ / Error Messages
Text/CSV to SQL   



  Installing Instructions
SQL Scripter is written in VB.NET 2005, so it requires an installed .NET Framework (Version 2.0 or higher) on your client PC.
You can check to see if you already have the .NET Framework installed by clicking Start on your Windows desktop, selecting Control Panel, and then double-clicking the Add or Remove Programs icon. When that window appears, scroll through the list of applications. If you see Microsoft .NET Framework 2.0 listed, the required version is already installed and you do not need to install it again.
  1. If there's no .NET Framework installed, you have to install it to run SQL Scripter.
    You can do this via Windows Update, or download the framework for your OS direct from Microsoft.
  2. Download and copy the file SQL-Scripter.exe and SQL-Scripter.exe.config into a folder of your choice, there are no more setup steps needed. Just run the file.
  3. In order to use the report engine (including export to PDF/Excel), you have to install Microsoft Report Viewer first.
    Download Microsoft Report Viewer


  Generate T-SQL Data Scripts
1. SQL Scripter is able to script your data in a valid T-SQL format which can be executed in Query Analyzer or SQL Server Management Studio.

Feature list

  1. Choose your source:
    From table, view or your own SQL statement.
  2. Choose your fields.
  3. Choose between different types:
    • Just insert the records (optional: Delete all records first)
    • Insert only new records
    • Insert new records, update existing records
    • Update only existing records
    • Insert all records, but delete first if records exists
    • Delete existing only records
  4. Choose your own key fields, or just select one of the existing indexes.
  5. A result file with all your data will be created.


  Export Data to Text/CSV file
Export your data very easy to text/csv files. Make use of different data sources, field selection, individual settings and data format options.


  Quick Scripter
There are two types of Quick Scripter:

1. Generate T-SQL output scripts for all tables/fields in your database in a single step. The primary key is used to identify the records in each table.
2. Export data to text/csv files in a single step.


  Create Reports - Export to PDF/Excel
This tool can be used to create reports using Microsoft Report Viewer. Export generated reports to portable document format (pdf) or Excel (xls). See Installing Instructions for prerequisites.


  Text/CSV to SQL
Use this tool to generate T-SQL data scripts from Text/CSV file. Read and validate your data. Make use of all SQL-Scripter options.


  Reporting Services Files
This tool can be used to download all report files from a Reporting Services database in a single step. RDL, GIF and JPG files are supported. To read more about Reporting Services for SQL Server, click here.

There're several benefits using SQL Scripter to download/backup your reporting services files.
  • The source is always a reporting services database. This could be the current version, or just a backup.
  • There's no need to setup a full reporting services web environment to access the reports.
  • Trying to use the web default environment to backup your files will result in endless clicks.


  Templates
Create templates for either Generating T-SQL Data Scripts or Exporting Data to Text/CSV Files. A template file contains all information necessary to generate the output scripts. You can execute a template file using the user interface (Execute Templates) or via using the command line optionsg of SQL-Scripter.

How do I create template files?

SQL Temlates: Run "SQL Scripter" and follow the steps to specify all the information necessary.
In step 5 ("Settings + Go") click the "Save As Template" button to save your settings to a template file.
Text/CSV Temlates: Run Text/CSV Exporter and follow the steps to specify all the information necessary.
In step 3 ("Settings + Go") click the "Save As Template" button to save your settings to a template file.

Template folders

The template folder for SQL templates is always SQL-Scripter.exe folder\Templates and for Text/CSV templates SQL-Scripter.exe folder\CSVTemplates.


  Command line processing
You can execute Templates via command line processing only (no user interface). Both SQL and Text/CSV templates are supported.
The template files itself must be located in given template folders (see Template section).

Command line parameters:

/ServerName="Server Name"
/DatabaseName="Database Name"
/Type="SQL" or "CSV"
/UserName="User Name" (no user name = use windows security)
/Password="Password for given User Name"
/Templates="Template1.xml,Template2.xml,..." (one or more template files)
/OutputPath="Output folder"

Examples:

Execute SQL template using username and password:
SQL-Scripter.exe /ServerName="MyServer" /DatabaseName="MyDatabase" /Type="SQL" /UserName="MyUser" /Password="secret" /Templates="MyTemplate1.xml" /OutputPath="C:\Temp"

Execute multiple SQL templates in one step using windows login:
SQL-Scripter.exe /ServerName="MyServer" /DatabaseName="MyDatabase" /Type="SQL" /Templates="MyTemplate1.xml,MyTemplate2.xml" /OutputPath="C:\Temp"

Execute Text/CSV template using username and password:
SQL-Scripter.exe /ServerName="MyServer" /DatabaseName="MyDatabase" /Type="CSV" /UserName="MyUser" /Password="secret" /Templates="MyTemplate1.xml" /OutputPath="C:\Temp"

Execute multiple Text/CSV templates in one step using windows login:
SQL-Scripter.exe /ServerName="MyServer" /DatabaseName="MyDatabase" /Type="CSV" /Templates="MyTemplate1.xml,MyTemplate2.xml" /OutputPath="C:\Temp"


Log Files:

A log file will be created with each command line execution. This log file contains all detailed informations, for example it the execution itself succeeded or not.
The log files are located in folder SQL-Scripter.exe folder\LogFiles

The naming convention of a log file is YYYYMMDD HHMMSS {OK|Error}.txt


  Version/Limitation/Guarantee
SQL-Scripter is shareware. Test and evaluate SQL-Scripter with full functionality.
(Only processed records will be limited).

The application is developed and tested with best intention, but the author assumes no responsibility for any adverse effects of using this software.
Use the software and the result scripts on your own risk.


  FAQ / Error Messages
Error Message:
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Answer: This is a normal behaviour of .NET Framework. Do not run SQL-Scripter from a network drive, run SQL-Scripter from your local machine (or change .NET security settings).
Error Message:
Application could not be initialized (0xc0000....). Click OK to close the application.
Answer: .NET Framework is not installed. See Installing Instructions
Quick Scripter (No Primary Key):
Question: My table has no primary key?
Answer: The primary key is used to identify the records in each table. You may have unique indexes, but non of them is indicated as 'primary key'.
Check yourself for a primary key using:
SELECT OBJECTPROPERTY(OBJECT_ID('InsertYourTableNameHere'), 'TableHasPrimaryKey')
If a primary key is available, this command returns 1.
Text/CSV to SQL:
Question: After clicking on Load file..., only strange looking chars are loaded into the preview grid?
Answer: Try to use another File Format in order to load your file. In some situations, the Automatic function does not work.
SQL Server client tools required?
Question: Are SQL Server client tools (or any other third party object modell) required to run SQL-Scripter?
Answer: No. SQL-Scripter uses only functionality provided by .NET Framework.
Microsoft Report Viewer installed?
Question: How to check if Microsoft Report Viewer is already installed?
Answer: Use Windows Explorer to open the assembly folder (located in Windows\assembly, for instance C:\Windows\assembly). When the list appears, scroll through the list of installed assemblies. If you see Microsoft.ReportViewer.WinForms listed, the required version is already installed and you do not need to install it again.
Microsoft Excel installation required?
Question: Does xls export require Excel to be installed?
Answer: No. The xls export feature is independent of Excel. Excel is only required to view the xls file.
Adobe license required?
Question: Does PDF export require an Adobe license?
Answer: No. The ReportViewer control does not use any Adobe code to generate PDF files. PDF is an open format, and anyone can create PDF files without requiring a special license.
SQL Server versions
Question: Which SQL Server versions are supported?
Answer: SQL Server 7.0, 2000, 2005, 2008