For questions about SQL Server 2014 (major build version 12.0.xxxx)

learn more… | top users | synonyms

3
votes
1answer
117 views

How do I identify the program that called a stored procedure?

As part of an application database design spec, we've been asked to block execution of a set of stored procedures if they have been fired directly from SSMS / osql / sqlcmd and so on; that is, they ...
2
votes
1answer
52 views

How do I create a partition using a bit field in SQL Server 2014

I have a table where data is archived. I need to keep this data as it is rarely viewed. Instead of moving archived data to a separate table, I wanted to create a partition on the Archived field. When ...
0
votes
0answers
10 views

SSMA mysql double to sqlserver decimal, decimals getting cut off

I have a field that is a (signed) double in mysql, and I want it to be a decimal(18,4) in sqlserver. I have changed the Type Mapping for Source Types double and double precision to decimal[18][4] in ...
1
vote
0answers
15 views

Best ratio for files and file groups for a highly partitioned table

I have a number of tables with exactly 1000 partitions. Each table can be up to 200G with 100M rows and cannot be compressed. Data in partitions distributed quite equally. The SQL Server has 8 ...
0
votes
0answers
13 views

NT Service\SQLSERVERAGENT account to run job failed on SQL 2014 Standard / Window Server 2012R2

I'm facing with issue of NT Service\SQLSERVERAGENT account. Here is my scenario: - Use Database Maintenance Task in SQL Server to create a backup job + Step 1: use Database Integrity Component + ...
-1
votes
0answers
29 views

Database design for different wildlife types

I am planning to design a database for wildlife details (such as fishes, birds, and animals) in a certain state, e.g. what kind of wildlife is present. I have created a table in SQL Server 2014 in ...
2
votes
1answer
49 views

Threshold for sort spill and random cardinality estimates

