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)

1
vote
1answer
22 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
14 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
104 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
34 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
31 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
19 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
32 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
46 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
33 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
44 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
16 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
50 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
23 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
143 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
33 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
40 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
72 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
28 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
21 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
58 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
42 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
17 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
83 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
16 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
113 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
12 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
96 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
39 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 ...
0
votes
0answers
28 views

Looking for feedback on a design for a simple task manager

I've got tired of using notepad / excel to manage my tasks at work. Since tasks may sometimes contain sensitive data, my boss will not allow us to use an online task management system, so I've decided ...
0
votes
1answer
28 views

Can SQL Server 2014 schema be defined using ODBC?

I am trying to use the ODBC driver for SQL Server 2014 to export data from an Autodesk Revit 2015 model to a database. However, I would like to export to a default database (e.g. db1), creating a new ...
2
votes
0answers
16 views

Deny BACKUP CERTIFICATE

In SQL Server, there are three database roles that have CONTROL certificate permissions. Those are db_owner, db_DDLadmin and db_securityadmin. Also, the documentation for decryptbycert specifies ...
0
votes
1answer
36 views

Cache statistic data in SQL Server

Currently my team develop additional web app to let customers analyze user statistics to theirs portals. So we have a table with all logins. It contains about 100 millions of rows. One user could ...
0
votes
1answer
30 views

SQL Server 2008 Triggers and Merge Replication

I am trying to have a trigger fire when the Merge agent inserts or deletes data into / from a table. It is supposed to insert data into a report table for use with SSRS. I DO NOT have the "NOT FOR ...
-3
votes
0answers
22 views

what is other way of use Limit function in MSSQL server [migrated]

How to use LIMIT function in SQL Server. I need to create a pagination using SQL Server data and I need to fetch the data using $start and $pagesize. This is the query used: SELECT * FROM ...
-6
votes
2answers
55 views

bring the output into single column from a table as vertical order [closed]

Name Age Type City Tom 20 life null tim null motor UK john 55 null USA I need Output as Tom 20 life Tim motor UK John 55 USA
3
votes
1answer
121 views

How to get the daily amount of committed transactions on a given MSSQL database?

The number of transactions for the current connection can be obtained with @@TRANCOUNT. How can you get a daily counter of the globally committed transactions on a given database?
0
votes
0answers
27 views

What options exist for replicating SQL Server over the public internet

Specifically, I'd like to set up a reporting copy of a SQL Server 2012 transactional database. This primary runs in a managed services provider, and I want a copy in an AWS EC2 SQL Server instance. ...
1
vote
1answer
40 views

Cannot connect to SQL Server database regardless of connection string

I'm having a tough time to connect to a local SQL Server instance within a C# app. I can connect to external databases on other servers, but I need to be able to use my own local database. The ...
0
votes
2answers
26 views

Help writing query for MS SQL Server [closed]

I need to write a MS SQL Server query statement that will generate the result set table name SUMMARY from the DETAIL table Server name: Development Database name: Test DETAIL ...
0
votes
1answer
21 views

“Unresolved reference to User” after importing as a VS DB project

I just imported an existing SQL Server 2008r2 production database into a VS 2013 database project. I now get a number of errors along the lines of Error SQL71501: User: [mydbuser] has an ...