Posts

Showing posts with the label SQL

Run Queries in SQL Server Using Python!

Image
By Naomi A. This is a fairly quick one - all of the info needed on how the script works is in the comments! The full script is ready for download on GitHub: (LINK) # Import the pyodbc module. #This module allows Python to connect to an ODBC database, like SQL Server. import pyodbc # The variables hold the server name, database name, username, and password. # This is necessary in order to connect to the SQL Server database. server = 'ServerName' database = 'DBName' username = 'user' password = 'password' # Connection string: # This is a formatted string that the ODBC driver uses to know who is connecting (username and password), # where they are connecting to (server and database), # and what driver they are using to make the connection (ODBC Driver 17 for SQL Server). connection_string = f 'DRIVER= {{ ODBC Driver 17 for SQL Server }} ;SERVER= { server } ;DATABASE= { database } ;UID= { username } ;PWD= { password } ' # DRIVER={{ODBC Dri...

SSRS - How to add a Data Source & Dataset

Image
  SSRS - How to add a Data Source & Dataset By: Naomi A. This article covers: HOW TO ADD A DATA SOURCE HOW TO ADD A DATASET Prerequisites: Have Report Builder downloaded (you can download from Microsoft )

Why Do Apps Perform So Slow?

Image
  This presentation is for technical managers, directors, executives. Hence, please share the link with your colleagues. This presentation is not really for DBA's, however, if you are a DBA and you want to watch then by all means go ahead. Thank you for your support.   CORRECTION: article on nolock hints was written by Priyanka Chauhan. Though Erin Stellato has written articles on this topic as well. Shout out to Priyanka Chauhan for the article.    https://ola.hallengren.com/ https://www.brentozar.com/responder/ https://www.brentozar.com/training/ https://tsql.lucient.com/ https://www.sqlskills.com/sql-server-... https://www.littlekendra.com/2018/02/... https://www.littlekendra.com/course/r... https://www.sqlservercentral.com/arti... https://www.experts-exchange.com/arti... https://retool.com/blog/isolation-lev... https://blog.sqlauthority.com/2007/12... https://www.brentozar.com/archive/201... https://www.brentozar.com/archive/201... https://bertwagn...

DBA Superwomen!

Image
I started training in SQL Server three years ago and I have greatly admired the accomplishments of these Super Women! If you don’t follow them on social media, you are missing out big!   There is so much to say about all of their accomplishments, you could literally write a book, but here I am highlighting some of their achievements! *** If I missed any other contributors in the SQL Server DBA community, it’s because I haven’t found you yet, but rest assured, I will! ***   Kendra Little Little Kendra is no stranger to SQL Server and being Microsoft Data . Little Kendra is no stranger to SQL Server and being Microsoft Data Platform MVP. Kendra Little has been a Top 10 speaker at the SQL PASS Summit more than once and considers herself a database nerd who carries on long conversations with her pets. Not only does she have a great sense of humor, but Kendra has impressively co-developed, tested, and refined the widely used SQL Critical Care consulting product and has worke...

Restoring a SQL Database in Less than 1 Minute!

Image
Steps I took in the Video: 1. Open SSMS 2. Right-Click on Databases 3. In the menu, select Restore Database... 4. Add your Backup Media (Backup files have a .bak file extension) 5. Restore! 6. Check that everything looks great and your done! I made a quick video instead of writing this time... The database being restored is the AdventureWorks2014 sample database. [Resources Linked Below] Thanks for reading!   This was a quick one, but sometimes we need quick answers. If you like what you see on Techie Chatz! join our mailing list to get notified when we post some techie insight! Stay tuned techies! #TechieChatz #techies #techieshelping #SQL #SQLSERVER #SQLserver #master #model #tempdb #msdb #resou rce #systemdatabases #information #sqldatabases #learn #sqlserveragent #SQLserverinstance #instance #database s #fun #technology #userdatabases #data #articleoftheweek #Adventureworksdatabase #Microsoft   Resource: • AdventureWorks sample databases - https://docs.microsoft.com...

The Logical Query Processing Order; T-SQL

Image
What is the logical query process?  Today we are going over the T-SQL (Transact-SQL) logical query processing order for a SELECT  statement. This is the way that standard SQL defines how a query is processed.  Although this process is the conceptual guideline, SQL sometimes bypasses it during the processing of a query.   Note: There are cases where the processing order may differ. See this article for more information.       Example Query: (Using Microsoft's AdventureWorks2014 database, so feel free to try it out in a TEST environment.) SELECT SalesOrderID AS OrderID, COUNT (OrderQty) AS NumberOfOrders FROM Sales.SalesOrderDetail WHERE SalesOrderID <= 43696 GROUP BY SalesOrderID HAVING COUNT (OrderQty) <= 4 ORDER BY SalesOrderID ASC ; GO