This tag is for SQL Server 2012, major build version 11.00.xxxx.

learn more… | top users | synonyms (3)

3
votes
0answers
19 views

SET STATISTICS IO- worktable/workfile

I am executiong query, that produces plan: Statistics IO: Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob ...
0
votes
0answers
14 views

which technology i shoul use 1. LinkedServer 2. SSIS?

Which technology should be use if i want to move my data from MSSQL server to MySQL server every time when data is entered to MSSQL row by row and getting feed back from MySQL server? Should it be ...
0
votes
0answers
14 views

Getting issue while creating SQL Server Agent job

Getting error while copying SQL Server Agent job from SQL Server 2012 to SQL Server 2014. I restored databases in SQL Server 2014. But still facing below error. Msg 14234, Level 16, State 1, ...
1
vote
0answers
14 views

SSIS Custom Task with a default Task UI

I followed the tutorial here to build a very simple task and was able to get that task to work. Here are my current tools: Sql Server 2012 Visual Studio 2013 (project is compiled in .net 4.0) Sql ...
2
votes
0answers
18 views

SQL Server 2012 Explicit transactions taking time with Always on Setup

We have a weird issue while we setup the AlwaysOn on Azure VM. We have explicit transactions in our stored procedures, and which are causing some delays and blocking when till the time we get the ...
1
vote
0answers
27 views

Will longer DB transactions make calls to other DB wait?

I have a fundamental question but unable to find precise information online. I opened up a DB transaction (SQL Server) and making multiple inserts, updates, delete etc; the entire process takes about ...
1
vote
0answers
17 views

SQL Server 2012 restrict CmdExec to sysadmin server role

I'm trying to restricting CmdExec rights to sysadmin server role in SQL Server 2012. I've googled but just found some solution which they were for older version of SQL Server. Can you please help?
1
vote
1answer
20 views

Adding Secondary Data file in SQL Always on

How to add the Secondary Data file to the Database which is a part of Always on availability Group in SQL Server 2012.
1
vote
2answers
35 views

Drop and Create Script not working

I'm fairly new to databases, but I'm beating my against the wall trying to do something that (I believe) should be fairly trivial. I'm using SQL Server Management Studio 2012 and am trying to delete ...
1
vote
1answer
35 views

Strange behaviour in TSQL function (parameter with int variable or NULL behaves differently)?

I experienced very strange problem today with TSQL function. The function has several parameters (int and bit). One of the (int) is set with value NULL. When calling a function with NULL inside the ...
0
votes
1answer
54 views

Multi-threaded inserts vs serial

I have a large database application on SQL Server 2012 Standard Edition which receives data from hardware in chunks of 500-1000 (100 byte) rows every few seconds through a stored procedure. Would a ...
0
votes
1answer
28 views

Why does adding a transactional replication publication change all the tables and columns to “not for replication”?

I'm trying to get replication set up - this is my first time ever doing it, so I'm probably making some rookie mistake here. Right now I'm just working in the dev environment. I've been following the ...
0
votes
2answers
43 views

Finding the longest entries for a given column (nvarchar(100))

I am trying to find the biggest / longest entries of a column which is of type nvarchar(100). I need to understand if I can maybe restrict that column to be only nvarchar(20) or something. Is there a ...
1
vote
0answers
36 views

SQL server database performance issue [closed]

There are two database on same sql server 2012, with same tables, indexs and data as well, but for some reason one database response is 6 times slower then the other in most of the quries. Please help ...
1
vote
0answers
15 views

AlwaysOn AG Live Migration

A couple of thoughts on AlwaysOn AG migrations: Is there a reason why Microsoft didn't implement similar technology to Hyper-V Live Migration to AlwaysOn AGs so that the buffer pool and cache are ...
1
vote
2answers
53 views

SQL Server : Tracking a slow running query on completion

Am trying to work on script for slow-running queries. I understand that we can get the list of slow running queries using sys.dm_exec_requests. Say, I have a query Q1 which is running very slow, say, ...
0
votes
1answer
49 views

Breaking up long running query into batches runs fine for a while and then produces fatal error

I'm using a variation of this post which details using "careful batching" to delete records in batches from a table that contains 38MM records. The script below runs for a while and shows results ...
5
votes
2answers
115 views

SQL Server compatibility with New TLS Standards

