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

learn more… | top users | synonyms (3)

1
vote
1answer
20 views

Does Resource Governor help protect page life expectancy?

I have several large tables that I need to copy into partitioned copies on a transactional database. I am worried about the hit that this will cause to performance of my production applications. In ...
1
vote
0answers
25 views

Understanding `dbcc showcontig` Record Size

I am comparing two tables. They are: CREATE TABLE Table1( Column1 [bigint] NOT NULL, Column2 [VARBINARY](max) NULL, Column3 [int] NULL, Column4 [DATETIME] NULL, Column5 [INT] ...
0
votes
0answers
36 views

The target principal name is incorrect. Cannot generate SSPI context - SQL Server 2012 error

I don't understand why this error is popped up suddenly. It was working till yesterday. It is a stand alone env. Problem is when me or any user wants to connect from their machine locally it is ...
0
votes
1answer
25 views

How can I call a remote User Defined Function?

I have SQL server which contains a link to another server(For e.g: test) I have a function in linked server(name:getvalue(@parameter)).so this function output i want to retrieve in SQL server 2012.I ...
2
votes
1answer
45 views

Stats Maintenance after Restoring to Newer SQL Server

What's the ideal (or necessary) sequence of call when restoring a SQL Server 2012 backup onto a SQL Server 2014 instance and updating the compatibility level? -- Update Statistics for all tables EXEC ...
3
votes
0answers
32 views

Compress backup taken from two different environments take different time to restore

I have two backup files one from Normal SQL Server and one from SQL Server from Azure VM. The restore of these backup files is totally different from each other. Though the database backups are ...
1
vote
1answer
11 views

Replication with fail over cluster in SQL Server 2014

Presently I am Using Replication Feature in SQL Server 2012 .I want to migrate to SQL server 2014 .I want to use fail over cluster feature .Does it effect the replication feature which we are using ...
1
vote
2answers
65 views

How to tune a stored procedure that is fast on test data but slow in production

If you have a SQL Server 2012 database with test data in development and preproduction phase and the real from the company's server take place only in the production phase. In other words, the real ...
4
votes
1answer
83 views

When to use sort_in_tempdb when rebuilding indexes?

We are debating whether to use the SORT_IN_TEMPDB option for our DW tables. My understanding is that there are more writes when using this option, although they are more sequential. We have a SAN ...
1
vote
2answers
53 views

Create rows when selected rows exist

I haven't spent much time with SQL Server, and I can't seem to figure something out. I have 3 tables; user, usergroup, group. usergroup is a table that contains both a group id and a user id, where ...
2
votes
3answers
62 views

Show all stored procedure definitions (content) for editing

Apologies if this has been asked before, the suggested 'related' questions weren't relevant and my own search turned up very little. I need to list the definitions (code) of all my stored procedures, ...
-4
votes
2answers
28 views

Uses of Database Mail [on hold]

What can I use Database Mail for in SQL Server 2012? I have configured Database Mail but would also like to know where I can use it.
2
votes
1answer
108 views

I/O is frozen on Database & also I/O was resumed on Database on daily basis in log with complete Backup

I would like to say that as on daily basis i got the message in my log file. First The I/O is frozen on Database (DatabaseName) message appears in log. The message is like I/O is frozen on ...
0
votes
0answers
28 views

SQL Server DeleteFolder Job ran successfully but it doesn't deleted the folder

I have a job to delete past 15 days folder in SQL Server. The job run successfully and delete the folder in local SQL Server. But it runs successfully and does not delete the folder in another SQL ...
0
votes
0answers
53 views

SQL server only using 4 GB ram [closed]

I have a Windows Server 2008 R2 server running SQL Server 2012 Standard Edition. It won't use more than 4 GB of RAM. I checked max server memory variable and it's a 7 digits long standard number ...
2
votes
2answers
26 views

Disk size and log file growth during upgrades

I have four SQL Server databases. Per the maximum load requirements, each database file can be between 1 and 2 TB in size. The HDD is a multi-disk DAS with about 9TB of space. During a database ...
1
vote
0answers
37 views

Oracle migration to SQL Server

I am working in a Oracle 11g database migration to SQL Server 2012, I did the migration using SSMA v5.3 and all works fine. However, I did re-write code in some objects like triggers and stored ...
7
votes
1answer
89 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 ...
1
vote
1answer
36 views

Which technology to synchronise SQL Server and MySQL data?

Which technology should be used if I want to move my data from SQL Server to MySQL server when data is entered to SQL Server row by row and getting feedback from MySQL server? Should it be 1. ...
0
votes
0answers
22 views

Getting issue while creating SQL Server Agent job [closed]

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
17 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 ...
3
votes
1answer
27 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
36 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 ...
0
votes
1answer
29 views

Issue in installing SSIS MS-SQL2012

While installing the MS SQL Server 2012 Enterprise Edition, everything goes through fine but I'm not able to install Integration Services alone. I get the error as following: The following error ...
1
vote
0answers
20 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
26 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.
2
votes
2answers
41 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
37 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
64 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
29 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
46 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
16 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
58 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
50 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
147 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
40 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
22 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
266 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
40 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
63 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
43 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
30 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
106 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
51 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
100 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, ...