Meet a friend outside for a chat, and hopefully a walk
I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.
For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.
Documentation. The Under Recognised Skill
Today we have a guest editorial from David Poole, as Steve is out on holiday.
I have a confession to make. I enjoy writing documentation and do so for a number of reasons.
Writing is a tool I find effective in helping me learn
I enjoy capturing how the different parts of a system work and how the different parts relate to each other.
I enjoy sharing information which is a key part of my role. Writing is a soft skill that enables this.
I enjoy the craftsmanship of writing and the information architecture supporting it
Many of you find the task of documenting systems to be a sin bin task. You didn’t start a career in IT to be a scribe. That is OK, everyone has different passions though I find that people give many reasons to avoid the task rather than say “sorry, I would rather do almost anything other than spend my time writing documentation”.
Yet many of the skills and thought processes that go into a good database design have comparable counterparts in producing good documentation. As with a good database design you don’t notice the good until you have to deal with the bad.
What does good look like?
Let’s take a look at some Microsoft documentation to see some examples of the information architect’s skill.
Information architecture for Microsoft official documentation for sp_column_privileges
The information on system stored procedures is broken up into discrete pages per stored procedure.
The pages themselves are broken up into discreet headings
Relevance
Our page is focussed entirely on one particular stored procedure
Labelling and consistency
The right hand “In this article” bookmarks label the relevant sections in a consistent way across the different stored procedures. The structure of the documentation page is also consistent.
The consistency of the layout also reduces the cognitive load of trying to ingest the information on the page.
There are some variations in that some stored procedures omit examples where as others have an additional and explicit Azure Synapse Analytics and PDW set of examples.
Accessible detail
We can use the right hand “In this article” panel to skip to the part of the documentation that is relevant to us.
The other aspects on the page that are important are as follows.
We see the document date
As authors and readers we have an indicator as to how much time it will take to read the documentation
We see supported versions of SQL Server clearly
The left-hand table of contents is carefully categorised to group relevant information together
We use the hyperlinked breadcrumb trail at the top of the page to keep track of where we are in the documentation set
Although not demonstrated on the sp_column_privileges page, where a stored procedure is marked for deprecation Microsoft does emphasise the fact by placing a shaded warning block around the disclaimer text.
The facility to allow the reader to feedback on whether or not the page is helpful to them gives valuable feedback to the authors. Documentation is written for the reader, not the writer after all.
Although not visible to the reader, should you look at the page source for the documentation you will see a rich set of metadata categorising the content. Search engines can use this to make the content easier to find.
In short, we probably don’t consider the thought, design and hard work has gone into the Microsoft online documentation.
We can see similar thought processes have gone into the way that Redgate SQLDoc and Data Catalog present their information.
What else supports good information husbandry?
From the example above we can see two elements of good documentation that are vital for its success
A clear template and pattern for documenting stored procedures and other SQL Server artefacts
A carefully designed taxonomy and information architecture pattern to follow
The user community contributes to Microsoft documentation which is important for the following reasons
Shared ownership of the documentation
A peer review and approval process
Librarianship to keep the documentation current, catalogued and relevant.
Data quality benefits from data stewards and governance and so too does information husbandry.
Without these three things any documentation will quickly degrade into an unnavigable swamp full of pages of uncertain provenance. When people doubt the provenance, they lose trust and when they lose trust the hard work of assembling the documentation will be wasted through disuse.
Where else I think we can improve
By asking a few basic questions we can focus our efforts where they may be needed.
Do we have a business model measuring the cost of delay for not having sufficient documentation against the cost of producing that documentation? I could waste a couple of hours (or more) Googling and reading Stack Overflow posts then trying to assimilate that information into a form useful for what I am actually trying to do. As our teams repeat this the cost of doing so soon mounts up.
At the extreme end an absence of information may lead to system change being seen as too risky. Because of this the system is considered legacy and requiring an expensive rewrite.
The reader determines the effectiveness of documentation so we must provide a mechanism for feedback. We must also encourage that feedback and also have a process for acknowledging and acting on it? Do the readers themselves have a means to upgrade the documentation? Do they have shared ownership?
We devote considerable effort to measure the effectiveness and optimise our customer facing websites. Could we make better use of our SEO (Search Engine Optimisation) skills for our internal documentation?
We must retire information that is no longer relevant because this will prevent it polluting our remaining documentation.
Do we seek to improve and refactor documentation as we find better ways to express what it is trying to communicate?
Authors must get clear guidance as to what should and should not get documented. Where should they publish that documentation?
Do we provide training and tooling to help our would-be authors? Do we adapt to our authors’ needs?
Concluding thoughts
We find documentation "necessary" when it makes our life easier. That should be measurable in some way
In an office environment I can simply interrupt a colleague to get the internal information I need. However this isn't practical in a distributed working environment such as we have during this pandemic. I feel the absence of suitable documentation more keenly whether I need to give or ask for help.
I believe that businesses are slow to recognise the value of the support a suitably documented system can bring in much the same way as businesses are slow to recognise the value in the work described by Dr. Forsgren in her book Accelerate. Does the organisation see the way we do things today as simply the cost of doing business, not an optimisation opportunity?
Hopefully increasing regulation and scrutiny of the data world is likely to change that perception.
A set of PowerShell automation script tasks for running database build and migrations tasks. This article describes the SQL code analysis task, which will check the syntax of the SQL code in your databases and your migration scripts for 'code smells'.
Power BI is becoming widely used for reporting and data analysis. There are many different versions of Power BI and the features that are offered and this article provides an overview of what is available.
I’m doing a little series on some of the nice features/capabilities in Snowflake (the cloud data warehouse). In each part, I’ll highlight something that I think it’s interesting enough to share....
I am very passionate about having a disaster recovery architecture, plan and strategy. This is very important for business continuity. I will be walking you through a journey on...
Question of the Day
Today's question (by Steve Jones - SSC Editor):
Shutting Down the Instance
Which fixed server role(s) can shut down the instance?
Think you know the answer? Click here, and find out if you are right.
Yesterday's Question of the Day (by Steve Jones - SSC Editor)
The Full OFFSET
I am getting a limited list of numbers with this code on SQL Server 2014:
WITH myTally(n)
AS
(SELECT n = ROW_NUMBER() OVER (ORDER BY (SELECT null))
FROM (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) a(n)
CROSS JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10)) b(n)
)
SELECT *
FROM myTally
ORDER BY n OFFSET 7 ROWS
FETCH NEXT 6 ROWS
This code gives me a syntax error near "ROWS". What is wrong?
Here's a few of the new posts today on the forums. To see more, visit the forums.
SQL Server 2016 - Administration
SQL Server 2016 SP1 to SP2 - We are currently on SQL server SP1. Should we go ahead and apply SP2? What are your recommendations? Do you think it is critical that if we do not apply this updates are we are not having any issues with SP1? Thank you,
SQL Server 2016 - Development and T-SQL
SQL2016 to Access2016 Linked server issue - Hi all We've got an issue with a linked server to an Access database. The general gist is we need the Access database for a file submission that we have to make. The linked server itself is fine but, when I try and write data to it via code, I get the […]
Datawarehouse question - So I have one dimension table and a fact table. dimension table has surrogatekey, fiscalyear and businessplan attributes. (Fiscalyear=2021) fact table has invoice level facts and businessplan surrogate key in there, which works fine. Now, business has additional requirements. They want to come up new business plan for new fiscal year (2022). This new year […]
Getting sum of all transactions by month-end - I have a table that is a list of inventory transactions. For simplicity sake, the table has these columns: Location, Item Number, Trx Date, Trx Amount I'm trying to create a query that gets the accumulation of all transactions for each month in a year. For example, let's assume these transactions: I'm trying to create […]
Administration - SQL Server 2014
Enabling/Configuring Read only routing - I have 2 servers which are part of AG. DB1(Primary) and DB2(Secondary). It has been setup like this for quite some time now but we don't have read routing enabled/configured. I went thru GUI and scripted out what I want to do. Couple of question related to my inquiry. Do I have to failover/reboot when […]
SQL 2012 - General
Implementing TLS In sql server 2012 - Hi Experts, In my project we have 2 servers Webserver and one is database server . We are planning to Implement the TLS in the database server and our DBA can handle the the step to implement TLS on the database server. My query is what all changes we have to do on the Webserver […]
Can we use SSIS dynamically import or export from one table to another table? - Normally, we can use selected databasename--tasks--import data/export data to handle data import and data export rapidly, but this operation is required to be done manully, Can we use SSIS dynamically import or export from one table to another table? such as creating a job in backend to call it as the schedule or call the […]
SQL Server 2019 - Administration
SQL server 2019 reporting need help - Hello sql server reporting 2019, i created temp for 180 days and not sure what to do next, I need to do the following: create a folder for reports for reporting services server. 2.create the report. We want to generate a reporting services web page where you display the contents of the table and create […]
Changing Data Drive Allocation Unit Size on Existing Installation - I have an existing SQL Server 2019 Standard installation that includes SSRS. The setup is fairly typical and the databases are relatively small at this point. There is a C drive and two additional local drives; one for data files and one for backups. The data drive was formatted for 4K and I'd like to […]
Unable to uninstall Sql Server 2019 in my Laptop - Hello, I have installed Sql Server 2019 more than 6 months before and forgot the credentials. So I tried uninstalling manually but it is not allowing me to uninstall. Even the services are not starting in Services.msc and Sql Configuration Manager. Not sure what is the issue. Attached the screenshots of the same. I tried […]
Grant Execute on ALL procs in a Database - I see a lot of old, 10+ year old posts for SQL 2000, 2005 etc on this. For our SQL 2019 environment, what is the easiest most efficient way to: GRANT EXECUTE on ALL StoredProcedures in DB_XYZ to MyDomainUser (eg. MyDomain\User_1) thx for any feedback!
SQL Server 2019 - Development
Cant cast VARCHAR(MAX) To XML Variable - Hi there I would like to cast a NVARCHAR(MAX) variable string to an XML variable as follows: declare @DataSheetXML NVARCHAR(MAX) = 'supports_alarmsTruealarmsTinylikesupports_min_maxFalselocally_latched_alarmsFalsesupports_startFalsesupports_suspend_when_fullFalsertcinternalhas_radioTrueunicode_descriptionsTrueminimum_interval120host_battery_alert_functionbattery_alertmemory_size1146880pt1000_reference_resistor1831.1688311688313device_descriptionTinytag Ultra2 Radio Receiveris_basestationTruememory_size32768config_hz1024delay_hz1max_delay315360000outputs_signed_encodingTruehas_32_bit_addressesTruehas_bc_start_new_sessionTrueserviceserviceambientserviceinstrumentationinstrumentationtesttesttesttesttesttesttesttesttesttesttest01thrhinstrumentationambienttestserviceloaded_vrefswitched120false0vrefswitched120false0bat_chk120twelve_bit_rawfalse0temperature120false0RadioStats_00160false0Radio' declare @xml xml Set @xml = cast(@DataSheetXML as XML) However I am getting the following error: Msg 9400, Level 16, State 1, Line 6 XML parsing: line 1, […]
Powershell
Pipeline Variables - Hi All I am trying to understand why my filtering doesn't work here.... I am new to Powershell Using dbatools This works: $t = get-dbaregserver $t | Where-Object {$_.group -eq "GroupName"} This does not filter the result: $p = get-dbaregserver $p | Where-Object {$p.group -eq "GroupName"}
The Future of Community
Future of SQL Server - I am becoming a little disconcerted by the lack of news about the next version of SQL Server as well as the continual bombardment of all things Azure from Microsoft. Microsoft is pushing Azure hard. The subscription model via the Cloud is the future. For Adobe customers it is already the present. Now, logically, I […]
Administration
Changing Data Drive Allocation Unit Size on Existing Installation - I have an existing SQL Server 2019 Standard installation that includes SSRS. The setup is fairly typical and the databases are relatively small at this point. There is a C drive and two additional local drives; one for data files and one for backups. The data drive was formatted for 4K and I'd like to […]
This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.