Microsoft's SQL Server is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It originated from the Sybase SQL Server codebase, which is why both products use the extension of SQL called Transact-SQL (T-SQL).

learn more… | top users | synonyms (2)

2
votes
1answer
36 views

What do the HT* wait types mean? (HTREPARTITION, HTDELETE, …)

A big query is running right now. The result of a batch mode hash join that spills to disk is streamed into a temp table using select into. The query is showing wait types HTDELETE and HTREPARTITION ...
1
vote
0answers
33 views

Simple Unpivot - erroneous Column Conflict [duplicate]

Did I stumble across a reserved word here or something? For, the following statement: SELECT [Type] FROM (SELECT 'Receive' AS [Rec], 'Transfer' AS [Trx]) [data] UNPIVOT ( [Orders] FOR [Type] IN ...
0
votes
1answer
47 views

Using Year Ranges vs Row for Each Year

I'm working on a database in SQL Server for a project. My background is in data analysis and although I'm familiar with database design I don't have a lot of experience. The project revolves around ...
0
votes
2answers
46 views

De-duplicate rows in place vs de-duplicate on transfer

Doing what: Loading data from many flat table CSV files into their final destination, a "Target" table. Using: TSQL / SQL Server 2008 Goals: Don't include "duplicate" rows What are duplicates in ...
0
votes
1answer
28 views

Why does adding a transactional replication publication change all the tables and columns to “not for replication”?

I'm trying to get replication set up - this is my first time ever doing it, so I'm probably making some rookie mistake here. Right now I'm just working in the dev environment. I've been following the ...
0
votes
1answer
31 views

SQL redundant databases both sets being modified independently yet staying concurrent

I have a server in location 1. This location has slow external internet but all the employees. Location 2 has fast external internet but no people are there. I have a mobile app that I would like to ...
1
vote
2answers
36 views

Having trouble with insert query on linked server

Two servers. Server A and Server B both has database named KPS. KPS has two tables complaint and attachment. KPS database on server A gets the value from the Web. Both table if the submitted value = ...
1
vote
3answers
80 views

Quality of Microsft's SQL Server Training/Certification

I'm working as a SQL Developer in the healthcare industry and I have about 2 years experience. I'm primarily using SQL Server 2012. My company will pay for me to get additional training and/or ...
-2
votes
1answer
39 views

Sorting in dd/mm/yyyy format group by date

select CONVERT(nvarchar(15),TransDate,103) as TransDate, isnull(SUM(Convert(int,Amount)),'0') as Amount from HMS_DiagnosisTransactions where TransDate between '05/01/2015' and '07/24/2015' ...
4
votes
2answers
87 views

SQL Server : If a query is cancelled, where to get data on it?

Suppose am tracking a query using sys.dm_exec_query_stats, if the query ends fine, then we can find the relevant statistics in sys.dm_exec_query_stats. But if a query is cancelled, the statistics of ...
2
votes
1answer
29 views

Non clustered index for non-evenly distributed data in large SQL table

I have the following table containing 2.000.000.000 rows: CREATE TABLE [VeryLargeTable] ( [dataCol1] [NVARCHAR(MAX)] , [dataCol2] [NVARCHAR(MAX)] , [Manufacturer] [NVARCHAR(10)] , ...
1
vote
0answers
11 views

How can I return the full text of a document indexed in SQL Server Full-Text?

I'm using SQL Server 2014 with FileTables to store a large number of documents in different formats. The iFilters are working great, and everything is getting indexed with FTS + Semantic Search. Now ...
1
vote
1answer
21 views

SQL Server Agent Notification Email if a Step has an error, but the job is succesfull?

Is it possible, that I can receive Email from Server Agent, if a step in an Agent has an error, but the Job is successful? In the history, I can see, that for example one Step has an Error, but all ...
0
votes
1answer
13 views

Do we have logging feature for SQL AUDIT like we have it for transaction and error logs in SQL server 2008?

Do we have logging feature for SQL AUDIT like we have it for transaction and error logs in SQL server 2008 ????
1
vote
0answers
22 views

Multi-thread Informatica connections to use different processors on target database server

See this question for reference. Can data streams from Informatica to SQL Server be multi-threaded? I've got most of my problem figured out. I've split up the one large table into four smaller ...
3
votes
2answers
102 views

SQL server tools to identify query optimisations and missing indexes [closed]

I have a broad question regarding SQL Server that was given to me on a quiz and I am not sure what the answer is as I do not have access to SQL Server at home. My question is how can I utilise SQL ...
1
vote
1answer
44 views

microsoft sql server schema [closed]

From blog.sqlauthority.com: Protecting ISV database access: in custom ISV (Independent Software Vendor) applications, the database schemas are usually complex, and in the case of applications such ...
-1
votes
2answers
33 views

How to Interpret Trace Flag 1222 deadlock

please guide me how to read this graph to figure out what is cause for this deadlock . I looked for resources online but didn't find clear information. this is my first time to see this graph ...
0
votes
0answers
30 views

SQL Server DR scenario

I have a SQL server A and B which is production databases. The DR of production 'A' is production db 'B' and DR of production db 'B' is production db 'A'. DR feature that is used is log shipping. All ...
1
vote
0answers
16 views

SQL Agent job history not found for few jobs

I have;backup ,rebuild Indexes , Update Stats and few other jobs like space alerts, replication jobs etc which run frequently on SQL Server 2102-SP2, Build Number:11.0.5058.0 and I do not see any ...
0
votes
1answer
22 views

Verify conditions before creating a constraint

I've taken over an application database that has been grown from an Access db. As such, the database is in need of some significant refactoring. The first step that I'm planning is adding a number of ...
3
votes
1answer
31 views

SQL Server - monitor changes on linked server

We have a local SQL Server database which we have full control over, and in this local server we are linking a remote SQL Server database, to which we have only read access (no schema changes, no ...
0
votes
2answers
44 views

Finding the longest entries for a given column (nvarchar(100))

I am trying to find the biggest / longest entries of a column which is of type nvarchar(100). I need to understand if I can maybe restrict that column to be only nvarchar(20) or something. Is there a ...
1
vote
1answer
24 views

Category entity relationship / subtype relationships design

I am looking to implement a generic comment and file attachment facility within a web application which would be used across various parts and allow users to provide comments and add attachments to ...
0
votes
0answers
32 views

Versioning database tables

I need to store all the changes made for almost every table in a meta-data database. I am thinking about storing every previous version in a JSON array or XML in the table. Like: CREATE TABLE ...
2
votes
2answers
38 views

How to identify database users and their owned schemas before dropping server logins?

While deleting logins, there might be a possibility that there are users in databases along with chances that they own schemas in those databases. Is there a way to find this out with a single ...
1
vote
1answer
15 views

FIPS 140-2 Compliance

Just wondering if anyone has configured FIPS? Based on the information I found in the Microsoft support pages, it would seem FIPS is configured at the Windows level only and that all instances on my ...
1
vote
2answers
58 views

SQL Server : Tracking a slow running query on completion

Am trying to work on script for slow-running queries. I understand that we can get the list of slow running queries using sys.dm_exec_requests. Say, I have a query Q1 which is running very slow, say, ...
0
votes
1answer
49 views

Breaking up long running query into batches runs fine for a while and then produces fatal error

I'm using a variation of this post which details using "careful batching" to delete records in batches from a table that contains 38MM records. The script below runs for a while and shows results ...
2
votes
1answer
22 views

Duration measure in fact table

I have a fact table with the user reservations with StartDate and EndDate. I am thinking what is the proper way of serving the duration queries in the reports. Should I calculate DurationDays and ...
2
votes
3answers
61 views

updating the entire column with datetime values based on other values in the row

I have a very large table [server].[dbo].[MyTable] where I need the SQL statement to fill the column 'ToDateTime' (currently full of NULLs) according to the following logic: Only add a value to ...
5
votes
2answers
120 views

SQL Server compatibility with New TLS Standards

The major browsers are moving beyond SSL3.0 and TLS1.0 . The PCI Security Council has declared an end-of-life date for these protocols to be considered sufficiently strong encryption. We need to ...
3
votes
1answer
24 views

Guidelines for full-text index maintenance

What guidelines should be considered for maintaining full-text indexes? Should I REBUILD or REORGANIZE the full-text catalog (see BOL)? What is a reasonable maintenance cadence? What heuristics ...
1
vote
1answer
39 views

Performance improvement on SQL query joining table on itself

I'm running this query on a table with approximately 20MM records in it. It's a very slow query, and I'm wondering if there's a better way to accomplish this that might run faster ? delete previous ...
3
votes
2answers
65 views

Does SQL Server prioritize select and update statements?

Assume that SQL Server received both select and update statements to the same table at the same time Do any of them get prioritized? I know that select statements are delayed until update completed. ...
1
vote
1answer
23 views

Do Triggers in the Active Secondary Database of an AlwaysOn Group Execute?

If I have triggers on tables in a database that is a member of an AlwaysOn group, will they fire on the secondary? If they do fire, and they do something different on the secondary will it matter as ...
0
votes
1answer
20 views

SQL Server 2012 - sp_executesql multiple parameter error

I am receiving an error when attempting to execute the following code that builds a dynamic string to be executed by sp_executesql. DECLARE @paramDefinition NVARCHAR(500); DECLARE @ID1 NVARCHAR(20); ...
1
vote
3answers
45 views

SSIS: How to check if a record DOESN'T exist in flat file but exists on the database

I am working on preparing an SSIS job where I am importing a .CVSV file to OLE DB destination (sql database). We are going to get these files on daily basis. The .CSV file contains records of doctors. ...
0
votes
1answer
41 views

How to configure SQL Server Port on multiple instances?

I have a server called SQLDWDEV01, with 2 instances: default and UAT. To the default instance that uses port 1433, everything works fine. However, the UAT instace, which I configured according to ...
0
votes
0answers
15 views

Converting Legacy SQL Server 2005 Stored Procedure to Transaction based for parallelism [closed]

My task is to convert a legacy stored procedure written in SQL Server 2005 so that it can be used in parallel (multiple executions from different users). As of now the stored procedure is designed ...
-3
votes
1answer
36 views

Microsoft Sql Server online [closed]

I am having a Sql Server Standard Version on my PC. I would like to make this Sql Server available over the internet with/without VPN. Please suggest me how is that possible. Thanks Kalyan
0
votes
0answers
14 views

Auto Increment Sequence Broken After Applying a Key [duplicate]

After SQL Server 2012 Enterprise edition's evaluation period expired, I applied another key using the edition upgrade wizard. After it was successfully done, all Auto-Increment columns started ...
3
votes
3answers
78 views

Restoring and upgrading multiple databases

I have a SQL Server 2005 instance on my PROD server. I have been given a task to migrate databases from that instance to a different box (SQL Server 2008 R2 on Windows 2008 R2). The current instance ...
-1
votes
0answers
15 views

Unable to connect to [PC-NAME]\Instance in SQL

I'm installing a new SQL instance together with an application I'm running on Windows Desktop. The name of the instance is "MyAppSQL". After some attempts, I managed to get it able to connect (using ...
2
votes
0answers
29 views

Can data streams from Informatica to SQL Server be multi-threaded?

Suppose we have a database server, with SQL Server on it. And we are moving data from another database server, through our Informatica server, and onto that SQL Server database server. And our SQL ...
6
votes
1answer
108 views

Several Questions about SGAM & GAM & IAM & PFS in SQL Server

Have several questions about internal structure of SQL Server. Lets assume that we have a table in a database. SGAM & GAM pages keep track of shared & uniform extents within a single ...
0
votes
0answers
10 views

Reset default value for many foreign keys in SQL Server

I need to reset the foreign keys default values to null for a big database by using some sql queries. My research in the stackoverflow website got me to drop the existing default values contraints and ...
6
votes
1answer
93 views

Log shipping large DBs - what about the log?

I'm currently setting up log shipping of a large DB (Approx 1.5TB) and am wondering what I can do about the log file. As it stands, I want to do the following steps: Change DB to FULL recovery ...
2
votes
1answer
27 views

TDE restored DB encryption state

I've been looking into using TDE in our SQL Server 2014 environment and have a few questions. I think I have a fairly solid grasp on the numerous "how-to's" that are out there on initially ...
0
votes
2answers
38 views

How to add deleted user in sql server? [duplicate]

I have set up sql server 2008 in windows server 2008 r2 and it works fine. However, I have deleted the my user from logins in the sql server accidentally and now I cannot find a way to log in to the ...