Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sql-server-2012]

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

0
votes
0answers
7 views

Corrupted system health extended event file with error message “Not a valid Win32 FileTime”

We collect data for monitoring from system health extended events and few of the SQL Server installations started failing with error below error message: Conversion failed when converting date and/...
0
votes
0answers
6 views

Migrating AWS RDS SQL Server to a smaller RDS instance

I am in the process of migrating an AWS RDS SQL Server to another instance of AWS RDS SQL Server with lesser storage. AWS folks suggested using the native backup/restore option instead of DMS. Steps ...
0
votes
1answer
7 views

SQL Server unattended / Silent installation override Configuration.ini file in command line parameter

I am creating a PowerShell script to install SQL Server 2012 silent installation. It is not hard to find a tutorial or instructions online on how to do so. I want to my script be a bit more flexible ...
1
vote
0answers
7 views

SSIS won't connect to Oracle issue after ODAC driver un-install & re-install

I installed the ODTwithODAC1120320_32bit drivers and client and could successfully connect SSIS to an Oracle database. I noticed that the installation had defaulted to the E: drive which is where the ...
1
vote
1answer
21 views

PIVOT function Says Invalid Column

I'm trying to teach myself to use the SQL Server 2012 PIVOT function, using the old example pubs database from Microsoft, I have written this code.. SELECT [au_lname], [CA], [OR], [IN] FROM (...
-4
votes
0answers
37 views

Merging multiple records into single record [duplicate]

Here is my question via an example: Now, I want a single record with column T approved and COLUMN W,X WITH 12 VALUE EXAMPLE:
0
votes
2answers
61 views

How to merge records in SQL

I have a table with multiple records for each ID. For example, there may be three or more records for one Class ID): one record with a status of "approved" and two more records with status NULL, or ...
0
votes
0answers
29 views

Invalid column name and object name [duplicate]

I've created a database in SQL Server 2012 called: StevesTest. In that database I have created and populated, a table, called: dbo.OP_Activity To test the table, I entered the following SQL code in ...
-1
votes
1answer
55 views

Truncate multiple tables after finding those tables using a select query

I want to truncate tables I find, all in 1 script. I have the select criteria now I need to truncate these tables. 1 problem I have is it can be different tables every time I run the query. SET ...
-7
votes
0answers
33 views

Anyone can help me suggest or give a sample query to generate this sample output in sql server or mysql database [on hold]

Anyone can help me suggest or give a sample query to generate this sample output in sql server or mysql database
7
votes
1answer
129 views

XML Query Question

