News in the Category: SQL Subscribe to the rss of this category.

Total posts: 6964 | Sort by Views | Sort by Hits

SQL SERVER Different Methods to Extract Scale Part From Decimal Number

Journey to SQL Authority with Pinal Dave, August 28, 2015
Views: 33 | Hits 1

One of my blog readers asked me “Is there a way to extract only the number after the decimal point?”. For example, in decimal number 45.90, 45 is the precision and 90 is the scale value. There are sev...

SQL SERVER Are Power Options Slowing You Down? Notes from the Field #095

Journey to SQL Authority with Pinal Dave, August 27, 2015
Views: 63 | Hits

[Note from Pinal]: This is a 95thepisode of Notes from the Fields series. When it is about tuning SQL Server, we always look at the configuration of the SQL Server. However, there are few settings of ...

SQL SERVER Script: Finding queries without JOIN Predicates

Journey to SQL Authority with Pinal Dave, August 26, 2015
Views: 97 | Hits 6

I have been in developers shoes for close to 5+ years before reinventing myself to do things that made me even better in coding. It is a tough challenge these days being a developer. The life around y...

SQL SERVER Database Mirroring login attempt failed Connection handshake failed. An OS call failed: (8009030c)

Journey to SQL Authority with Pinal Dave, August 25, 2015
Views: 113 | Hits 1

The best way I have learnt about building SQL Server AlwaysOn Availability Group is by contacting my close friends who have written the only book on this topic. It is not common that I ping them for s...

Working with SQL Server data in Power BI Desktop

Simple Talk, August 24, 2015
Views: 73 | Hits 4

What's the best way of providing self-service business intelligence (BI) to data that is held in on-premise SQL Server? Not, it seems, Power BI 2.0 the hosted cloud service, but Power BI 2.0 Desktop....

SQL SERVER Fix @@ServerName Property Value When Incorrect

Journey to SQL Authority with Pinal Dave, August 24, 2015
Views: 96 | Hits 2

Our software systems are funny and sometimes give us strange values. I dont quite venture out trying to fiddle around with system level properties on my servers, but having said that, this query had c...

Interview Question of the Week #033 How to Invalid Procedure Cache of SQL Server?

Journey to SQL Authority with Pinal Dave, August 23, 2015
Views: 98 | Hits 1

Question: How to invalidate all the stored procedure plans in SQL Server? Answer:DBCC FREEPROCCACHE will invalidate all stored procedure plans that the optimizer has cached in memory and force SQL Ser...

SQL Authority News 100 Million and Onwards

Journey to SQL Authority with Pinal Dave, August 22, 2015
Views: 87 | Hits 1

I will always remember August 20, 2015 as a landmark milestone for SQLAuthority.com. On August 20th, this blog crossed 100 Million Views. When I started this journey onNovember 1, 2006, I had no idea ...

SQL SERVER DBCC CHECKDB errors Msg 2520 during executions

Journey to SQL Authority with Pinal Dave, August 21, 2015
Views: 99 | Hits 1

Some of the simplest recommendations can lead you to some bizarre output that we never anticipated. I always recommend running DBCC CHECKDB on mission critical databases because we need to be 200% sur...

SQL SERVER Rewriting Database History Notes from the Field #094

Journey to SQL Authority with Pinal Dave, August 20, 2015
Views: 103 | Hits 1

[Note from Pinal]: This is a 94th episode of Notes from the Fieldseries. When I read the title of this article – I was extremely intrigued with it – Rewriting Database History! When I was a kid, histo...

SQL SERVER Login failed for user . Reason: Token-based server access validation failed with an infrastructure error

Journey to SQL Authority with Pinal Dave, August 19, 2015
Views: 99 | Hits 2

