Skip to content

Commit cb52314

Browse files
committed
Simplified CONNECTION_OPTIONS for data source DDL
1 parent 644a8cf commit cb52314

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

samples/features/sql-big-data-cluster/data-virtualization/generic-odbc/mysql/mysql_version.sql

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
-- the Query menu, and "Specify Values for Template Parameters" option.
55
IF NOT EXISTS(SELECT * FROM sys.database_scoped_credentials WHERE name = 'MySQL80-user')
66
CREATE DATABASE SCOPED CREDENTIAL [MySQL80-user]
7-
WITH IDENTITY = 'mssql-user'
8-
, SECRET = 'sql19tw0mysql';
7+
WITH IDENTITY = '<mysql_user,nvarchar(100),mssql-user>'
8+
, SECRET = '<mysql_user_password,nvarchar(100),sql19tw0mysql>';
99

10-
-- Create external data source that points to MySQL server
11-
-- The tokens '%u' and '%p' is used to reference the credential information.
10+
-- Create external data source that points to MySQL server.
1211
--
1312
IF NOT EXISTS(SELECT * FROM sys.external_data_sources WHERE name = 'MySQL80')
1413
CREATE EXTERNAL DATA SOURCE MySQL80
15-
WITH (LOCATION = 'odbc://uc-win19-vm.redmond.corp.microsoft.com'
16-
, CONNECTION_OPTIONS = 'Driver={MySQL ODBC 8.0 Unicode Driver};User name=%u;Passwword=%p;IGNORE_SPACE=1'
14+
WITH (LOCATION = 'odbc://<mysql_server,nvarchar(100),mysql-server-name>'
15+
, CONNECTION_OPTIONS = 'Driver={MySQL ODBC 8.0 Unicode Driver};IGNORE_SPACE=1'
1716
, CREDENTIAL = [MySQL80-user]);
1817

1918
-- Create external table over inventory table on MySQL server

samples/features/sql-big-data-cluster/data-virtualization/generic-odbc/postgresql/pg_tables.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ IF NOT EXISTS(SELECT * FROM sys.database_scoped_credentials WHERE name = 'Postgr
77
WITH IDENTITY = '<postgres_user,nvarchar(100),mssql-user>'
88
, SECRET = '<postgres_user_password,nvarchar(100),sql19tw0postgresql>';
99

10-
-- Create external data source that points to PostgreSQL server
11-
-- The tokens '%u' and '%p' is used to reference the credential information.
10+
-- Create external data source that points to PostgreSQL server.
1211
--
1312
IF NOT EXISTS(SELECT * FROM sys.external_data_sources WHERE name = 'PostgreSQL11')
1413
CREATE EXTERNAL DATA SOURCE PostgreSQL11
1514
WITH (LOCATION = 'odbc://<postgres_server,nvarchar(100),postgres-server-name>'
16-
, CONNECTION_OPTIONS = 'Driver={PostgreSQL ODBC Driver(UNICODE)};User name=%u;Passwword=%p'
15+
, CONNECTION_OPTIONS = 'Driver={PostgreSQL ODBC Driver(UNICODE)}'
1716
, CREDENTIAL = [PostgreSQL11-user]);
1817

1918
-- Create external table over inventory table on PostgreSQL server

0 commit comments

Comments
 (0)