Tagged Questions

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

learn more… | top users | synonyms (2)

0
votes
0answers
40 views

Query execute slowly when changed compatibility Level of my database

I use SQL Server 2014 and have a database with compatibility level 110 (SQL Server 2012). also I have a stored procedure on it that execute about 10 second. When I change compatibility level of my ...
1
vote
1answer
29 views

01/01/1753 date is corrupt in Excel after export from SSRS

The date 01/01/1753 appears fine in the SSRS 208R2 report preview, but when the report is exported to Excel 2010, it appears as ########### and the value in the cell is -53689. All other dates come ...
1
vote
0answers
16 views

How to UPDATE/DELETE/INSERT with Microsoft.ACE.OLEDB.12.0 as Linked Server in SQL Server 2012?

I need to update an Access 2003 database from SQL Server 2012 with the Microsoft.ACE.OLEDB.12.0 provider. As an administrator, everything works great. I can do Select, Insert, Update and Delete ...
1
vote
2answers
75 views

Using sp_BlitzIndex - Diagnosed as “Index Hoarder: Addicted to nulls” [duplicate]

Context: MS SQL Server 2012 In using Kendra Little's awesome tool, sp_BlitzIndex, a number of tables were diagnosed as "Index Hoarder: Addicted to nulls". I'm not looking for a debate over NULLs and ...
0
votes
2answers
44 views

Is it normal for tempdb to not give up disk space when it releases things?

So my tempdb is getting huge. Like 200+ GB. USE tempdb GO EXEC sp_spaceused database_name database_size unallocated space tempdb 211668.88 MB 206803.45 MB It's using a SIMPLE ...
2
votes
1answer
70 views

How to get CPU usage by database for particular instance?

I have found the following queries to detect the CPU usage by database, but they are showing different results: WITH DB_CPU_Stats AS ( SELECT DatabaseID, DB_Name(DatabaseID) AS [DatabaseName], ...
0
votes
1answer
31 views

Procedure permission issues with a SQL state query

We have a login/user with DBO to a single database, and now we're adding a query that's providing some basic monitoring information requiring permissions extending somewhat to the sysadmin side. ...
3
votes
0answers
36 views

AlwaysON : Log_Send_Queue_Size is increasing but the log_send_rate keeps decreasing?

Question Why, despite the increasingly log_send_queue_size for these two databases, did the log_send_rate keep decreasing? There were no bandwidth issues on the network at this time, and no other ...
0
votes
1answer
37 views

SQL Server 2012 install hangs during the RunRemoteDiscoveryActiom

I've tried multiple times to install SQL Server 2012 on a 2-node cluster. I've tried multiple different media. Each time it hangs shortly after the initial validation check. The detail log for the ...
0
votes
1answer
38 views

SQL Server 2012: stored procedures permissions

Is it possible to control permissions on a single stored procedure level in SQL Server 2012? It seems that SQL Server Manager doesn't expose such functionality via GUI. Can somebody advice me how to ...
0
votes
0answers
25 views

How to test a SQL Server 2012 Cryptographic Provider

One of the nodes in my SQL Server 2012 availability group has been having problems with an external cryptographic provider. It's current separate from the rest of the availability group and can't be ...
0
votes
4answers
81 views

Restoring master database

I am trying to restore master database, when I set the server to single mode user I am unable to connect I get the error below. Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login ...
1
vote
1answer
65 views

Find out who ran a query using transaction log backups

We have a SQL Server 2012 Enterprise database running in Full Recovery Model with transaction log backups running every minute. A query was run last night which means we need to recover data from a ...
0
votes
0answers
29 views

How best to index large table with many index keys

In our datawarehouse load, we bring data in the following manner. 1. from source to stage 2. stage to a consolidation layer 3. from consolidation layer to operational data store (ODS) ...
0
votes
0answers
26 views

Restoring a SQL Server 2012 database in high availability

I have a database which is in always-on high availability mode synchronized with another database on a different instance. How can I restore from a .bak file into the primary database using T-SQL? ...
0
votes
1answer
28 views

Unable to call sp_start_job from website only

I have an agent job that I'm trying to use to kick off an SSIS package via a web page. I have configured my web site running in an application pool as user X. When I invoke sp_start_job as use X ...
0
votes
1answer
167 views

Does SQL Server require SSLv3?

We have a Windows 2008 R2 server running SQL 2012 Express RTM (11.0.2100.60). All three protocols (shared memory, named pipes, TCP/IP) are enabled for the server and both 32-bit and 64-bit clients. ...
3
votes
2answers
78 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 ...
1
vote
0answers
19 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 ...
-2
votes
1answer
26 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 ...
0
votes
2answers
52 views

SQL Server 2012 Very Slow to Consume Memory

I have a bit of a conundrum. I recently upgraded a ~20gb database from Window Server 2008 R2 || SQL Server 2008 R2 to Window Server 2012 || SQL Server 2012. The previous server had 32gb of memory, ...
0
votes
1answer
34 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 ...
0
votes
1answer
21 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
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
16 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
48 views

Linked Server from SQL Server to SSAS not working - what is missing?

I have a SQL Server 2012 Standard edition sp1 that has ssas also installed. From this server I create a linked server to a ssas server called BIREPLON1, but when I try to access it, I get the error ...
0
votes
1answer
49 views

Is there a way to minimally log insert under Always on?

I have a primary database in FULL recovery mode which is part of Always On group. Is there a way to minimally log insert operation under FULL recovery model? I have a process that is executed each ...
0
votes
1answer
26 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
56 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 ...
1
vote
2answers
195 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
1answer
65 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 ...
0
votes
2answers
47 views

Can't create table in database with db_owner role (SQL Server 2012)

I have database in SQL Server 2012 SP2 Enterprise. I created new SQL Login and mapped to X database with db_owner role. Now I can't create table on this database. When I run simple create table script ...
1
vote
1answer
13 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 ...
0
votes
1answer
19 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
40 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" ...
0
votes
1answer
42 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 ...
1
vote
0answers
24 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
0answers
42 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 ...
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 ...
4
votes
2answers
170 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 ...
2
votes
3answers
99 views

Why is cost threshold for parallelism ignored?

SQL Server 2012 SP2 Enterprise Edition. Users complaining of slowness. Monitoring tool shows highest wait event is CXPACKET. Instance settings MAXDOP: 8 Cost Threshold for Parallelism: 175 Ran ...
0
votes
0answers
26 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
0answers
25 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 ...
1
vote
2answers
52 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
30 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 ...
0
votes
2answers
52 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
26 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
24 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? ...
2
votes
2answers
55 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
39 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 ...