Popular Posts

SQLblog.com - The SQL Server blog spot on the web

Sunday, December 31, 2017

An Introduction to PowerShell for a DBA

SQLServerCentral » Latest topics
An Introduction to PowerShell for a DBA
Comments posted to this topic are about the item [B]An Introduction to PowerShell for a DBA[/B]

Comic for 2017.12.31

RSSMix.com Mix ID 8239024
Comic for 2017.12.31
New Cyanide and Happiness Comic

The New Year

SQLServerCentral » Latest topics
The New Year
Comments posted to this topic are about the item [B]The New Year[/B]

Saturday, December 30, 2017

using araylist in stored proc

SQLServerCentral » Latest topics
using araylist in stored proc
hello i have this stored proc for  dynamically insert update delete select  and select with id

but hier have a 2 column name and 2 values for this crud operaion
may be more columns and more values for crud opertaion
can i use ar

Friday, December 29, 2017

Free eBook: Troubleshooting SQL Server: A Guide for the Accidental DBA

SQLServerCentral.com Articles
Free eBook: Troubleshooting SQL Server: A Guide for the Accidental DBA

Three SQL Server MVPs (Jonathan Kehayias, Ted Krueger and Gail Shaw) provide fascinating insight into the most common SQL Server problems, why they occur, and how they can be diagnosed using tools such as Performance Monitor, Dynamic Management Views and server-side tracing. The focus is on practical solutions for removing root causes of these problems, rather than "papering over the cracks".

Comic for 2017.12.29

RSSMix.com Mix ID 8239024
Comic for 2017.12.29
New Cyanide and Happiness Comic

Fantasy Football 2017

SQLServerCentral » Latest topics
Fantasy Football 2017
Placeholder for the 2017 league. Congrats to the 2016 winners: Ray K - $100 SequelSurfer - $75 Steve Jones - $50 I'll do the same prizes next year. Everyone from 2016 has first crack at the league (12 teams), but if you're interested in joining, l

Thursday, December 28, 2017

Generate Create Login script for an Azure Logical SQL Server for DR purposes

SQLServerCentral » Latest topics
Generate Create Login script for an Azure Logical SQL Server for DR purposes
Hello,

I've done a fair bit of looking around, and I am not finding a way to generate a script that I can keep to recreate Azure SQL Server Logins (not users I've done that). I need something similar to the old sp_help_rev_login, but for Azure in

Understanding Migration from SQL Server to SQL Server 2017 using Data Migration Assistant

SQLServerCentral.com Articles
Understanding Migration from SQL Server to SQL Server 2017 using Data Migration Assistant

You can use the Data Migration Assistant (DMA) tool to migrate your SQL Server instance to an on-premise SQL Server 2017 or to Azure SQL Database. DMA analyzes data migration issues and provides recommendations to resolve them. Read on learn about the features of DMA and how DMA eases your SQL Server instance migration as well as reduces overall risks, allowing you to complete the migration successfully.

Splitting TempDB across multiple files

SQLServerCentral » Latest topics
Splitting TempDB across multiple files

I have a question regarding the splitting of TempDB in SQL Server, I know its a must in production environments as DBs Start growing and system becomes move complex.

In terms of a System Test / UAT environments, Should the exact sam

Comic for 2017.12.27

RSSMix.com Mix ID 8239024
Comic for 2017.12.27
New Cyanide and Happiness Comic

Wednesday, December 27, 2017

Redgate data governance survey reveals database DevOps is the key to GDPR compliance

SQLServerCentral.com Articles
Redgate data governance survey reveals database DevOps is the key to GDPR compliance

A major new data governance survey from Redgate demonstrates there are important GDPR compliance issues that need to be addressed – and that a DevOps approach to database development can provide the answers.

Comic for 2017.12.26

RSSMix.com Mix ID 8239024
Comic for 2017.12.26
New Cyanide and Happiness Comic

Two tables, exact same structure but with different names, behave differently while performing mass updates.

SQLServerCentral » Latest topics
Two tables, exact same structure but with different names, behave differently while performing mass updates.
Hi all, 

This has me stumped. I'm performing mass updates to a table. I'm using Data Masker by Redgate to de-identify the data. It's basically a wide update, involving 8+ columns. The table has around 662K+ rows. I have the constraints disab

Tuesday, December 26, 2017

Rethink Server Sizing

SQLblog.com - The SQL Server blog spot on the web
Rethink Server Sizing
Standardizing on 2 and 4 sockets systems for servers has been an established practice going back to 1996. There were very good reasons for this, but it was so long ago that they have been forgotten. Yet the practice continues unquestioned, almost as a reflex action ingrained in our subconscious. Back then, 2-way was the baseline, and a 4-way was for databases. Now, the large majority of standard systems are 2-way (2S) with 4S for exceptional requirements. It might seem that the 2-socket system continues...(read more)

FCI + Always On

SQLServerCentral » Latest topics
FCI + Always On
Hi,

I want to setup a 3 nodes solutions. NODE_A, NODE_B and NODE_C are part of the same WSFC.

Node_A -> Contains the SQL Server Role, with the sql server clustered instance and its resources
Node_B-> SQL Server role can be fai

How to Customize Schema Comparisons using Auto Map in SQL Compare

