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

learn more… | top users | synonyms (2)

2
votes
2answers
203 views

Performance effect of indexing foreign keys

My database is for an HR application with performance reviews and I am interested in whether I should index my foreign key. There are two tables involved. The first is a ratings table with 2 columns: ...
1
vote
1answer
183 views

Startup procedure for availability replica becoming primary

Is there any way how to create a startup T-SQL script/procedure for starting availability replica (when state has changed from secondary to primary)? I want to disable SSIS jobs specific for related ...
3
votes
0answers
118 views

custom population of full text index

Is there any way to populate a full text search index without storing the backing information in the database? I don't mean using remote-blob-storage or FILESTREAM types. The backing information is a ...
-1
votes
1answer
334 views

Why does fn_my_permissions return empty rowset? [closed]

If I run this query: select * From fn_my_permissions(NULL, 'SERVER') This is what I'm getting: entity_name subentity_name permission_name ------------- --------------- ...
4
votes
1answer
2k views

Convert SQL Server 2012 SSIS package to 2008

I've created a few SSIS packages in SQL Server 2012 that I need to run on SQL Server 2008. I've been told that it is impossible in their current state. Is there a way to convert the 2012 packages to ...
1
vote
4answers
2k views

Simple model database transaction log full 'CHECKPOINT'

I have a SQL Server 2012 SP1 database which has a problem that the transaction log is full. It consists of a single data file and a single log file, both about 800MB. I had 5GB free disk space, and ...
1
vote
0answers
65 views

Coerce columnstore to operate in batch mode [closed]

I want to try the column store index in SQL Server and im trying to get my queries to run in batch mode, i rewrote my query this way( it had an outer join before) but the execution plan still show ...
1
vote
2answers
940 views

SQL Server Memory Clerk Description

Trying to understand different memory clerks reported by sys.dm_os_memory_clerk however, not able to find description of the each individual memory clerk either on web (google and binged) or in SQL ...
2
votes
0answers
520 views

Failover only working for Classic ASP, not ASP.net [closed]

Setup: All machines run Windows Server 2008 Enterprise SQL Server 2012 Standard (Primary) SQL Server 2012 Standard (Mirror) SQL Server 2012 Express (Witness) Root issue: Our ASP.NET application is ...
1
vote
2answers
244 views

Can we Configure Change Data Capture in another Database?

I want to apply Change Data Capture(CDC) to database DB1's tables and want to log everything in DB2. So, could it be possible to capture table DB1's changes to DB2?
2
votes
2answers
416 views

The multi-part identifier “xxx” could not be bound

