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

learn more… | top users | synonyms (2)

1
vote
1answer
70 views

Using LIKE or Full-text when searching database

I am fairly new to SQL and I am currently trying to create a search function for my website, much like the one on imdb.com. I have 3 tables and I need to search two rows (nvarchar) in each table when ...
1
vote
0answers
22 views

SQL Server Transactional Replication

I am using SQL Server 2012 and I am investigating transactional replication and had a question on SQL Versions that can be used. The Distribution and Publisher will be on SQL2012 Standard Edition, ...
1
vote
1answer
76 views

SQL Server 2012 - Dropping Snapshots takes hours

We recently did a SQL Server upgrade from 2005 to 2012. We have a nightly job that drops a snapshot of an active database. The snapshots gets created again later in the day. Before upgrading, in SQL ...
2
votes
2answers
39 views

How do I add keyboard shortcuts in SSMS 2012 to run a specific query?

How do I add keyboard shortcuts in SSMS 2012 to select all the data from table? In SSMS 2008 we could assign a shortcut in the following way: ...
1
vote
1answer
72 views

How to improve query to include 2 critical pieces of employee data

I’m going to preface by saying that I’m fairly green with SQL. My code below works, however I am missing two vital pieces of my employee population: (1) those employees who have been invoiced but ...
3
votes
2answers
197 views

Searching multiple tables in SQL

This question will involve some C# code but I hope that is fine, in the end it is the SQL that is the issue. (To see short question look at end of post) So I have a site, where you can add a site in ...
1
vote
1answer
344 views

SQL Server - Linked Server - Using OPENROWSET with windows integrated security

I have seen many articles regarding OPENROWSET using integrated security (Windows Authentication), but I could not make it work for me. It is working fine using SQL Server authentication: select * ...
1
vote
2answers
59 views

SQL Server 2012: set a column to only use a single case?

Is there a way to tell SQL Server 2012 to store both A and a as A (or both A and a as a) for some given column such that every insert statement does not need to have UPPER() in it?
2
votes
1answer
54 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 ...
1
vote
1answer
37 views

how to output 3 column into 3 element in xml format with the same name?

I have this code and I can't figure out how to get the expected result? declare @table table (TAG int, PARENT int,col1 varchar(100) ,col2 varchar(100) ...
3
votes
1answer
64 views

Tool for quickly backup and restore a table

Is there a tool for quickly backup and restore a table's data, preferably to a csv file? It would be best if I could do it using batch. Run a .cmd file and data is backed up into a file with datetime ...
1
vote
0answers
94 views

SQL Server database corruption in multi-user mode but not single-user mode

Using Microsoft SQL Server 2012 SP2 Standard Edition on a 2 node SQL Cluster. When I run dbcc checkdb on a certain database when it is in multi-user mode, it finds corruption in the clustered index ...
0
votes
1answer
27 views

