Articles tagged SQL

11 February 2016
11 February 2016

Documenting SQL Server with PowerShell

SQL Server instances are generally poorly-documented. How easily can you tell if something has changed? How easily can you check that there is adequate space for growth? Are you up-to-date with licenses? What errors are happening? Who has accessing the system? Before PowerShell, it was difficult to be on top of all this. Now you can, with the help of Sander's database documenter.… Read more
08 February 2016
08 February 2016

Five Online Database Modelling Services

To design, or redesign, a database of any complexity, the Entity-Relationship modelling tool becomes essential. The specialized tools that have dominated the industry for a long while are expensive and are installed on a workstation. Now that browser technology has progressed so rapidly, the online database modelling tools have become viable and are starting to attract the attention of database designers. Are they good enough to use now? Robert Sheldon finds out.… Read more
08 February 2016
08 February 2016

SQL GROUP BY Basics

It sometimes pays to go back and look at what you think you already know about SQL. Joe Celko gives a quick revision of the GROUP BY and HAVING clauses in SQL that are the bedrock of any sort of analysis of data, and comes up with some nuggets that may not be entirely obvious… Read more
27 January 2016
27 January 2016

SQL Server System Views: The Basics

When maintaining or refactoring an unfamiliar database, you'll need a fast way to uncover all sorts of facts about the database, its tables, columns keys and indexes. SQL Server's plethora of system catalog views, INFORMATION_SCHEMA views, and dynamic management views contain all the metadata you need, but it isn't always obvious which views are best to use for which sort of information. Many of us could do with a simple explanation, and who better to provide one than Rob Sheldon?… Read more
26 January 2016
26 January 2016

The SQL Server 2016 Query Store: Accessing Query Store Information Using DMVs

The SQL Server 2016 Query Store provides several new ways of troubleshooting queries, studying their plans, exploring their context settings, and checking their performance metrics. In using the Query Store to ensure that performance is as good as possible, it isn't long before it becomes important to be familiar with the DMVs that are associated with the query store, and using them in custom queries.… Read more
13 January 2016
13 January 2016

Data Manipulation in R: Beyond SQL

0
35
Although SQL is an obvious choice for retrieving the data for analysis, it strays outside its comfort zone when dealing with pivots and matrix manipulations. R includes a number of packages that can do these simply. By combining the two, you can prepare your data for analysis or visualisation in R more efficiently.… Read more
06 January 2016
06 January 2016

The SQL Server 2016 Query Store: Built-in Reporting

One of the most important features of the SQL Server 2016's new Query Store is the reporting. With these features, it is now possible to get a wealth of information on how your query workload is performing, either aggregated for the entire query workload or for a single query. With this information, you can see the effects of 'forcing' an execution plan for specific queries and get feedback of the consequences.… Read more
15 December 2015
15 December 2015

JSON support in SQL Server 2016

At last, SQL Server has caught up with other RDBMSs by providing a useful measure of JSON-support. It is a useful start, even though it is nothing like as comprehensive as the existing XML support. For many applications, what is provided will be sufficient. Robert Sheldon describes what is there and what isn't.… Read more
15 December 2015
15 December 2015

Declarative SQL: Using References

There are several ingenious ways of using SQL References to enforce integrity declaratively. Declarative Referential Integrity (DRI) is more effective than using procedural code in triggers, procedures or application layers because it uses the SQL paradigm, thereby making optimisation easier and providing clearer expression of the rules underlying the data.… Read more
04 December 2015
04 December 2015

Declarative SQL: Using UNIQUE Constraints

In SQL, you can express the logic of what you want to accomplish without spelling out the details of how the database should do it. Nowhere is this more powerful than in constraints. SQL is declarative, and Joe Celko demonstrates, in his introduction to Declarative SQL, how you can write portable code that performs well and executes some complex logic, merely by creating unique constraints.… Read more
04 December 2015
04 December 2015

The PoSh DBA – Using the Basic PowerShell Paradigms

PowerShell is like any computer language: you must understand the paradigms, the constructs, and the way it is designed to work to get the most value from it. It is no good just translating 'sausage-string' procedural algorithms. To demonstrate how PowerShell should be used as its' creators intended, Laerte Junior shows the difference between PowerShell problem-solving with, and without, PowerShell paradigms.… Read more
16 November 2015
16 November 2015

Doing a SQL Server Healthcheck via PowerShell

PowerShell is an ideal tool for doing health checks of a collection of SQL Server instances, and there are several examples around, but few acknowledge the fact that individual DBAs have their own priorities for tests, and need something easily changed to suit circumstances. Omid's health check allows tests to be SQL or PowerShell and requires only adding, altering or deleting files in directories. … Read more
16 November 2015
16 November 2015

The SQL Server 2016 Query Store: Overview and Architecture

SQL Server's Query Store, introduced in SQL Server 2016, helps to troubleshoot query performance by capturing a range of information about query usage, CPU, memory consumption, I/O and execution time, and retaining every Execution Plan for analysis. Much of this information is available through queries. It looks set to be the most significant enhancement of SQL Server 2016.… Read more
16 November 2015
16 November 2015

SQL Server Data Tools (SSDT) and Database References

0
22
SQL Server Data Tools (SSDT) provides, via the DacPac, interesting support for verifying not only those references within the database, but also those to other databases even if they are on other servers. Although it is adds an extra level of complexity to deployments, it can increase the probability that deployments will succeed without errors due to broken references or binding errors.… Read more
04 November 2015
04 November 2015

Using SQL Prompt to Accelerate the Top 10 Most Common Database Scripts

There may be some people who enjoy repetitive typing, but Grant Fritchey doesn't. He's always preferred SQL Prompt. The standard snippets suit developers fine but aren't so DBA-oriented, so he set about asking the SQLServerCentral community what they typed in the most, and set about producing a set of DBA snippets with the results. … Read more
03 November 2015
03 November 2015

Jodie Beay and the Deployment of the Cross-Database Dependency

When you use AdventureWorks as a practice database, have you ever looked at the code and thought 'what idiot did this', or 'what did the DBAs think when they saw that?' Subconsciously, you occasionally forget it isn't real and 'fill in the back-story'. The SQL Release Team at Redgate did the same with their own practice database, and imagined a cast of characters wrestling with the difficulties of deploying it.… Read more