This is one of the most common error searched on my blog search (http://search.sqlauthority.com) and lately I realized that I have not written any blog about the cause of such error and fixing that. I...

SQL SERVER How to Migrate Existing Database to Contained Databases

Journey to SQL Authority with Pinal Dave, August 18, 2015
Views: 98 | Hits 6

Most of the queries that land into my inbox are based on something I have already written or something people want to explore more on. When it comes to learning and exploring the skills, there is no b...

SQL SERVER PowerShell Knowing SQL Server Information

Journey to SQL Authority with Pinal Dave, August 17, 2015
Views: 119 | Hits 6

If you search this blog, there are a number of PowerShell scripts that I have shared in the recent past. Some of them include: Using PowerShell and Native Client to run queries in SQL Server Identify ...

Interview Question of the Week #032 Best Practices Around FileGroups

Journey to SQL Authority with Pinal Dave, August 16, 2015
Views: 108 | Hits 3

Here is another question I just heard during a recent interview in the multinational company. I have observed over 1000s of interview, but this is the first time I have heard this is being discussed a...

SQL SERVER How to Identify Locked Table in SQL Server?

Journey to SQL Authority with Pinal Dave, August 15, 2015
Views: 106 | Hits 4

Here is a quick script which will help users to identify locked tables in the SQL Server. SELECT OBJECT_NAME(p.OBJECT_ID) AS TableName, resource_type, resource_description FROM sys.dm_tran_locks l JOI...

SQL SERVER Unable to Bring SQL Cluster Resource Online Online Pending and then Failed

Journey to SQL Authority with Pinal Dave, August 14, 2015
Views: 89 | Hits 3

Here is the situation which my client explained and I was asked for help. Hi Pinal, We are having 2 node windows cluster having 3 SQL Server instances clustered running on Windows 2012 R2 on VMWare. W...

SQL SERVER Performance Monitoring for Analysis Services Notes from the Field #093

Journey to SQL Authority with Pinal Dave, August 13, 2015
Views: 112 | Hits 3

[Note from Pinal]: This is a new episode of Notes from the Fieldseries.When we build any application, we build it with zeal and enthusiasm. We believe it will do well for many years but it is not the ...

SQL SERVER Understanding the Basics of Write Ahead Logging (WAL) Protocol

Journey to SQL Authority with Pinal Dave, August 12, 2015
Views: 108 | Hits 3

The journey for IT started way back in my college days more than a decade back. It was a booming time and it was exciting to see everyone eyeing the Computer Science stream. Almost every other person ...

SQL SERVER Error while starting SQL Server logFileSize <= BlkToByteOffset ((ULONG)-1)

Journey to SQL Authority with Pinal Dave, August 11, 2015
Views: 105 | Hits 1

Recently I was playing with tempdb database in SQL Server and made some mistake. Due to that I was then not able to start SQL Service itself. Since it was an interesting problem so worth blogging abou...

SQL SERVER Error: Msg 4305, Level 16, State 1 The log in this backup set terminates at LSN, which is too early to apply to the database.

Journey to SQL Authority with Pinal Dave, August 10, 2015
Views: 108 | Hits 1

While working with transaction log backup restore or log shipping, you must have seen below error message. Msg 4305, Level 16, State 1, Line 47 The log in this backup set begins at LSN 330000000480000...

Interview Question of the Week #031 How to do Case Sensitive SQL Query Search

Journey to SQL Authority with Pinal Dave, August 9, 2015
Views: 113 | Hits 8

Question –How to do case sensitive search on any column of the table? Answer – If Column1 of Table1 has following values CaseSearch, casesearch, CASESEARCH, CaSeSeArCh, following statement will return...

SQL SERVER Adding File to Database in AlwaysOn Availability Group

Journey to SQL Authority with Pinal Dave, August 8, 2015
Views: 112 | Hits

Writing some typical interview questions have been on my list always. I look for new ways of tricking the person and most importantly, some of the interview questions are designed to make sure the per...

Data Storage in Universal app (Windows Phone 8.1/Windows Store 8.1)

EggHeadCafe.com New Articles, August 7, 2015
Views: 100 | Hits 2

Learn how we can use the Sqlite in Windows Phone/Store for local database or offline storage. If you are developing a universal app (Phone & Store) , which requires a common database for both the proj...

FileHelpers v3.1 - Delimited (CSV) or Fixed Data Import/Export Framework

The Code Project Latest Articles, August 7, 2015
Views: 76 | Hits 8

An easy to use .NET library to read/write strong typed data from files with fixed length or delimited records (CSV). Also has support to import/export data from different data storages (Excel, Acces, ...

SQL SERVER How to do IFTHEN in SQL SERVER?

Journey to SQL Authority with Pinal Dave, August 7, 2015
Views: 79 | Hits 4

Just another day I received following question – “Pinal, I am from DotNet expertise and I do not know how to convert the logic of IF…THEN into SQL statement, would you please help? ~Rajesh” I love sim...

SQL SERVER A Stored Procedure for Executing SSIS Packages in the SSIS Catalog Notes from the Field #092

Journey to SQL Authority with Pinal Dave, August 6, 2015
Views: 91 | Hits 1

[Note from Pinal]: This is a new episode of Notes from the Fieldseries. SQL Server Integration Service (SSIS) is one of the most key essential part of the entire Business Intelligence (BI) story.It is...

SQL SERVER Knowing Which Database is Consuming My Memory

Journey to SQL Authority with Pinal Dave, August 5, 2015
Views: 113 | Hits 6

I have been fortunate enough to be at conferences around the world and it is always refreshing to see how people come up with some really common yet never answered questions from time to time. The cla...

Setting up Web App Multitenant Azure AD Sample

<ChristophDotNet, August 4, 2015
Views: 85 | Hits 3

Multitenancy in Azure AD is a very cool concept with the Consent Framework if you're and ISV or a Service Provider building a cloud service that you're looking to monetize. When you're building a serv...

SQL Server Dapper

The Code Project Latest Articles, August 4, 2015
Views: 86 | Hits 5

Helper class to mitigate working with Dapper against SQL Server database...

SQL SERVER Unable to Start SQL Error: SQL Server Could Not Spawn Lazy Writer Thread

Journey to SQL Authority with Pinal Dave, August 4, 2015
Views: 123 | Hits 1

I have a tendency to try out various settings on a typical SQL Server just to see how the behavior changes from time to time. While playing with affinity settings in SQL Server I shot myself in the f...

SQL SERVER Increase Characters Displayed in Text Results

Journey to SQL Authority with Pinal Dave, August 3, 2015
Views: 104 | Hits 5

Working with various SQL Server options is always a great feeling. Every now and then I go to the Options page to get just the thing I want. When I wrote the blog post – SQL SERVER Getting started an...

Interview Question of the Week #030 Retrieve Last Inserted Identity of Record

Journey to SQL Authority with Pinal Dave, August 2, 2015
Views: 130 | Hits 7

Question: What are the different ways of retrieving the identity of last inserted record? Which method do you prefer? Answer: There are many different ways to do that. Here are three different ways to...

SQL SERVER How to Remove All Characters From a String Using T-SQL?

Journey to SQL Authority with Pinal Dave, August 1, 2015
Views: 116 | Hits 11

In the recent past I have seen the best interaction and learning happens when we all get into a puzzle and challenge mode. And that just gets the creative juice in our minds and some really innovative...

SQL SERVER Puzzle Inside Working of Datatype smalldatetime

Journey to SQL Authority with Pinal Dave, July 31, 2015
Views: 113 | Hits 3

In the recent past, I have been bringing few puzzles around using date and time functions. All these have brought some awesome feedbacks and you all have been sharing some awesome answers. Todays ques...

SQL SERVER DevOps for the DBA Notes from the Field #091

Journey to SQL Authority with Pinal Dave, July 30, 2015
Views: 119 | Hits 3

[Note from Pinal]: This is a91st episode of Notes from the Fieldseries.Divas is a new buzz word with lots of substance behind it. Not everyone understands what it means and not everyone actually relat...

SQL SERVER Error: Msg 245 Conversion failed when converting the varchar value Inactive to data type int

Journey to SQL Authority with Pinal Dave, July 29, 2015
Views: 115 | Hits 1

Using CASE statements is something I see a lot of developers use. They use it in complex environments and I have been fortunate to troubleshoot and look at code blocks that run for pages using the sta...

SQL Server Text Search

The Code Project Latest Articles, July 28, 2015
Views: 137 | Hits 13

A stored procedure that searches for a text in the SQL Server database (DDL)...

SQL SERVER Free SQL Complete Add-in For SSMS

Journey to SQL Authority with Pinal Dave, July 28, 2015
Views: 188 | Hits 15

This article covers main features of ApexSQL Complete, free SQL complete add-in. You can download the most recent version, and check its features while reading the article. ApexSQL Complete is a free ...

SQL SERVER Inserting into Sparse Column Sets and Errors Associated With It

Journey to SQL Authority with Pinal Dave, July 27, 2015
Views: 97 | Hits 3

I have written tons of blogs in the past around using sparse columns. The best part and lesser known part of sparse columns is that we can write to the column sets directly too. In this blog let me ta...

Interview Question of the Week #029 Difference Between CHARINDEX vs PATINDEX

Journey to SQL Authority with Pinal Dave, July 26, 2015
Views: 122 | Hits 3

Question:What is the difference betweenCHARINDEX vsPATINDEX? Answer:We can use either CHARINDEX or PATINDEX to search in a TEXT field in SQL SERVER. The CHARINDEX and PATINDEX functions return the sta...

SQL SERVER How to Find If Queries are Run in Parallel?

Journey to SQL Authority with Pinal Dave, July 25, 2015
Views: 116 | Hits 5

Technology innovations over years have made personal computing and the infrastructure inside our datacenters even more powerful. Gone are the days when our laptops used to come with single processors ...

Microsoft and Database Lifecycle Management (DLM): The DacPac

Simple Talk, July 24, 2015
Views: 78 | Hits 3

The Data-Tier Application Package (DacPac), together with the Data-Tier Application Framework (DacFx), provides an alternative way to automate the process of scripting out, or deploying a SQL Server d...

SQL SERVER FIX Property IsLocked is Not Available for Login

Journey to SQL Authority with Pinal Dave, July 24, 2015
Views: 131 | Hits 1

I play and experiment with SQL Server to the max. Sometimes I am not sure what I did and I land into something undesired. Then the reason to troubleshoot starts and I get to learn something new. Somet...

SQL SERVER What are T-SQL Window Functions? Notes from the Field #090

Journey to SQL Authority with Pinal Dave, July 23, 2015
Views: 140 | Hits 5

[Note from Pinal]:In this episode of the Notes from the Field series database expert KathiKellenbergerexplains about T-SQL Median. Kathi is an amazing instructor, she was the SQL author I have read in...

SQL SERVER Generating Meaningful Test Data with dbForge Data Generator for SQL Server

Journey to SQL Authority with Pinal Dave, July 22, 2015
Views: 122 | Hits 6

Recently I faced with necessity of generating meaningful SQL data for testing purposes. During my search for a proper application for the task, I found out that Devart, a recognized developer of datab...

SQL SERVER FIX Server principal Login Name has granted one or more permission(s). Revoke the permission(s) before dropping the server principal

Journey to SQL Authority with Pinal Dave, July 21, 2015
Views: 112 | Hits 1

There are parts of SQL Server where I always like to take expert advice. Sometimes a quick call to a friend can save you tons of time. When I see topics around AlwaysOn, though I know what the basic s...

SQL SERVER Fix Error: Msg 468, Level 16, State 9, Line 1

Journey to SQL Authority with Pinal Dave, July 20, 2015
Views: 111 | Hits 2

Ever since I have started writing about Error Messages a number of you ping me from time to time to understand why you are getting an error. As I always say, Error messages are a great way to learn co...

Interview Question of the Week #028 Few SQL Best Practices

Journey to SQL Authority with Pinal Dave, July 19, 2015
Views: 129 | Hits 9

Just last week, I moderated a SQL Server interview and I heard very interesting conversation. Question –What are the best practices are you following for SQL Server? When I heard this question – I tho...

PowerShell: How to Find Logical and Physical Processors on SQL Server?

Journey to SQL Authority with Pinal Dave, July 18, 2015
Views: 134 | Hits 4

Working on PowerShell scripts have been an interesting journey. I have written a couple of posts before on using WMI events. Was pondering on this thought and this blog is inspired by combining using ...

Can Code Review Be Automated?

Simple Talk, July 17, 2015
Views: 85 | Hits 4

I was scanning the API of DacFx, the ‘engine’ of SSDT, and became interested in the facility it contains for automating SQL code reviews. DacFx allows you to parse the SQL code sufficiently to do stat...