The major browsers are moving beyond SSL3.0 and TLS1.0 . The PCI Security Council has declared an end-of-life date for these protocols to be considered sufficiently strong encryption. We need to ...
1
vote
1answer
39 views

Performance improvement on SQL query joining table on itself

I'm running this query on a table with approximately 20MM records in it. It's a very slow query, and I'm wondering if there's a better way to accomplish this that might run faster ? delete previous ...
0
votes
1answer
20 views

SQL Server 2012 - sp_executesql multiple parameter error

I am receiving an error when attempting to execute the following code that builds a dynamic string to be executed by sp_executesql. DECLARE @paramDefinition NVARCHAR(500); DECLARE @ID1 NVARCHAR(20); ...
0
votes
0answers
14 views

Auto Increment Sequence Broken After Applying a Key [duplicate]

After SQL Server 2012 Enterprise edition's evaluation period expired, I applied another key using the edition upgrade wizard. After it was successfully done, all Auto-Increment columns started ...
1
vote
1answer
26 views

I need to figure out the last time that a function was used by SQL Server. How can I do this?

I work with databases that contain thousands of stored procedures and hundreds of functions. I have found on-line methods to track the usage of stored procedures; however, I haven't seen the same for ...
4
votes
1answer
263 views

Why does SSMS highlight SUBSTRING in purple but RIGHT in grey?

I apologise for the trivial question, but I was trying to work out how to do a RIGHT in SQL so I experimentally typed RIGHT and it didn't highlight in purple, so I spent some time scratching my head ...
1
vote
1answer
37 views

Cannot connect to SQL Server database regardless of connection string

I'm having a tough time to connect to a local SQL Server instance within a C# app. I can connect to external databases on other servers, but I need to be able to use my own local database. The ...
4
votes
1answer
61 views

Why are these two HADR DMVs reporting different states?

SQL Server 2012 (11.0.5058.0) Enterprise Edition We have 8 Availability Groups in a 2(HA)+1(DR) cluster and our monitoring DMVs are reporting results that confuse me. 6 Availability Groups are ...
1
vote
1answer
40 views

No rows in sys.dm_exec_procedure_stats for a particluar stored procedure

I am running DMV queries to get stats for my stored procedure, but I am not finding any rows against this SP under sys.dm_exec_procedure_stats. Please suggest what could be various reason for this ...
0
votes
1answer
24 views

Need to make sense of FileTable permissions

I'm setting up a FileTable to allow users to quickly stuff some PDF report files into a database for later searching via an intranet application (to be built later). Sorting out the necessary ...
2
votes
2answers
98 views

Why can't user with SQLAgentOperatorRole delete his own SQL jobs

I created a login and a user. I assigned the user as the db owner of the database "test". Then I granted him the role SQLAgentOperatorRole so that he can delete/create/modify the jobs belonging to the ...
2
votes
1answer
33 views

What should be the command for following role creation requirement?

I need to create a role where the assigned user can access only the 'AdventureWorksDB" where he will have execute permission to all tables,views and stored procedures in the database. I wrote the ...
-2
votes
1answer
36 views

when adding a table to my dbo.view I don't get the entire view

here is the code for my view that calls all rows from the tables: SELECT dbo.Purchase_Order.Purchase_Order_ID, dbo.Purchase_Order.Purchase_Order_Number, dbo.Purchase_Order.Purchase_Order_Date, ...
2
votes
1answer
50 views

Identity column value falling behind randomly

We are having a strange intermittent issue where the identity column value falls behind the MAX(ID) for the table. Each customer gets their own table that stores statistics to the tune of ...
13
votes
2answers
93 views

Index on a persisted computed column not seekable?

I have table, called Address, that has a persisted computed column called Hashkey. The column is deterministic but not precise. It has a unique index on it that is not seekable. If I run this query, ...
2
votes
1answer
26 views

How to add new named instance in SQL Server 2012 [closed]

We have already installed SQL Server 2012 with required instance and collation name. But now as per the project needs we have need to add one more instance name. Can anyone knows how to add new ...
1
vote
1answer
29 views

How to group data and write it's group id for each row?

I have sample data: CREATE TABLE #T (Name varchar(5), GroupId int NULL) INSERT INTO #T (Name) VALUES ('A'), ('A'), ('A'), ('B'), ('B'), ('C'), ('D'), ('D') Name GroupId ----- ----------- A ...
1
vote
2answers
59 views

