Skip to content

Kooteech/SQL-telegram-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL telegram bot

The purpose

To send and receive messages to/from telegram bot natively with MS SQL server (by stored procedures)

Prerequsites

How to install

  1. Clone repo git clone https://github.com/gleberof/SQL-telegram-bot.git
  2. Run setup.sql (new DB [telegram] with all nesessary procedures will be created)
  3. Send a message to your bot directly in Telegram (it will help to identify your chat ID). If you're going to use the bot within a group - you need to set up the bot as one of the admins of that group.
  4. Open Configure.sql. Set bot_token given by Bot Father. It will automatically assign chat_id from the last message to the bot or chat.

How to use

  1. Send a message from SQL by EXEC [dbo].[usp_SendMessage] @message = N'Hello World!'
  2. Run Jobs.sql - to enable jobs
  3. Setup commands.

Please check [telegram].[dbo].[commands] table to learn how to configure new commands (we setup few during initial setup)

commands

  1. Setup progress bar for backups. It's almost confugured and run by job (please try backup on you server)

backup2

  1. Execute SQL selects. It's almost ready to execute commands - put * symbol before select.

select

  1. Setup monitoring. Please check [telegram].[monitor].[threshold] to change threshold for alerts

Contacts

Please do not hesitate to address us in case of questions if any:

  • gleberof @ gmail.com
  • efremovfedorofficial @ gmail.com

About

MS SQL telegram bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TSQL 98.6%
  • C# 1.4%