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

learn more… | top users | synonyms (2)

0
votes
0answers
3 views

Effects of renaming FC and using its original name for AG network name

We have a Failover Cluster, named MainSQL consisting of MainSQL01 and MailSQL02 which are default named instances and we can connect to whichever is the active node with just simply MainSQL. If we ...
0
votes
1answer
28 views

T-SQL Parsing XML escaped in format %3E (less than)

First question here so please be gentle :) I am a junior SQL developer. I am try to parse a string in xml format that has been escaped like below: ...
0
votes
1answer
44 views

Seeing multiple CXPACKET blocks when trying to load data from a INSERT SELECT

We are trying to load data and are getting multiple CXPACKET waits. The activity monitor says "running" however, it appears nothing is happening. I am selecting close to 5 million rows which I ...
1
vote
1answer
21 views

List with all visible meta data in AFTER UPDATE trigger

I have the following issue - something is updating particular table columns when such update is not allowed. I was not able to find the object (searching in T-SQL and ASP code, server jobs), so I ...
4
votes
0answers
30 views

Is there a way to suppress DBCC TRACEON/OFF messages in the Error Log?

We have quite a few dataloading processes that run throughout the day all day long. These processes are setting the 610 flag on for their connection then turning it off when they are done. Because ...
2
votes
0answers
44 views

SQL Server migration from 2005/2008 to 2012 [duplicate]

We need to upgrade two SQL Servers for our projects to SQL Server 2012. Since we’re not db-admins or familiar with such migrations, I wanted to ask you if you could tell me what we have to be aware of ...
1
vote
1answer
32 views

Measuring DB time of application using SQL Server Profiler

I have an application residing on the same host as a SQL Server database. There is a scenario in which this application is slow and due to co-existence of IIS and SQL Server, I cannot get which one ...
0
votes
1answer
30 views

AlwaysOn - Availability Group Listener in a multi-subnet cluster

I'm running into some difficulty getting the AG Listener created for a 3 node cluster where node 3 is on a separate subnet. I'm encountering an error that states Create failed for Availability Group ...
-1
votes
1answer
28 views

SQL Server Agent 2012 Job Schedule Report [on hold]

I am looking for a report that will display graphically what jobs are scheduled on the server and when. My goal is to very quickly be able to glance at it and find a time where a new job will not ...
-3
votes
0answers
13 views

Peer to peer replication error [on hold]

Replication-Replication Transaction-Log Reader Subsystem: agent SURESH-VAIO\NEEMA-PAVAN-1 failed. The process could not execute 'sp_repldone/sp_replcounters' on 'SURESH-VAIO\NEEMA'.
0
votes
0answers
63 views

SQL-Server 2012: Same query takes different Query Plans - but why?

Recently we had an issue with a query, which reached a timeout when executed the call through our web application. Using a monitoring tool I found the "bad query" and took it. I run it directly on the ...
1
vote
1answer
32 views

SQL Server 2012 Install error “The instance selected for installation is already installed and clustered on computer…”

I am trying to setup a new environment for SQL Server 2012 AlwaysOn. I inadvertently used some SQL Server 2008 config files initially to do the installs but ran into too many problems. I un-installed ...
0
votes
1answer
42 views

Search NVARCHAR(MAX) string in other string

I want to find the index of a string in other string. I try to use CHARINDEX and PATINDEX but nothing worked because the search string is NVARCHAR(MAX) and these functions are limited to 8000 chars ...
3
votes
1answer
86 views

How do I login to SQL Server via group membership in another domain

When attempting to connect to SQL Server (2012), I get a login failed error message. The error log on the server reports: Logon Error: 18456, Severity: 14, State: 5. Logon Login failed ...
2
votes
2answers
40 views

SQL Insert Statement Persists Two Records When I Need Just One

I have altered it to include hardcoded variables when I pulled this chunk of code from the stored procedure. I ran it independent of the application with the same result. I need one insert statement ...
0
votes
1answer
19 views

SQL Insert Statement Persists Two Records When I Need Just One [duplicate]

I have altered it to include hardcoded variables when I pulled this chunk of code from the stored procedure. I ran it independent of the application with the same result. I need one insert statement ...
1
vote
1answer
28 views

