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

learn more… | top users | synonyms (2)

2
votes
1answer
353 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
599 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
366 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
2k 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
427 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 ...
8
votes
2answers
11k 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
103 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
1k 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
100 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
2k 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 ...
3
votes
3answers
2k 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
832 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 ...
15
votes
6answers
7k 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 ...
5
votes
2answers
634 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
336 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 ...
2
votes
1answer
409 views

Storing multiple settings for multiple users in a SQL Server table

I'm using SQL Server 2012 to store the account settings for multiple accounts (each user account will have a set of settings). These settings could have any number of fields (has not been completely ...
3
votes
1answer
146 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 ...
10
votes
3answers
2k 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 ...
4
votes
3answers
359 views

Backup strategies for zero data loss

I am working on one project and it has around 100K records. We can afford a downtime of 1 day but we need the data to be always available to us in latest state. I've gone through two options: 1) ...
5
votes
2answers
187 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 ...
5
votes
1answer
4k views

Log Shipping - RESTORE WITH STANDBY - on SQL Server 2012 keeps breaking

We are using log shipping and RESTORE WITH STANDBY on SQL Server 2012 in order to restore the database in read-only mode for reporting purposes. However, the log shipping setup keeps breaking after ...
5
votes
2answers
2k views

RSExecRole missing

I have multiple servers and 4 of them have reporting services installed with the ReportServer & ReportServerTempDB databases. A few days ago I was setting up security for a new login and I found ...
2
votes
1answer
772 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
52 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 ----------- ---------------- ------------- ...
2
votes
1answer
170 views

MDW performance_counter_instances table running out of identity values

My MDW database's performance_counter_instances table has run out of identity values. Has anyone ever encountered this? Is it safe to change the data type of the identity field ...
0
votes
0answers
34 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
522 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
1k views

Is there a better option than Union All for multiple selects from the same row?

Example Schema: CREATE TABLE [dbo].[Base]( [ID] [int] IDENTITY(1,1) NOT NULL, [Option1ID] [int] NULL, [Option2ID] [int] NULL, [Option3ID] [int] NULL, [Option1Name] [varchar] NULL, [Option2Name] ...
7
votes
2answers
3k 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
14k 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 ...
0
votes
2answers
63 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
392 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 ...
5
votes
1answer
644 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 ...
4
votes
1answer
830 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 ...
4
votes
1answer
259 views

What are the best practices for backing up a secured SQL Server 2012?

I want to state right off the bat that I'm not looking for information on how to backup a SQL Server. I've got that taken care of. I'm looking for some form of documentation that will tell me the ...
1
vote
1answer
141 views

Set up AlwaysOn in virtual environment: How to add nodes to domain? [closed]

On a beefy server, I have a few Virtual Machines (VMs) running. On one of those, I have Domain Controller (DC) with a domain name (ex:SQL.AD.COM) running successfully. Now, I need to add the other VMs ...
4
votes
1answer
370 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 ...
3
votes
1answer
346 views

SQL Server 2012 defrag job runs interactively, but not as a job - why?

I have recently started using the dba_indexDefrag_sp stored procedure from SQL Fool (http://sqlfool.com/2011/06/index-defrag-script-v4-1/) against my production databases running on SQL Server 2012 ...
3
votes
1answer
529 views

Are there problems with using SQL Server AlwaysOn Availability Groups with Windows 2008R2?

[Cross post from StackOverflow] Brent Ozar published this webcast (slides, video with free registration) entitled "Real-Life SQL Server 2012: AlwaysOn Lessons Learned", in which he repeatedly states, ...
2
votes
1answer
369 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
2answers
576 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 ...
3
votes
1answer
547 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
2answers
169 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 ...
2
votes
1answer
801 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 ...
4
votes
1answer
237 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 ...
2
votes
1answer
206 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
403 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 ...