Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cavo789/vbs_sql_sp_columns
Connect to SQL Server, iterate every tables and generate a .csv file by table containing the table's structure
https://github.com/cavo789/vbs_sql_sp_columns
csv documentation marknotes sql-server table-structure vbscript
Last synced: about 1 month ago
JSON representation
Connect to SQL Server, iterate every tables and generate a .csv file by table containing the table's structure
- Host: GitHub
- URL: https://github.com/cavo789/vbs_sql_sp_columns
- Owner: cavo789
- License: mit
- Created: 2018-03-29T13:46:29.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-11-01T21:51:20.000Z (about 3 years ago)
- Last Synced: 2024-11-28T23:34:06.039Z (about 1 month ago)
- Topics: csv, documentation, marknotes, sql-server, table-structure, vbscript
- Language: VBScript
- Size: 80.1 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - cavo789/vbs_sql_sp_columns - Connect to SQL Server, iterate every tables and generate a .csv file by table containing the table's structure (VBScript)
README
# SQL Server - Document tables, extract structure as CSV file
![Banner](./banner.svg)
> Connect to SQL Server, iterate every tables and generate a .csv file by table containing the table's structure
## Table of Contents
- [Description](#description)
- [Install](#install)
- [Usage](#usage)
- [Author](#author)
- [License](#license)## Description
Connect to a SQL Server database, obtain the list of
tables in that db (process all schemas), get the structure
of each tables thanks the sp_columns stored procedure and
for each table, export that structure in a results subfolderAt the end, we'll have as many files as there are tables in
the database. One .CSV file by table.The content of the CSV will be what is returned by the sp_columns
stored procedure.## Install
Get a copy of the script, save it to your computer.
Get also a copy of the `test.bat` file and edit that file.See below, you'll need to mention four parameters
```
cscript.exe sql_sp_columns.vbs "servername" "dbname" "login" "password"
```Note that you can also edit the first lines of the `sql_sp_columns.vbs` file and mention these infos immediatly as constants.
## Usage
Just run the `batch` file from a command prompt.
A connection to your SQL DB will be made and one .csv file and one .md file will be created in the `results` subfolder; one by table.
## Author
AVONTURE Christophe
## Contribute
PRs not accepted.
## License
[MIT](LICENSE)