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

learn more… | top users | synonyms (3)

-3
votes
1answer
150 views

How to achieve high performance management of a huge list of distinct strings [closed]

I am trying to achieve high performance management of a huge list of distinct strings in SQL Server (but I'm open to suggestions of alternate platforms that might be more performant). My specific use ...
0
votes
0answers
20 views

SQL Server Policy Management Escaping for LIKE/NOT LIKE conditions

I would like to post this question and answer it right away in case anyone else has wondered... After hours of research and even opening this issue http://connect.microsoft.com/SQLServer/feedback/...
2
votes
0answers
16 views

Service broker internal spid hogging tempdb

We've recently decommissioned a rather badly implemented service broker setup after a number of near outages, however while doing my morning checks I've noticed that there are 2 Service Broker ...
10
votes
6answers
8k views

SQL Server Management Studio 2012: How to have folders in the SSMS project?

I'm using SSMS 2012 to talk to the SQL server 2012 and Azure SQL servers we use. I admit I'm not a SQL expert so I've been saving most of my SQL scripts for future reference. I've quickly run into 20 ...
0
votes
0answers
28 views

SQL Server 2012 Availability Group (with Synchronous & Asynchronous Replicas)

I have an AG set up in SQL 2012 (sp3), where I have 2 replicas (with synchronous commit & automatic failover) which works very well. When I try to add a 3rd replica (for DR purpose, with ...
15
votes
3answers
569 views

Implementing subtype of a subtype in type/subtype design pattern with mutually exclusive subclasses

Introduction In order for this question to be useful for future readers I will use the generic data model to illustrate the problem I face. Our data model consists of 3 entities, which shall be ...
2
votes
1answer
176 views

By Mistake Deleted AlwaysOn Availability Database from live Production Server

Today by mistake deleted The AlwaysOn Availability Database from live server. Let I am explaining the Details. In AlwaysON Availability Groups, there is 2 Availability Replica. That is Primary ...
6
votes
3answers
4k views

db_owner unable to drop database - Error 615, SQL Server

I have a SQL Server 2012 database running on amazon EC2. I've created a user to be able to create, edit and drop databases. I gave the new user with dbcreator server role. My user can connect ...
1
vote
1answer
99 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
2answers
47 views

Determine ANSI_DEFAULTS setting ON or OFF?

How can I determine if ANSI_DEFAULTS is enabled or not on my server. My server is using IMPLICIT transactions and one way from which it can affect it based on setting of ANSI_DEFAULTS. How can I ...
0
votes
1answer
32 views

Migrate Database

I'm trying to migrate my database to another server, an older version. Currently my database is on SQL Server 2014, but I need to add migrate it to a SQL Server 2012 because thats the one my server ...
0
votes
1answer
36 views

AlwaysOn Shared network location change requrest

We have successfully setup the Alwayson with different subnets and it was working fine. But unfortunately the existing NAS storage had a problem. Now our storage team provide new storage IP. We need ...
1
vote
1answer
114 views

Shared network location in Availability Groups configuration

I am configuring Availability Groups feature in azure virtual machines nodes. In the below screen wizard, it's asking me for shared location. where and how I need to create this shared location? Do ...
2
votes
1answer
37 views

SQL Server 2005 still running after in place upgrade to sql 2012

We upgraded a default instance from SQL Server 2005 to 2012 today. But Components of SQL Server 2005 are still on the server. These includes the MSQL1. folder (it has all the data and log files), Mgmt ...
1
vote
0answers
41 views

Where can I find information on what resources are consumed when connections are established with MSSQL 2012?

I'm trying to troubleshoot the following intermittent sql connection error: "DESCRIPTION: SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. ...
3
votes
1answer
68 views

How to script XML Schema collection in SQL Server 2012?

I need to make script of XML schema collections in my Database and then insert each xml inside a table field as string. I need to do this to compare current schema collections with the new schema ...
2
votes
1answer
1k views

Why has my database connection failed?

Recently I have developed software using SQL Server 2012. Now when I try to connect, I get this error message: Cannot connect to AAFI\SQLEXPRESSA network-related or instance-specific error ...
6
votes
2answers
99 views

SQL perf issue - configure server correctly first or troubleshoot issues one by one?

This is for SQL Server 2012. I am troubleshooting overall slow performance on a Dynamics AX environment. Everything is just slow - app itself, reports, ad-hoc, etc. Right off the bat, I can see ...
3
votes
3answers
106 views

Query Spatial Data for Nearest Neighbor for each group

I want to query spatial data for nearest neighbor. I am using this article and the following query works perfectly: SELECT TOP 1 [Location].STDistance(@Location) FROM [DS1] WHERE [Location]....
0
votes
1answer
134 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 ...
3
votes
1answer
2k views

How to find the active transactions in VLF?

Is there a way to find the T-SQL statement that is part of the active transaction that is blocking the reuse of the transaction log file VLFs? I am performing tlog backups on every 15 minutes, but ...
1
vote
2answers
41 views

Linked Server works on SSMS and isn't found on SSDT

My Microsoft SQL Server has a linked server to another SQL Server. I have a simple query that runs on mine, deleting a remote table (truncate doesn't work) and inserting data to it. This query works ...
0
votes
0answers
26 views

Replicate SCCM2012 DB to secondary read only server

We have a SCCM2012 DB that we're looking to replicate out to a SQL2012 or above server. The reason for the replication is for a new ITSM system to use ODBC to extract information about devices without ...
8
votes
2answers
293 views

How to configure SSRS (SQL Server 2012) to run on a different instance, but same server as SharePoint

I have an instance of SQL Server 2012 running on Windows 2008R2 along side another instance of SQL Server 2012 that is running SharePoint (I think it is SharePoint 2010). When I try to access the ...
1
vote
1answer
149 views

SQL Server full text search query takes way too long to execute

I've got query snippet as follows: SELECT * FROM CONTAINSTABLE(dbo.Analysis, *, 'FORMSOF(FREETEXT, "historic year-on-year exchange rates forecast year-on-year exchange rates")'); I'm running it on ...
0
votes
0answers
42 views

How Can I move data among the datafiles

I have almost 1 tb of database which have 4 datafiles in primary file group that have data unevenly A-data file has 300 gigs B- has 430 gigs c- has 200 gigs D- has 12 gigs what should I do in order to ...
3
votes
3answers
9k views

Greyed out menu options, broken activity monitor

I recently installed SP1 on my 2012 SQL Server. Ever since then SSMS has behaved a little weirdly when I connect from my pc rather than from the local server itself. I no longer see the green "...
1
vote
0answers
54 views

Different sporadic SQL Server errors

First question on this SA but I feel my problem is more Database related than code related. I have multiple Delphi Datasnap servers connecting to SQL Server 2012. The SQL server has multiple ...
3
votes
1answer
30 views

Maintenance Plan on Replication Subscriber

I have seven subscribers to a replicated publication using transactional replication in SQL Server 2012. Do I treat the subscribers just like a normal database and perform maintenance via a ...
1
vote
1answer
66 views

Convert hierarchy in an ordered list of rows

I tried to make a simple list that represents hierarchy of items. Tags have simple structure like [Id] ,[Name] ,[ParentTagId] I try to make the follwing result table: ID, ParentID, Name, Lev,...
2
votes
1answer
103 views

Why take full backups when you can do COPY_ONLY?

With a SQL Server 2012 availability group, you can only take COPY_ONLY full backups on replica. You can make regular BACKUP LOG. As it's possible to restore logs backups after a database restoration ...
10
votes
2answers
59k views

Installing SQL Server 2012 Express fails with error “ Could not find the Database Engine startup handle.”

I'm attempting to install SQL Server Express 2012 w/ SP1 x64 on Windows 7 SP1 x64. This machine has previously had SQL Server Express 2012 installed. This instance was upgraded to SQL Server 2012 ...
3
votes
1answer
59 views

Auto created Statistics vs Manually created Statistics

Is there any difference between the Statistics that got created automatically by Query optimizer and the one that created with CREATE STATISTICS statement. Will the manually created statistics get ...
0
votes
1answer
68 views

Linking between SQL Server and Excel [closed]

I want to dump Excel data in SQL Server database. What is the best/easiest way to do this? I have SQL Server 2012 Management Studio. I have tried many techniques but failed miserably, there is no ...
1
vote
1answer
203 views

Replication Configuration

I had a SQL Server 2008 Express edition as a Default instance and I am having SQL Server 2012 Evolution and SQL Server 2014 Evolution are my named instances. When I was trying to configure ...
3
votes
2answers
210 views

Adding 4th table to join jumps processing time from seconds to over 20 minutes

I am trying to join a total of 4 tables together. When I only join 3 of the tables together I get a result set of about 220,000 records in about 2 seconds, but as soon as I throw the 4th table in, the ...
2
votes
1answer
2k views

Inline edit SQL Server database rows from Visual Studio

I'm pretty sure Microsoft have pulled one of the most useful features for performing quick edits on a SQL Server Database within the Visual Studio IDE. It seems to have only affected SQL 2012 ...
3
votes
1answer
40 views

Replication for Mirrored server

I have 3 SQL servers running SQL Server 2012 Standard Edition, called A , B and C. Server B is a mirror of server A. There is transactional replication between server A and Server C. How can I ...
3
votes
2answers
76 views

Strange Database Mirroring Problem

I am noticing a strange problem with DB mirroring on SQL Server 2012 (standard edition). The mirroring is set up, and successfully established, and working. There is no witness. Once principal is ...
0
votes
1answer
32 views

Accessing a Linked server [closed]

I am fairly new to the whole DBA scene. With that said, i was able to get an ODBC connection established within Microsoft SQL Server 2012 to be able to access a database for a library. Now what I am ...
0
votes
0answers
24 views

How do I keep all roles, users and permission on a database being dropped then restored with a different database with different permissions [duplicate]

The DBA at my job every week drops my test database and restores it with a copy of the live environment. The permissions on the live database are different then the test database(and need to be). ...
3
votes
1answer
114 views

Error: “The certificate cannot be dropped because one or more entities are either signed or encrypted using it.”

I have a certificate I would like to remove from the database. If I issue the command DROP CERTIFICATE <FooCert> I get the error The certificate cannot be dropped because one or more ...
1
vote
0answers
30 views

Is it possible to query the avg time in ms per read/write

I was wondering if it was possible to obtain the avg block read and avg block write in ms with a query in SQL Server. If SQL Server knows how many IO requests are made for a given wait type and how ...
3
votes
1answer
42 views

SQL Server Replication

We had an issue with replication, where a large (7.5 million row) update was done on a 33 million row table. Replication converted that to 7.5 million individual update statements. When my alerting ...
17
votes
5answers
11k views

SQL Server Agent Jobs and Availability Groups

I'm looking for best practice in dealing with scheduled SQL Server Agent jobs in SQL Server 2012 availability groups. Maybe I missed something, however at the current state I feel that SQL Server ...
0
votes
0answers
34 views

Failed to flush the commit table to disk

We recently had this error come up for one our databases https://support.microsoft.com/en-ca/kb/2603910 In order to fix it we patched the server to the latest SP and Security Update. Current version ...
0
votes
1answer
45 views

SQL Server 2012 SP1 to SP3 with Mirror

I have a Production server and DR server where the databases are mirrored, both on SQL Server 2012 SP1. I want to apply SP3. I can do this on a weekend and I don't want a failover. Should these be ...
1
vote
2answers
74 views

SQL Server 2012 cannot use file server for log shipping

I have a problem with log shipping in SQL Server 2012. I have two servers for log shipping, let's say server A and server B. For the first experiment, when I use a shared folder from my computer ...
1
vote
1answer
91 views

Tables not displaying after creating database by script. Do I need to insert?

I successfully created (scripted) a database in SQL Server 2012. My problem is that while the database itself is listed in the object explorer, the tables from the database are not. The database I ...
1
vote
1answer
33 views

Notify on SQL trace event starting?

I was wondering if there was a method of receiving some sort of notification when a SQL trace begins - be it e-mail or some other method? The circumstances of needing this we currently have a ...