SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

Tell Me a Joke

It's April 3rd today, and I'm a little sad. We missed April 1 here at SQLServerCentral. The date was on a Saturday, and we don't send a newsletter on that day, so there wasn't any opporunity for a prank. Running one today just doesn't seem right, so we're foregoing our fun in 2017.

Over the years, we've had some good ones. My favorite was SQL Server on Linux, one of the most popular articles for years, unitl it finally came true. There was my decoding of the DTUs and MySQL supporting T-SQL from last year. Where was also the time we took over PASSIn previous years, I've shown you how to throttle a query in mid-execution and  how to get your Service Broken messages in order, and let you enter C# into stored procedures. Do you remember the Easter Egg in SSMS?

We've learned about SQL Server having an open source alternative and the way an index really works. That last one made me proud since I suckered in a few SQL Server experts.

It's not just me, Gail Shaw, Paul Randal, Grant Fritchey, and more have participated in April Fools, with some funny ideas, just real enough to be true. I'm always looking for more people to come up with creative April 1 prank, so if you have a good idea, think 2018...

With Apr 1 being on a holiday, and since I was by myself in the UK (I did run a 5K and work on presentations over the weekend), I thought I'd ask if you had any good links or jokes that appeared on your screen. Anything sucker you in? Anything disappoint you because you wished it were real? Let me know today.

Steve Jones from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums

ADVERTISEMENT

Featured Contents

 

Step by Step Configuring AlwaysOn with Log Shipping

Ganapathi varma Chekuri from SQLServerCentral.com

In this article, I will show you a procedure to combine SQL Server AlwaysOn with logshipping and to make log-shipping to work even in case of failovers between availability replicas in primary site. More »


 

Migrating a Disk-Based Table to a Memory-Optimized Table in SQL Server

Additional Articles from SimpleTalk

The feature formerly known as Hekaton, now In-Memory OLTP can provide very useful performance gains where you carefully select the tables to become memory-optimised. How do you set about the job of converting existing tables to become memory-optimised tables? the process isn't entirely straightforward but the benefits that an In-Memory OLTP table delivers is worth your effort. Alex Grinberg takes you through the basics. More »


 

From the SQLServerCentral Blogs - Compressed backup errors and TF 3042

Kenneth Fisher from SQLServerCentral Blogs

