for SQL Server 2012, major build version 11.00.xxxx. Released April 1, 2012 with a projected end-of-life date of 7/12/2022.

learn more… | top users | synonyms (2)

9
votes
3answers
1k views

Unique Identifier with Extra Characters Still Matching in Select

We are using SQL Server 2012 with a unique identifier and we've noticed that when doing selects with additional characters added onto the end (so not 36 chars) it still returns a match to a UUID. For ...
3
votes
1answer
117 views

Delete a variable number of records by a chronological order

Our developers have been using a cursor within a stored procedure to delete old password history. The number of records to delete is being passed by variable. DECLARE hist_cursor CURSOR LOCAL FOR ...
9
votes
2answers
414 views

Best way to defrag/compact a database for archival purposes

We've got an SQL Server instance that's used for email archiving (courtesy of a 3rd party archiving package). Every so often, the software is rolled over to a new empty database. We've done this ...
4
votes
1answer
532 views

Unrecognised system process saturating CPU

We have switched to our backup DC today as primary site Bandwidth has gone. We are getting issues with the most powerful DB server; it is spawning the following process for several db's on the ...
1
vote
1answer
405 views

Snapshot not picking up new articles in SQL Server 2012 transaction replication when added through script

I am trying to add new articles to an existing publication in SQL Server 2012. I am adding the article to the publication with the syntax --add the table into the correct publication sp_addarticle ...
4
votes
2answers
166 views

Is it possible to enforce unique values in a column, excluding nulls?

I have a business requirement to have a FK field on TableA referencing TableB. If there is a value in TableBID, it should be unique, but it's not mandatory, so there could be multiple records with ...
6
votes
1answer
8k views

SQL Server 2012 performance v SQL Server 2008 R2

Does anyone have any links to performance benchmarking of the database engine, or any anecdotal reports of the performance improvements in SQL Server 2012. We are only using the DB engine,not ...
2
votes
1answer
643 views

How can I configure SQL Server 2012 to use multiple NICs?

How can I configure SQL Server 2012 to use multiple NICs? I've a server with 4 NICs. I want to use 2 NICs to query my databases, and 2 NICs to retrieve results from them. I want them to work in load ...
4
votes
1answer
45 views

Can I query data_space names when not in context of the database for multiple databases?

I have a data set pulled from sys.master_files. The data set looks something like this: database_id filename physical_name data_space_id ----------- ---------------- ------------- ...
0
votes
0answers
33 views

Performing a Transaction Log Backup on a Live Database [duplicate]

I have a server 2012 database that has a transaction log that is growing at a rapid rate. i have a job that runs once a day after production hours which backs up the log file and shrinks it. The ...
2
votes
1answer
447 views

How to grant permission for am administrator account in SQL Server 2012? [closed]

I installed SQL Server 2012 on my laptop. I am trying to run a script to create a simple database. SQL Server version: 11.0.3128 SSMS starting parameters: server type: database engine server name: ...
6
votes
2answers
2k views

How might a corrupt partition in TempDB result in DBCC CHECKDB reporting no issue?

One of our SQL Servers reported the following error recently: DATE/TIME: 2/25/2013 9:15:14 PM DESCRIPTION: No catalog entry found for partition ID 9079262474267394048 in database 2. The ...
12
votes
4answers
11k views

SQL Server 2012 slower than 2008

