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

learn more… | top users | synonyms (2)

6
votes
1answer
1k 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 ...
5
votes
3answers
5k views

Best practice for tempdb log file

I have read many blogs here and there about how to configure tempdb data files but i didnt found any information regarding the tempdb log file. Here's the strategy that I'm presently using with my ...
0
votes
1answer
117 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, ...
7
votes
1answer
1k 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 ...
5
votes
5answers
4k views

SQL Server 2012 AlwaysOn: need to automatically add databases by script- T-sql or PowerShell

I've installed and successfully configured our SQL Server 2012 AlwaysOn 2-node servers for our new "Intranet" that is coming out. I've gotten AlwaysOn working great, and our Front End servers for the ...
1
vote
1answer
331 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 ...
0
votes
1answer
307 views

MSDTC on SQL Server 2012 with mount point for data disk

I have installed a new SQL Server 2012 instance on a cluster. The installation went fine but when I've added the MSDTC as resource of the instance, it went wrong. When I just added it, the MSDTC was ...
4
votes
2answers
3k 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 ...
1
vote
1answer
935 views

SQL Server 2012, Network for: AlwaysOn Availability Group with AlwaysOn AlwaysOn Failover Cluster Instances

Setup: I have two data centers. In site1, my primary site, I'd like to deploy an AlwaysOn Failover Cluster Instance (FCI). In site2, my data recovery site, I'd like to deploy a single-node instance of ...
1
vote
1answer
471 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 ...
5
votes
2answers
14k views

SQL Server AFTER INSERT trigger

I want this trigger to be fired after an insert is made with the text married on the marital_status column, this is what I have so far ALTER TRIGGER [dbo].[marriage] ON ...
4
votes
2answers
2k 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 = ...
3
votes
2answers
183 views

Tuning advisor with Extended events?

With SQL traces I was able to analyze them with Database Engine Tuning Advisor to obtain basic recommendations for perf. tuning(missing indexes, statistics,...). Now, with SQL 2012 and Extended ...
1
vote
1answer
3k views

SQL Server bulk insert performance

I’m running sql server 2012 and the installed ram on that machine is 128 GB. The performance of the bulk insert is very low. The bulk insert of 10 million records takes about 2 hours. We have checked ...
8
votes
1answer
239 views

Are the cost percentages in this SQL Server plan over 100% for a valid reason?

I'm looking through the plan cache, looking for low-hanging optimization fruit and came across this snippet: Why are many of the costs listed above 100% ? Shouldn't that be impossible?
3
votes
2answers
2k views

SQL Server how to detect unused views and/or get usage stats

Is there a way to determine in SQL Server if a view is no longer being used? (without removing it) Ideally i would like to know usage for SQL Server 2000 as well as 2012 if that is possible. I am ...
0
votes
2answers
5k views

Linked Server to SQL Server 2000 server from SQL Server 2012

I have a new SQL Server 2012 instance, and am migrating a database from SQL Server 2000. Some of the stored procedures in the DB I am moving reference another database back on that 2000 server. What ...
1
vote
1answer
604 views

Unique index for subquery with RANK() function

I have the following tables: CREATE TABLE Revision ( RevisionId INT PRIMARY KEY IDENTITY, UserName NVARCHAR(256) NOT NULL, DateTime DATETIME NOT NULL DEFAULT GETDATE() ) CREATE TABLE ...
1
vote
1answer
51 views

Adding users to a list and sort by category?

I'm using SQL-Server 2012 and I would like to know how to solve this program. So: I want to create a page that allows admins to manage a project, and part of it, would be to add members/employees to ...
4
votes
2answers
92 views

Database Install Issue

I was navigated over here from Stack Overflow, hopefully you can help me out. So I've got a dilemma. Our company has bought a volume license for Microsoft SQL Server 2012 Standard Edition. We ...
5
votes
2answers
987 views

Securely generate a UNIQUEIDENTIFIER in SQL Server