The following is a HAVING clause from a small part of a very large stored procedure which I have inherited from some other devs (external); HAVING (SELECT COUNT(*) FROM ( SELECT * FROM ...
0
votes
1answer
7k views

Manually entering data using Management Studio

How can I enter data through the GUI interface rather than an insert command in SQL Server Management Studio 2012? I can't find it anywhere whereas there used to be an option in the previous versions. ...
0
votes
1answer
39 views

Is there a system primary key associated with each row?

Does a system primary key or unique identifier for each row in a table exist? Like @@ROWID, @@IDENTIFER, or some other identifier that uniquely identifies each row regardless of how it was created? ...
2
votes
2answers
736 views

Accessing a network share via a SQL Server 2012 Availability Group

If you have a SQL Server Cluster called CLS, with machines CLS1 and CLS2, accessing: \\CLS\network\path is equivalent to accessing either \\CLS1\network\path or \\CLS2\network\path depending ...
1
vote
1answer
1k views

Data Migration from Oracle to SQL Server [duplicate]

If you need to do a data migration from an Oracle database to SQL server, what approaches and technical solutions are the best practice? Our database has about 100 million rows and a total of 52 ...
3
votes
2answers
1k views

Suspended in index rebuild

In SQL Server 2012, an Index Rebuild job is taking a very long time (up to 8 hours). However, not even one Index rebuild completed, so I stopped the index job. In monitoring SQL task: state = ...
1
vote
3answers
198 views

Improve performance by partitioning

I'm using SQL Server 2012. I’m using CTE to create an orders table from the items table. The final count for the orders table is around 120 million. It is taking about 2 hours for the whole process. ...
1
vote
1answer
166 views

Restore a Single File from FileStream

We have an document management application uses SQL Server 2012 to store document index information and uses a Windows file share to store the documents. We are working on migrating to store the ...
0
votes
2answers
2k views

Remove collation from all database columns

I have a SQL Server database where the collation is set on it. However I am running into problems as the collation on some columns in the database varies from the database collation. I would like to ...
0
votes
3answers
304 views

AlwaysOn Architecture - SQL Server 2012 for creating a dev environment?

I was thinking if the AlwaysOn architecture in SQL Server 2012 can be leveraged somehow to create a replica for DEV and QA environment properly in addition to setting up HADR using the same ...
1
vote
1answer
229 views

Merge Statement + Replication difference for SQL Server 2012

We have a SSIS package that will pull from a source database and run a merge statement to put the data into a "Master" database. (Eventually the "Master" database will be the source of truth, but we ...
0
votes
0answers
480 views

SSMS 2012 error message: evaluation period expired despite Edition Upgrade

Problem similar to this one only with SQL Server 2012. None of the suggested registry edits have worked. This problem was supposed to have been fixed back in 2008 SP1. Here's the sequence of ...
6
votes
1answer
871 views

LATCH_EX Waits on Resource METADATA_SEQUENCE_GENERATOR

We have a process that generates an inventory report. On the client side, the process splits of a configurable number of worker threads to build a chunk of data for the report that corresponds to one ...
4
votes
0answers
764 views

SQL Server Browser uses NT AUTHORITY\SYSTEM account and logon failure error in SQL Log [closed]

Using SQL Server 2012 on Windows 2008 R2 I have been getting errors in SQL Logs for failed login for NT AUTHORITY\SYSTEM. All of SQL Server's services are running under their own Domain accounts, ...
4
votes
1answer
122 views

Selective Xml Indexing

I have recently been researching Selective Xml Indexing and have been trying to figure out how to index a .query method If I have the below query WITH XMLNAMESPACES (Default ...
1
vote
1answer
624 views

Service accounts for SQL Server 2012 only allow pre-Windows 2000 name?

I've just set up SQL Server 2012 with domain service accounts. I found that the account name would not validate unless I used the shorter user name. Is there any way of using the full names?
1
vote
2answers
648 views

What's the meaning of the Collation Code (blank, 90, 100, 110) in SQL Server 2012

During the installation of SQL Server 2012, in the Collation tab, i can choose between French_CI_AS and French_100_CI_AS. What do they mean and which one is newer? When there's no Code, is it newer ...
1
vote
1answer
101 views

Can I use Try_Cast to give me a query result column with different datatypes?

I have a column that is varchar(max). It contains mostly valid XML. But sometimes it has invalid xml (that I still need). I am trying to make a view for this table that allows the value to display ...
2
votes
2answers
1k views

Restoring differential backup from SQL Server 2005 to SQL Server 2012

We are migrating a client to a new server. Their old server has SQL Server 2005. I have attempted to perform a differential backup however I received an error about the LSN chain being broken. Please ...
1
vote
3answers
164 views

DB comparer field by field for all tables

I have a liveDB and I have a development DB. Now when I make a change to development DB, I want to find out the changes later when I am deploying my application on server. For eg. I may have added ...
1
vote
1answer
407 views

Restoring SQL Server 2012 database onto 2008

I am trying to restore a SQL Server 2012 database after I set the compatibility level to SQL Server 2008 by following the instructions as listed on: ...
0
votes
1answer
383 views

How to access SQL Server 2012 on EC2 server from my ASP.NET website published on the same EC2 server?

My site is not able to establish a connection to the SQL Server 2012 from EC2. My connection string is as follows: Data Source=AMAZONA-2SSRDM3;Initial Catalog=MyDatabase;Integrated Security=SSPI; ...
5
votes
2answers
1k views

How do I change SQL Server 2012 Availability Group DNS subdomain?

Questions: how can I get my availability group to be registered as ag-ewgtest.sql.company.com given that my server thinks of itself as server.company.com. Setup: my SQL Server 2012 availability ...
4
votes
1answer
265 views

SQL Server 2012 indirect checkpoint

I am trying to understand where to draw a fine line for Indirect Checkpoint that was introduced in SQL Server 2012. Based on my understanding SQL Server does checkpoint to flush dirty pages out to ...
2
votes
2answers
1k views

Will SSIS 2012 work with SQL Server 2008R2 (not integrated)

Our company has SQL Server 2008R2 and plans to upgrade to 2012 in late 2013 or early 2014. I would like to use SSIS 2012 now as we do have the software. We have a company policy where we cannot run ...
4
votes
2answers
924 views

Transactional Replication Concerns

We are debating an architecture that employs sql server 2012 and transaction replication. Idea is to offload reporting activity to a secondary server and have the ability to include/exclude what is ...
6
votes
2answers
2k views

How best to maintain SQL log file sizes

I'm somewhat of a new DBA and I'm managing a SQL Server 2012 instance that has a fair amount of activity. I'm running in Full Recovery mode because we need point in time recovery. Right now, I'm ...
3
votes
3answers
1k views

Conditional WHERE Clause in a Table Valued Function

I have a table valued function CREATE FUNCTION [dbo].[DateRange] ( @StartDate date, @EndDate date, @Location varchar(25), @Device varchar(25) ) ...
2
votes
1answer
319 views

Paging in SQL Server 2012 vs. previous versions

I have used lot of paging code in SQL Server 2008. The format is With CTE( -- SQL With RowNumber ) -- SELECT ALL Page N This is working fine. But I have heard that SQL Server 2012 has better ...
1
vote
1answer
69 views

How can I identify the number of times a View is called in SQL Server?

How can I identify the number of times a View was called in SQL Server? I am looking for an answer that is similar to this below which shows how it can be done for stored procedures. How can I ...
2
votes
2answers
95 views

Identity proceeds as normal, but with a leading 10…?

So I noticed a very strange thing when tinkering with my database. I had just inserted a row which was ID 47, then after inserting some more, I realised that somehow my Identity had skipped all the ...
4
votes
1answer
495 views

How do I display subtotals in cube browser in SSAS 2012 (Sql Server Data Tools)?

Apparently this feature was available in previous versions but has now been removed. What are some alternatives?
7
votes
2answers
1k views

How to flatten results of a table with two related “many” tables?

I've reorganized some tables in my database to be more flexible but I'm not really sure how to write the SQL to extract meaningful data from them. I have the following tables (somewhat abbreviated ...
1
vote
0answers
34 views

Does SQL Server place shared locks on scanned records when using REPEATABLE READ [duplicate]

Assume a SQLCmd session which is using transaction isolation level REPEATABLE READ. In this session I start a transaction and execute an UPDATE statement with a WHERE clause on a non indexed column. ...
2
votes
1answer
7k views

SQL Server 2012 installation failure An error occurred for a dependency of the feature causing the setup process for the feature to fail

I am installing SQL Server 2012 Developer (from ISO image written on DVD), my machine has Windows 7 (Edit: Windows 7 with service pack 1) and it already has SQL Express and SQL 2008 R2 Express ...
0
votes
1answer
110 views

Different Results between stored proc and udf

I am getting different results between my stored proc and my SVF. The jist of of the both of them is that, it queries a remotely linked server, jams those results into a temp table/table variable, ...
1
vote
1answer
409 views

import csv data stored in a blob column

Here's what i need to do: Users will upload CSV files into SQL Server 2012 blob column Each night, i would like to take each file and import the data into table I will have 2 web sites using the ...
6
votes
1answer
855 views

How does SQL Server generate a query execution plan that adds up to 6,000%? [duplicate]

Today I was on The Heap and was looking at a query plan for something I thought could be improved. However, it created something that shook my belief in the SQL Server query optimizer. Can I still ...
1
vote
1answer
256 views

SQL Server 2012 Availability group disk configuration options

Background I am quite far into the process of setting up a 2 server SQL Server 2012 Always on availability cluster to provide redundancy with a readable secondary replica of all our databases. Since ...
4
votes
2answers
2k views

Is high Extent Fragmentation a problem?

DBCC SHOWCONTIG scanning 'MyTable' table... Table: 'MyTable' (2048062382); index ID: 1, database ID: 28 TABLE level scan performed. - Pages Scanned................................: 1019182 - Extents ...