I migrated a large website and database from an older server (Windows 2008 / SQL Server 2008 / 16 GB RAM / 2 x 2.5 GHz Quad Core / SAS disks) to a newer, much better server (Windows 2008 R2 / SQL ...
4
votes
1answer
706 views

Specifying the failover partner when using Availability Groups

We have a situation where we are using replicated databases in an environment that's making use of Availability Groups. As we wanted no manual intervention when failing over, we decided to set up ...
0
votes
2answers
61 views

some tips on setting up sql server database server

I am currently setting up a new sql server database server with databases. It is supplied by a third party company. I need to request access for them around ports etc. I would like to be able ...
0
votes
2answers
336 views

Is there a sortable ('order by') alternative to CURRENT_TIMESTAMP

I'm in the process of looking for a way to find a sortable alternative to a column that is populated with CURRENT_TIMESTAMP and I'm stumped at the moment. I have a web based form with multiple ...
4
votes
1answer
283 views

Query records that chain together based on date gaps

I have a table in SQL Server 2012 with the below simplified schema and I need to define a query that grabs the most recent record and then returns the chain of records that have less than 30 days of a ...
0
votes
1answer
690 views

Is it possible to use ExpressMaint with SQL Server 2012 (Express)?

When I try running ExpressMaint on a server with SQL Server 2012 installed, it fails with an error saying it cannot find the Microsoft.SqlServer.Smo libraries (SQL Management Objects). From what I've ...
0
votes
1answer
187 views

How can I install a provider for linked server?

I have a provider for a linked server called PervasiveOLEDB.11.0 installed on a sql server 2005 machine. It always me to have a connection to a pervasive sql database. I would like to use this same ...
6
votes
3answers
3k views

Not able to install any piece of SQL server 2012 dev edition on my windows 7

I have tried everything i can think f to install SQL 2012 but no luck I am getting these errors but after looking through the logs I can't find the actual cause to get a solution. every feature gives ...
3
votes
1answer
634 views

AG and SQL Backups

I am using always on in sql 2012 and have an AG setup. I would like to know if i were to backup the primary database and restore it would that be allowed without taking the cluster down etc. ...
2
votes
1answer
304 views

AlwaysOn Availability Groups: Confusion with some concepts

In Sql Server 2012, I am trying to install Failover Clustering to configure AlwaysOn Availability Groups. When I run Cluster Validation test wizard, it comes back with a lot of errors. One of them ...
3
votes
2answers
2k views

Resetting a SQL Server 2012 sequence

I'm in the process of testing and populating a specific table that leverages the SEQUENCE object. In this process I'm testing populating the table with tens of thousands of insert lines (as I'm ...
4
votes
1answer
193 views

Error in SQL Server 2012 OUTPUT clause

Given the following SQL code against the AdventureWorks Database: begin transaction; drop trigger Sales.iduSalesOrderDetail; alter table Sales.SalesOrderDetail add LineNumber int null; go with ...
4
votes
2answers
440 views

Restore SQL Server database from .sql files

So we had an encrypted database that puked and killed our whole SQL Server setup. Sucks about our data, but we were smart enough to have our data structures / stored procedures / functions in Git The ...
2
votes
2answers
155 views

Using SQL Server 2012 for Business Intelligence Features Only, No Database Engine

I would like to implement SQL Server 2012 purely for the Business Intelligence Features: SSIS, SSAS and SSRS on its own server. I current have SQL Server 2008R2 Database Engine installed on another ...
3
votes
1answer
414 views

LIKE character length limitation

The background to this question can be found here. The following part of my stored procedure does not work. Is there a character length limitation for the LIKE clause? t1.ProductList sometimes can be ...
2
votes
1answer
592 views

Should I use Asynchronous Mirroring?

I plan on setting up mirroring on a SQL 2012 database which is currently in production. My concern though is how much it will affect the performance of the principal database. I am using mirroring ...
2
votes
1answer
149 views

Parameter triggers different execution plan, but why?

I have a table CREATE TABLE [dbo].[Numbers] ( [Date] [date] NULL, [Time] [time](3) NULL, [Value] [char](10) NULL ) and the table has > 10 Billion rows, therefore it ...
1
vote
1answer
318 views

Commit Insert but Hold Lock

I have implemented what is effectively a reliable queue through the following: CREATE TABLE Queue (MessageID UNIQUEIDENTIFIER, Message varchar(255)) --Enqueue Command DECLARE @MessageID ...
2
votes
2answers
2k views

32-bit ODBC driver on 64-bit SQL Server [closed]

I am unable to use an ODBC 64-bit driver with SSMS 2012 running on a SQL Server 2012 64-bit instance. However, I believe that the 32-bit driver works. My question is can I use SSMS 2005 32-bit to ...
1
vote
1answer
356 views

How can I change SQL Agent Log file to use unicode format?

I've created a database with tables that heavily leverages nvarchar for most of the columns. One of the challenges I'm running into is that when I go to view the SQL Server Agent Log files, I get the ...
6
votes
1answer
531 views

Warning in query plan “Cardinality Estimate”

create table T(ID int identity primary key) insert into T default values insert into T default values go select cast(ID as varchar(10)) as ID from T where ID = 1 The query above has a warning in ...
2
votes
0answers
259 views

SQL71561 Error on Schema compare after initial import from database

I have created a new sql server project with SSDT 2012, then I went to import an existing database and it created all my scripts. After that I did a schema compare between the project and the database ...
0
votes
1answer
174 views

Installation of SQL Server 2012 does not contain Virtual Interface Adapter?

I have installed the entire Enterprise edition of SQL Server 2012 and have noticed that I do not have the Virtual Interface Adapter. What is the cause of this?
1
vote
2answers
286 views

Query Performance Tuning on a huge table

I have the following table Transactions. The table looks like this: CREATE TABLE [dbo].[Transactions]( [TransactionID] [bigint] IDENTITY(1,10) NOT NULL, [PlayerID] [bigint] NOT NULL, ...
2
votes
0answers
836 views

SQL Server Create Access Denied even after adding MSSQLSERVER user permissions

I am aware that SQL Server instances need write access not for my user account (which is in fact irrelevant to that service's context) but for the user account or security principal under which the ...
2
votes
1answer
702 views

Error: 9245, Severity: 16, State: 1. / During the last time interval XXX query notification errors were suppressed

I've got this sequence of error messages showing up regularly in my server error log: Error: 9245, Severity: 16, State: 1. During the last time interval 257 query notification errors were ...
7
votes
3answers
9k views

Upgrade process from SQL Server 2000 to SQL Server 2012

I have a SQL Server 2000 database that I would like to upgrade to SQL Server 2012 (running on a different server). I don't think there is a direct upgrade path, but if there is, what is it? My ...
2
votes
1answer
302 views

Inside SQLOS – Scheduling

Using SQL Server 2012 Enterprise Edition SP1 running on Windows Server 2008 R2 SP1 For each logical processor core on SQLOS has a scheduler assigned to it. Those scheduler can be viewed as status ...
2
votes
1answer
3k views

Active/active SQL Server Clustering in Installation Center (setup.exe)

I like to know which option to choose in the setup.exe in SQL Server 2012/2008? What I have here is Windows Active/Active Cluster setup with one quorum and one msdtc configured. I installed my first ...
1
vote
0answers
99 views

dropping and adding subscription only picking up new article on some subscribers

I have used the following script to drop aand re-add a table from a subscription so I could move replace the ntext fields with nvarchar(max) columns. the script worked fine, but when I ran the ...
0
votes
0answers
2k views

0x84BB0001 Error when installing SQL Server 2012. Could not create a handshake [closed]

I have hopelessly attempted to install SQL server 2012 onto my 64 bit Windows 8 machine. The database engine always fails to install with error 0x84BB0001. Native reporting also fails, I reckon from ...
2
votes
0answers
186 views

tempdb objects creator wanted, bufferpool issue caused by tempdb objects

I have a number of tables in tempdb named like #A0030B77 #A01D908C #A06D1FCB #A0F72FB0 #A1614404 #A1EB53E9 #A205D8FE #A255683D How (if) can I get spid of the process which created them? These ...
4
votes
1answer
106 views

Is there a way to start a script on the publisher when synchronization starts?

I am using merge replication with pull subscriptions and Web Sync. What is the easiest way to start a SQL script on the publication database when a subscriber starts the synchronization process? ...
2
votes
1answer
142 views

How can I rename a table, but also all FK etc. references to that table?

I would like to e.g. rename my Applicant table to ApplicantProfile, as applicant is an abstract entity that has a profile. The profile is not the applicant. Simply renaming the table is hopelessly ...
2
votes
1answer
60 views

How to create an object and then alter it

I'm using sql server 2012: I would like to script out creation of an object(if it doesn't exist first), and then alter it. I'm trying to avoid the usual drop/create as it would impact stats. It ...
2
votes
1answer
437 views

Decryption not working when SQL Server database copied to new server

I am copying a database from an old server to a new server. The database has an encrypted column. From my searches I see that I need to backup the master key from the old server and restore it in ...
3
votes
0answers
310 views

SqlDependency permissions

The db is SQL Server 2012. All data tables are in the dbo schema. All data access is done via stored procedures in a different schema (user rt). I want to add query notifications for some tables, so I ...
4
votes
1answer
2k views

SQL Server 2012 is putting [brackets] around Table and Column Names

Is there anyway to turn that off? I'm unable to find anything in options, and they're really a distraction.