SQLServerCentral.com Articles
How to Customize Schema Comparisons using Auto Map in SQL Compare

SQL Compare includes many options to make comparing objects easier on the developer. Auto mapping is one of these, and if often saves a little time and frustration. However, there are times that you many need to customize your mapping, and this gives you a technique for doing so.

sqlmonitor How to fix SQL Server disk I/O bottlenecks (without a hammer)
In this new article, Simple-Talk editor Tony Davis explains step-by-step how to find and fix the root causes of disk I/O bottlenecks, including gathering data, avoiding knee-jerk fixes, and how monitoring tools can help. Read now.

Monday, December 25, 2017

Changing the Path for the Master Database

SQLServerCentral.com Articles
Changing the Path for the Master Database

We as DBAs, changing or migrating databases to a new path is important part of admin’s world. This article helps you with the steps involved to move the Critical 'master' database.

Comic for 2017.12.25

RSSMix.com Mix ID 8239024
Comic for 2017.12.25
New Cyanide and Happiness Comic

Fantasy Football 2017

SQLServerCentral » Latest topics
Fantasy Football 2017
Placeholder for the 2017 league. Congrats to the 2016 winners: Ray K - $100 SequelSurfer - $75 Steve Jones - $50 I'll do the same prizes next year. Everyone from 2016 has first crack at the league (12 teams), but if you're interested in joining, l

Sunday, December 24, 2017

Comic for 2017.12.24

RSSMix.com Mix ID 8239024
Comic for 2017.12.24
New Cyanide and Happiness Comic

I don’t know how to help with database…

SQLServerCentral » Latest topics
I don’t know how to help with database…
One of my friends asked me about help. Her database on SQL Server stopped working. She tried to open it, but wasn’t successfully. The database didn’t open by double clicking.

Saturday, December 23, 2017

Overriding error message sent back

SQLServerCentral » Latest topics
Overriding error message sent back
I have a table with a constraint on 2 columns (Which are keys into 2 other tables) and I want to prevent duplications
I am  using Entity  Framework and message sent back to application if violation is encountered
  [1234,5678 ] is d

Comic for 2017.12.23

RSSMix.com Mix ID 8239024
Comic for 2017.12.23
New Cyanide and Happiness Comic

Friday, December 22, 2017

VMs for Development

SQLServerCentral » Latest topics
VMs for Development
Comments posted to this topic are about the item [B]VMs for Development[/B]

Comic for 2017.12.22

RSSMix.com Mix ID 8239024
Comic for 2017.12.22
New Cyanide and Happiness Comic

Stairway to SQL Server Agent - Level 3: Agent Alerts and Operators

SQLServerCentral.com Articles
Stairway to SQL Server Agent - Level 3: Agent Alerts and Operators

How to be notified when a job succeeds or fails, or be notified when a SQL Server performance condition is met.

Thursday, December 21, 2017

ReSETting the value

SQLServerCentral » Latest topics
ReSETting the value
Comments posted to this topic are about the item [B]ReSETting the value[/B]

Partition Level Locking: Explanations From Outer Space

SQLServerCentral.com Articles
Partition Level Locking: Explanations From Outer Space

Erik Darling partitions the Stack Overflow database, then uses sp_WhoIsActive's @get_locks = 1 parameter to demo locking.

Comic for 2017.12.20

RSSMix.com Mix ID 8239024
Comic for 2017.12.20
New Cyanide and Happiness Comic

RSTempFiles directory filling up our C: drive

SQLServerCentral » Latest topics
RSTempFiles directory filling up our C: drive
RSTempFiles directory is filling up our C: drive.  Can the files in there be DELETED?

Wednesday, December 20, 2017

Openrowset not working with network file path

SQLServerCentral » Latest topics
Openrowset not working with network file path
Hi all, 

I'm trying to get an openrowset query to work and I believe I'm running in the permission issues.  I've looked around the internet extensively but haven't found a solution.  The query works when referencing a file on the d

Checking SQL Server with Policy-Based Management

SQLServerCentral.com Articles
Checking SQL Server with Policy-Based Management

Policy-Based Management, a feature of SQL Server, is a flexible tool that can help DBAs manage one or more SQL Server instances. It's used for monitoring and enforcing a standard set of policies for SQL Server throughout an organization. While there are many built-in conditions from which to choose, Dennes demonstrates how to set up a custom policy as well as a standard one. Viewing the policy status over many servers can be tedious, so he also explains how DBAs can evaluate the states of multiple servers with just one glance.

Tuesday, December 19, 2017

Defining keys as sets that must not intersect instead of scalar values that must not be equal

SQLServerCentral » Latest topics
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 now, had some thoughts which evolved from what I was thinking about regarding phone numbers and contacts in my earlier post here 

Generating test data in JSON files using SQL Data Generator

SQLServerCentral.com Articles
Generating test data in JSON files using SQL Data Generator

SQL Data Generator is adept at filling SQL Server databases with ‘spoof’ data, for use during development and testing activities. However, what if instead of a SQL Server database full of fake data, you need a JSON file?

Comic for 2017.12.19

RSSMix.com Mix ID 8239024
Comic for 2017.12.19
New Cyanide and Happiness Comic

