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

Independence Day II

It's Indepdendence Day in the US, and I'm sure plenty of people will go to see Independence Day: Resurgence in a theater. This day means much more than that, at least I think it should mean more to US citizens.

Whether you're in the US or elsewhere, I hope you have a great day today, nothing breaks, and you don't end up working more than you need to.

It's a holiday for me, and I'll be likely doing chores around the ranch, remembering the origin of this day, and probably having a cookout with the family. I'll be back tomorrow, hopefully rested, though with all the work piling up, I might be more tired when I get back.

Happy 4th of July to all.

Steve Jones from SQLServerCentral.com

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

ADVERTISEMENT
SQL Prompt

Have you got SQL Fingers?

Watch these free SQL Prompt tips videos for SQL writing hints from top SQL Server MVPs. SQL Prompt is the SQL code productivity add-in for SQL Server Management Studio and Visual Studio. Find out how easily you can write SQL.

ReadyRoll

Database migrations inside Visual Studio

Want to work on SQL Server databases in Visual Studio alongside your application? Download Redgate ReadyRoll to make database changes using SQL migration scripts. Try it free.

SQL Search

Find SQL in your database for free

For example, want to rename one of your table columns but are not sure what stored procedures reference it? Using Redgate’s free SSMS add-in, SQL Search, you can search for the column name and find all the stored procedures that use it. Find out more and download now.

Featured Contents

 

Stairway to SQL Server Virtualization Level 1: What is Virtualization?

David Klee from SQLServerCentral.com

The first level in the Stairway to Virtualization introduces the concept of virtualized servers as well as the terminology and benefits of implementing the technology. More »


 

Difference between SQL Server Unique Indexes and Unique Constraints

Additional Articles from MSSQLTips.com

Uniqueness of values in specific columns can be enforced in a SQL Server table by creating a unique constraint or a unique index on those columns. In this article, Sergey Gigoyan looks at what the differences between the two are, and how SQL Server handles them both. More »


 

From the SQLServerCentral Blogs - Are my SQL logins weak?

Daniel Janik from SQLServerCentral Blogs

Security is a vital component of data security. In today’s day and age it is imperative to think about security.... More »

Question of the Day

Today's Question (by Steve Jones):

In the movie Independence Day (1996), Jeff Goldblum's character defeats the alien computers with what?

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 7 points in this category: humor.

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

SQL Server T-SQL Recipes

SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server. This edition has been lightly updated for SQL Server 2014 and provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, create in-memory tables and stored procedures, insert and update data, generate reports, secure your data, and more. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

If I have an In-Memory OLTP table that uses delayed durability to improve throughput on writes. However, periodically I want to ensure that all transaction log records are written to disk. What command should I use?

Answer: sp_flush_log

Explanation:

The sp_flush_log stored procedure will ensure that all committed transactions have their log records flushed to disk.

Ref: sys.sp_flush_log - https://msdn.microsoft.com/en-us/library/dn467645.aspx


» Discuss this question and answer on the forums

Featured Script

Quick table size information

Gabe Tower from SQLServerCentral.com

There are many reasons you might want to see the sizes of all tables on a database. Maybe you're part of an effort to try to trim down some of the more egrigious tables out there. Maybe you're doing index optimization and want to see how much space indexes are taking up in general. Maybe you're testing cleanup processes across a bunch of tables, and you want to quickly see the effect the cleanup has had.

There are many ways to get at table size information, but usually the easiest is sp_spaceused. The only drawbacks are it can only do one table at a time, and several of the values it returns are strings instead of numbers. This tends to be my go-to script for these sorts of queries because it's quick to run, lets me query the data afterwards, and when bound to some sort of shortcut, I can pull the information up at any time.

Just replace the database name using CTRL+SHIFT+M and let 'er rip!

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 - Development and T-SQL

Finding a substring and extracting a number associated with it - Hi, I have a text string that appears in files as below: 'There were 6 discharges and 3 admission since reporting 21/04/2016' However...


SQL Server 2012 : SQL 2012 - General

So in the event that you are searching - So in the event that you are searching for the most extreme conceivable addition bulk and are not for outer...

Single database attached to two instance - how to take backups from each instance - This is venu, i am learning SQL Server DBA.... while practice i got a doubt. 1. I have attached "AdventureWorks2012' in...

How to practice SQL server at home - Hello everyone. I would like to know if it is possible to use SQL Server Management Studio at home so...


SQL Server 2012 : SQL Server 2012 - T-SQL

is there any other fast way splist commaseprate values - hi, i have one function which return list of values from comma seprated value then i have one with cte which does...

not able to find why/where this error is comming. - hi, i am getting this error"The current transaction cannot be committed and cannot support operations that write to the log file....

in dynamic sql , creating temp table in with in dynamic sql is good or it should be out side. - hi, i have one dynamic sql and in need one temp table like declare @db varchar(200) declare @tablename varchar(200) declare @sql varchar(max) @sql='create table...


SQL Server 2008 : SQL Server 2008 - General

Help creating a dynamic table of numbers - Hello all, I'm trying to dynamically create a table of days spanned for a aging report. I would like the end...


SQL Server 2008 : SQL Server Newbies

UNION with CASE statement - Hi Experts, I am getting error in running this query, It has to do with data type conflict. But I am...


SQL Server 2008 : Security (SS2K8)

User (db_datareader) can't see tables in MS; can SELECT data! - We have an Acitve Directory user that is assigned db_datareader for a given database. Given any table name in the...


Cloud Computing : SQL Azure - Administration

What are the different database types? - I will be celebration the USA's Independence, have some bar-b-que and go hiking with my family. :-D But I also intend...


Cloud Computing : General Cloud Computing Questions

how to Copy .bak file from S3 to RDS - Amazon Cloud - Greetings - I am trying to setup a DR solution.. I was able to copy .bak file to S3 bucket in...


Data Warehousing : Integration Services

Question from Beginner DTSX person about Transforms - I would like to change different ways to put in United States to one thing buy a fuzzy look up...


Data Warehousing : Analysis Services

MDX for last year values - Hi, I am using SSAS 2005 and trying to create a MDX for the hierarchy Fiscal Period (Year->Quarter->Month->Day). The user will...

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 ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com