Skip to main content

Posts

Showing posts from November, 2017

How to run Firefox after installing Windows 10 creators update

I updated my Windows machine to use creator update and among other surprises, Firefox suddenly stopped to run. It was shown in the Task Manager, but I didn't see anything in Taskbar and the browser wouldn't open. Finally, I found the fix from the below link. This easy solution helped me to get the Firefox app running back again in no time. [Fix] How to run Firefox after installing Windows 10 creators update Here is the summary of needed steps - 1. On the Windows Explorer, go to address bar and type: %appdata%\Mozilla and press enter key. This will take you to the Mozilla folder in AppData folder where additional data and information regarding user program settings and preferences are stored. 2. Once you are inside the Mozilla folder, head to the address bar again and click the “Roaming” word. Doing this will take you the the upper level directory which contains the Mozilla folder. 3. Once in the Roaming folder, go and delete the Mozilla folder. Deleting the Mozilla f

Getting SQL Server Database Size using Python on Windows

Pre-requisites: 1.        Install SQL Server or an Azure SQL Database: I have tested it with SQL Server 2012 installation 2.        Get Python: https://www.python.org/ downloads/ 3.        Get Microsoft ODBC Driver 11 or 13 for SQL Server Windows:   https://www.microsoft.com/en- us/download/details.aspx?id= 50420 4.        Install 'Pyodbc' library using pip or any other package manager of your choice   Here are the main parts of Python Script that fetches DB size -   Import Pyodbc library import pyodbc Define database variables server = <ServerName> database = <DBName> username = <UserName> password = <Password>  Define Database Connection String cnxn = pyodbc.connect( 'DRIVER={ODBC Driver 13 for SQL Server};SERVER=' + server + ';   DATABASE=' + database + ';UID=' + us ername + ';PWD=' + password) cursor = cnxn.cursor()   Define query