Multi-Source partitioned Azure Analysis Services tables – cold data from Azure Data Lake Store, hot data from Azure SQL Database

SQLblog.com - The SQL Server blog spot on the web
Multi-Source partitioned Azure Analysis Services tables – cold data from Azure Data Lake Store, hot data from Azure SQL Database

You can read this blog post at this link: https://jorgklein.com/2017/12/19/multi-source-partitioned-azure-analysis-services-tables-cold-data-from-azure-data-lake-store-hot-data-from-azure-sql-database/

This blog has moved to https://jorgklein.com There will be no further posts on sqlblog.com. Please update your feeds accordingly.

You can follow me on twitter: http://twitter.com/jorg__klein

Monday, December 18, 2017

Temporary tables and procedures

SQLServerCentral » Latest topics
Temporary tables and procedures
Comments posted to this topic are about the item [B]Temporary tables and procedures[/B]

Comic for 2017.12.18

RSSMix.com Mix ID 8239024
Comic for 2017.12.18
New Cyanide and Happiness Comic

Free virtual event: SQL in the City Streamed

SQLServerCentral.com Articles
Free virtual event: SQL in the City Streamed

Technical sessions will dive into the latest Microsoft SQL Server releases, and cover topical issues such as data compliance, protection & privacy.

Comic for 2017.12.17

RSSMix.com Mix ID 8239024
Comic for 2017.12.17
New Cyanide and Happiness Comic

How to give month input in my procedure

SQLServerCentral » Latest topics
How to give month input in my procedure
Hi Friends,


I am  creating one  procedure to  get  Quarterly data from month input [code language="sql"]