I intend to be using a UNIQUEIDENTIFIER as an access key that users can use to access certain data. The key will act as a password in that sense. I need to generate multiple such identifiers as part ...
8
votes
1answer
2k views

Is SQL Server data compression categorically good for read-only databases?

Some literature on SQL Server data compression I read state that the write cost increases to about four times what would normally be required. It also seems to imply that this is the primary downside ...
0
votes
1answer
6k views

Login Failed for Domain\ServerName$ when trying to create a new SQL Server Reporting Services Application in SharePoint 2013

Basic setup: All of the following is installed on Domain\Servername: SharePoint 2013 Standalone Install (Trial version) Currently using an instance of SQL Server 2012 SP1 Express for basic ...
3
votes
1answer
154 views

How can I determine what is using a particular resource (table, view, or function, etc) on my SQL Server?

I've been looking for tables that could use better indexing. I've created a stored procedure that provides a list of tables that have no indexes other than a primary key: CREATE PROCEDURE ...
3
votes
1answer
256 views

SQL Server 2012 catalog.executions to sysjobhistory - any way to join them?

I have exhausted my resources and can't find a foolproof way to join the ssisdb.catalog tables to the jobs that run them. Trying to write some custom sprocs to monitor my execution times and rows ...
6
votes
2answers
2k views

Relating ExecutionInstanceGUID to the SSISDB

The 2012 release of SQL Server Integration Services, SSIS, has delivered an SSISDB catalog which tracks the operations of packages (among other things). The default package execution for solutions ...
1
vote
3answers
3k views

SQL Server 2012, rebuild not lowering avg fragmentation

I have a script identifying what indices to rebuild. select 'alter index ' + name + ' on ' + @dbname + '.dbo.' + OBJECT_NAME(a.object_id) + ' rebuild;' from sys.dm_db_index_physical_stats ...
3
votes
5answers
2k views

How can I tell if a SQL Server backup is compressed?

We have recently upgraded from SQL Server 2005 to SQL Server 2012. Under SQL Server 2005 there is no option to create compressed backups as there is in 2012. If you attempt BACKUP DATABASE ... WITH ...
0
votes
1answer
285 views

SQL Server Express on Windows 8 isn't locking MDF database files

Historically, if I go to rename a database that is currently being used by SQL Server, I get an exception. On this Windows 8 desktop I'm in.. my primary desktop.. I'm able to MOVE SQL Server ...
3
votes
6answers
845 views

Can SQL Server 2000 and SQL Server 2012 CoExist?

We have OLTP Databases on SQL Server 2000 on my client's Prod Server. Planning to create Data Warehouse on the same Server but use SQL Server 2012. Can I install without any issues?
8
votes
2answers
2k views

SQL Server database design for “archived but available” data

We have this large database (>1TB) that we intend to "shrink". The database revolves around one main entity, let's call it "Visit". For discussion, let's say it is a database for a medical practice. ...
1
vote
1answer
3k views

How to connect Powershell to the SQL Server named instance?

When I run # Load the SMO assembly [void][reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo"); $ServerName = "[local\s12]"; #Get a server object which corresponds to the ...
-5
votes
1answer
64 views

SQL server 2012 installation [closed]

i'm installing SQL server 2012 x64 on windows 7 professional x64 and when i install it said to me your operating system doesn't meet the requirements !!
2
votes
1answer
390 views

IntelliSense alternative using SSMS 2012 in a contained database as a contained user?

According to this answer about contained database disadvantages: If you connect to a contained database as a contained user, SSMS will not fully support IntelliSense. You'll get basic ...
2
votes
1answer
661 views

Even when user has 'bulkadmin' role, query says user does not have role - SQL Server 2012

I am facing a weird issue with SQL Server 2012. I have a user (say RS\sqluser) which has bulkadmin role. Now when i run this query Select IS_SRVROLEMEMBER('bulkadmin', 'RS\sqluser') output is 0. ...
1
vote
1answer
4k views