Dividing data from one table to multiple storage

I have the following tables: [Table_A] [Table_A_Changes] The two tables are pretty large (more then 50GBs). The first one contains some data, and the second one records' changes.The database is in ...
1
vote
1answer
66 views

sql server service broker

For the last few days the service broker command which run from master database is consuming much more RESOURCES than before. The Impact on the Database is high (from the bad side), It causes for ...
1
vote
3answers
72 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 ...
3
votes
2answers
100 views

Insert only deadlocks

We have an application inserting data into a table. Unfortunately, we are getting deadlocks and the deadlocks are coming from inserts only. We are seeing the inserts take key locks in a different ...
3
votes
2answers
507 views

Which of the following pieces of SQL is most efficient

I need to add the date part of GetDate() to the time part of a stored DateTime. Naively I thought I could do the following: declare @testTime DateTime = '2013-04-23 13:55:06' select cast(getdate() ...
0
votes
2answers
51 views

Live Partial Table / column replication

I want to know if there is a way to achieve the following with SQL Server 2012 Enterprise Edition? I have Table A: on Server 1 with say 10 columns. Table A: | col1 | col2 | col3 | coln | col10 | ...
5
votes
1answer
80 views

SQL Server stuck in single_user with auto_update_statistics_async on [on hold]

Books online states Before you set the database to SINGLE_USER, verify the AUTO_UPDATE_STATISTICS_ASYNC option is set to OFF. When set to ON, the background thread used to update statistics ...
6
votes
1answer
107 views

Does tempDB disk perf matter if you have plenty of unused memory?

We have a SQL Server 2012 Enterprise setup with a large amount of RAM (256 GB), and at this time fairly small databases (about 17GB). Right now we are experiencing performance issues due to various ...
0
votes
1answer
43 views

Using CREATE TYPE within Stored Procedure Call

I have a SQL Server 2012 database, and I generally use stored procedures that belong to a role with grant execute permission. I just created a stored procedure (sp1) that calls another stored ...
2
votes
0answers
39 views

SQL Server, Mount Points and File Groups design [closed]

I am looking for some advice on a data warehouse we are building. Specifically around SQL Server, mount points and file groups. We have two design options for how mount points and files groups should ...
5
votes
1answer
94 views

.WRITE clause performance optimization

I have found that you can do high performance updates on varchar(max),nvarchar(max),varbinary(max) columns using the .WRITE clause(example here and here). Unfortunately, there is nothing mentioned ...
0
votes
1answer
20 views

[sys].[dm_db_index_usage_stats] returns more entries in some databases

I am using the following query to get some indexes usage statistics: SELECT DB.[name] ,OBJECT_NAME(IDX.[object_id]) AS [Table] ,IDX.[name] AS [Index] ,US.[user_seeks] ...
7
votes
1answer
166 views

Detecting the locked table or row in SQL Server

I'm trying to understand/learn how to track down the details of a blocked session. So I created the following setup: create table foo (id integer not null primary key, some_data varchar(20)); ...
1
vote
1answer
53 views

The query processor could not produce a query plan

I'm getting this message: Msg 8624, Level 16, State 17, Line 1 Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support ...
1
vote
1answer
28 views

Viewing how much transaction log is used in Simple Recovery Model

We have a DW database in Simple Recovery Model. Every night, we load in data from different sources and run a few procs. I'd like to see how much the transaction log is actually used during this ...
1
vote
1answer
38 views

Difference in architecture between SQL Server 2005 and SQL Server 2012 [closed]

I've been asked to identify the architecture differences between Microsoft SQL Server 2005 and 2012. I've been pointed out to http://technet.microsoft.com/en-us/library/bb545450.aspx but I haven't ...
0
votes
1answer
43 views

Unable to copy a DB from SQL Server 2000 to SQL Server 2012 using copy wizard

I am trying to copy a database from SQL Server 2000 to SQL Server 2012 using copy wizard in my local machine where SQL Server 2012 is installed. But, the wizard is not detecting destination server. ...
2
votes
1answer
39 views

Defining a column as nullable in a view (but not in the referenced table)

My company is working on implementing a new HR application that will unify our existing HR processes. We've run into a bit of a sticking point, though; according to business rules, the EmployeeID and ...
1
vote
2answers
169 views

Should these two indexes suggested by the SSMS missing index feature be combined?

I'm trying to improve the performance of a specific query that is automatically generated by Entity Framework. I have run the query through SSMS, and it has suggested creating two missing indexes. ...
0
votes
1answer
49 views

Procedure with Insert Data From One Table to Another Table

I have two tables Person with PersonId, Name,Address,Mobile and PersonLog with Id,Name,Address,Mobile,FK_PersonId. I am trying store the old data in PersonLog and Person to be updated. This is my ...
0
votes
0answers
22 views

How to retrive output depending on last alphabet from entry in table [migrated]

I have table User with Id, Name. So depending on last alphabet from column Name, i need to output some text. If last char is 'o' should return YES, if is 'i' return NO, else null Ex. Monika ...
4
votes
2answers
88 views

Quickly restore test/QA SQL Server database

My company is releasing new mission critical software. For thorough QA, we are doing database comparisons. Our process is: Restore full backup. Test code. Compare. Repeat. This database is ...
3
votes
2answers
90 views

Keep getting message: Failed allocate pages: FAIL_PAGE_ALLOCATION 540

I'd appreciate some help with the following: I've done some Googling, but haven't managed to resolve this one. I keep receiving a message in the SQL Log 'Failed allocate pages: FAIL_PAGE_ALLOCATION ...
0
votes
0answers
46 views

Column encryption/decryption using encryptbykey

Working on a project where I need to encrypt a few sensitive columns in a table but make the data available through a procedure that a user can execute through either a report or excel. In looking ...
7
votes
1answer
120 views

T-SQL - OPTION (FAST x) and trace flag 8722

I have searched a long time and still haven't found the answer to my problem. Our Dynamics AX is generating queries with the query hint OPTION (FAST x), which sometimes forces a bad execution plan to ...
0
votes
1answer
85 views

How to split one big table that has 100 million data to multiple tables?

I have one database in Sql server 2012 and in that there is one table that has more than 100 million data and I wanted to split that table to multiple similar table with 1 million data in each table. ...
0
votes
0answers
27 views

SQL Server 2012 Replication Subsystem Increase Number of Working Threads

I am trying to create Transaction Replication (Push) between two servers, using a distribution database on a3rd server. Server 1 is SQL Server 2008, Server 2 is SQL Server 2012. The Distribution ...
0
votes
0answers
23 views

What are the best practises for locking down an SQL Server Instance Data/Log directories?

We have our own on SQL Server instance on a client's system. Other vendors also have instances on there. In order to prevent access to our data we are limiting the user access to our data using ...
0
votes
1answer
12 views

Altering table on SQL Server 2012 AON High Availability Databases [duplicate]

In a production site, the current configuration I am using is three SQL Server 2012 servers, with some databases configured with AON High Availability. I understand that between the AON High ...
1
vote
3answers
48 views

Restoring SQL Server database with CDC

I want to perform a database restore on SQL Server 2012 and copy the database to a different server. CDC is enabled on the original database. I have managed to copy the database along with the CDC ...
1
vote
1answer
43 views

Pre-production database replication solution

I would like to start by specifying I am no DBA and have basic understanding of advanced DB concepts. I am trying to find the optimal solution to replicate our production database to our ...
2
votes
1answer
37 views

Create failed for Availability Group 'AGN'

I tried creating availability group (AOH) many times but no luck , It got failed every time. Please help me on this case. I configured Windows cluster (Name as 'WINCLUSTER') with two nodes. They are ...
0
votes
0answers
57 views

Prevent gaps while using Identity/sequence object in sql server

I have a table and I am trying to insert values in it. I want to prevent gaps in the primary key column. For primary column I have tried using Identity / sequence objects. I know that this is ...
0
votes
1answer
75 views

How to get more information from dm_exec_query_stats

I am running SQL server 2012 on windows azure VM (windows server 2012) I suspected that some of my web appliactions are attacked via SQL injection, So far i could not trace the relevant text with my ...