Questions tagged [sql-server-2014]

SQL Server 2014 (major build version 12.0.xxxx). Please also tag sql-server.

Filter by
Sorted by
Tagged with
2
votes
1answer
145 views

Seamless SQLServer Database Name Change

I need to change the name for a few databases, however the databases are used by a lot of applications managed by several different teams. It would take some time for all the applications to finish ...
0
votes
1answer
46 views

Finding Culprit Blocking Sql

Whenever in our system there is a block (everything stopped). I see the below query is the culprit, (@P1 numeric(10))SELECT "Col1128","Tbl1029"."A_NAME" "Col1124&...
1
vote
1answer
33 views

Select distance between cities in two directions

I have a distance table and a cities table. I have joined them in a way where i now have: cityA_id,city_A,cityB_id,cityB, distance in km i need to get the distance betweens cityA and CITY B and then ...
4
votes
3answers
560 views

MS SQL Server 2014: which stored procedure is my error in?

As a general question or three on Microsoft SQL Server 2014, that perhaps I should know the answer to already, or even perhaps did once - When my stored procedures run other stored procedures, how can ...
-1
votes
1answer
40 views

How to view size of clustered index for a given table? [duplicate]

Inherited the following audit table: Table UserActions AppID int ActionTime datetime Action varchar(25) UserID int Description text Clustering key is on AppID, ActionTime, Action columns. RowCount = ...
2
votes
3answers
279 views

Urgent help with TempDB log file growth mystery

I need some urgent guidance for a tempdb issue for past last week: The tempDB log file is growing starting a specific time, lets say 2 PM. And almost continue to grow upto 150 GB and then comes down ...
0
votes
0answers
25 views

How To Grant A Specific Login Under Acitve Directory Group To View Server State In SQL Server [duplicate]

I want to grant only a login who is under an active directory user group to view server state in sql server. How can i do it?
1
vote
1answer
32 views

How to BCP export three related tables in a transaction consistent manner?

Have three related tables that I would like to bcp export to file(s). This three tables have relationships to each other. Is there a good way to bcp export these tables in a transactionally ...
0
votes
1answer
81 views

Too many Partitions, removing older years

This is a follow-on to this question a few years ago Splitting Existing Partitions in SQL 2014 where now there are partition years for 2011 all the way to 2021. I need to archive partitions 2011 to ...
0
votes
1answer
30 views

Properly delete data forever and free up the space it was using? [duplicate]

I've been having issues finding a real answer to this question as the response is always "Don't do this, it's a bad idea, that space was obviously needed and it will just get used up again in ...
0
votes
0answers
48 views

Reporting & Logging Failing on SQL Server Job

System Info: SQL Server 2014 Enterprise, Windows Server 2012 R2, running on a VM I have a Maintenance Plan set up to perform a log backup of a database every 17 minutes. The job normally runs fine ...
1
vote
1answer
135 views

Enable Toolbox window in SQL Server Management Studio

I am assuming that the Toolbox windows in SSMS is used to store code samples. So I am able to highlight code in the editor and drag it to the Toolbox window. However, if I wanted to use the code ...
0
votes
1answer
51 views

Concurrent Update On Primary Key Column Making Deadlock

