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

VMs for Development

This editorial was originally published on Feb 14, 2014. It is being republished as Steve is on holiday.

Here's the scenario: you have gotten a few consulting jobs and have a couple clients. This could be your full time employment, or a side job that you perform away from another employer. You want to watch your budget, ensure you can work efficiently, and handle whatever requirements your clients may send your way. This week's question is:

How do you set up your virtual environment at home?

I think the idea of using Virtual Machines (VM) is a given these days, but do you have one VM with all your tools in it? Do you use separate VMs for each client? What about licensing? Those can be complex questions for many people, especially if your employer does not provide you with multiple license keys.

I hope that you are using VMs as having multiple computers isn't practical these days, especially as the cost of power rises. A relatively small, inexpensive desktop computer can run 5, or even 10, VMs to simulate a variety of environments. I've seen some creative uses of hypervisors and other software to simulate clusters, SANs, and even multiple domains on one host.

Let us know this week if you have some good tricks that can help someone get started with virtual machines, building a lab, choosing hardware, or easily configuring networking for their own learning efforts. Tell us what software you use, and if you don't mind sharing cost data, I'm sure others would appreciate the information.

Steve Jones from SQLServerCentral.com

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

ADVERTISEMENT
SQL Clone

SQL Clone: Now supporting databases up to 64TB

Create copies of production databases and SQL backups in seconds and save up to 99% of disk space using SQL Clone. Redgate’s new tool removes much of the time and resource needed to create and manage database copies, allowing teams to work on local environments to develop, test and diagnose issues faster. Try it free

Redgate Hub

Watch SQL in the City Streamed 2017

The livestream recording for Redgate's 2017 virtual event is now available. Technical sessions went into the latest Microsoft SQL Server releases, and covered topical issues such as DevOps, data compliance, protection & privacy. Watch the recording

Featured Contents

 

Securing Reporting Services Reports

Mohamed Idttalbe from SQLServerCentral.com

Learn how you can get the userid of someone connected to Reporting Services and use that information to determine if they can view the report. More »


 

New Azure SQL Database Standard Tier Sizes

Additional Articles from SQLPerformance.com

Tim Radney of SQLskills talks about the various Standard tiers available in Azure SQL Database – what they get you, and how much they cost. More »


 

From the SQLServerCentral Blogs - More Beginner / Fundamentals Content

Brian Kelley from SQLServerCentral Blogs

Not surprisingly, there are folks who want beginner / fundamentals presentations and blog posts.  I put up the poll based on a... More »


 

From the SQLServerCentral Blogs - Live on Channel 9 with ReadyRoll

Steve Jones from SQLServerCentral Blogs

I was interviewed in Redmond a couple months ago and the video was just published. I show and demo some... More »

Question of the Day

Today's Question (by Steve Jones):

I have a table with a few rows in it.

 ContactID FirstName 1 Tom 2 Peyton 3 Eli 5 Drew 

I have this code. What happens when I run this?

 DECLARE @name VARCHAR(100) = 'Bob'; SET @name = (SELECT c.FirstName FROM dbo.Contacts AS c WHERE c.FirstName = 'Joe' ) SELECT @name 

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: T-SQL.

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 Practice Problems: 57 beginning, intermediate, and advanced challenges

It's easy to find basic SQL syntax and keyword information online. What's hard to find is challenging, well-designed, real-world problems—the type of problems that come up all the time when you're dealing with data. Learning how to solve these problems will give you the skill and confidence to step up in your career. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have an identity property on the LoggerKey column in my Logger table. I decide to run this

 SELECT IDENT_CURRENT('Logger') 

What is returned?

Answer: The last identity value used in an insert for the Logger table in any session and any scope

Explanation:

The IDENT_CURRENT() function will return the last identity value generated for the specific table in any session and any scope.

Ref: IDENT_CURRENT - click here


» Discuss this question and answer on the forums

Featured Script

Trigger Based Change Data capture

Ankush Parab from SQLServerCentral.com

Description:

