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

learn more… | top users | synonyms (2)

1
vote
2answers
2k views

Recover registered servers in SQL Server Management Studio 2012

My computer died so it's be reinstalled. Previously I had SQL Server 2008 R2 installed. On the new system I have SQL Server 2012. I have the old RegSrvr.xml file (that contains the list of ...
3
votes
2answers
82 views

Trigger firing when it shouldn't

I have the following trigger: CREATE TRIGGER SalaryCannotDecrease ON Employees AFTER UPDATE AS IF EXISTS ( SELECT * FROM inserted, deleted WHERE inserted.Salary ...
0
votes
1answer
56 views

Stored proc getting ANSI_NULLS and ANSI_WARNINGS error when executed by application

I have a stored procedure that is getting the following error when executed via an application : Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the ...
-2
votes
1answer
34 views

Foreign Key Error [closed]

Getting this error on my database and I don't know how to fix it: Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint ...
1
vote
0answers
28 views

Adding a distributor for availability groups

According to this MSDN article, I need to add a distributor. http://msdn.microsoft.com/en-us/library/hh710046(v=sql.110).aspx I'm confused by this particular statement: The distributor should not be ...
0
votes
1answer
37 views

ODBC connection for testing Availability Group Listener

I am having difficulty verifying my Availability Group Listener configuration. I would like to create an ODBC connection which points to the listener. When I configure the system DSN and try to test ...
0
votes
1answer
2k views

SQL Server 2012 Reporting Services: “Unable to connect to the remote server”

I am trying to install SQL Server 2012 Reporting Services on Windows Server 2008, but all the web interface says after adding the feature and confirming all the default settings in Reporting Services ...
0
votes
1answer
23 views

non clustered index on same table but the order is different?

I have one table it has 5 columns like col1...col5 . i need to create non clustered index on col2,col3,col4. I did .. then my boss is asking me create one more non clustered index on col4,col3,col2 ...
0
votes
0answers
22 views

sys.sp_audit_write Procedure not available

I am trying to execute the audit write procedure but it can't be found. I have looked in master for it in the system procedures list and confirmed it isn't there. Does anyone know why this might be? I ...
0
votes
1answer
42 views

SQL Server 2012 how to create new schema from existing database selecting only subset of database objects?

I'm looking for a way to create new schema from existing database selecting only subset of database objects. I.e. I want to have some "database representation" which only includes subset of tables ...
0
votes
1answer
83 views

How SQL Server agent calculates next run date for a job

I am developing a system for scheduling task & I am following Microsoft SQL agent approach to schedule task. I have replicated sysschedules table for capturing users scheduling occurrences and ...
0
votes
1answer
84 views

A transaction log grows unexpectedly [duplicate]

I am trying to understand what process is making my transaction log file to grow. For example, currently it is 120 GB and only 5-10 MB of it are in use. Before: FULL recovery mode a backup of the ...
1
vote
2answers
262 views

SQL Server Grant execute on all stored procedures without ddl permissions

I have some users in my database. They are member of db_datareader. They now also need to have execute permissions on stored procedures. I was just wondering what would happen if one of the stored ...
0
votes
0answers
51 views

SQL Server : how to decide if FULL backup or DIFFERENTIAL

The following scenario (on SQL Server 2008 R2 and 2012 servers) A co-worker of mine restored another DB into the one our process was trying to create a differential backup for. As I am currently only ...
1
vote
1answer
17 views

Can I minimize maintenance of duplicated Windows + SQL Auth logins?

In our environment, SQL authentication is the norm, but Windows auth is possible when users are using RDP. As a result, each physical user has two logical logins for each instance and two logical ...
6
votes
2answers
347 views

Filter table before join

I have a stored procedure that populates the temp table #employee_benefits with a list of Ids. This table ends up being roughly 10,000 rows long. The query below then selects from a table called ...
1
vote
0answers
26 views

Resuming log shipping, do I just restore the db over itself?

I have log shipping set up. I then bring all the databases online on the secondary machine, so log shipping can't restore anymore. A bit later on I want to resume log shipping. I was told before ...
0
votes
1answer
22 views

Select Ingredients of a product based on unit type

I have three tables UnitType,NutritionMaster, NutritionInProduct UnitTypeID UnitName 1 100ml contains 2 250ml contains NutritionID Name Description 1 Energy NULL 2 ...
0
votes
0answers
49 views

How to fix deadlock caused by “X” locks on same resource?

I have the following <resource-list>: <resource-list> <keylock hobtid="72058301601677312" dbid="7" objectname="myDatabase.dbo.TableOne" indexname="PK_TableOne" id="lock2c336fb380" ...
4
votes
2answers
197 views

How can I reliably determine if a given SQL Server instance has the “Lock Pages in Memory” right?

The "Lock Pages in Memory" right can be granted to the service account used by SQL Server. This allows SQL Server to prevent memory being paged to disk. I've noticed several of our SQL Server ...
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 ...
0
votes
1answer
58 views

SQL Server Developer Edition Downgrading to Older Developer Edition

I have seen answers for questions regarding downgrading from different editions (e.g. - Enterprise to Standard), but is anyone familiar with downgrade policies for SQL Server Developer editions to ...
0
votes
0answers
27 views

I have a SQL job that sends an e-mail. Can I make it run a program instead?

I set up a job, and in Job Properties > Notifications I checked E-mail When the job fails. I'm wondering if instead of this e-mail, I can make it run an .exe or similar with the details. The reason ...
1
vote
2answers
60 views

Managing logins with Availabilty Groups

I have created a user on my primary node that has access to all of the databases in Availability Group AG1. How do I ensure that same user has the same rights on all the other replicas in AG1? ...
0
votes
0answers
53 views

SQL Server Agent Job, Access Denied

I have a T-SQL agent job that I've created that adds steps to itself depending on a query of the MSDB database. I am able to run the query outside of the agent, inside a query editor window, but when ...
0
votes
2answers
60 views

Signal wait always high

I'm not sure if this is the right place to ask this question, so apologies in advance if not. Problem I'm facing is: One of my server's signal wait floats at around %35 and won't go down. Top 3 ...
0
votes
0answers
30 views

How to specify localhost for SSIS package source server?

I have a job running on SQL Server 2012, where one of the steps is of type "SQL Server Integration Services Package". For the "Package source" I choose SSIS Catalog. For the "Server", if I type in the ...
0
votes
0answers
53 views

I want to ignore all SSIS errors, and copy over every row with the error column simply set to NULL

I have a simple SSIS package that reads from an OLE DB Source (Oracle), goes through a conversion transformation, and then to an OLE DB Destination (SQL Server 2012). I have configured the error ...
10
votes
1answer
580 views

SQL Server 2012 Page Life Expectancy resets to 0 after about 50 days

I've noticed an odd behavior on a 2-server HA cluster and I was hoping someone could confirm my suspicion, or maybe offer some other explanation... Here is my setup: A 2-server SQL 2012 SP1 ...
0
votes
0answers
31 views

mirroring on sql server 2012 on different windows server 2012

I have 2 servers *.203 and *.205 I have sql server 2012 on each of them I tried to make mirroring between them every thing goes successfuly but when I tried to start mirroring it gives me ...
1
vote
0answers
33 views

Speed up changing of collation?

I'm trying to change collation on all our databases, and doing it on one of the databases (~15gb) took me 42 minutes in testing even though I put it on SSD disc. Do anyone know any way to speed it up? ...
3
votes
3answers
230 views

Keeping default max memory 2147483647 MB value in SQL Server, a bad practice?

Based on that msdn page : server memory settings it's a good practice to keep the default values for SQL-Servers min and max memory to keep it dynamic... From what I learned through tutorials you ...
2
votes
2answers
83 views

SQL Server 2012 DBCC memorystatus has wrong information. How can I correct it?

I have a Windows 7 64-bit machine with 16GB ram, 24GB pagefile, 500GB HD and SQL Server 2012 Standard Edition 64-bit running on it. With 5 minutes of starting up, it routinely uses all my virtual ...
1
vote
1answer
45 views

Can I create a database on a local folder mapped as a drive

I have mapped a local folder as a drive, as follows: subst E: c:\MyFolder I need to create a database on that drive, but it fails: CREATE DATABASE MyDb ...
1
vote
2answers
198 views

Transaction Log Shipping across multiple SQL Server versions

I'm lead to believe that TLS is only appropriate/supported across the same versions of SQL Server. What I'm trying to do is to maintain a reporting (read only) version of a production transactional ...
2
votes
1answer
41 views

SQl Sever Backup Exclude Users

I have a database on SQL Server 2012 that I need to backup and send to someone on a different network / domain. Is there a way to create a full backup file that will not include the users / security ...
1
vote
1answer
39 views

What permissions do I need to grant on service accounts on SQL root path when relocating?

During a Win2012 with SQL Server 2012 two-node cluster installation, I accidentally set the system root to be the mount point volume hosting folders for the various attached LUNs for the system and ...
3
votes
1answer
69 views

Overlapping indexes

I have two non-clustered indexes on one of my dbs and their definition are: CREATE NONCLUSTERED INDEX [NC_Index1] ON [dbo].[anyTable] ( [X] ASC, [Y] ASC, [Z] ASC ) INCLUDE (A , ...
0
votes
1answer
56 views

Moving SQL Server default instance's folders to another path on the same server

My customer installed SQL Server 2012 default instance. But default instance's folders and data folder are on the same disk. I want to move the default instance's folders to another disk (C:Program ...
0
votes
1answer
98 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 ...
1
vote
1answer
31 views

many Servers of SQL server 2012 needs mirroring [duplicate]

I have now simply 2 SQL Server 2012. I want to configure database mirroring between the 2 servers. My questions are: How can it automatically change host of one if the other one was dropped ? Is ...
0
votes
0answers
50 views

Wait Stats, Server Up Time and CXPACKET

I have been looking at the following post and using the query to look at my top wait stats: http://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/ My top wait stat is ...
1
vote
1answer
44 views

many Servers of SQL server 2012 needs mirroring

I have two SQL server 2012 instances and I want to configure mirroring between the 2 servers with database. My questions are: How can it automatically change host of one if the other one was dropped ...
0
votes
1answer
71 views

Copy Database from Production to Development

I need to copy database from production to development instance in SQL Server 2012 as I don't want to mess up the production server database. Can someone suggest how I can do this ?
1
vote
1answer
45 views

How to recover a database from a failed Availability Group?

We are currently testing a SQL Server 2012 AlwaysOn HA implementation where we have 2 out of the 3 nodes are synchronous. The third, asynchronous node, does not have a vote in the quorum. There is a ...
0
votes
0answers
59 views

Performance of VIEWs with UNIONs in different databases

For various corporate and historical and replicating reasons, I have multiple databases that contain similar-structured tables, holding the main production data used as a source for other home-made ...
0
votes
1answer
37 views

set right permission to get connection ip for a user mapped to login

I have a problem with properly settings the rights permissions for my user to get access to connections ips. I know that, to get the conn ip I must set the VIEW SERVER STATE to the login that I use ...
2
votes
2answers
5k views

How to script all permissions on a schema

SQL management studio allows to create scripts for all db objects, however I so far couldn't find a way to correctly script a schema or user. The permissions of a user on a schema are not included in ...
0
votes
0answers
52 views

SSIS 2012 metadata not refreshing on re-deploy

I have three systems: DEV, UAT, PROD, all running SQL 2012 Enterprise. I have existing packages that hit objects on these systems. Every time I have to make a change that affects metadata, it's not ...
0
votes
0answers
36 views

How can I obtain concurrent deletes for this table?

We have a program that is currently doing something to the effect of: SET TRANSACTION ISOLATION LEVEL READ COMMITTED BEGIN TRANSACTION UPDATE [Source].[dbo].[SourceTable] SET [ProcessedOn] = ...