tzimie / BellModules

https://actionatdistance.com
MIT License
4 stars 1 forks source link

How to run script? #1

Open ZedZipDev opened 1 year ago

ZedZipDev commented 1 year ago

I have a SQL Server instance on my machine VMUX20\SQL2019

and 10 databases small and large. This is my ready.txt file

# root demo, params: usr, grp, name, tags
from bell import *
import os

usr, grp, name, tags, tagval = bellparams()

print(f'SQL2019|MSSQLserver|folder|Server=192.168.1.6~Conn=Server=192.168.1.6\sql2019;UID=sa;PWD=dobedo)

Then I run

`PS D:\_Docker\BellDemo> .\runme.bat  `
In browser I see one SQL server only
SQL2019
I click on it and after timeout I received:
SQL2019
>Error executing script /var/scripts/MSSQLserver_open.py: Traceback (most recent call last):
  File "/var/scripts/MSSQLserver_open.py", line 22, in <module>
    d = MSSQLquery(conn,"select DB_NAME(DbId) as name,sum(BytesOnDisk/1000/1000./1000.) as Gb from ::fn_virtualfilestats(null,null) where DbId>4 group by DbId")
  File "/var/scripts/MSSQLquery.py", line 12, in MSSQLquery
    curs = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};'+constr).cursor()
pyodbc.OperationalError: ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')

What is wrong in my connection string? What database analyzed by script or all available? What to do If I need to analyze 1-2 databases only?

tzimie commented 1 year ago

Hi. Thank you for your interest in the project. I am traveling till Fri so replying from a phone

  1. Your machine IP is 192.168.1.6, based on ipconfig, correct?
  2. I will check if docker can connect to a named instance, but few days later. Frankly, Docker demo support is experimental, just because the project is many component and is difficult to configure
  3. Some scripts are server-wise, and some are database-wise.
  4. I do need a feedback to this project before 2 conferences I will participate in, so if you have time I can make a 30 min demo for you so you can decide if you need this project out not

Regards tzimie@gmail.com