Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Merge release 1.0.0a23 #196

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
61a36fd
Test commit
MrMeemus Nov 20, 2017
6cc6587
Ron/remove win64 (#165)
MrMeemus Nov 20, 2017
52f92bb
Fixing naming convention for local copy of sqltoolsservice, removed l…
MrMeemus Nov 22, 2017
92da80e
Ron/refresh sqltoolsservice v1.4.0-alpha.47 (#195)
MrMeemus Jun 27, 2018
a2e3efd
Version bump to 1.0.0a23
MrMeemus Jun 28, 2018
559f3ae
Fixed link names
sitwalkstand Jul 11, 2018
d7fef41
Merge pull request #1 from sitwalkstand/sitwalkstand-link-typos
sitwalkstand Jul 11, 2018
c0012c1
Fix typo (scritper -> scripter)
ReneNyffenegger Nov 9, 2018
8c627ca
Spelling fix
austineric Jul 29, 2019
a4d4d6b
Fixed typo (#239)
jcurbelo Jun 1, 2020
987d2f5
add placeholders as directed
udeeshagautam Mar 4, 2021
c38bb4b
missed a spot for password
udeeshagautam Mar 4, 2021
165403f
Trying a placeholder variation
udeeshagautam Mar 4, 2021
1c5ff3c
reverting the last trial change
udeeshagautam Mar 4, 2021
e66aa65
Merge pull request #253 from microsoft/fixcredscanerrors
udeeshagautam Mar 4, 2021
6a5214e
Fix license link
Charles-Gagnon May 20, 2021
1da39c8
Merge pull request #256 from Charles-Gagnon/patch-1
dzsquared Jun 15, 2021
7f07977
Merge pull request #197 from sitwalkstand/dev
dzsquared Jun 15, 2021
56787be
Merge pull request #211 from ReneNyffenegger/ReneNyffenegger-patch-1
dzsquared Jun 15, 2021
694e705
Merge pull request #228 from austineric/patch-1
dzsquared Jun 15, 2021
b9b38be
Update usage_guide.md (#249)
judahr Jan 11, 2022
bef011a
Environment Variables example (Windows)
eshultz Feb 4, 2022
8040fd0
Update usage_guide.md
eshultz Feb 5, 2022
2af5b97
Update usage_guide.md
eshultz Feb 5, 2022
f9f27fe
Merge pull request #264 from eshultz/patch-1
Charles-Gagnon Feb 6, 2022
9e281f1
Microsoft mandatory file
microsoft-github-policy-service[bot] Aug 31, 2022
bb428f3
Merge pull request #270 from microsoft/users/GitHubPolicyService/aec2…
Charles-Gagnon Aug 31, 2022
a197dee
Update README for project archive status
kburtram May 7, 2024
a6bdfe1
Merge pull request #286 from microsoft/feat/archive_readme
kburtram May 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[bumpversion]
current_version = 1.0.0a22

current_version = 1.0.0a23
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+))(?P<release_version>\d+)
serialize =
{major}.{minor}.{patch}{release}{release_version}
Expand Down
14 changes: 12 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@

mssql-scripter
===============

PROJECT STATUS
--------------

**This tool is no longer actively maintained.** Microsoft SQL Server Management Studio provides
a Generate Scripts Wizard that provides similar functionality to mssql-scripter.

Description
-----------

We’re excited to introduce mssql-scripter, a multi-platform command line
experience for scripting SQL Server databases.

Expand Down Expand Up @@ -63,12 +73,12 @@ opencode@microsoft.com with any additional questions or comments.
License
-------

mssql-scritper is licensed under the `MIT license`_.
mssql-scripter is licensed under the `MIT license`_.

.. _installation guide: doc/installation_guide.md
.. _development guide: doc/development_guide.md
.. _usage guide: doc/usage_guide.md
.. _Issues: https://github.com/Microsoft/mssql-scripter/issues
.. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/
.. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/
.. _MIT license: https://github.com/Microsoft/mssql-scripter/blob/dev/LI
.. _MIT license: https://github.com/Microsoft/mssql-scripter/blob/dev/LICENSE.txt
41 changes: 41 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
4 changes: 1 addition & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ def publish_official(platforms_names):
supported_platforms = [
'win32',
'win_amd64',
'win64',
'macosx_10_11_intel',
'manylinux1_x86_64',
'manylinux1_i686']
'manylinux1_x86_64']

targets = {
'build': build,
Expand Down
2 changes: 1 addition & 1 deletion doc/documentation_page.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ You can set environment variables for your connection string through the followi
mssql-scripter

# set environment variable MSSQL_SCRIPTER_PASSWORD so no password input is required.
export MSSQL_SCRIPTER_PASSWORD='ABC123'
export MSSQL_SCRIPTER_PASSWORD='[PLACEHOLDER]'
mssql-scripter -S localhost -d AdventureWorks -U sa

## Generate and run scripts
Expand Down
31 changes: 28 additions & 3 deletions doc/usage_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,18 @@ For option parameters, pass in '-h':
## Examples
Below are example commands that run against the AdventureWorks database. Here is the list of examples:

[Dump datbase object schema](#dump-database-object-schema)
[Dump database object schema](#dump-database-object-schema)

[Dump datbase object data](#dump-database-object-data)
[Dump database object data](#dump-database-object-data)

[Dump database object schema and data](#dump-the-database-object-schema-and-data)

[Include database objects](#include-database-objects)

[Exclude database objects](#exclude-database-objects)

[Include database object types](#include-database-object-types)

[Target server version](#target-server-version)

[Target server edition](#target-server-edition)
Expand All @@ -159,6 +161,9 @@ Below are example commands that run against the AdventureWorks database. Here is

[Script data to a file](#script-data-to-a-file)




### Dump database object schema

# generate DDL scripts for all objects in the Adventureworks database and save the script to a file
Expand Down Expand Up @@ -193,6 +198,13 @@ Below are example commands that run against the AdventureWorks database. Here is
# generate DDL scripts for objects that do not contain 'Sale' in their name to stdout
mssql-scripter -S localhost -d AdventureWorks -U sa --exclude-objects Sale

### Include database object types

# generate DDL scripts for stored procedures to stdout
# The list of object types is specified in the DatabaseObjectTypes Enum of Microsoft.SqlServer.Management.Smo
# https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.management.smo.databaseobjecttypes?view=sql-smo-160
mssql-scripter -S localhost -d AdventureWorks -U sa --include-types StoredProcedure

### Target server version

# specify the version of SQL Server the script will be run against
Expand All @@ -215,15 +227,28 @@ Note this example is for Linux and macOS usage.

# script all the data to a file.
mssql-scripter -S localhost -d AdventureWorks -U sa --data-only > ./adventureworks-data.sql


## Environment Variables
You can set environment variables for your connection string through the following steps:


# (linux/bash)
# set environment variable MSSQL_SCRIPTER_CONNECTION_STRING with a connection string.
$ export MSSQL_SCRIPTER_CONNECTION_STRING='Server=myserver;Database=mydb;User Id=myuser;Password=mypassword;'
$ mssql-scripter

# (linux/bash)
# set environment variable MSSQL_SCRIPTER_PASSWORD so no password input is required.
$ export MSSQL_SCRIPTER_PASSWORD='ABC123'
$ export MSSQL_SCRIPTER_PASSWORD='[PLACEHOLDER]'
$ mssql-scripter -S localhost -d AdventureWorks -U sa

# (windows)
# set environment variable MSSQL_SCRIPTER_CONNECTION_STRING with a connection string.
$Env:MSSQL_SCRIPTER_CONNECTION_STRING = 'Server=myserver;Database=mydb;User Id=myuser;Password=mypassword;'
mssql-scripter

# (windows)
# set environment variable MSSQL_SCRIPTER_PASSWORD so no password input is required.
$Env:MSSQL_SCRIPTER_PASSWORD = "placeholder"
mssql-scripter -S localhost -d AdventureWorks -U sa
10 changes: 3 additions & 7 deletions mssql-scripter.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,10 @@
<Compile Include="mssqlscripter\tests\test_sqltoolsclient.py" />
<Compile Include="mssqlscripter\__init__.py" />
<Compile Include="mssqlscripter\__main__.py" />
<Compile Include="mssqltoolsservice\buildwheels.py" />
<Compile Include="mssqltoolsservice\mssqltoolsservice\__init__.py" />
<Compile Include="mssqltoolsservice\setup.py" />
<Compile Include="register_upload.py" />
<Compile Include="mssqlscripter\mssqltoolsservice\__init__.py" />
<Compile Include="mssqlscripter\mssqltoolsservice\external.py" />
<Compile Include="setup.py" />
<Compile Include="utility.py" />
<Compile Include="verify_packaging.py" />
</ItemGroup>
<ItemGroup>
<Folder Include="doc\" />
Expand All @@ -83,8 +80,7 @@
<Folder Include="mssqlscripter\jsonrpc\contracts\tests\scripting_baselines" />
<Folder Include="mssqlscripter\jsonrpc\tests" />
<Folder Include="mssqlscripter\tests" />
<Folder Include="mssqltoolsservice\" />
<Folder Include="mssqltoolsservice\mssqltoolsservice\" />
<Folder Include="mssqlscripter\mssqltoolsservice\" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
</Project>
2 changes: 1 addition & 1 deletion mssqlscripter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# --------------------------------------------------------------------------------------------


__version__ = '1.0.0a22'
__version__ = '1.0.0a23'
12 changes: 5 additions & 7 deletions mssqlscripter/mssqltoolsservice/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@

# Supported platform key's must match those in mssqlscript's setup.py.
SUPPORTED_PLATFORMS = {
'manylinux1_x86_64': SQLTOOLSSERVICE_BASE + 'manylinux1/' + 'Microsoft.SqlTools.ServiceLayer-linux-x64-netcoreapp2.0.tar.gz',
'manylinux1_i686': SQLTOOLSSERVICE_BASE + 'manylinux1/' + 'Microsoft.SqlTools.ServiceLayer-linux-x64-netcoreapp2.0.tar.gz',
'macosx_10_11_intel': SQLTOOLSSERVICE_BASE + 'macosx_10_11_intel/' + 'Microsoft.SqlTools.ServiceLayer-osx-x64-netcoreapp2.0.tar.gz',
'win_amd64': SQLTOOLSSERVICE_BASE + 'win64/' + 'Microsoft.SqlTools.ServiceLayer-win-x64-netcoreapp2.0.zip',
'win64': SQLTOOLSSERVICE_BASE + 'win64/' + 'Microsoft.SqlTools.ServiceLayer-win-x64-netcoreapp2.0.zip',
'win32': SQLTOOLSSERVICE_BASE + 'win32/' + 'Microsoft.SqlTools.ServiceLayer-win-x86-netcoreapp2.0.zip'
'manylinux1_x86_64': SQLTOOLSSERVICE_BASE + 'manylinux1/' + 'Microsoft.SqlTools.ServiceLayer-linux-x64-netcoreapp2.1.tar.gz',
'macosx_10_11_intel': SQLTOOLSSERVICE_BASE + 'macosx_10_11_intel/' + 'Microsoft.SqlTools.ServiceLayer-osx-x64-netcoreapp2.1.tar.gz',
'win_amd64': SQLTOOLSSERVICE_BASE + 'win_amd64/' + 'Microsoft.SqlTools.ServiceLayer-win-x64-netcoreapp2.1.zip',
'win32': SQLTOOLSSERVICE_BASE + 'win32/' + 'Microsoft.SqlTools.ServiceLayer-win-x86-netcoreapp2.1.zip'
}

TARGET_DIRECTORY = os.path.abspath(os.path.join(os.path.abspath(__file__), '..', 'bin'))
Expand All @@ -39,7 +37,7 @@ def copy_sqltoolsservice(platform):
if not platform or platform not in SUPPORTED_PLATFORMS:
print('{} is not supported.'.format(platform))
print('Please provide a valid platform flag.' +
'[win32, win_amd64, win64, manylinux1_x86_64, manylinux1_i686, macosx_10_11_intel]')
'[win32, win_amd64, manylinux1_x86_64, macosx_10_11_intel]')
sys.exit(1)

copy_file_path = SUPPORTED_PLATFORMS[platform]
Expand Down
10 changes: 5 additions & 5 deletions mssqlscripter/tests/test_argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ def test_connection_string_builder(self):

standard_connection = [u'-S', u'TestServer', u'-d', u'mydatabase', u'-U', 'my_username', u'-P', 'secret']
parameters = parser.parse_arguments(standard_connection)
self.assertEqual(parameters.ConnectionString, u'Server=TestServer;Database=mydatabase;User Id=my_username;Password=secret;')
self.assertEqual(parameters.ConnectionString, u'Server=TestServer;Database=mydatabase;User Id=my_username;Password=PLACEHOLDER;')

def test_connection_string_with_environment(self):
"""
Verify parser picks up connection string and password from environment variable.
"""
os.environ[parser.MSSQL_SCRIPTER_CONNECTION_STRING] = u'Server=TestServer;Database=mydatabase;User Id=my_username;Password=secret;'
os.environ[parser.MSSQL_SCRIPTER_CONNECTION_STRING] = u'Server=TestServer;Database=mydatabase;User Id=my_username;Password=PLACEHOLDER;'
parameters = parser.parse_arguments(['--append'])
self.assertEqual(parameters.ConnectionString, u'Server=TestServer;Database=mydatabase;User Id=my_username;Password=secret;')
self.assertEqual(parameters.ConnectionString, u'Server=TestServer;Database=mydatabase;User Id=my_username;Password=PLACEHOLDER;')

standard_connection = [u'-S', u'TestServer', u'-d', u'mydatabase', u'-U', 'my_username']
os.environ[parser.MSSQL_SCRIPTER_PASSWORD] = u'secret123ABC'
os.environ[parser.MSSQL_SCRIPTER_PASSWORD] = u'PLACEHOLDER'
parameters = parser.parse_arguments(standard_connection)
self.assertEqual(parameters.ConnectionString, u'Server=TestServer;Database=mydatabase;User Id=my_username;Password=secret123ABC;')
self.assertEqual(parameters.ConnectionString, u'Server=TestServer;Database=mydatabase;User Id=my_username;Password=PLACEHOLDER;')


if __name__ == u'__main__':
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from setuptools import setup

MSSQLSCRIPTER_VERSION = '1.0.0a22'
MSSQLSCRIPTER_VERSION = '1.0.0a23'

CLASSIFIERS = [
'Development Status :: 3 - Alpha',
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.