I'm trying to generate a SQL query to get the "DATE" values out of the following SQL XML: I've tried something like this but I don't think I'm understanding the concepts. select xConfig.value('(/...
0
votes
1answer
20 views

Hierarchical data: get all nodes from a hierarchy, including parents that don't match the where

I have a table similar to this structure: TaskId: int PK AssignedTo: varchar(50) ParentTaskId: int FK nullable ParentTaskId references TaskId. The data in the table looks similar to this: TaskId ...
2
votes
2answers
84 views

Slow select Queries on Log shipping standby server

We have a database in primary DC around 15 TB with partitioned tables with largest one around 7 TB. To avoid users from reporting a LS set up was done for above database in different DC where the LS ...
1
vote
0answers
19 views

SSMS - Can I create a default layout?

Using SSMS 11 to connect to a SQL Server 2012 instance. When I first load up SSMS and log-in, is it possible to have specific nodes in the object explorer expand? I always expand the tables node in ...
0
votes
0answers
16 views

Under what circumstances would it be reasonable to choose a full index over a filtered one?

When I create the test case below, the filtered index is always chosen, even on the different versions of SQL Server with different configuration. create table #t (id int not null identity(1,1) ...
2
votes
0answers
35 views

Database stuck in recovery pending but can't set to ONLINE or EMERGENCY

We have a database server who's data drive filled up see error log: Error: 17053, Severity: 16, State: 1. D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\MyDb_log.ldf: Operating ...
0
votes
1answer
26 views

Convert Column values into row values with new row headers

Starting table Col1|col2|col3 --------------- 1 |EDTU|Value1 2 |EDTP|Value2 3 |aaaa|value3 4 |bbbb|value4 5 |cccc|value5 I only need values for EDTU and EDTP in below format with new row ...
1
vote
1answer
50 views

LOG backup Always ON using Ola Hallengren database backup script does not carry out a backup

I am trying to run a LOG backup on the primary node of an Always ON SQL Server 2012 environment. The secondary server is only used for replication. no read or other access permitted. (licensing of ...
3
votes
1answer
38 views

Understanding Stolen and foreign memory usage between 2 app database servers

Below is more for my understanding on how to interpret the data from my perfmon counters for 2 database servers with diff app structure but sort of similar workload Server A has total of 1 TB RAM ...
7
votes
2answers
123 views

What is the purpose of this Uniq1002 column in this index scan?

Take the following repro: USE tempdb; IF OBJECT_ID(N'dbo.t', N'U') IS NOT NULL DROP TABLE dbo.t GO CREATE TABLE dbo.t ( id int NOT NULL PRIMARY KEY NONCLUSTERED ...
0
votes
1answer
38 views

Aggregating data in .net SQL

I'm converting a database originally written in MS Access VBA to .net and many of the SQL statements that worked in Access don't work in .net. My data set is standard stock market daily information ...
-1
votes
0answers
27 views

Rebuild index with MAXDOP

On a server with MAXDOP set to 0: Database 4TB with around 1TB of indexes. What behavior can I expect if my maintainece of index is occuring for threshold greater than 60 % wrt index rebuild? On ...
0
votes
0answers
32 views

exec sp_executesql N'BEGIN CONVERSATION TIMER

please let me know if any way to avoid below statement: exec sp_executesql N'BEGIN CONVERSATION TIMER (''f550457c-f181-e911-833b- 902b34ef3b40'') TIMEOUT = 120; WAITFOR(RECEIVE TOP (1) ...
1
vote
1answer
46 views

Troubleshooting TempDB for Performance Bottlenecks

While trying to investigate some performance issues with our SQL Server database, I've noticed our wait statistics seem high for ASYNC_IO_COMPLETION and PAGEIOLATCH_*. In Resource Monitor I noticed ...
0
votes
0answers
8 views

Is there anyway to automate DQS knowledge base discovery process, using SSIS or any SQL job?

We are implementing a data warehouse for our client and part of it requires the development of metadata repository. Now, that repository, other than metadata information, would also contain domain ...
4
votes
2answers
59 views

Grouping rows in ranges

Let's say I have the following (contrived) table of monitoring data: RowID DateStamp Success Error ----- ----------------- ------- ----------- 1001 5/...
0
votes
3answers
42 views

Sum of decimal values that come in a string

Is there an easy way to get the sum of all decimal values in a string column. Example: "ABC $3.25, DEF $2.50, HIJ2 $0.25" "ABC1 $3.25, DEF $2.50, HIJ $0.25, KLM $4.50" I want to add only the values ...
1
vote
1answer
18 views

Directory Verification with For Each Loop in SSIS

How can we check if a directory is valid or not inside for each loop . I am having multiple files at some location and i want to load that file but before this i want to check if the directory is ...
2
votes
1answer
34 views

Object id error in sql server

I want to know the object referenced as an associatedObjectId in a deadlock graph, so I ran the below query: SELECT OBJECT_NAME(1234560112364076) I get the following error: Arithmetic overflow ...
0
votes
0answers
47 views

One SPID has deadlocked itself - how? [duplicate]

We had some Deadlock alerts raised today - on further investigation I have found that it seems to all be the same SPID and related to parallelism events. How has this happened? I didn't think ...
0
votes
2answers
46 views

How to find if difference between all row data for a specific columns are same

I have a table with column with following data, Column1 0.50 1.00 1.50 2.00 2.50 .... 10000.00 Is there a way to validate the pattern that each data row has a difference of 0.50 ? I tried googling ...
1
vote
1answer
88 views

Understanding MAXDOP behaviour for queries going parallel

For my current server as below 4 Sockets with 10 cores per socket and 20 logical processors per socket. Total 80 per SQL licensing: 4 NUMA nodes with HT enabled I've set CTOP 50 and MAXDOP 8 on ...
0
votes
1answer
22 views

SQL Server license from AWS Marketplace with ? cores

We are planning to buy a SQL Server 2012 Enterprise edition license from AWS Marketplace for our company. We have exhausted our previous licenses and we need to add a new region with SQL Server in ...
0
votes
0answers
18 views

There is no column named id5093 in the table body_record. It is ignored for this operation

One of our Database - has been Error Spamming Event Logs for over 8 months stating the below Error: There is no column named id5093 in the table body_record. It is ignored for this operation. The ...
4
votes
1answer
117 views

Some basic questions about SQL and TLS 1.0 and 1.2

(I don't believe this is a duplicate of any other TLS-related question, like the authoritative question about SQL Compatibility with TLS or its many duplicates, or questions about specific TLS-related ...
1
vote
2answers
56 views

Query to see Index Fragmentation on all databases without using SP or temp tables

I am trying to compile a index fragmentation report on all databases, in a multi-server environment. The query will be executed via an openquery command, so I would like to make it as simple as ...
0
votes
1answer
15 views

Will this RedGate backup plan interfere with a new differential backup plan I want to create?

First, I need to get an assumption verified: If I setup a differential backup plan and someone comes along and manually creates a backup without specifying COPY_ONLY then it's going to throw the plan ...
7
votes
1answer
137 views

After Restoring Log Shipping to Secondary Server, First Stored Procedure Execution is Slow

We've set up log shipping to a secondary SQL server on Standby/ Read-Only to offload all SSRS report generation. This works fine within the restrictions imposed by: Kicking out the user during the ...
-2
votes
2answers
30 views

Procedure tr_employee_tbl_forinsert Column name or number of supplied values does not match table definition [duplicate]

I get error "Procedure tr_employee_tbl_forinsert Column name or number of supplied values does not match table definition" when I run the INSERT query below. What should I do? create table ...
2
votes
2answers
26 views

Will I be notified that BACKUP encountered a CHECKSUM error if I use CONTINUE_AFTER_ERROR?

I am in the process of adding the WITH CHECKSUM flag on our daily SQL backups, as part of an effort to better ensure data integrity. I definitely want to know if a checksum error is ever encountered, ...
0
votes
1answer
15 views

MSX Job deployment: Not creating job on certain servers

I am deploying a new index maintenance jobs through MSX to about 100 servers, I am in the process of manually checking that each job has been created and I have already discovered that for some ...
5
votes
2answers
67 views

Changing a certifcate+key algorithm by dropping & recreating with the same names

We have a situation where a symmetric key has been created (a long time ago) using TRIPLE_DES. This is used to encrypt a password column, and is used by around ten stored procedures (that utilizes ...
0
votes
1answer
27 views

INSERT INTO from 2 unrelated tables

I need to INSERT INTO a new table (FinalTable) from 2 unrelated tables, but values from Table1 will need to be repeat for every value pulled from Table2. Example: Table1 Table2 ...
0
votes
0answers
44 views

Handling Dot (.) in SQL Full Text Search [duplicate]

I need to implement Full Text Search in SQL Server in our production databases. While working on it, I found that dot . in a column value cannot be considered as full text along with the remaining ...
7
votes
2answers
451 views

Can I combine SELECT TOP() with the IN operator?

I was wondering if there is a way for a SELECT query to be made on each matched value found within IN. Consider that the table below contains 100 records for each of the values included referenced by ...
-1
votes
2answers
31 views

SQL Server 2012 log shipping to Azure SQL

Is there any way to take SQL Server 2012 log shipping files and upload them into Azure SQL Database. We just need the data changes and not to bothered about the recovery side of things.
1
vote
1answer
93 views

SQL Server Metric Report Information For Management [closed]

We have a quarterly metric meeting and I report the metrics for all of our production SQL Servers. The people that are looking at these reports are mostly management (some technical, but others are ...
3
votes
1answer
51 views

Should I create two endpoints for two availability groups on the same SQL Instance?

I have a two node cluster running SQL Server 2012. I want to create two Availability groups within the same instance of SQL Server. Should I add one endpoint for each AG, or shall I allow both AG's ...
0
votes
0answers
38 views

Performance difference between on-prem SQL Server and SQL Server running on Azure(IaaS)

We are comparing the performance of an on-prem SQL Server and SQL Server running on Azure VM. The Azure VM is created by Azure Site Recovery(ASR). For the testing purpose, we have executed following ...
0
votes
1answer
81 views

Max Workers available and yet pending task high

While exploring the data from system health extended events for event so server diagnostics I see for column query processing XML as below: Max workers - 2944 ( based on 80 schedulers on my server) ...