SQL Server 2012 (major build version 11.00.xxxx). Please also tag sql-server.

learn more… | top users | synonyms (3)

7
votes
2answers
271 views

8k row overflow error when updating row of size 5k

I'm trying to update a target table which has one row of size 5k to a row of size 5k also. Since it's one row it's easy to know the row actual size: select * from ...
0
votes
1answer
130 views

Breaking up long running query into batches runs fine for a while and then produces fatal error

I'm using a variation of this post which details using "careful batching" to delete records in batches from a table that contains 38MM records. The script below runs for a while and shows results ...
2
votes
1answer
51 views

Moved database to new server, not sure about NT AUTHORITY\* users

I just moved database to new instance of SQL Server (SQL Server 2012 Web from Amazon EC2) and am now cleaning up database users. I am not sure if/why these 2 users are needed (they exist in original ...
3
votes
2answers
47 views

Availability Group Listener

I'm looking at AlwaysOn availability groups. The more I look at it the more it appears that the availability listener group is a single point of failure. Where exactly does the listener actually run? ...
8
votes
3answers
350 views

Updating a WHERE clause to check if a value is NOT in a separate table

I have a query which uses a WHERE clause, and I happen to use the exact same WHERE clause in many queries on this table (et al). The query is: SELECT DATENAME(DW, [AtDateTime]) AS [Day of Week] ...
5
votes
3answers
3k views

Creating a read only replica of SQL Server database for reports

I've faced a problem when my .Net web application is running slow, even when I've optimized all queries. As it turned out another developer, who is making reports runs a bunch of non optimized queries ...
5
votes
1answer
88 views

How can I restrict the version of the target DB instance in a SSIS package?

How can I restrict an SSIS Package to only execute on SQL Server 2012? Is there a built-in way to do this (metadata?), or do I need to do a query? (Possibly belongs in a new question): I can get ...
0
votes
0answers
19 views

Availability Group failover stuck in Resolving State

I am setting up a lab for testing automatic failover for SQL Server I have a 2 node WSFC (SQL-CLUSTER-TEST-01) with the nodes SQL-TEST-01 SQL-TEST-02 A listener SQL-HA-GRP-01 My initial testing ...
1
vote
2answers
246 views

Should these two indexes suggested by the SSMS missing index feature be combined?

I'm trying to improve the performance of a specific query that is automatically generated by Entity Framework. I have run the query through SSMS, and it has suggested creating two missing indexes. ...
4
votes
6answers
4k views

using IDENTITY column with increment -1

I need to run a sql server logging db with 2 main tables in 2 seperate datacentres writing to both at the same time. I had the idea of restoring the db to the new datacentre and then reseeding the ...
2
votes
2answers
359 views

Performance effect of indexing foreign keys

My database is for an HR application with performance reviews and I am interested in whether I should index my foreign key. There are two tables involved. The first is a ratings table with 2 columns: ...
4
votes
1answer
116 views

SQL Server 2012 Express high Commit (KB) (low virtual memory condition)

I have a customer running SQL Server 2012 Express Edition: Microsoft SQL Server 2012 - 11.0.2100.60 (X64) Feb 10 2012 19:39:15 Copyright (c) Microsoft Corporation Express Edition (64-bit) on ...
1
vote
1answer
54 views

CREATE TABLE AS SELECT creates non-nullable columns

I am using the CREATE TABLE AS SELECT statement in Oracle 11g to get data from SQL Server 2012 via a database link. Oracle creates all these tables with non-nullable columns and that causes me ...
4
votes
1answer
45 views

Finding parent by set of children

Given a many-to-many relationship (product/component), I need to find a product (or all products) that are composed from the given set of components. I can't wrap my head around the SQL query for ...
5
votes
1answer
199 views

How many users are supported on SQL Server 2012 Express?

I would like to say that i have gone through some of the sql blog and MSDN BOL, but still there is some confusion in mind like. The limitation of SQL Server 2012 Express is 10 GB. It is the ...
13
votes
4answers
833 views

Why would SQL Server ignore an index?

I have a table, CustPassMaster with 16 columns in it, one of which is CustNum varchar(8), and I created an index IX_dbo_CustPassMaster_CustNum. When I run my SELECT statement: SELECT * FROM ...
1
vote
0answers
29 views

Trans Replication and Always On Listener Group Name

We have currently (SQL Server 2012 STD) which is continuously replicating from 8 different database server for reporting purpose to server which is on SQL 2008R2. We would like to create an Always On ...
4
votes
1answer
341 views

Alternative of DBCC CHECKDB

I am running DBCC CHECKDB on one of my database but its taking very very long time. I have some questions please help me. Is there any alternative of it that can check my database integrity? Should ...
-1
votes
4answers
173 views

What MAXDOP setting should be used for MS SQL Server 2012? [closed]

I am getting a performance degradation error in one of my cluster production server. The error is like that A significant part of sql server process memory has been paged out. This may result in ...
3
votes
1answer
83 views

Log Shipping “out of sync” but none of the jobs are failing

I've configured a log shipping from a server, to the same server, only with a different instance. Primary server is configured this way: LSBACKUP_MyDatabase - every 25min Secondary server: ...
-2
votes
1answer
46 views

Backup file from SQL Server 2012 to 2008 [duplicate]

I have a backup file of SQL Server version 2012 but I want to restore that backup on SQL Server 2008. Question: Is this possible ?
3
votes
1answer
140 views

SSAS cube process time increased after making fact and dimension small

I have a cube of 55 GB size which takes around 2 Hour to process full. As I have data for last 4 years but our business wants only 2 years of data. For that, I have changed dimension and Fact views to ...
3
votes
1answer
200 views

SSIS 2012: What rights are needed to connect to SSDB via DMO

I'm trying to connect to the SSDB catalog to execute a package using the .NET object model e.g. using Microsoft.SqlServer.Management.IntegrationServices; var sqlConn = new ...
2
votes
2answers
644 views

Query execute slowly when changed compatibility Level of my database [duplicate]

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 ...
7
votes
1answer
96 views

What is most efficient way to compare two large record sets in SQL Server 2012

Current advice for the most efficient way to compare two large record sets seems to be to use EXCEPT. This self contained SQL script below gets very inefficient as record sizes increase (change @last ...
2
votes
1answer
950 views

SQL Server 2008 mirroring migration to SQL Server 2012 always on

Quick question, request your input. I am migrating a SQL Server 2008 R2 instance with database mirroring to SQL Server 2012 with always on. Should I : Restore the SQL Server 2008 R2 backup to SQL ...
3
votes
2answers
69 views

How to downgrade SQL Server 2012 Enterprise to 2012 Express?

I would like to say that as per company policy we are downgrading SQL Server 2012 Enterprise to SQL Server 2012 Express. Any suggestion would be appreciated.
4
votes
1answer
38 views

Is it possible to connect MS SQL Server Express 2012 through DAC Connection?

Is it possible to Connect MS SQL Server 2012 Express Through DAC. After moving from SQL Server 2012 Enterprise to MS SQL Server 2012 Express, some performance problem were there. When i have checked ...
3
votes
1answer
50 views

SQL Server - SQL Agent - Allow a Group to own a job

Scenario There are three separate groups of users in our organisations (development, support, implementation). As it stands everyone is using a single login for everything. We are starting to move ...
3
votes
1answer
74 views

Create table in Oracle as select from SQL Server - varchar size

I am trying to create table in Oracle 11g as select from a table in SQL Server 2012 via database link. The table in SQL Server contains column: hslakkis varchar(3) In Oracle it created the table ...
0
votes
2answers
58 views

ORDER BY performance impact

I am using SQL Server 2012. We have a table that specifies the incoming requests to be processed. Some of the columns are (total columns are 10), requestId requestStatus (Enum - Processed, ...
9
votes
2answers
106 views

How to specify SQL startup parameters in quiet installation via command line

I want to fix the identity gap bug in SQL Server 2012 via the -T272 startup parameter. How can I automate this after installation? I found no install parameter for startup parameters.
1
vote
2answers
75 views

Problem executing multiple procedures [closed]

I'm really new to SQL Server development and I learn everyday. Today I encountered a problem while executing multiple stored procedures in a query. I saw only one of both start. After a long research ...
2
votes
1answer
68 views

Stack Dumping and performance degradation of sql server process [closed]

I would like to say that today i got first time SQL Server log message in My SQL Server 2012 Database. ***Stack Dump being sent to D:\MSSQL11.MSSQLSERVER\MSSQL\LOG\SQLDump0012.txt * ...
3
votes
0answers
63 views

Unable To Log In Through Windows Authentication

See this question for details of troubleshooting I've been stepping through (I did answer 2, which didn't work - it was a corrupt master file). In configuration manager, I changed to a Built-in ...
5
votes
1answer
117 views

Set “Encryption Enabled” to FALSE…what can go wrong?

I'm migrating a database from SQL Server 2012 to SQL Server 2014 on the Same server. I'm configuring LOG SHIPPING on a database that is apparently encrypted: When setting the log shipping i got ...
6
votes
1answer
62 views

How do I replicate a database over 2 geographical sites?

Disclaimer: I have no idea what I'm talking about here, or if what I'm doing is the correct thing to do. Long story short, my superior has asked me if it's possible to replicate our internal database ...
2
votes
1answer
93 views

SSIS package fails intermittently with: Unsafe assembly 'microsoft.sqlserver.integrationservices.server, version=11.0.0.0

I have an SSIS package deployed to the SSIS catalog on my Data warehouse which has run successfully for months. The package is executed by a SQL agent job. Now it fails intermittently with the ...
2
votes
1answer
346 views

Trouble removing filestream file / filegroup

My database was originally using filestreams in one table. For reasons that I won't go into here, we decided to stop using filestreams. I therefore wrote a migration to copy the filestreamed table ...
3
votes
0answers
51 views

Is execution plan cached “better” for stored procedures than for a non-dynamic query?

Reading different explanations about execution plan caching by Microsoft SQL Server, I'm confused about the benefits of using stored procedures instead of non-dynamic queries. By a non-dynamic query ...
59
votes
5answers
14k views

Are SQL Server in-place upgrades as ill advised as they used to be?

I have been working with SQL server on and off since SQL Server 6.5, the old advice that still rings in my head was never to do an in-place upgrade. I'm currently upgrading my 2008 R2 DEV and TEST ...
0
votes
2answers
49 views

SQL server 2012 service pack installation

which service pack I should apply first after installing sql server 2012 enterprise edition either sp1 or sp2 ? Thanks in advance.
9
votes
3answers
298 views

What is the use of restore headeronly when performing a backup?

When I monitor my backups with the following query: SELECT command, percent_complete, 'elapsed' = total_elapsed_time / 60000.0, 'remaining' = estimated_completion_time / ...
3
votes
3answers
2k views

SQL Server 2012 performance degradation

We are running SQL Server 2012 SP1 on Windows Server 2012. The issue we have is that after some time the server automatically reboots. Checking the logs did not show any errors. When looking into ...
6
votes
1answer
31 views

Update an Indexed View “Online”

Say I have an indexed view that looks like this: ALTER VIEW dbo.MyIndexedView WITH SCHEMABINDING AS SELECT ord.SomeColumn, COUNT_BIG(*) AS Count FROM dbo.Ordered ord WHERE ...
4
votes
2answers
51 views

Kill all sessions for ONE user in MS SQL

So we have a bad external application that connects to the database, executes a stored procedure and gets an answer. It never releases the database connection. I need a script that either kills all ...
4
votes
2answers
62 views

db_datareader, db_datawriter and db_owner permissions [duplicate]

First of all, sry because I am not a DBA and I'm not familiar with all the permissions. My question is, if I give a user db_owner permissions on one database. Do I need to give also db_datareader and ...
39
votes
8answers
9k views

Is select * still a big no-no on SQL Server 2012?

Back in the days of yesteryear, it was considered a big no-no to do select * from table or select count(*) from table because of the performance hit. Is this still the case in later versions of SQL ...
2
votes
1answer
332 views

Registered Server window does not show Database Engine or Local Server Groups

I am running SQL Server Management Studio 2012 on a Windows 7 machine. After a failed attempt to import my registred servers from SSMS 2008, the icons for Database Engine and Local Server Groups are ...
2
votes
1answer
65 views

Script file execution through Power shell

We are trying to automate few things, one of them is to deploy patch in one go on selected DBs of SQL Server, as per my knowledge Powershell is an option. But I have zero taste buds of Power shell. ...