How can I run a SQL job every 1 second? [duplicate]

I have an SQL Job which processes minimum amount of rows at a given time. Currently its running every 10 seconds which is the minimum available in Job Scheduler. But because of that the table used ...
1
vote
2answers
45 views

When to prefere a truncate over a batch-delete?

When I browse DBA-Reactions I understand nearly all the .gifs but with this one I have trouble: https://twitter.com/DBAReactions/status/613840893322338304 I mean truncate obviously doesn't create ...
0
votes
0answers
17 views

SQL Server 2012 Backups on Azure VM

I am trying to take compressed backup of SQL Server databases on Azure VM. I am observing huge difference between the compressed backups taken by Backup to URL and Backup to Azure Mapped Drive. ...
1
vote
0answers
34 views

SSRS puts excessive load on SQL server

I have this bit of code: With ab as (Select distinct d.Code from d join a on d.code = a.Code where a.text like '%AutoPost%' ), sd as (Select distinct m.ref, m.Number, m.Completed, s.ID, ...
1
vote
2answers
35 views

Automating an SQL task on a monthly basis

At the start of each month I have to give a team a copy of the live database which is held in a backup from 1am each morning (D:\Backup) - We then copy this database elsewhere onto a dev server and ...
0
votes
1answer
15 views

Correct way of configuring remote users to connect to Microsoft SQL Server 2012

I have 2 Servers, a web server and a database server. Web server runs a number of .net sites that need to connect to the database server. Currently, I have a configuration string for each ...
3
votes
1answer
39 views

Determine Gap Records, Fill and Return Result

The following working code targets SQL-Server 2012 and I have distilled the actual problem into a manageable scenario with the code example shown below also presented on SQL Fiddle. I seek feedback ...
1
vote
1answer
28 views

SQL Availability Group restore database to standalone server

Running: SQL Server 2012, Windows Server 2008 R2 I want to test a backup by restoring onto an isolated server. The backup was taken from an Availability Group (HADR) configuration, but the target ...
1
vote
0answers
37 views

A significant part of sql server process memory has been paged out. Lots of free memory though

Having a problem where my SQL Server 2012 SP2 Enterprise server says that most of SQL Server's memory has been paged out to disk but there's over 100GB free (of 256GB). From there system performance ...
1
vote
1answer
21 views

Attach Database is disabled in Microsoft SQL Server 2012 Management Studio

I have buy from Godadday hosting and domain, after that I have create database in godaddy and the connect to this db using my authentication. I have .mdf, .ldf that need to attach to the connected ...
3
votes
1answer
48 views

How to create a login and user that can only access one schema in one database

I have executed the following: USE [MyDatabase]; GO CREATE LOGIN [MyDomain\MyAccount] FROM WINDOWS WITH DEFAULT_DATABASE=[MyDatabase]; CREATE USER [MyDomain\MyAccount] FOR LOGIN [MyDomain\MyAccount]; ...
1
vote
2answers
80 views

SQL Server 2012 and DBM

Why would MSFT would deprecate mirroring from 2012.. I understand alwaysON will replace it but then SE users are left with nothing..no alwaysON or dbm from future releases.. Just analyzing from end ...
4
votes
3answers
369 views

How can I convert a key in a SQL Server deadlock report to the value?

I have a deadlock report that tells me that there was a conflict involving waitresource="KEY: 9:72057632651542528 (543066506c7c)" and I can see this: <keylock hobtid="72057632651542528" dbid="9" ...
1
vote
1answer
28 views

SQL Server full text search query takes way too long to execute

I've got query snippet as follows: SELECT * FROM CONTAINSTABLE(dbo.Analysis, *, 'FORMSOF(FREETEXT, "historic year-on-year exchange rates forecast year-on-year exchange rates")'); I'm running it on ...
2
votes
0answers
31 views

SQL Server 2012 replication setup on routed network

I'm trying to setup replication between two SQL Server 2012 instances. I set up a publication successfully on server1, but then I had a problem when trying to access it from server2, because the only ...
0
votes
1answer
15 views

SQL Server not using all cores

I have a server with 6 cores, I've installed SQL Server 2012 web edition, based on core licensing, allowing up to 16 cores. However, it only uses 4 cores. In the error log file: 2015-07-09 ...