I wanted to test tempdb spill warnings so I run the following script on SQL Server 2014: USE tempdb IF OBJECT_ID('tempdb..tblTest') IS NOT NULL DROP TABLE tblTest CREATE TABLE tblTest ( ...
4
votes
2answers
66 views

How to get COUNT of a range between 2 columns

Table: Staff | StartingTime | EndingTime | starthour | endhour ------------------------------------------------------------- 10 | 0813 | 1610 | 08 | 16 20 | ...
1
vote
1answer
37 views

XACT_ABORT OFF vs COMMIT in trigger

I have a trigger on a table that kicks off several other processes. However, I would like to ensure that even if the other processes fail, the insert is successfully committed to the original table. ...
2
votes
0answers
25 views

Grant users privilege to use QUERYTRACEON 9481

Microsoft suggests using OPTION (QUERYTRACEON 9481) for queries that have "degraded" performance against SQL Server 2014 databases running under compatibility level 120. In my situation, "degraded" ...
1
vote
1answer
34 views

Granting permissions to SSIS for developer

I installed SSIS a couple of months after installing SQL Server 2014. I granted permissions to users per MSDN and rebooted SSMS and SSIS. I can login remotely from my client without issue, but have ...
0
votes
0answers
20 views

SQL Server 2014 upgrade

I currently have websites running on SQL Server 2008 R2 - this is the version I also have installed on my own machine. I'm looking at moving my websites to a different provider, however they only run ...
3
votes
1answer
99 views

Get minimal logging when loading data into temporary tables

After reading The Data Loading Performance Guide I am unsure if its necessary to add the TABLOCK table hint to an empty temporary table, defined with a clustered index in order to get minimal logging. ...
2
votes
0answers
30 views

Full-Text Index menu option not appearing in SQL Server Management Studio AND error when right clicking a table

I am using SQL Server Management Studio Version 11.0.3128.0 and SQL Server 2014 12.0.2361 Web Edition. I have successfully created a Full Text Catalog following these instructions: Cannot use a ...
1
vote
2answers
21 views

Upgrade BI server to 2014 and stay on 2008r2 with the database engine server

We would be happy to upgrade our SQL Server environments to 2014, but we have a tight budget for next year. Our BI server (SQL Server 2008 Standard Edition, that is used only for BI purposes) is ...
1
vote
2answers
55 views

Creating a Linked Server that Points to Itself

I am attempting to create a linked server on SQL Server 2014 instance servername\instancename using the following call: EXEC master.dbo.sp_addlinkedserver @server = N'servername\instancename', ...
1
vote
1answer
118 views

Estimated rows very wrong when using declared variables

I am getting very, very wrong estimates for the clustered index seek step of this query (estimated rows is 8,637,530; actual is 74,723): Declare @StartDate as date = '10/1/2014'; Declare @EndDate as ...
0
votes
2answers
55 views

Setting for default column type

Is there a setting in SQLServer 2008 and newer for default data type of date-time columns, i.e. datetime or datetime2? Actually more like something that would tell SQLServer to use datetime2 instead ...
3
votes
2answers
66 views

Is there a way to grant SELECT for every database (including new ones) at a server level?

I have a unique (well, I think it is unique) situation where databases (yes, entire databases) can be created more or less dynamically. Ignoring the obvious issue with that, I need to be able to ...
2
votes
1answer
23 views

How to format documentation in MS_Description extendedproperties?

I'm using a 'MS_Description' extended property to document parameters in a stored procedure. This parameter's documentation requires more structure than just plain text. That is I would like to ...
0
votes
1answer
37 views

Trying to install sql_server_2014_enterprise_edition_x64_dvd Windows 7(Ultimate) 64Bit OS

Im receiving the following error after the Set-up checks Global rules It shows the following error. any idea why this issue occurs :( ?by the way this machine was formatted yesterday and this is a ...
1
vote
1answer
50 views

Best practise how to sync SQL Server 2014 database with other database

What is best practise if we have application using a SQL Server database and we would like to have backup if SQL Server does not work? Our scenario: We would like to use our main SQL Server ...
0
votes
1answer
73 views

SELECT with lots of left join is very slow in SQL Server 2014

I've got a query with, more or less, this structure: SELECT MAINTABLE_ID FROM MAINTABLE WITH (NOLOCK) LEFT JOIN TABLE_1 WITH (NOLOCK) ON TABLE_1_FK_MAINTABLE_ID = MAINTABLE_ID LEFT JOIN ...
0
votes
0answers
20 views

Multi Session Mirroring using 1 witness server, cannot find certificate

I am trying to use 1 witness server for 2 mirrored databases that reside on different servers. For example: db1 on server(A) mirrored to server(B) using witness server(1), and db2 on ...
0
votes
0answers
47 views

Connecting SSIS to Oracle using Attunity Drivers

I am trying to recreate the steps I took to allow me to connect to 64bit Oracle installation from SSIS using the Microsoft Connectors 3.0 for Oracle and Teradata (Attunity driver). MY issue is I ...
0
votes
1answer
28 views

Restore back up strategy for history tables

I have historical/log tables which are: very large holds data that is not rarely queried only inserts are performed (constantly, very often) I want to either compressed them or move them to ...
1
vote
1answer
61 views

SSRS (2008 R2 to 2014) Migration Issues Running Reports

This is my first ever StackExchange question, so sorry if I something is off...I searched and found a rather helpful article that got me this far, but nothing I found addressed what I am currently ...
1
vote
0answers
20 views

Clustered Column store table Delete error

I am getting the below error when we tried to delete records on clustered column store table using OPENDATASOURCE. DELETE TOP (1) OPENDATASOURCE('SQLNCLI','Data Source=Server Name;Integrated ...
13
votes
5answers
1k views

How to recursively find gaps where 90 days passed, between rows

This is a kind of trivial task in my C# homeworld, but I don't yet make it in SQL and would prefer to solve it set-based (without cursors). A resultset should come from a query like this. SELECT ...
0
votes
0answers
75 views

Query execute slowly when changed compatibility Level of my database

I use SQL Server 2014 and have a database with compatibility level 110 (SQL Server 2012). also I have a stored procedure on it that execute about 10 second. When I change compatibility level of my ...
0
votes
2answers
79 views

How to update a column with values from the same newly inserted row on a SQL Server 2014 trigger?

Using SQL Server 2014, I have this: Table1 Tab1_id int identity(1,1) primary key Tab1_val1 smallint Tab1_val2 smallint Tab1_valInfo varchar(10) -- not yet implemented, will be used ...
1
vote
0answers
49 views

Oracle 11g SSIS SQL Server 2014 Truncation

We have a nightly SSIS job which downloads data from a Vendor's ORACLE system into our SQL Server 2014 system using ORACLE's Wallet. On some tables, we've noticed that some VarChar columns have last ...
7
votes
1answer
102 views

Memory optimized DLLs not being removed

From BOL, my understanding is that DBAs do not need to administer DLLs created for memory optimized tables, or natively compiled stored procedures, as they are recompiled automatically, when the SQL ...
1
vote
1answer
69 views

Migrate SQL Server from 2012 to 2014 (11 to 12)

I have just installed SQL Server Management studio 2014 and I also need to update my (local) server to accept a new database via a bak file from a version 12 server. When I look in Server Properties I ...
1
vote
1answer
84 views

Script Table Definition in Powershell

I'm writing a powershell to create a duplicate table(in another schema) for the purposes of partition switching*. I'm having problems adding the columns and the clustered column store index. Here's ...
5
votes
3answers
113 views

Has the guidance on the setting for 'cost threshold for parallelism' changed with the advent of columnstore indexes?

First off, what I'm not asking. I'm not asking what my setting should be. Many are recommending upping the value past the default, and I certainly understand why that's the case for B-Tree based ...
0
votes
0answers
52 views

Log not truncating due to xpt_checkpoint

I have a DB on a SQL Server 2014 instance. I have a memory-optimized filegroup, but as yet, no memory optimized tables. I also have a FILESTREAM filegroup, which contains 1 FILETABLE and a Primary ...
0
votes
0answers
19 views

SQL Server decryption authentication not working with concatenation

I'm trying to retrieve encrypted text according to the authenticator. I am using SQL Server 2014. Everything works except for the decryption. Does anybody know why this is not working? --Step1: ...
3
votes
1answer
122 views

SQL server 2014 locks up on insert query, while SQL server 2000 runs fine

One of the applications I am supporting, is running into a weird issue. In a particular page, there is an insert query. INSERT INTO TBL_Parts_In_Arrival_Details ( PIAD_Parts_In_Arrival_Detail_ID, ...
2
votes
2answers
414 views

Assembly 'system.web, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.' was not found in the SQL catalog

I am trying to deploy a SQL CLR function using the HTTPUtility.UrlDecode method of System.Web but I can't get it to deploy. Error received: .Net SqlClient Data Provider: Msg 6503, Level 16, State ...
5
votes
2answers
231 views

Strange query results for DELETE with ROW_NUMBER

In the following DELETE statement I try to delete all rows except the first one ordered by some criteria. (The actual query makes more sense, this is just a repro. All the sys.objects stuff is just ...
-2
votes
1answer
42 views

Subqueries in SQL Server 2014 [closed]

I want to get results that is in more than one row using a subquery. here is what: Note. This is in microsoft SQL Server 2014. Relations: FeeStudent(Feeid, Studentid, MODE,LEVEL, SEM, Paid, Status) ...
1
vote
2answers
347 views

Issues with module signing and SSIS catalog internal procedures

I'm trying to set up a stored procedure to execute an SSIS package. I want to allow a user to execute only this stored procedure, so I need it to run as a different user. I found this article which ...
1
vote
4answers
210 views

Deploying SQL Server database changes from test to production server

I have a high availability production server that runs SQL Server. It is constantly being read/write to by hundreds of users. I have an exact copy of the database on a testing server and do all the ...
1
vote
4answers
492 views

Execute permission denied on object sp_start_job

I need to allow a user to kick of a specific agent job without having any ability to start other ones. To accomplish this, I've created the following procedure (simplified): ALTER PROCEDURE ...
9
votes
2answers
283 views

Clustered columnstore indexes and foreign keys

I am performance tuning a data warehouse using indexes. I am fairly new to SQL Server 2014.Microsoft describes the following: "We view the clustered columnstore index as the standard for storing ...
5
votes
1answer
261 views

Alternative way to compress NVARCHAR(MAX)?

I am trying to compress some tables that have NVARCHAR(MAX) fields. Unfortunately, the row and the page compression do not have the desire impact (only ~100/200 MB saved for 20 GB table). Also, I am ...
3
votes
1answer
54 views

sp_estimate_data_compression_savings for column store compressions

Is there a way to get compressions saving for column store and column store column store archival compression? In order to check these compressions saving I have to drop all clustered and non ...
3
votes
2answers
684 views

Can SQL Server 2014 Standard Edition Trial be upgraded to a full Core license?

If I install a copy of SQL Server 2014 Standard Trial edition can that version be upgraded (in place without a full re-install) to the full version (core license) afterwards? I'd love to get this ...
1
vote
1answer
63 views

SQL Server 2014 In Memory Table Creation Error

When I create an in-memory table, I get this error: The data types char(n) and varchar(n) using a collation that has a code page other than 1252 are not supported with memory optimized tables