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

learn more… | top users | synonyms (3)

4
votes
1answer
139 views

Validate XML using XSD inside TSQL function in SQL Server 2012?

I need to validate XML using XSD inside TSQL. To make this task semi automated I need to do this inside TSQL function. To make validation I have to set value to XML and if it is not valid I will ...
-1
votes
2answers
67 views

Database BackupSize has Changed after migration from SQL Server 2012 Exterprise to SQL Server 2012 Express [closed]

I would like to say that after migration of MS SQL server 2012 Enterprise to MS SQL Server 2012 Express. I have seen there is some subtle diffence in DB backupsize as well as in "LSN" of all ...
6
votes
1answer
83 views

SQL Server Edition for MS 70-463

I just started the MS 70-463 Implementation of warehouse, on the video course the tutor is directing towards SQL Server 2012 Evaluation Edition, but I have already have a SQL Server 2012 Express. Can ...
-1
votes
2answers
87 views

SQL query execution differs each and every time in SSMS

I have used below query to fetch maximum of 6000 records in SQL Server 2012. Select A.Date, A.City From dbo.TBL_Auction (NoLock) A Inner Join dbo.TBL_PLACE (NoLock) B On A.Place_Fk_Id = B.Place_Pk_Id ...
7
votes
2answers
296 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 ...
3
votes
2answers
210 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? ...
1
vote
2answers
91 views

How can I narrow down the cause of a deadlock after the fact?

We're using a .Net 4.5 web application with SQL Server 2012 on the same machine. We will sporadically see a cluster of "Wait operation timed out" exceptions while using the site. Occasionally we will ...
8
votes
3answers
409 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] ...
0
votes
1answer
75 views

SMB 3.0 file share storage limitation

What is/are the limitation/s to move from SAN storage to SMB 3.0 on windows Server 2012 - SQL server 2012 enterprise production environment? I want to know the benefit of using SAN over SMB 3.0 as ...
1
vote
0answers
119 views

SQL Server Transactional Replication Distribution Database not keeping up

We have following setup at the moment: 8 Cluster servers (SQL Server 2012 Standard Edition) talking to 2,000 store servers in the field via Merge Replication. The 8 servers are replicating to a ...
1
vote
1answer
94 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 ...
1
vote
0answers
35 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 ...
13
votes
3answers
1k 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 ...
-2
votes
1answer
63 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 ?
5
votes
1answer
95 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 ...
4
votes
1answer
277 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
votes
4answers
210 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 ...
7
votes
1answer
140 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 ...
4
votes
1answer
46 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
318 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 ...
10
votes
1answer
108 views

Job not running on Schedule

So I have a basic SQL agent job that runs a Robocopy script to move all files from one folder to another. Job is a pretty basic set up. With a pretty basic schedule. And yet it has yet to run. ...
9
votes
2answers
165 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.
5
votes
1answer
705 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 ...
0
votes
2answers
64 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, ...
4
votes
1answer
52 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 ...
1
vote
2answers
79 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 ...
3
votes
1answer
119 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 ...
2
votes
2answers
265 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.
2
votes
1answer
203 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
74 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 ...
6
votes
1answer
79 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 ...
3
votes
1answer
103 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 ...
5
votes
2answers
100 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 ...
0
votes
2answers
80 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
332 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 / ...
6
votes
1answer
41 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 ...
6
votes
1answer
47 views

Indexed (Materialized) View for Parent and Newest Child

Say I have parent->child tables setup. Call them Shipment and Widget. Is there anyway to create an Indexed view that will have the PK of the parent (ShipmentId) and the created when of the newest ...
4
votes
2answers
86 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
213 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 ...
2
votes
1answer
97 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. ...
1
vote
1answer
46 views

On an idle instance, why does setting max memory to 256mb cause %CPU to jump

Five 2012 instances on a 2-node cluster using AVGs. Two of them doing nothing yet, no user databases or users. Customer insists on specific max mem settings while waiting for additional memory ...
0
votes
1answer
36 views

turn off (synchronized) database

I just found a database, and I have no Idea what to do. I can't drop, update, or anything. The database is in this state: How can i turn it off? Because, it's already off ! I tried to restore ...
8
votes
1answer
157 views

What does the “reads” column in sys.dm_exec_sessions actually indicate?

This may seem like a very basic question, and indeed it should be. However, as a fan of the scientific method, I like to create a hypothesis, then test it to see if I'm correct. In this case, I'm ...
7
votes
1answer
152 views

Will a Full-Text Catalog with Track changes: AUTO automatically update if Change Tracking for that table is not enabled?

I have this database table that is suppose to keep the full-text index up-to-date. However I am not seeing it happening at all (no error in the log because the last log I see was when I triggered it ...
1
vote
0answers
194 views

What does 'Could not find a log backup file that could be applied' means on log shipping?

Skipped Log Backup File ..... Could not find a log backup file that could be applied to secondary Database What does this mean? I've configured a log shipping. To test, I created 2 tables, ...
2
votes
1answer
68 views

SQL Server is running slow after a certain amount of time [closed]

We've been experiencing some issues with our SQL server recently. I have noticed that some of our SQL jobs are running longer than normal. One job normally runs in under 3 minutes will take over a ...
5
votes
3answers
140 views

What are the SQL Server 2012 versions of FIRST() and LAST()?

I have a table with a value column. I want to calculate the last row minus the first row, as shown here: id value 1 10 2 45 3 65 4 95 . . . . ...
0
votes
2answers
54 views

Update row count on corrupt table

I have a corrupt table, 1 dodgy page about 1.6 million rows into a 2.9 million row table. I want to attempt this: ALTER DATABASE [CorruptDB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DBCC CHECKDB ...
3
votes
1answer
139 views

IS-A relationship with only single sub entity

Hi I'm trying to design a database for a dictionary. The words has several fields like meaning, an example, and maybe a picture. but the words that are 'verbs' has three more special fields that the ...
3
votes
2answers
177 views

How to import blanks as nulls instead of zeros while importing txt using wizard

I'm using the Import Wizard to load a text file and need blanks in integer fields to be nulls, but only zeros are inserted. How to import it properly?