SQL Server has in-built methods to capture changes occurring to tables. Eg. Change data Capture, Change tracking and auditing. However, they have some shortcomings. Such as, CDC does not provide "user" who made the change or Change tracking does not provide before and after image of data, etc.

This trigger based solution provides simple way to capture changes occuring to table and its designed t ocapture changes from all tables to single log table. The change data is logged in JSON format.

Sample json payload for reference:-

Snapshot of Changelog table:-

How to use:

The script can be used to create triggers on mulitple tables by providing comma seperated list which need to be setup in "configuration" section of the script along with schema name. The script has to be run against intended database.

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 2017 : SQL Server 2017 - Development

Graph DB edge tables - I'm one of those people who insist on an INSERT statement showing an explicit list of column names to be...

Help with aggregate function - have table: col1 col2 col3 A       B    10 B       A     5 C       D    8 Want to get: A    B   15 C    D    8


SQL Server 2016 : SQL Server 2016 - Administration

views,tables,stored procedures are rolled back to previous versions - Hi, I have observed that some of the views,tables,stored procedures are rolled back to previous versions . Need to find how those...

Check DB failed - in one of my server CHeck DB failed due to the below error The operating system returned error 1450(failed to...


SQL Server 2014 : Administration - SQL Server 2014

Memory issue .. cloudberry service getting stop with following error - HI Everyone, I am getting this error on SQL server developer edition 2014 SP2 server . We have installed the cloudberry service...


SQL Server 2014 : Development - SQL Server 2014

Coffee sales for just 7am to 8am but for the entire year? - select * from TicketItem where s_item IN('Coffee', 'Espresso', 'Double Espresso', 'Decaf Espresso', 'Cappucino', 'Latte', 'Iced Coffee', 'sm coffee pot', 'lg coffee...

Distinct of two columns? - Hello all, Hoping someone out there can help with this because I'm just not seeing the answer for some reason, and...

I got date conversion error - Dear colleagues, I got a very peculiar situation. Here is my code: Declare @startdate as datetime Declare @enddate as datetime Declare @newfee as...

How to get TOP ID in query? - USE GO CREATE TABLE .(      (15, 2) NOT NULL CONSTRAINT DEFAULT ((0)),      (10) NOT NULL CONSTRAINT DEFAULT ((0)),     ...


SQL Server 2012 : SQL 2012 - General

What is using the RAM? - Hi everyone, I've been investigating RAM bottleneck on one of my servers, and it looks like the buffer pool is...


SQL Server 2012 : SQL Server 2012 - T-SQL

usage of DISTINCT OPERATOR - Hi All, Is there a better way to rewrite below code without using DISTINCT operator. Other thing, is that I don't...

Need some suggestions on query execution plan - Hi All, Need some advise on the query plan analysis. There is stored proc within which a dynamic sql is...

Suggestions on a query plan - Hi All, This is related query tuning. I have a query which is doing expensive sorting. Without ORDER BY clause the...

Dynamic SQL not executing - Wow I can not believe the number of questions I have had. I am way over tired but that only...


SQL Server 2008 : T-SQL (SS2K8)

Is there any obvious performance difference between updating 1 column in a 4 column wide table vs 1 columns in a 1000 column wide table ? - I have a table with 4 columns and 10 million rows in which I want to update 1 column I have...


SQL Server 2008 : SQL Server 2008 Administration

Enabling RCSI - Hi I'd like to be able to enable RCSI on some of our databases. I know that if your code is not...


Reporting Services : Reporting Services

Reporting Services From a Data warehouse - Bottleneck On Every Month - Hi All, I am a Software Engineer working in an MNC on MSBI Platform. I have been working in Reporting services project...


Data Warehousing : Integration Services

script error - hi my target server is in 2016 ( 13.0.4206.0) to run sql server agent job . I am using visual studio 2015 to...


Database Design : Relational Theory

Defining keys as sets that must not intersect instead of scalar values that must not be equal - I have been doing a lot of thinking about data models for the last couple of weeks. I have, just...


SQL Server 2005 : Administering

Which is better and Why.? - Dear All, I have a question. Long back when I started learning SQL Server-2000, somewhere I had read that "SQL SERVER lies...

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