fides icon indicating copy to clipboard operation
fides copied to clipboard

Issue with generating dataset for SQL server express

Open waghsac opened this issue 2 years ago • 9 comments

Tried to generate dataset using SQL server express using various connecting strings but getting the below errors. First one: fidesctl generate dataset db mssql://WAGHSAC\SQLEXPRESS/AdventureWorks2019?trusted_connection=yes adw_scan/sample.yml Server is reachable and the client/server application versions match. /usr/local/lib/python3.8/site-packages/sqlalchemy/connectors/pyodbc.py:82: SAWarning: No driver name specified; this is expected by PyODBC when using DSN-less connections util.warn( Database connection failed with engine: Engine(mssql://WAGHSAC\SQLEXPRESS/AdventureWorks2019?trusted_connection=yes)! (pyodbc.InterfaceError) ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)') (Background on this error at: http://sqlalche.me/e/14/rvf5)

Second one: fidesctl generate dataset db mssql+pyodbc://WAGHSAC\SQLEXPRESS/AdventureWorks2019?driver=ODBC+Driver+17+for+SQL+Server?trusted_connection=yes adw_scan/sample.yml Server is reachable and the client/server application versions match. Database connection failed with engine: Engine(mssql+pyodbc://WAGHSAC\SQLEXPRESS/AdventureWorks2019?driver=ODBC+Driver+17+for+SQL+Server)! (pyodbc.OperationalError) ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)') (Background on this error at: http://sqlalche.me/e/14/e3q8)

waghsac avatar May 06 '22 08:05 waghsac

Are you installing from pypi with pip install fidesctl or from a clone with pip install -e .? If from pypi does pip install fidesctl[mssql] make a difference? Or if from a clone try pip install -r optional-requirements.txt.

sanders41 avatar May 07 '22 14:05 sanders41

Thanks @sanders41 will check this out and let you know.

waghsac avatar May 09 '22 07:05 waghsac

Hey @waghsac are you still having trouble here? We could do some debugging with you if you're running into issues.

NevilleS avatar May 12 '22 22:05 NevilleS

Hey @waghsac are you still having trouble here? We could do some debugging with you if you're running into issues.

Yes @NevilleS still getting this error.

waghsac avatar May 14 '22 10:05 waghsac

OK thanks @waghsac. Can you confirm if you've tried using pip install fidesctl[mssql]? This is needed to enable the MSSQL connector.

NevilleS avatar May 14 '22 11:05 NevilleS

You can see a bit more information about these optional dependencies here: https://ethyca.github.io/fides/1.6.0/installation/pypi/#installing-optional-dependencies

NevilleS avatar May 14 '22 11:05 NevilleS

@waghsac if you do have the optional dependencies installed can you try wrapping your connection string in quotes to see if it makes any difference?

fidesctl generate dataset db "mssql://WAGHSAC\SQLEXPRESS/AdventureWorks2019?trusted_connection=yes” “adw_scan/sample.yml”

sanders41 avatar May 14 '22 16:05 sanders41

@sanders41 does not work with the quotes as well. Gives the same error.

waghsac avatar May 15 '22 13:05 waghsac

@waghsac can you confirm that you're able to connect to the database otherwise via sqlalchemy? using that connection string?

ThomasLaPiana avatar Jul 07 '22 15:07 ThomasLaPiana

Closing as stale, but happy to reopen and troubleshoot further with your help!

NevilleS avatar Jan 10 '23 13:01 NevilleS