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

learn more… | top users | synonyms (2)

1
vote
2answers
40 views

How can I Insert when not in table and when max timestamp T-SQL

I am trying to insert rows from one table to another that are not in the one I am moving them to. I also want to only move the ones that have the highest datestamp. (I want to only insert rows that ...
0
votes
0answers
20 views

The Service Broker endpoint is in disabled or stopped state - AoAG - SQL 2012 - 15 minute interval

I receive this error message in SQL error log every 15 minutes. I have setup AOAG on this server. The database option "Service Broker - Broker Enabled" is turned on for the Blackberry related ...
4
votes
2answers
119 views

Deleting other files during maintenance plan

I have an SQL Server 2012 maintenance plan which does the normal stuff (rebuild indexes and update statistics, back up DBs, deletes .bak files older than X days, etc). Everything is working fine with ...
0
votes
0answers
7 views

After merge replication setup, tables at subscriber not getting any data from publisher

I have created a merge replication setup through Replication Wizard. After sync, it is observed that the subscriber DB gets created with the exact tables in publisher as intended, but on the ...
0
votes
0answers
36 views

System.OutOfMemoryException SQL Server 2012 and 2008R2

I have a 64-bit and 64gb memory for both SQL Server 2012 and 2008R2, when I generate a report w/c has 900K rows, it finished the query smoothly and no problem, but when I'm going to copy the result ...
0
votes
0answers
26 views

SQL Server 2012 Standard Cluster in a Box

We currently have a Microsoft SQL DB “cluster in a box” with two physical servers and a SAN. This is done with just Hyper-V and SQL Standard installed on the physical servers while having one ...
2
votes
2answers
35 views

Long running backups on small databases

We normally perform backups across the network to a file share on a different SAN. This works very well for all but 1 of our database servers. The problem machine is a new server running Windows ...
1
vote
1answer
17 views

SQL Server 2012 Error 9512 when modifying user login

We are attempting to grant access to a database to one of our employees. We open up his user properties in Security -> Logins, navigate to the User Mappings page, select the database, select db_owner ...
0
votes
1answer
23 views

SSIS package hits “login failed for user” when simultaneous operations occur against the same target database

Quick summary We have been working on migrating our library of SSIS packages from SQL Server 2008 hosted on physical Windows Server 2003 to SQL Server 2012 hosted on virtual Windows Server 2012. The ...
0
votes
0answers
13 views

SSIS Package Deployment Failure using SSDT

SSIS fails almost immediately on the final "Deploying project" step of the Deployment Wizard (Package Deployment Model), using Visual Studio 2010 (SSDT) connecting to a SQL 2012 Server: Failed to ...
4
votes
1answer
28 views

Microsoft SQL linked server to Oracle data not updating

I need to pull data from an Oracle database running on a remote machine and use it on my sql server instance. I need to check these tables periodically for updated or new records. I have created a ...
0
votes
0answers
36 views

Does the transaction log grow during a full backup? [duplicate]

I've been tagged as the occasional DBA in the office. I have minimal experience and it would be great if someone could answer my simple question. I know the trans log grows during transactions, but ...
0
votes
2answers
44 views

Encryption in SQL Server 2012/2014

We are hosting sharepoint DBs with AlwaysOn AGs and FCI. My boss asked me what the options for encryption are on the content database, it's backup files and at the column level? I have read about ...
0
votes
0answers
33 views

SQL 2012 Standard Edition (on Azure VM) + Bitlocker. Good or Bad idea?

I will start this question with a few statements to negate any "Why" questions that are going to be asked. The Head of IT wants the data encrypted. Our profession is such that encrypted data is ...
0
votes
2answers
45 views

sql server transactional - replication - the internal procedures often deadlock with user processes

Very often I have deadlocks on my subscription server, involving the replication internal stored procedures and user processes either ad hoc or procedure queries. For example: Deadlock of the ...
1
vote
1answer
57 views

When Should You Shrink Your Database

I have read conflicting articles about shrinking a databases. Basically, our database grew 100% overnight from 150 gigs to 300 gigs b/c I believe it was with staging tables I put in. However, all the ...
0
votes
0answers
18 views

SQL Server hangs during backup on EC2

Once and then our SQL Server will "hang" during its weekly full backup. When this happens, external connections start to timeout. The symptoms are: Connections timeout The sqlservr.exe process sits ...
1
vote
0answers
23 views

Uninstalling MS sql server 2012 issues

I'm trying to uninstall ms sql server 2012. But when I click Microsoft SQL Server 2012(64 bit) and choose remove option it shows like this. Then how can I remove the MS SQL Server 2012? Please help. ...
1
vote
0answers
38 views

SQL Server 2008R2 to SQL Server 2012 Install

I'm trying to upgrade one of my SQL servers from 2008R2 to 2012 and I'm getting an error popup within a couple of seconds from starting the setup The Error is TITLE: SQL Server Setup failure. ...
1
vote
0answers
20 views

How can I setup a Login which can run an automated Database Refresh without giving away too much priv?

I would like to re-ask and extend the question posed in this thread if I may: SQL Server permissions to create, restore, delete only some databases I am also attempting to setup an 'isolated' ...
2
votes
0answers
37 views

Merge row size overflow in SQL Server

The target table to which I'm trying to merge the data has ~900 columns. The code for the merge: MERGE TBL_BM_HSD_SUBJECT_AN_1 AS targetTable USING ( SELECT * FROM ...
1
vote
0answers
35 views

DR option for SharePoint databases? ideas and experiences

First let me clarify that I am not looking for thoughts in terms what is the best or the bad options for a DR for SQL Server. I am just looking for for inputs from experienced people. We are running ...
0
votes
1answer
28 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 ...
1
vote
2answers
18 views

Ambiguity in Auto Create\Update Statistics

If I set 'Auto Update Statistics' to 'False' and 'Auto Update Statistics Asynchronously' to 'True' What the DB will do? Also - If I set 'Auto Create Statistics' to 'True', It will be 'Async'?
2
votes
2answers
47 views

migrate db's - best way to mirror or replicate a full database

I would like to mirror/replicate my databases to the cloud. The cloud is setup using VPN to my actual machine. I am a bit confused by the options I have and would like to get some light into it. My ...
1
vote
1answer
35 views

Migration from SQL Server 2012 Ent to SQL Server 2014 STD

We recently migrated from a traditional hosting environment with a back end of SQL Server 2012 ENT to an Azure VM running SQL Server 2014 STD. We did all the cool stuff with BPEs on SSD, etc. The ...
0
votes
1answer
31 views

Options for structuring multiple associations to a record

This is 101 level stuff and I promise to read a book later, but in the meantime, given the following three tables: Product --------- ProductId (uniqueidentifier) User --------- UserId ...
7
votes
1answer
849 views

Why 0 is equal to empty string?

I need some help in finding why the following T-SQL statement returns 1 (true): SELECT IIF( 0 = '', 1, 0) I guess someone has change an ANSI option like SET ANSI_NULLS or something else that is ...
0
votes
2answers
54 views

Single query for searching for records without knowing what the search column is for

I have a single line search where i should be able to search for address or city or zip or state. I should be able to show data of what ever that matches for the typed in word. Suppose user had typed ...
0
votes
1answer
24 views

Load & traffic balance best practices

I am about to design an enterprise solution for a large scale application in which a windows service, MVC, and many other projects will use a database, so I am thinking about load balancing and best ...
1
vote
1answer
28 views

Column store index on a large fact table

I have seen column store index and also tested it. I have no doubt admiring that it is lightning fast. But every tutorial and blogs I have considered, says about its limitation "table will become read ...
1
vote
1answer
64 views

Another bad execution plan!

This is running SQL Server 2012 SP2 Enterprise Edition. I have a nightly ETL job that, for a specific SP, is taking way too long to run. During my investigation I found that it was a specific update ...
3
votes
1answer
129 views

How to union four different tables

I have two tables whereby both of them use sub queries. These two tables are combined by using UNION ALL. I have two other tables that only uses a WHERE clause and both of these are combined using ...
0
votes
1answer
46 views

How do I pass or fail a job in SQL Server agent based on a return value from a stored procedure?

What do I need to do in order to execute a step in a SQL Server 2012 agent job that returns a bit value back? Basically, I want to fail the job or pass to the next step based on the results from the ...
0
votes
2answers
29 views

Chaning tempdb settings on production database

I have to change the initial size and autogrowth of my tempdb on production. Along, with that I have to add new files to tempdb. What is the right way to do it? As it is production and I don't want to ...
1
vote
1answer
24 views

How to capture Query Status(Sleeping, Background, Running) in SQL Server Profile trace

Is there any EventClass/Data Column which can log the Query Status to trace in SQL Server Profiler? Query Status which we find through sys.dm_exec_requests
4
votes
2answers
95 views

Transaction log is full due to 'CHECKPOINT' for DB in simple recovery model

For one of our DB's on SQL server 2012 RTM, We could not perform almost any troubleshooting step as the error says: " Transaction log is full due to 'CHECKPOINT" This being a dev database, its ...
0
votes
1answer
19 views

How do I merge two rows only if there is the TagWidgetIds are same but the tagValues are different?

I have this stored procedure which generates the following output. The query which generates the output from the stored procedure is as follows: SELECT tat.[agent-id], ...
1
vote
1answer
14 views

Limit of Generating Script for Schema Only from SQL Server 2012 to SQL Server 2008R2

Is there a limit on this method? I've tried a 35GB Database and it works, but my question is how about if my Database is like 100-150GB? Will I encounter some error? Or it will work smoothly but a ...
3
votes
1answer
138 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
vote
1answer
129 views

UPDATE with CASE with 2 tables

I have 2 tables and I want to update table2 with criteria of table1 and table2. The criteria are: 1.table1.amount > 10000 2.table2.flag is null or table2.flag = '0' So if the 2 conditions are ...
1
vote
1answer
74 views

Help on deciding how to pick Correct Index

I would like to ask for some help to create correct indexes for this query: SELECT DISTINCT D.TypeID FROM dbo.Sizes AS S WHERE EXISTS ( SELECT 1 FROM #PermissionsTable AS PT ...
0
votes
1answer
38 views

Optimizing key lookup in subquery with UNION ALL

I am trying to optimize following query (little bit more complex actually, but this is important part): SELECT Id, StatusDate, [...Lot Of Columns...] FROM ( ( SELECT Id, StatusDate, [...Lot ...
8
votes
2answers
107 views

Getting a realistic query plan when partitioning with low volumes of data

We're using partitioning to reduce the amount of blocking our OLTP system experiences due to locks, with a partition scheme that splits the working tables into 100 partitions based on a customer id. ...
0
votes
0answers
24 views

MDS 2012 - An unknown error occurred. The metadata model version cannot be found

I have created a a few models in my test MDS environment, and yesterday I finally created a derived hierarchy. The objective is to then assign Hierarchy Members security to some users. But now, when ...
1
vote
1answer
40 views

SQL Server 2012 CPU usage spikes to 100%

I am using SQL Server 2014 in AWS and the AWS image configuration is 4 cores and 16GB RAM(m3.xlarge). I am running the following simple query, SELECT * FROM user_table WHERE user_id = '10' ...
3
votes
1answer
42 views

Secondary replica indexing

I have a question, about a question, that is part of the 70-462 Microsoft exam. I had this question today, and I'm not completely sure of the correct answer. While I did pass the exam, I would like ...
4
votes
1answer
71 views

Tempdb change settings and recommendation

In my production database I have below configuration in TempDb and needless to say I am facing a lot of IO issues on the drive . So, as per recommendation I am planning to change it Change #1 ...
3
votes
1answer
41 views

Pagination performance, with subquery, inner join and where

I am trying to optimize following query (this is most simplified version I could came up with): SELECT tr.Id, StatusDate FROM ( SELECT tr.Id, tr.StatusDate FROM mon.ArchivedTaskResults_201504 ...
0
votes
0answers
43 views

DB_STARTUP blocking on spid 7

I have a sql server 2012 instance that I'm installing a new license on that had previously had an evaluation license. I've did this on two other servers with out incident, but this server is giving me ...