A package to run SQL script or SQL file script in an instance of sql server
Project description
# py-scripto This is to run SQL script or file script in an instance of sql server
### Version used SQL Server 2019 Python 3.7.5
## DEPENDENCIES
### DbExec stored procedure Download from https://github.com/datnguye/SQL-Server/blob/master/maintenance/DbExec.sql Compile it to master database
### xp_cmdshell need enabling on SQL instance ` EXEC sp_configure 'show advanced option', 1 RECONFIGURE GO EXEC sp_configure 'xp_cmdshell', 1 RECONFIGURE GO `
## USAGE
` from py-scripto.sqlserver sqlserver.run_file_script(server="DAVID\DAVID", uid="py-scripto", pwd="py-scripto", connect_to_db="IMPORT", script_path="D:\\Downloads\\test.sql") sqlserver.run_script(server="DAVID\DAVID", uid="py-scripto", pwd="py-scripto", connect_to_db="IMPORT", sql="SELECT * FROM Test WITH (NOLOCK)") `
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py_scripto-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5964de81e6218066bcfee6aaeb3fb9c56ee7e03fc3bbbbdc13486768722a287a |
|
MD5 | 14fb710400217a58874e5dc95fd2d993 |
|
BLAKE2b-256 | 6bc48807aeb9b473b4f9ec1e41ee3e364d8a50bac03769e6f908f2aa0e08a48e |