Rank function creating duplicate partitions? (two rank 1's for the same key)

The below query is outputting two rows. Given that I am partitioning on ref_number and also have ref_number in the where clause, I believe I should only ever get a single row back. WITH rank_cte AS ...
1
vote
1answer
97 views

Work queue with complex select and long processing: Ensuring concurrency

I have a queue table from which worker processes claim records, one at a time. It is crucial that no two workers claim same item to process. Normally this kind of thing is done with select top (1) ...
3
votes
1answer
91 views

PAGELATCH_EX on 2:1:128

We are having problems on SQL Server 2012 with contention on tempdb page 2:1:128, which seems to be related with system table sysobjvalues. We have about 400 sessions waiting on this resourse ...
0
votes
1answer
198 views

Error while running SSIS Package job in SSMS

Error while running SSIS Package job in SSMS Hi! A SSIS package named "My_Package" has been scheduled as a job in SSMS to be executed daily at 5:00 AM daily. SQL Server Version : Microsoft SQL ...
0
votes
0answers
47 views

SQL Server Partitioning - parent/child tables reference partitioning

I have a requirement to partition quick growing tables in our product and below are the table information with key details. PERIODIC_EVENTS (PARENT TABLE which has ID (sequence no) as Primary KEY and ...
0
votes
0answers
40 views

SQL Server 2012 Downgraded from Enterprise to Standard. Permission errors

We downgraded our SQL Server from Enterprise to Standard. Now on 3 of my 5 non system databases a lot of users no longer have effective permissions. My admin account is in the same boat. I have ...
0
votes
2answers
272 views

How to get the column name having a particular value from a SQL Server table?

I have a value (say 5) but I do not know in which column of the table it is stored in. I want to get the column name which has this value. Please help me with this.
1
vote
1answer
41 views

Differntial back up: what happens to existing data?

Ok, this is a question borne purely from paranoia. But i want to ask all the same. If I make changes to a db, and then apply a differential back up at a later date, what happens to the changes I ...
0
votes
2answers
78 views

Creating joined rows from multiple tables on date field

I need to be able to take Table A and find the records that match in Table B and Table C based on its ID and add them together. The trick is that I only want to add the results from Table B and Table ...
0
votes
1answer
57 views

How to lift a nested windowed query from a left outer join?

So... I came across the following view. Aside for table design (some names and variables changed to protect the innocent), joins etc. I would like to simplify the query by lifting the two nested ...
0
votes
1answer
169 views

Mirror / replicate only 1 table of a database

I need a good way to replicate a single table in SQL Server 2012 between different servers and different databases. I tried replica which works just fine, but there might be a much better / easier way ...
3
votes
1answer
102 views

Transactional Replication to DB on Same Server instance

We have a SQL Server 2012 instance that contains a database with data for many product lines. We are looking for a way to take subsets of this data into another database on the same instance. This ...
-4
votes
1answer
51 views

Who is depends on specific column? [closed]

I want to alter column table from varchar X to Y. And for that I need to know who is depend on this column . Any suggestion?
4
votes
2answers
156 views

Execute SP whenever any job is finished

I have many SQL Server jobs on the server. I need to execute a SP whenever any job execution is done. One hard way is to create a step on every job which calls that SP. Is there any simple way to do ...
1
vote
1answer
82 views

Availability Group: ReadIntent connection failing

I have two nodes configured in an AG group in a dev domain: node1.DevDomain.com node2.DevDomain.com My own workstation is on our production domain: MyMachine.ProdDomain.com When I test ...
0
votes
0answers
51 views

Many to many update query

SQL Server 2012 Notification Source can have multiple deliveries type and each delivery type can have one notification templates (For future, Each delivery type can multiple templates). ...
1
vote
1answer
66 views

SQL Server 2012 extended event session to expose the network protocol

I am using SQL Server 2012 (11.0.5058.0) extended events, and wish to know the network protocol used by each connection (TCP/IP, shared memory etc). Event session created for the login event via: - ...
0
votes
1answer
27 views

Data warehouse: Can I tell any details from Source System on delays or blocks? [closed]

I have a MS SQL Server 2012 machine that is acting as our data warehouse currently. We are having issues with long running jobs, and am curious if there is a way to get detailed historical logging on ...
0
votes
0answers
15 views

DB replication, each db their own distributor or use a single distributor?

this may be a simple question for most but I am a bit confused and could use guidance, I am not a DBA, however I need to present out case for servers to our DBA's I am looking to set up replication ...
6
votes
3answers
230 views

REORGANIZE seems to work as well as REBUILD all the time

On this MSDN Page it says if you should reorganize or rebuild based on the amount of fragmentation: 5% to 30% -> ALTER INDEX REORGANIZE Over 30% -> ALTER INDEX REBUILD WITH (ONLINE = ...
1
vote
2answers
123 views

Is it possible to set stand-by database to active, do changes and then continue restore chain?

Basically, I'm using a custom log shipping method on a sql 2012, where the transaction files are manually copied to an offsite location. The files are then restored using something similar: RESTORE ...
5
votes
4answers
536 views

shrink after archiving, is this that bad too?

I have a database which grow to 20 GB, after archiving some data, the real size of tables is just 5GB. Backup script does save a copy of the backup to a different location. Moving 20GB or 5Gb does ...
7
votes
1answer
62 views

very poor cardinality estimate on a geometry intersection

I'm intersecting a point with a set of polygons. The query is indexed, and the polygons do not overlap but the query plan seems to think that instead of 1 row, i'll return 18k rows, and this results ...
1
vote
0answers
37 views

Deleting already duplicated Filestream Files

I have three FileStreams (FS1 on F drive, FS2 on H drive, FS3 on E drive) belonging to the same FileStream group of one particular database (DB) which is in Simple recovery mode in the SQL Server ...
1
vote
2answers
273 views

SQL Server Cumulative Updates - not visible in Windows Update

I just installed all possible Windows updates on WS2008R2/SQL2012 instance. When I run SELECT @@VERSION I get Microsoft SQL Server 2012 - 11.0.5058.0 (X64) May 14 2014 18:34:29 Copyright ...
0
votes
1answer
68 views

SSIS Package fails to “Transform File and create output file”

I have an SSIS (2012) package which was written by one of the developers. I've been tasked to with fixing the error. Each time the package is run I receive the following three messages indicating the ...
0
votes
0answers
38 views

Why does the SQL Server 2012 SA account always show up with creation date of 4/8/2003?

Why does the SQL Server 2012 SA account always show up with creation date of 4/8/2003? I am not sure why this is happening and if this is something that needs to be resolved. I noticed that on ...
2
votes
1answer
101 views

Indexing nvarchar(128) in SQL Server

Have no idea how indexing works in SQL Server. Working with a SQL Server 2012 Intel Xeon 2.2 GHz dual core 8 GB RAM. Will indexing a nvarchar(128) in addition to int primary key cause any ...
1
vote
0answers
15 views

Does an “update-update” conflict get created from the same node in P2P replication?

I have been told that an update-update conflict is being created in a production environment, which is set up using p2p replication, because of concurrent update by stored procedures. The msdn ...
2
votes
1answer
111 views

T-SQL query to find backup folder for specific maintenance plan

I want to check check if backup plans are set up correctly and need to query different servers, mostly SQL Server 2008, but also 2012. Is there any way to query the maintenance plans for databases, ...
1
vote
1answer
98 views

Modifying a non managed table partition

I ran across a partition that was initially setup (sql 2012) beginning of 2014 to break by month but wasn't updated for 2015. The main issue is that the last partition was setup as Jan 2015 so Feb ...
0
votes
1answer
173 views

Error message when importing data into SQL (Import & Export Data Wizard)

I am trying to use the Import & Export Data Wizard to import the contents of a CSV file into a table in MSSQL. I have no issues if I import all columns as strings however, I need one column to be ...
3
votes
0answers
40 views

Migrating VLDB to AlwaysON AG

I have been using AlwaysON AG for a long time now and currently have about 10TB of data across 120 databases and 3 AG groups for any application that is on SQL 2012 with great success. Each AG group ...
0
votes
0answers
100 views

Issues Setting Up SQL Server - Multi Server environment

I am trying to Configure the Master target server / Multi server environment in Sql Server 2012. I changed : MSXENCryptChannnelOptions-->Changed from 2 to 0 AllowDownloadedJobsToMatchProxyName - ...
1
vote
2answers
122 views

Best DR strategy for MS SQL Failover Cluster [closed]

I have... 2 database servers 1 shared SAN storage 2 MSSQL 2012R2 (Standard) server instances (2 SQL Failover Cluster) Server A is the primary node for SQL Instance A Server B is the primary node for ...
2
votes
0answers
43 views

Filtered Index is not selected once an identical, non-filtered, index is made [duplicate]

I have a lot of historical data, but 98% of the time, my data entry team only looks up data from the last 5 days. So I added a filtered index to help those lookups be faster. My test query looks ...
0
votes
0answers
35 views

Wrapping code in function is causing a huge delay

I have the following function: CREATE FUNCTION [dbo].[FunctionScore] ( @Param1 ... ,@ParamN ) RETURNS TABLE RETURN ( SELECT T1.[Col001] ,SUM(ISNULL(F1.[Pts], T2.[Pts])) ...
2
votes
1answer
58 views

Migrating SQL Server 2000 to 2012, getting old versions of Views (edit: offender SQL Server 2008 R2)

I'm migrating an ancient SQL Server 2000 database to 2012 (with a quick pass through 2008 R2 since 2012 is not compatible with 2000). The DB contains hundreds of views and stored procedures, and in my ...