I have simple table T which have Col1, Col2,Col3 and Col4. columns. Col1 is primary key. Now I am running some concurrent code, Parallel.For(0, list.Count, new ParallelOptions { MaxDegreeOfParallelism ...
1
vote
2answers
51 views

Unable to understand correlation between MaxWorkers created and CPU utilization

I am having a strange issue which i am unable to understand: On my server with 64 Logical processors having maxworkers 1472, there are peak periods in day where workers created for an hour lets say ...
0
votes
2answers
46 views

How to query plan cache for all query's using a table variable?

Is there a way to query the sql plan cache for all query's using a table variable?
2
votes
1answer
53 views

Exponential log file growth on quiet database with log backups

I have a small (~3GB) database in Full recovery mode, with full backups at midnight and transaction log backups at noon. Despite being a testing database with virtually no activity, the size of the ...
0
votes
4answers
50 views

MS SQL Express - Find when a Query was run

I have an ecommerce website in .NET and using MS SQL Server Express, Version info: Microsoft SQL Server 2014 - 12.0.4100.1 (X64) Apr 20 2015 17:29:27 Copyright (c) Microsoft Corporation Express ...
1
vote
2answers
164 views

Ola Hallengren scripts: after a job failure, how to skip the databases that worked and backup only the remaining ones?

In our organization we have more than 150 databases in one instance and full backup should run for every day. Our backup script should be in such a way that if backup job fails while taking 100th ...
1
vote
2answers
48 views

How to size SQL Server VM so that it is comparable to bare metal primary SQL server?

Are there any guidelines for sizing a new Windows SQL Server VM in Azure so that it matches performance of the on-prem / bare-metal primary SQL server?
1
vote
0answers
42 views

Ola IndexOptimize Deadlocking On Self But No Error Record In CommandLog Table

I have seen this a couple times. There is a job running IndexOptimize that completes successfully, but running sp_BlitzLock will show a deadlock for one specific table. The deadlock command is ...
1
vote
1answer
163 views

Executions/min and CPI ms/sec inside Activity Monitor is too high

We have executions/min is too high, around 20,000 to 30,000 for a query. Does this means the query is executing 20,000 per minute? I don't think we have that much load on server that a single query ...
0
votes
1answer
37 views

Is there a way to tell if a GUID column contains sequential or traditional / random GUID's?

Have a table that is populated by Entity Framework 3.1.1 code. The table contains a clustered index / primary key on ID which is defined as of type GUID with no default value. Is there a way in SQL ...
0
votes
2answers
42 views

How to query cached plans that contain a specific missing index?

I see a potential missing index for a table but would like to first query all cached plans that have that specific missing index (so I can later test those queries after the new index is built). How ...
0
votes
1answer
50 views

How can I measure the impact of queries with errors being rejected by SQL Server?

After configuring XE on November 23, 2020 to capture some errors I could count 2,163,665 occurrences of the same error coming from requests of a legacy app (that probably won’t be corrected so soon). ...
0
votes
1answer
41 views

Identify table usage in sql server before we stop the load

I tried browsing this across lot of links but cant get much of help so i am posting this question which sound bit similar. We have quite some tables which are being planned from our app team that they ...
0
votes
1answer
41 views

Find if and when a Query was run?

I am trying to get to the root of a problem and need to see if and when a specific Delete Query was run on my MS SQL Server. The command would have come from my .NET website. My Server is Windows 2012 ...
2
votes
1answer
114 views

Allow user to GRANT certain permissions to others

I have tried googling this but may well be using the wrong terms... permissions and the like aren't my strong point. What I want to do is first create a role - eg 'Snr_Analyst' - with certain ...
2
votes
1answer
46 views

Why do SQL Server auto-created statistics sometimes include the primary key?

I had always understood that SQL Server auto-created statistics only include one column. In other words, they are not multi-column statistics. However, today I came across some auto-created ...
0
votes
1answer
69 views

Running select filename from dbo.sysfiles returns short foldernames with tilde

I am running the following statement in SQL Server 2014(in Windows 2012R2): select filename from dbo.sysfiles where fileid = 1 However it returns: c:\progra~1\micros~1\mssql1~1.sql\mssql\data\master~...
0
votes
1answer
55 views

Why is the built-in distance function so much slower than my custom one?

I'd like to find the distance between 2 sets of coordinates. First I use the built in function: declare @lat1 real = 33.1, @lon1 real =-117.1, @lat1 real = 39.6, @lon1 real =-98.7 declare @source ...
1
vote
1answer
167 views

Configure Connection String to Use Target Machine Credentials

I am trying to develop an SSIS package that will be run on several different machines. I am stuck because I do not understand how to create a connection string that doesn't explicitly point to one ...
0
votes
1answer
183 views

Create LINKED SERVER to MYSQL using SSH

Is there any way to create a MS SQL Server Linked Server to connect to MySQL through SSH? I managed to connect to MySQL through SSH using other database management tools like HeidiSQL or DBeaver, ...
0
votes
1answer
69 views

How to avoid implicit conversion when using XQuery value() method in TSQL?

I have the following xml that I am parsing using TSQL - XQuery value method. <Root> <FooAudit> <BarIntField>..</BarIntField> <BarDateTimeField>..</...
2
votes
2answers
190 views

How to allow a certain domain user to create databases on a remote SQL instance?

I want to allow for a certain domain user to be able to create databases on a remote SQL instance. What steps are necessary and is it possible to perform those steps programmatically in a C# ...
0
votes
1answer
41 views

Do DB permissions flow from primary server to secondary server in SQL log shipping?

Do DB permissions flow from primary server to secondary server in SQL log shipping? If someone wants db read permissions on the secondary, do we grant on primary and the permission flows to the ...
2
votes
1answer
75 views

Longer time to bring SQL online after node failover

We had a strange issue post our regular OS patching for SQL servers. Per best practices, we apply patch on Passive and do node failovers to make current passive, active and vice versa to complete ...
1
vote
3answers
81 views

Handle development issues when dealing with different collation for the instance/database setting

Looking for some guidance on how we can handle the scripts/schemas when being run on different collation in sql server. We have a process where multiple stored procs are created lets say with schema ...
0
votes
1answer
40 views

How to optimize and estimate DB recovery times?

Would like to optimize recovery time for db's after failover to passive node in high availability cluster. Assuming full recovery model... What are the steps to take to optimize DB recovery time for a ...
1
vote
2answers
120 views

Help with tuning this UPDATE Query or possible re-write

I have below SQL query which runs on avg. 40 secs and need some guidance where can i improve it or possibly re-write: Declare @status_D INT, Declare @StatusIP INT, Declare @Status_F INT,...
0
votes
3answers
111 views

Allow user to create databases on server and to see only the databases that are created by him, without creating login first

I want to implement the following use case using C# application and MS SQL Server Express 2014. I have a centralized database server in which there are already created some database (which have the ...
2
votes
1answer
86 views

SQL Server 2014 only using 10 percent of its available memory? [duplicate]

Hoping someone can weigh in here. I have a 2014 developer edition box that doesn't seem to be performing well. I currently have 128 GBs of RAM allocated to the box and 120 GBs maximum allocated inside ...
0
votes
1answer
66 views

Index automation job script

Our Production instance is running SQL Server 2014. There needs to be an automated Index defragmentation job that will either reorganize or rebuild the indexes based on the fragmentation level for a ...
2
votes
1answer
228 views

Drop the last character of string, if the last character is s

Working through an odd issue that the moment and trying to find a solution. If we have a string variable (@string) how might we drop the last character of the string, ONLY if the last character is an ...
3
votes
0answers
95 views

Time to generate execution plan for select into from a view takes significantly more time than select

I have a view, vw_example, that is quite complicated and has multiple joins across multiple databases. This view has been causing significant delays when used as part of other queries, and we've ...
4
votes
3answers
405 views

General Question on sp_recompile

For couple of scenarios, not many a times but few we have seen doing sp_recompile on a stored proc improving the performance. Being a DBA i understand few of caveats involved when doing sp_recompile ...
0
votes
2answers
31 views

UDF in MS SQL Server returning a query starting with "with" cause

This is a perfectly valid SQL Query and works nicely (for e.g.) in Microsoft SQL Server 2014: with t as (select 'a' as attr) select * from t it returns a, surely one can simplify it and drop the with ...
0
votes
1answer
41 views

When should you shrink your transaction log?

We do log backups every 3 minutes but despite that the transaction log has still managed to grow to 200+ gb on disk. Its almost completely empty after log backup. How do you know if your transaction ...
1
vote
1answer
180 views

Steps to apply windows updates to sql failover cluster?

What are the steps to apply windows updates to a active/passive two node sql failover cluster? My initial thought was to apply windows updates to passive node/reboot and then failover and repeat ...
1
vote
1answer
42 views

Will large transaction log file slow db recovery?

Did a manual failover after windows updates to passive node today and recovery was fast for all but one db. The one slow db had a transaction log size of 203200.00 mb. Log Space percent used = 0.25. ...
0
votes
1answer
25 views

Part of statement missing from sys.dm_exec_query_stats

I'm trying to debug the individual parts of a large query; I'm using the statement offsets in sys.dm_exec_query_stats to separate them. There is one particularly troublesome statement that for some ...

1
2
3 4 5
55