SQL Server Management Studio – SQL Server Diagnostics Extension

The SQL Server engineering (TIGER) team announcement a preview for a SSMS SQL Server Diagnostics extension.

My writeup on this is at http://smooth1.co.uk/sqlserver2017/SSMS_SSD.html


SQL Server on Linux – new command line tools.

I have been playing with the new SQL Server on Linux command line tools

http://smooth1.co.uk/sqlserver2017/LINUX_CMD_TOOLS.html

Very nice that sql-scripter has an option to limit output to a given SQL Server Version and even better Edition although did find an issue with this option and will be providing feedback to Microsoft.

 


SQL Server on Linux – SQL Server 2017 goes cross platform!

Here are the slides for my recent talks on SQL Server on Linux – SQL Server 2017 goes cross platform!

http://smooth1.co.uk/presents/201705_SSOL/201705_SSOL.zip


SQL Server – Changing Recovery Model from Full to Bulk Logged whilst a Tranasction is active.

If have a SQL Server database and change the Recovery Model from Full to Bulk Logged whilst a transaction is open what happens?

If the ongoing transaction which was started under Recovery Model Full does an operation which can be minimally logged what happens?

Does the operation become minimally logged which then means the VLF is tagged as a minimally logged logfile which then does not allow certain operations e.g. restores from the next log backup with STOPAT.

We test with STOPAT and also use fn_dump_dblog to see exactly what ends up in the log backup and how we can identify minimally logged operations in a log backup file.

http://smooth1.co.uk/sqlserver2016/RM_BL_ML.html


SQL Server 2016 – Database Scoped Configuration Parameters and Always On Availability Group failovers.

In SQL Server 2016 we have database scoped parameters.

With an AlwaysOn Availability Groups we can have different database scoped parameter values on the primary compare to the secondaries.

How does this work with an Always On Availability Group failover ?

http://smooth1.co.uk/sqlserver2016/AA_AG_DSP.html


SQL Server – checking for Instant File Initialization Permissions

To check for Instant File Initialization Permissions:

 

NOTE: This script needs to be locally on the machine where you are checking for permissions.

The script assumes the SQL Servers are running under a server where the DisplayName starts with “SQL Server (“, please adapt for your own needs.


DB2 LUW announcements at IDUG NA 2017

From Peter Bradford @scend we have:

#1 We made requests for enhancements (RFEs) public!

http://ibm.biz/DB2-RFE

#2: DB2 Developer-C! All DB2 features, free for development, a MySQL substitute! Download 6/22

http://ibm.biz/try-db2

#3: The new “Download & Go” installation experience, available with Developer-C Download 6/2. Download a platform specific binary. Small download, less than 15 minutes to install. Install reduced to 3 clicks and User/Password input only.

http://ibm.biz/try-db2

#4: We will support DB2 V11 on Solaris Sparc later this year with our V11.1.3.3 release, by 12/15/17 (if not sooner)

#5: New “Continuous Support” offering for customers on DB2 V9.7 and V10.1!

How To and Workaround assistance, no new defect fixes

This still provides existing fixed but no new custom special builds or codes fixed

If you have questions contact

Email: askcs@us.ibm.com

Twitter: @db2support or https://twitter.com/db2_support


Setting up password-less ssh on CentOS

First set the hostname on both machines:

hostnamectl status

hostnamectl set-hostname newhostname

Add both hostnames to /etc/hosts on both machine

On source machine:

ssh-keygen

ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host

On target machine:

restorecon -Rv ~/.ssh

ssh remote-host


Informix write listener – Rest API setup issues

For my talk at IIUG 2017 I was working with the wire listener on Informix.

When setting up a wire listener for the REST API I found some Informix packaging issues and issues with the DeveloperWorks article.

I was following the developerWorks article Informix and NoSQL: First Steps with the REST API

NOTE: This series of articles REALLY helped when getting my talk ready!

I was working with the latest Informix server version 12.10.FC8 on CentOS 7 and found:

a) When unpacking nosql_sdk.zip this unpacks to folder nosql-sdk-1.2.2 – there was no explict step with the command to add a link called nosql_sdk to make the examples work, I add this below.

cd $INFORMIXDIR
unzip bin/nosql_sdk.zip

ln -s nosql-sdk-1.2.2 nosql_sdk

b) The library ${INFORMIXDIR}/nosql_sdk/tomcat-embed-core.jar is missing!

Noticing that the other libaries were for version 8.0.38 I went to

Tomcat Embed Core » 8.0.38

and on the “Files” line clicked the download link.

I then copied tomcat-embed-core-8.0.38.jar into $INFORMIXDIR/nosql_sdk/lib

and added this to the classpath.

3. In order to get class com.ibm.nosql.server.ListenerCLI I also had to add ${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar to the classpath.

The final result was:

cat rest_listener_start.sh
#!/bin/sh

${INFORMIXDIR}/extend/krakatoa/jre/bin/java \
-cp ${INFORMIXDIR}/bin/jsonListener.jar:${INFORMIXDIR}/nosql_sdk/lib/tomcat-embed-core-8.0.38.jar:${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar \
com.ibm.nosql.server.ListenerCLI \
-config ${INFORMIXDIR}/etc/restListener.properties \
-logfile /work/martinfu/731/restListener.log \
-start &

exit

cat rest_listener_stop.sh
#!/bin/sh

${INFORMIXDIR}/extend/krakatoa/jre/bin/java \
-cp ${INFORMIXDIR}/bin/jsonListener.jar:${INFORMIXDIR}/nosql_sdk/lib/tomcat-embed-core-8.0.38.jar:${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar \
com.ibm.nosql.server.ListenerCLI \
-config ${INFORMIXDIR}/etc/restListener.properties \
-stop

exit

I hope this helps and am talking to IBM about the issues I found.

 


SQL Server 2016, upgrading to compatability level 130,Trace flag 139 and additional one-off dbcc checks.

https://support.microsoft.com/en-gb/help/4010261/sql-server-2016-improvements-in-handling-some-data-types-and-uncommon-

When upgrading to SQL Server 2016 RTM CU3/SP1 and upgrading to database compatablity leve 130 there are additional DBCC checks which should be performed.

These are hidden behind Trace flag 139 which should be temporarily enabled as part of the process of changing database compability level to 130.

  • Enable trace flag 139 by running DBCC TRACEON(139, -1).
  • Run DBCC CHECKDB/TABLE..WITH EXTENDED_LOGICAL_CHECKS to validate persisted structures
  • Run DBCC CHECKCONSTRAINTS commands (if rows are affected the associated where clause to identify the row will be returned).
  • Disable trace flag 139 by running DBCC TRACEOFF(139, -1)
  • Change the database compatibility level to 130.
  • REBUILD any structures that you identified in step 1.

There are impovements to expression evaluation in database level 130 and this affects persisted structures

  • Check constraints
  • Persisted Computed columns
  • Indexes using computing columns whether as part of the key or as included columns
  • Filtered indexes
  • Indexed views

Upgrade to compatability level 130 BEFORE attempting to fix issues so the new expression evaluation logic is used for the fixed.

  • Check constraints – change data or drop/recreate constraint with new expression
  • Persisted Computed columns – Update a column referenced by the computed column to the same value to force recalcuation of the computed column
  • Index/filtered index/indexed views – Either A) Put db in single user mode and run DBCC CHECKTABLE with REPAIR_REBUILD B) ALTER INDEX…REBUILD and if supported in your edition of sql server consider adding the WITH (ONLINE=ON) clause.

NOTE: There are some queries in the Appendix C/D of the article above which can be used to help identify affected objects.