Upgrade SQL Server 2012 Express to Evaluation Edition

Is there a way to upgrade an instance of SQL Server 2012 Express to SQL Server Evaluation Enterprise? I tried using the SQL Server Installation Center and clicking Maintenance, and then Edition ...
0
votes
2answers
402 views

SQL Server sync databases between enterprise - web edition

We have an enterprise version of sql server 2012. we need to synchronize its data to a web edition database. what would be the best option t do this ? further to add on to this we need to provide ...
1
vote
1answer
3k views

Backup stored procedure for full, differential and log backup

I wrote a simple stored procedure for backing up FULL, Differential and LOG backup. This is my stored procedure: Alter PROCEDURE BackupDB ( @BaseLocation varchar(1024), @BackupType ...
1
vote
0answers
473 views

sp_testlinkedserver taking long time to time-out

I'm using the following code to check if a linked server is available before running queries on it: declare @srvr nvarchar(128), @retval int; set @srvr = 'my_linked_srvr'; begin try exec @retval ...
9
votes
2answers
14k views

When is it appropriate to use SQL Server Developer Edition?

Do you use SQL Server Developer Edition on server-class machines in DEV and STAGING environments? I am working on a large project where (if it passes the proof of concept stage) we will have several ...
2
votes
2answers
105 views

How do I write backup procedure

I've read that a decent backup strategy would be: 1) Full backup weekly 2) Differential backups daily 3) Log backups every 5 minutes. Now question is how do I write this stored procedure and create ...
6
votes
1answer
2k views

How do you move a SQL Server 7 database to SQL Server 2012?

I would like to move a database from SQL Server 7.0 to SQL Server 2012. They are not compatible for a backup and restore. Is there a way to export from SQL Server 7.0 and import it to 2012? I only ...
0
votes
1answer
101 views

Accessing a SQL Server Denali CTP1 database with Management Studio 2012 SP1 Express

I had Management Studio 2011 Denali CTP1 installed before but I have uninstalled it. Now I have installed the Management Studio 2012 SP1 Express without any database instances. I have a webserver ...
2
votes
1answer
3k views

Best way to perform SQL Server replication over multiple servers?

My current setup requires me to use three separate SQL Server 2012 instances (installed on 3 separate machines, separated geographically) and have the data be replicated across all 3. Any changes made ...
4
votes
4answers
3k views

SQL Server service shutdown due to 'bad?' SSL cert

This morning it transpired that SQL Server 2012 service running on Win2012 had shut itself down. When I logged in as the server admin and tried to access SSMS, after entering my credentials I got the ...
1
vote
1answer
899 views

Alternative tools to export Oracle database to SQL Server? [closed]

I've got an Oracle database that I need to export (schema and data) to SQL Server. I am trying the Microsoft SQL Server Migration Assistant for Oracle, but it is horribly slow, grossly inefficient ...
16
votes
6answers
8k views

What is a good, repeatable way to calculate MAXDOP on SQL Server?

When setting up a new SQL Server 2012, I use the following code to determine a good starting point for the MAXDOP setting: /* This will recommend a MAXDOP setting appropriate for your machine's ...
4
votes
2answers
1k views

Track grant permission on tables

I'd like to see if there are any changes on the permissions granted for a specific table. For example, I don't want to have the login 'John' have the SELECT permission on the table Invoices. If ...
7
votes
2answers
744 views

In SSIS 2012, what is the purpose of flagging a package as an “Entry Point” package

In the Visual Studio designer you can right click on a SSIS package and designate it as an "Entry Point" package" Doing a search I found this page on MSDN which states: The value of 1 signifies ...
5
votes
1answer
349 views

SQL availability groups log maintenance

I have a AG with 2 nodes in a site in sync mode and 1 offsite in async mode. I'm having trouble understanding how the logspace is maintained in this scenario. For instance, I'm taking log backups ...