alter procedure Ram_year_qu_month
(
@Fyear as varchar(20)

Sunday, December 17, 2017

Query big data, stored in a csv or parquet files, from any stored procedure

SQLblog.com - The SQL Server blog spot on the web
Query big data, stored in a csv or parquet files, from any stored procedure

Every cloud provider these days have a serverless interactive query service that uses standard SQL for data analysis.

As for the biggest cloud providers, we have Azure Data Lake analytics, Google BigQuery and Amazon Athena.

Due to the fact that my company is using only Amazon cloud, I have some experience with Athena service and I must say that it is awesome.

I will show you today how you can use Management Studio or any stored procedure to query the data, stored in a csv file, located on S3 storage. I am using CSV file format as an example here, columnar PARQUET gives much better performance.

I am going to:

1. Put a simple CSV file on S3 storage

2. Create External table in Athena service over the data file bucket

        3. Create linked server to Athena inside SQL Server  

        4. Use OPENQUERY to query the data.  

Athena service is built on the top of Presto, distributed SQL engine and also uses Apache Hive to create, alter and drop tables. You can run ANSI SQL statements in the Athena query editor, launching it from the AWS web services UI. You can use complex joins, window functions and many other great SQL language features. Using Athena eliminates need for ETL because it projects your schema on the data files at the time of the query.

Let’s create database in Athena query editor.

image

As a next step I will put this csv file on S3. By the way, Athena supports JSON format, tsv, csv, PARQUET and AVRO formats.

Uploading the below file to S3 bucket (don’t put columns header in file):

image

image

Going back to Athena to create external table over the S3 folder.  You can later add more files to the same folder and your queries will return the new data immidiately.

image

Now I can query the data:

image

image

As a next step I will set up a linked server from my SQL Server instance because I would like to offload the big data querying to Athena. Of course, I am using in this example tiny data file but in real life we are querying sometimes 300GB of data files in the single query and it takes a few seconds.

Athena has ODBC driver, I will install it on SQL Server machine ( AWS EC2 instance for this example).

Here is an installation link: https://s3.amazonaws.com/athena-downloads/drivers/ODBC/Windows/Simba+Athena+1.0+64-bit.msi

Setting up the ODBC connection. Important, click on the Authentication Option and fill in AccessKey and SecretKey that have permissions to access S3 bucket. S3 output location below will hold csv files with results from your queries. Remember to clean the output files from time to time.

image

What is left is to set up Linked Server inside Management Studio using OLEDB provider for ODBC.

EXEC master.dbo.sp_addlinkedserver @server = N'DWH_ATHENA', @srvproduct=N'', @provider=N'MSDASQL', @datasrc=N'DWH_ATHENA'

GO

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'DWH_ATHENA',@useself=N'False',@locallogin=NULL,@rmtuser=N'*******',@rmtpassword='*********'

GO

Replace @rmtuser and @rmtpassword with AWS access key and secret key and now we can query the data files from any script or stored procedure.

There is one very important thing that you need to know. Regular SQL Server ODBC destinations querying behavior of is to send “select *” to linked server and do filtering inside SQL Server. This is very bad for us since we wanted to offload all work to Athena and we do not want to receive all data.  The way to overcome this is to use OPENQUERY.

Here is example of the query that is using a linked server. The remote query has omitted all filtering and receiving ALL columns from the remote table and filter is being applied later on, inside the “Filter” step.

image

The same query that is using OPENQUERY instead of linked server:

image

Result.

image

 

Isn’t it wonderful to be able to keep the row data in files and query them with minimal effort from the SQL Server side?

Yours,

Maria

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 ?

SQLServerCentral » Latest topics
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 another table with 100 columns and 10 million rows in which again, I want to update 1 column.

Which one among these 2 would perform better.

Saturday, December 16, 2017

Comic for 2017.12.16

RSSMix.com Mix ID 8239024
Comic for 2017.12.16
New Cyanide and Happiness Comic

Replace TABLE with STAGING_TABLE. Approach?

SQLServerCentral » Latest topics
Replace TABLE with STAGING_TABLE. Approach?
I have a Stored Procedure which does some ETL "stuff"
At the end of the procedure I want to replace a CLIENTS table with the CLIENTS_STAGING table.
This process happens a number of times per day and the CLIENTS table needs to be available as much

Friday, December 15, 2017

Selectivity vs SARGAbility?

SQLServerCentral » Latest topics
Selectivity vs SARGAbility?
Hi All,

What is the difference between Selectivity and SARGAbility?

Thanks,

Sam

Comic for 2017.12.15

RSSMix.com Mix ID 8239024
Comic for 2017.12.15
New Cyanide and Happiness Comic

So long, farewell, auf Wiedersehen, adieu

SQLblog.com - The SQL Server blog spot on the web
So long, farewell, auf Wiedersehen, adieu
On an otherwise unremarkable day, almost twelve years ago (early 2006 to be exact), I got an email from Adam Machanic . I don’t have it anymore, but I do remember the management summary of the contents: “Hey Hugo, you should start blogging. Peter DeBetta and I have a site where we can host you”. Until then, I had never even considered blogging. Adam’s email got me thinking. The rest, as they say, is history. My first post here was made in July 2006. And now, December 2017, it is time for my last...(read more)

Major new study reveals the true ROI of database DevOps

SQLServerCentral.com Articles
Major new study reveals the true ROI of database DevOps

Redgate has launched a new research study that reveals the benefits different stakeholders can expect from DevOps, and provides a powerful methodology for calculating the ROI of database DevOps.

Help with SQL memory pressure investigation

SQLServerCentral » Latest topics
Help with SQL memory pressure investigation
Hello,
Please help me with SQL memory pressure investigation.

1 month ago we upgraded from SQL2005 (on WindowsServer2008) to SQL2016 (on WindowsServer2016).
Since that moment we had few serious incidents caused by memory pressure.
How

Thursday, December 14, 2017

error while importing Data from SQL server into tabular cube in Visual Studio

SQLServerCentral » Latest topics
error while importing Data from SQL server into tabular cube in Visual Studio

I am importing Data from SQL server into tabular cube in Visual Studio solution  using table import wizard , Test Connection is successful but once I check mark source table  and click finish it gives me err

Correlation Analysis using Correlation Plot in Power BI Desktop

SQLServerCentral.com Articles
Correlation Analysis using Correlation Plot in Power BI Desktop

Power BI provides correlation plot visualization in the Power BI Visuals Gallery to create Correlation Plots for correlation analysis. In this post, Siddharth Mehta shows how to create a correlation plot in Power BI Desktop using a sample dataset of car performance.

sqlmonitor How to fix SQL Server disk I/O bottlenecks (without a hammer)
In this new article, Simple-Talk editor Tony Davis explains step-by-step how to find and fix the root causes of disk I/O bottlenecks, including gathering data, avoiding knee-jerk fixes, and how monitoring tools can help. Read now.

Wednesday, December 13, 2017

Introducing the updated HTML comparison report in SQL Compare 13.1

SQLServerCentral.com Articles
Introducing the updated HTML comparison report in SQL Compare 13.1

In SQL Compare 13.1, Redgate have updated the interactive HTML comparison report type, providing simpler cleaner reports that focus on the differences between the compared databases. This blog post looks at the details of what's new.

Today's Random Word!

SQLServerCentral » Latest topics
Today's Random Word!
HI When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene or a word running through your mind... Jump on that word... And. Post it here by it's thumbs! :hat: Quickly! Before it becomes a number!

Comic for 2017.12.13

RSSMix.com Mix ID 8239024
Comic for 2017.12.13
New Cyanide and Happiness Comic

Tuesday, December 12, 2017

It's Time for SQL in the City

SQLServerCentral » Latest topics
It's Time for SQL in the City
Comments posted to this topic are about the item [B]It's Time for SQL in the City[/B]

Workaround for SQL Server 2017 PolyBase Installer Bug

SQLblog.com - The SQL Server blog spot on the web
Workaround for SQL Server 2017 PolyBase Installer Bug
To install PolyBase on SQL Server 2016 or 2917, there is a dependency on the Oracle Java Runtime Environment (JRE). Oracle made a breaking change to the JRE from version 8 to 9. I published a workaround that is available here ....(read more)

Intellisense broken?

SQLServerCentral » Latest topics
Intellisense broken?

Up until about a week ago, Intellisense on my SSMS worked fine. Now it's still working but for some reason only brings up SQL System functions. It doesn't prompt me for table names / columns / aliases anymore. Not even system tables. Like when I'm

Comic for 2017.12.12

RSSMix.com Mix ID 8239024
Comic for 2017.12.12
New Cyanide and Happiness Comic

Importing JSON Data from Web Services and Applications into SQL Server

SQLServerCentral.com Articles
Importing JSON Data from Web Services and Applications into SQL Server

To support many applications, it makes sense for the database to work with JSON data, because it is the built-in way for a JavaScript or TypeScript application to represent object data. It can mean less network traffic, looser coupling, and less need for the application developer to require full access to the base tables of the database. However, it means that the database must do plenty of checks first before importing. Phil Factor explains how it can be easily done.

Monday, December 11, 2017

Retrieving sales from last month

SQLServerCentral » Latest topics
Retrieving sales from last month
I created a report in ssrs with start and end date parameters that pull summary pipeline for certain types of deals.

I just want to find out how to retrieve total sales for the previous month.

For example, if i pull the report for Decemb

Comic for December 07, 2017

RSSMix.com Mix ID 8239024
Comic for December 07, 2017
Dilbert readers - Please visit Dilbert.com to read this feature. Due to changes with our feeds, we are now making this RSS feed a link to Dilbert.com.

query help

SQLServerCentral » Latest topics
query help
[code language="sql"]IF OBJECT_ID('Tempdb..#tStudents') IS NOT NULL
DROP TABLE #tStudents

CREATE TABLE #tStudents(
  [StudentID] [varchar] (6) NOT NULL ,
  [StudentName

http://www.healthyapplechat.com/vital-force-enduromax-reviews/

SQLServerCentral » Latest topics
http://www.healthyapplechat.com/vital-force-enduromax-reviews/
Vital force enduromax: is male upgrade supplement particularly made for the grown-up guys to support the vitality and essentialness. It

Grouping

SQLServerCentral » Latest topics
Grouping
Comments posted to this topic are about the item [B]Grouping[/B]

Singular or Plural

SQLServerCentral » Latest topics
Singular or Plural
Comments posted to this topic are about the item [B]Singular or Plural[/B]

STRING_SPLIT with no delimiter

SQLServerCentral » Latest topics
STRING_SPLIT with no delimiter
Comments posted to this topic are about the item [B]STRING_SPLIT with no delimiter[/B]

Comic for 2017.12.11

RSSMix.com Mix ID 8239024
Comic for 2017.12.11
New Cyanide and Happiness Comic

Is This Database Being Used?

SQLServerCentral » Latest topics
Is This Database Being Used?
Comments posted to this topic are about the item [B]Is This Database Being Used?[/B]

SSRS - Inherited Server - Unable to find instance - Is it possible to repair?

SQLServerCentral » Latest topics
SSRS - Inherited Server - Unable to find instance - Is it possible to repair?
Hello!

On the SQL 2016 Server I am a "DBA" of now, I was looking to setting up SSRS.  At first glance it looks like it is installed, but when I try to browse to http://localhost/reports no page comes up

Fantasy Football 2017

SQLServerCentral » Latest topics
Fantasy Football 2017
Placeholder for the 2017 league. Congrats to the 2016 winners: Ray K - $100 SequelSurfer - $75 Steve Jones - $50 I'll do the same prizes next year. Everyone from 2016 has first crack at the league (12 teams), but if you're interested in joining, l

Populate Acct Number (based on record above)

SQLServerCentral » Latest topics
Populate Acct Number (based on record above)
I have a file I get every month that has the account number on one line and the detail is above it.  When I read it into SQL I add an identity field (that is reason for sort DESC on ID).  How can I populate the 

An Open Letter to the SQL Community: Requests of Speakers

SQLblog.com - The SQL Server blog spot on the web
An Open Letter to the SQL Community: Requests of Speakers
(Part 2 of 2 -about and for Speakers.) In the previous article, Speakers were acknowledged for their dedication, passion, sacrifices, and contributions to the global SQL Server community, graciously providing tens of thousands of hours of free training around the world. Now I'm going to kick it up a notch, and say unequivocally, SPEAKERS, WE CAN DO EVEN BETTER! It really won't take much effort or time to propel yourself into the top tier of community Speakers. After the recent SQLSaturday Oregon,...(read more)

STRING_SPLIT with no delimiter

SQLServerCentral » Latest topics
STRING_SPLIT with no delimiter
Comments posted to this topic are about the item [B]STRING_SPLIT with no delimiter[/B]

Delayed gratification or not?

SQLServerCentral » Latest topics
Delayed gratification or not?
Comments posted to this topic are about the item [B]Delayed gratification or not?[/B]

Retrieving sales from last month

SQLServerCentral » Latest topics
Retrieving sales from last month
I created a report in ssrs with start and end date parameters that pull summary pipeline for certain types of deals.

I just want to find out how to retrieve total sales for the previous month.

For example, if i pull the report for Decemb

Please help with xp_cmdshell

SQLServerCentral » Latest topics
Please help with xp_cmdshell
Ok I am writing a proc that will look to a directory and import excel files. It is a work in progress overall however presently I am not getting past even the initial xp_cmdshell call.

When this is run I get  the following error:

Th

Intellisense broken?

SQLServerCentral » Latest topics
Intellisense broken?

Up until about a week ago, Intellisense on my SSMS worked fine. Now it's still working but for some reason only brings up SQL System functions. It doesn't prompt me for table names / columns / aliases anymore. Not even system tables. Like when I'm

Singular or Plural

SQLServerCentral » Latest topics
Singular or Plural
Comments posted to this topic are about the item [B]Singular or Plural[/B]

Monitor spids on SQL Azure instance? Can we do it?

SQLServerCentral » Latest topics
Monitor spids on SQL Azure instance? Can we do it?
Hi All,

Can I do the below for SQL Azure instance/db?

Suppose, I want to take a look at what is running right now . For example I want to run sp-who2 or execute sys.dm_exec_requests or sp_whoisactive to see if there is a blocking or wan

Copying rows from AS400 table into SQL table based on a sequence field.

SQLServerCentral » Latest topics
Copying rows from AS400 table into SQL table based on a sequence field.

Hello,

 

Stock take FiFo conundrum

SQLServerCentral » Latest topics
Stock take FiFo conundrum

Hello,

I'd very much appreciate some advice/help with a stock take problem.
I've had a look at https://ask.sqlservercentral.com/questions/1

Retrieving revenue total for last day of previous month

SQLServerCentral » Latest topics
Retrieving revenue total for last day of previous month
Hi

Im trying to retrive total revenue last day of previous month, i can get all the months totals, however i cant get my head around only retrieving the total revenue for last day of previous month.
This will be my opening balance
I

Delayed gratification or not?

SQLServerCentral » Latest topics
Delayed gratification or not?
Comments posted to this topic are about the item [B]Delayed gratification or not?[/B]

Comic for 2017.12.10

RSSMix.com Mix ID 8239024
Comic for 2017.12.10
New Cyanide and Happiness Comic

Even More SQL Server Features that Time Forgot

SQLServerCentral.com Articles
Even More SQL Server Features that Time Forgot

SQL Server works well, and Microsoft does everything it can to keep it relevant and competitive: As with everything in real life, it doesn't don't always get it completely right, and Rob Sheldon continues his quest through the jungle of past features to rediscover and explore the ones that time forgot. Here, he comes across Lightweight Pooling, XML Indexes, Stretch Databases, SQL Variants, Transaction Savepoints and In-Memory OLTP.

Sunday, December 10, 2017

dm_os_process_memory shows more memory usage than dm_os_memory_clerks & dm_os_buffer_descriptors

SQLServerCentral » Latest topics
dm_os_process_memory shows more memory usage than dm_os_memory_clerks & dm_os_buffer_descriptors
Hi,
I'm looking for some help finding some missing memory and how to reclaim it without restarting the SQL service.

The original issue:
A SSIS package is hanging on a sort operation. Only ~860K rows, ~45 bytes per row = ~37 MB.
This

Powershell experts, I need help with dynamic parameters. Posh V5. First Param Determines list of choices in next param.

SQLServerCentral » Latest topics
Powershell experts, I need help with dynamic parameters. Posh V5. First Param Determines list of choices in next param.
Hello,

I am really trying to get my head around dynamic parameters, but I just dont know enough PS to get this right. I'd like to select an environment from a drop down (validateset, no issues here), but then I'd like a related list to become ava

Which OS for SQL Server 2017 Standard? (new data warehouse)

SQLServerCentral » Latest topics
Which OS for SQL Server 2017 Standard? (new data warehouse)
My company will be setting up a new data warehouse server using SQL Server 2017 Standard. We're a mixed shop, running both Windows and Ubuntu, seems we could choose either. What would you recommend? Pros/Cons

Delayed gratification or not?

SQLServerCentral » Latest topics
Delayed gratification or not?
Comments posted to this topic are about the item [B]Delayed gratification or not?[/B]

metrics

SQLServerCentral » Latest topics
metrics
Is there a good performance metric to build a sql server 2016 instance(s) that has no past history, basically a new build that could calulate a VM for CPU and memory.

Find and count Incomplete records in a table

SQLServerCentral » Latest topics
Find and count Incomplete records in a table
Hi, I have a problem which is stretching my basic T-SQL coding capabilities and hope you might be able to help. I have a table of records, some are complete and some are not and as part of an audit I'm trying to set up I need to determine if a record is i

Help with Trigger emial

SQLServerCentral » Latest topics
Help with Trigger emial
I know just enough about SQL to be dangerous, so when I was asked to create a trigger that would email a user when line items from a PO were added I said that should be easy. Well, it turned out to be a week later and no luck.

I have managed to g

Scripting Tables with ALTER with dependencies

SQLServerCentral » Latest topics
Scripting Tables with ALTER with dependencies
Dear Experts,
Please advise how I can script all the tables of a database with ALTER option . It should script the drop and create of the dependencies like Indices, Constraints .Thanks in advance.

adding 365 partitions to existing scheme and fucntion in sql server 2014

SQLServerCentral » Latest topics
adding 365 partitions to existing scheme and fucntion in sql server 2014
Hi

My tables are partitioned on business date. My requirement is to add 365 partitions for next year to existing partition function and scheme.

Can Data Save the World?

SQLServerCentral » Latest topics
Can Data Save the World?
Comments posted to this topic are about the item [B]Can Data Save the World?[/B]

Monitor spids on SQL Azure instance? Can we do it?

SQLServerCentral » Latest topics
Monitor spids on SQL Azure instance? Can we do it?
Hi All,

Can I do the below for SQL Azure instance/db?

Suppose, I want to take a look at what is running right now . For example I want to run sp-who2 or execute sys.dm_exec_requests or sp_whoisactive to see if there is a blocking or wan

How to delete data in child tables first and then parent table data?

SQLServerCentral » Latest topics
How to delete data in child tables first and then parent table data?
Hi All,

Looking for a TSQL script which can delete/truncate data from child tables first and then parent tables. Does anyone has an handy script to do DELETE's ??

Thanks,

Sam

Singular or Plural

SQLServerCentral » Latest topics
Singular or Plural
Comments posted to this topic are about the item [B]Singular or Plural[/B]

Can we restore copy-only full backup and regular tlog backup?

SQLServerCentral » Latest topics
Can we restore copy-only full backup and regular tlog backup?
Good Morning Experts
Can we restore copy-only full backup and regular tlog backup?

adding 365 partitions to existing scheme and fucntion in sql server 2014

SQLServerCentral » Latest topics
adding 365 partitions to existing scheme and fucntion in sql server 2014
Hi

My tables are partitioned on business date. My requirement is to add 365 partitions for next year to existing partition function and scheme.

"Tag" highest value in the month

SQLServerCentral » Latest topics
"Tag" highest value in the month
I'm new to SQL and trying to figure out how I can place a "Y" (for yes) for the highest value of the month.  Right now, I have a simple table that contains a date and a numeric value... 

How can I create a third column the will place a

Saturday, December 9, 2017

joining lots and lots of tables in a vew

SQLServerCentral » Latest topics
joining lots and lots of tables in a vew

have got a query(view) that needs to join multiple tables in a view. Currently have over 100 tables in the join - and this number could get larger. Does produce is a rather wide resultset (1 column per table)

joined tables are relatively small (c

Changing sys.configurations for SQL Azure instance? Is that possible?

SQLServerCentral » Latest topics
Changing sys.configurations for SQL Azure instance? Is that possible?
Hi All,

If I would like to change the sp_configure settings on a SQL Azure instance, how can I do that? Can we do that using tsql statement or something which has to done in azure portal? This is a testing server. I want to propose changing "cost

Link SQL Server 2014 to a Progress Database, is it possible?

SQLServerCentral » Latest topics
Link SQL Server 2014 to a Progress Database, is it possible?
Hello Everyone,

i was tasked with a weird question, and sorta told them it is possible, or could be, but, is it really possible to link a Sql server 2014 to a Progress Database?

what the main goal is to replicate data daily from Progress

Cache Report via SQL commands

SQLServerCentral » Latest topics
Cache Report via SQL commands
Hello,
I'd like to cache a few reports at the same time using a SQL statement.
Currently I have to go to each SSRS report-->Manage-->Caching-->Click "Create a cache snapshot when I click Apply on this page" --> Apply
I am looking

Query from 2 tables from 2 databases

SQLServerCentral » Latest topics
Query from 2 tables from 2 databases
hello,
 
below is my query, the query result is2 columns from2 different databases
the columns "OriginalPremium" & "Share"
 
Share is always staticin EACH query run but in some queries are 50 some are 60..etc
the que

ORDER By Based on Company then SubCompany

SQLServerCentral » Latest topics
ORDER By Based on Company then SubCompany
Hello,
Trying to create a selection in a specific order.
The table is like this
 
CompanyName , CompanyStatus, CompanyNumber, GroupNumber
Blackwell ,          group, &nb

Query from 2 tables from 2 databases

SQLServerCentral » Latest topics
Query from 2 tables from 2 databases
hello,
 
below is my query, the query result is2 columns from2 different databases
the columns "OriginalPremium" & "Share"
 
Share is always staticin EACH query run but in some queries are 50 some are 60..etc
the que

Can Data Save the World?

SQLServerCentral » Latest topics
Can Data Save the World?
Comments posted to this topic are about the item [B]Can Data Save the World?[/B]

Property IsMailHost is not available for Database [msdb]

SQLServerCentral » Latest topics
Property IsMailHost is not available for Database [msdb]
I am getting this error when trying to setup a Notify operator task on a SQL2016 server

Scripting Tables with ALTER with dependencies

SQLServerCentral » Latest topics
Scripting Tables with ALTER with dependencies
Dear Experts,
Please advise how I can script all the tables of a database with ALTER option . It should script the drop and create of the dependencies like Indices, Constraints .Thanks in advance.

Comic for 2017.12.09

RSSMix.com Mix ID 8239024
Comic for 2017.12.09
New Cyanide and Happiness Comic

Today's Random Word!

SQLServerCentral » Latest topics
Today's Random Word!
HI When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene or a word running through your mind... Jump on that word... And. Post it here by it's thumbs! :hat: Quickly! Before it becomes a number!

Friday, December 8, 2017

"Tag" highest value in the month

SQLServerCentral » Latest topics
"Tag" highest value in the month
I'm new to SQL and trying to figure out how I can place a "Y" (for yes) for the highest value of the month.  Right now, I have a simple table that contains a date and a numeric value... 

How can I create a third column the will place a

http://www.healthyapplechat.com/ultralast-xxl-reviews/

SQLServerCentral » Latest topics
http://www.healthyapplechat.com/ultralast-xxl-reviews/
Ultralast xxl:It works by invigorating your body to build the testosterone level which begins to go down after a while.To see whether any suppl

Can Data Save the World?

SQLServerCentral » Latest topics
Can Data Save the World?
Comments posted to this topic are about the item [B]Can Data Save the World?[/B]

HASHBYTES can help quickly load a Data Warehouse

SQLServerCentral » Latest topics
HASHBYTES can help quickly load a Data Warehouse
Comments posted to this topic are about the item [B]HASHBYTES can help quickly load a Data Warehouse[/B]

Are the posted questions getting worse?

SQLServerCentral » Latest topics
Are the posted questions getting worse?
Is it me, or are the posted questions getting worse these days? I just read a post by someone apparently in charge of something who was asking how to take a database backup and restore it on another server. It seems like the general feeling of a lot

Singular or Plural

SQLServerCentral » Latest topics
Singular or Plural
Comments posted to this topic are about the item [B]Singular or Plural[/B]

Comic for 2017.12.08

RSSMix.com Mix ID 8239024
Comic for 2017.12.08
New Cyanide and Happiness Comic

Today's Random Word!

SQLServerCentral » Latest topics
Today's Random Word!
HI When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene or a word running through your mind... Jump on that word... And. Post it here by it's thumbs! :hat: Quickly! Before it becomes a number!

SQL Battleship

SQLServerCentral » Latest topics
SQL Battleship
Comments posted to this topic are about the item [B]SQL Battleship[/B]

The Relational Database is the Default

SQLServerCentral » Latest topics
The Relational Database is the Default
Comments posted to this topic are about the item [B]The Relational Database is the Default[/B]

application_name is not available in audit logs in SQL Server 2017

SQLServerCentral » Latest topics
application_name is not available in audit logs in SQL Server 2017
I am looking for a way to fetch client application name in audit logs in SQL Server. As per the MSDN page, it should be available from SQL Server 2017 on-wards.

Singular or Plural

SQLServerCentral » Latest topics
Singular or Plural
Comments posted to this topic are about the item [B]Singular or Plural[/B]

Can Data Save the World?

SQLServerCentral » Latest topics
Can Data Save the World?
Comments posted to this topic are about the item [B]Can Data Save the World?[/B]

Job getting stuck in UAT but runs fine in Prod

SQLServerCentral » Latest topics
Job getting stuck in UAT but runs fine in Prod
Good Morning ExpertsOne  of our jobs is getting stuck everytime it is triggered in UAT. The same ,job is running fine in prod. The job runs sql code.Could you please l

dm_os_process_memory shows more memory usage than dm_os_memory_clerks & dm_os_buffer_descriptors

SQLServerCentral » Latest topics
dm_os_process_memory shows more memory usage than dm_os_memory_clerks & dm_os_buffer_descriptors
Hi,
I'm looking for some help finding some missing memory and how to reclaim it without restarting the SQL service.

The original issue:
A SSIS package is hanging on a sort operation. Only ~860K rows, ~45 bytes per row = ~37 MB.
This

Remove duplicate values

SQLServerCentral » Latest topics
Remove duplicate values
Hi Experts,

In the below table records are grouped by ID column. If the count for ID is greater than 1 then remove the records which are having 'Null" values in any of the name ,city ,

The Relational Database is the Default

SQLServerCentral » Latest topics
The Relational Database is the Default
Comments posted to this topic are about the item [B]The Relational Database is the Default[/B]

Singular or Plural

SQLServerCentral » Latest topics
Singular or Plural
Comments posted to this topic are about the item [B]Singular or Plural[/B]

Thursday, December 7, 2017

Linked Server Error

SQLServerCentral » Latest topics
Linked Server Error
Hi,
I am trying to export the SQL (Server 2012)  data to Excel file.  I tried the below query

INSERT INTO OPENROWSET

Stairway to DAX and Power BI - Level 12: Function / Iterator Function Pairs: The DAX CountA() and CountAX() Functions

SQLServerCentral.com Articles
Stairway to DAX and Power BI - Level 12: Function / Iterator Function Pairs: The DAX CountA() and CountAX() Functions

Business Intelligence Architect, Analysis Services Maestro, eight-year Microsoft Data Platform MVP and author Bill Pearson introduces the DAX CountA() and CountAX() functions, discussing the syntax, uses and operation of each. He then provides hands-on exposure to CountA() and CountAX(), in counting non-empty cells in a column, and in counting nonblank results when evaluating the result of an expression over a table, respectively.

Remove duplicate values

SQLServerCentral » Latest topics
Remove duplicate values
Hi Experts,

In the below table records are grouped by ID column. If the count for ID is greater than 1 then remove the records which are having 'Null" values in any of the name ,city ,

Logic to check for empty table before joining

SQLServerCentral » Latest topics
Logic to check for empty table before joining
Hi All,

I have a requirement which requires me to display report as per the dimension access to the user trying to pull the report. Just to give an example.. My dimension "Dimension.Sites" can have more than 20 sites. But a us

http://www.australiasupplements.com.au/radiant-bloom-cream/

SQLServerCentral » Latest topics
http://www.australiasupplements.com.au/radiant-bloom-cream/
Radiant bloom cream:Ladies who wake up with puffy eyes and dark circles may utilize this item whose plan focuses on the eye area.The produ