Compressing your backups has very few downsides. It’s usually faster (the additional time for compression is less than the time... More »


 

From the SQLServerCentral Blogs - Dividend Tax Changes and Brexit – Damaging to UK IT company creation

David Postlethwaite from SQLServerCentral Blogs

In my previous post titled UK Budget 2017 –The Death Knell for Small Business? We scratched the surface in discussing... More »

Question of the Day

Today's Question (by Steve Jones):

I just started a new job and noticed that the error log on one of the servers is very large. The earliest entries are over a year old. How can I get SQL Server 2012 to start a new error log?

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: Error Log.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Securing SQL Server: DBAs Defending the Database

Protect your data from attack by using SQL Server technologies to implement a defense-in-depth strategy, performing threat analysis, and encrypting sensitive data as a last line of defense against compromise. The multi-layered approach in this book helps ensure that a single breach doesn't lead to loss or compromise of your data that is confidential and important to the business. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

Why are spatial methods faster in SQL Server 2016 than previous versions?

Answer: There is no more managed to unmanaged code transition.

Explanation:

In previous versions of SQL Server, the spatial methods required transitions from unmanaged to managed to unmanaced code using C++. In SQL Server 2016, C++ is still being used, but it is compiled differently to ensure there are a managed assemblies.

Ref: SQL 2016 – It Just Runs Faster: Native Spatial Implementation(s) - https://blogs.msdn.microsoft.com/bobsql/2016/06/03/sql-2016-it-just-runs-faster-native-spatial-implementations/


» Discuss this question and answer on the forums

Featured Script

Generate scripts for SQL Server Management Studio diagrams

Jonas Gunnarsson from SQLServerCentral.com

The procedure generates an import script for SQL Server Management Studio diagrams.
Easy to use, takes one diagram name and two optional parameters, one if is first diagram to script the other if to add date to diagram name.

List the database diagram for current database:

 select * from sysdiagrams;


The script is based on several other scripts, see the References in script.

Example of usage:

 execute tool.ScriptDiagram 'First', 1; execute tool.ScriptDiagram 'Second', 0; execute tool.ScriptDiagram 'Third', 0;

Further reading

More »

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2016 : SQL Server 2016 - Administration

Advise on AlwaysOn new feature - direct seeding - Hi Guys, Seeking advise. 1. Once AG is setup with automatic seeding, whenever i create a database in Primary, i need to...

tempdb data and log file - Hi, We have some reporting queries which use tempdb very heavily and I get alerts from monitoring tool, that temp db...

Windows Defender - Hi, I was trying to figure out whether or not to keep Windows Defender turned on or off on our database...


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Session Context In SQL Jobs - I have setup a job to test if session context could be used across job steps. From what I can...


SQL Server 2014 : Administration - SQL Server 2014

Compilation lock and blocking - Hello, We are seeing compilation lock blocking on one of our production server. Initially we saw it was because of the...

Actifio? - We are in the middle of implementing Actifio as our backup strategy.  Obviously as a DBA I'm reluctant to relinquish...

SQL Server Multi Administration Job not appearing on target server inquiry - Hi, Can anyone help me on this inquiry that it seems there was no error on job creation but not appearing...


SQL Server 2012 : SQL 2012 - General

How to archive old data from sql database - I have some data being written to a sql database, by requirement I need to retain the data for 1yr....

Removing Table Partitions - help!  I have moved the filegroup to another table, dropped table, how do I remove the filegroup from the partition function...

Unkillable session - alternatives? - 11.0.3381.0 SET SINGLE_USER WITH ROLLBACK IMMEDIATE hangs indefinitely According to sp_who2's LastBatch column it hasn't done anything since 6th February (dm_exec_requests says...


SQL Server 2012 : SQL Server 2012 - T-SQL

How to join these tables together - How to join Employee and Student tables with HR table, - using ID and date columns to join with effective dates...


SQL Server 2008 : SQL Server 2008 - General

SQL Server 2008 R2 CPU Blunted Spikes - Hi there, I'm looking for suggestions for statistics I could monitor to discover what could be causing the cpu "blunted spikes"...

subquery - this is  my query select Students.student_rollno, marks, Subjects.subject_name ,Subjects.subject_id, Gradetype.Grade_id, TheoryPractical .ThPr_name, EndtermProgressive. ETPA_name from Students_Subjects_junction join Subjects on Students_Subjects_junction.subject_id...

INSERT into table with 5 billion rows - Hi there,    I have a table that archives a process. Here's the table structure CREATE TABLE dbo.temp( NULL,   ...


SQL Server 2008 : T-SQL (SS2K8)

Create From and To dates - Hi, I have the @rent table as below which holds the tenant rent charged values. The table has inconsistency as there...

Stored Procedure execution - Hi, Below is the scenario. CREATE PROCEDURE SP_MAIN AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT...


Data Warehousing : Strategies and Ideas

No PKs on fact tables - I just inherited a data warehouse where none of the fact tables have a primary key (all fact tables are...


SQL Server 2005 : SQL Server 2005 General Discussion

Failed to notify ''operator name'' via email? - Following command sends email fine: EXECUTE msdb.dbo.sp_notify_operator @name=N'operator name',@body=N'test message' However, SQL Job with a notification to above operator doesn't work. Job history...


SQL Server 2005 : T-SQL (SS2K5)

Importing Stored Procedure execution in excel - New Columns not showing up - We have a stored procedure which we use to import the data in Excel using following vba   'With ActiveSheet.QueryTables.Add(Connection:=Array(ConString1), Destination:=Range("A1"))         .CommandType...


SQL Server 7,2000 : T-SQL

Search for string in stored procedures excluding comments - Anyone have a script that will not only find instances of a string in stored procedures on your db (easy...

This email has been sent to newsletter@newslettercollector.com. 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.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com