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
6 views

Stats Maintenance after Restoring to Newer SQL Server

What's the ideal (or necessary) sequence of call when restoring a SQL Server 2012 backup onto a SQL Server 2014 instance and updating the compatibility level? -- Update Statistics for all tables EXEC ...
1
vote
0answers
17 views

Why is DistinctSort followed by TopNSort in my query plan?

I have the following definition: CREATE TABLE [dbo].[JobItems] ( [ItemId] UNIQUEIDENTIFIER NOT NULL, [ItemState] INT NOT NULL, [ItemCreationTime] DATETIME ...
1
vote
1answer
4 views

Replication with fail over cluster in SQL Server 2014

Presently I am Using Replication Feature in SQL Server 2012 .I want to migrate to SQL server 2014 .I want to use fail over cluster feature .Does it effect the replication feature which we are using ...
0
votes
2answers
42 views

Select statements during long update

I've a table MESSAGES id (long) | attach_data (image) | ins_date | flag this table contains all messages of my application. During night, my job cleans old attach_data with query update messages ...
-2
votes
1answer
30 views

Performance Testing for Database [on hold]

Is it possible to make a automatical performance testing in SQL server in the production phase? When data in the database increase you need to gain feedback in proactive approach. I would like it do ...
0
votes
0answers
17 views

Why does my SQL Server HAG fail from PRIMARY to RESOLVING and back again?

I recently noticed our SQL Server High Availability Groups failed from the PRIMARY to the RESOLVING state, and then from RESOLVING to the PRIMARY state, without failing to the SECONDARY state. Does ...
2
votes
1answer
87 views

Database Backup - In Process - Power Outage

I am using SQL Server 2008 R2. What happens if a database backup (Full/Differential/Transaction Log) is in process and there is a sudden power outage or the system crashes? Does that corrupt the ...
0
votes
0answers
21 views

Query Designer - Cannot connect to Server

I am following a tutorial to be able to use SQL Server Data Tools (SSDT) for reporting. However, I am having issues connecting to a particular database when I try to add a new DataSet and try to ...
-1
votes
0answers
9 views

Error encountered during replication [on hold]

During replication i deleted the physical files of database which was in recovery state now it is in recoverypending state so how i can delete it
2
votes
1answer
46 views

Migrate existing SQL Server database file to smaller files

I have a database that is about 1TB in size. It's currently on a 2TB hard drive and I would like to replace it with a few 512GB SSD. I need to split the existing database file (.mdf) into multiple ...
3
votes
2answers
59 views

Use a view to join tables or a stored procedure for a better execution plan?

First let me state I am a C# developer, not a SQL Server DBA, so please excuse my ignorance on SQL Server database query execution plans. What I want to know is for a stored procedure which the ...
1
vote
3answers
28 views

Selecting the average of the top percent of duration, grouped by minute

I am attempting to find the average of (the top 5% of duration/ per minute). I wrote this query: select AVG(Q.duration) Avg5Perc, Q.time FROM ( select top 5 PERCENT duration, time from ...
0
votes
0answers
16 views

There is no option of audit in security for SQL Server 2014 .How to enable audit option for same?

Please see the below image there is no option about audit in database
1
vote
0answers
20 views

SQL Server Performance in VMWare when creating different drives from a single Datastore [on hold]

On VMWare if you are going to create a new SQL Server instance with 4 processors / 32GB ram as an example GuestOS and I have access to storage that is just one a big giant 800GB "Datastore" (made up ...
2
votes
0answers
20 views

SSIS Update (Replace) record instead of append based on Primary Key

I created an SSIS Pacakge that imports a monthly extract claims file. I have a simple Data Flow task, flat file to OLEDB Destination with a Derived column component in between used to generate a ...
1
vote
0answers
17 views

SSIS Error - Login Failed for user 'sa' [on hold]

I am running an SSIS package. However, I get the below error... The ExistsOnSQLServer method has encountered OLE DB error code 0x80040E4D (Login failed for user 'sa'.). The SQL statement issued ...
0
votes
0answers
34 views

Stored Procedure to create 1 row in parent table and multiple rows in child table [on hold]

I'm trying to create a stored procedure that creates a parent record and then multiple child records. I've kept the columns basic for this. Table 1 has columns: tbl1.EmployeeID tbl1.contractID ...
4
votes
1answer
76 views

When to use sort_in_tempdb when rebuilding indexes?

We are debating whether to use the SORT_IN_TEMPDB option for our DW tables. My understanding is that there are more writes when using this option, although they are more sequential. We have a SAN ...
-1
votes
1answer
28 views

Using datediff() in SQL Server 2008 to get the difference [on hold]

I'm having some trouble in updating my table. I would like to update the records that is passed in the current date. I am trying to update the records of the reservations(check-out) that is finished. ...
0
votes
0answers
22 views

Creating a trigger to update field in 1 table based on values in another table using data in multiple rows

I'm new at SQL and need to create 2 triggers between 2 tables. Table 1 has the following columns: tbl1.ContractID char(6) tbl1.ContractFulfilled char(1) Table 2 has the following columns: ...
2
votes
0answers
25 views

SQL Server replication - error when creating a subscription - The article '(null)' does not exist

When trying to add a subscription to an existing publication use [Product] exec sp_addsubscription @publication = N'Product', @subscriber = N'REPLON1', @destination_db = ...
1
vote
2answers
50 views

Create rows when selected rows exist

I haven't spent much time with SQL Server, and I can't seem to figure something out. I have 3 tables; user, usergroup, group. usergroup is a table that contains both a group id and a user id, where ...
0
votes
1answer
24 views

SQL server data copy bug? [on hold]

I have one query who shows some data, and those data I'm manually copying to Table1. The query shows the numeric type and it is in this form Query +---------------+ | status ...
0
votes
0answers
22 views

Synchronise Oracle Tables to SQL Server

Our ERP is using an Oracle database while our BI system is based on SQL Server. We need to get the changed data in Oracle and copy it in our staging area. At the moment we get the changed rows by ...
0
votes
1answer
21 views

sql server replication - how to find and drop subscriptions?

I had 2 subscriptions to a publication, but they were from the same subscriber server and writing to the same subscriber database, just one was bad and one was running fine. I could not find a ...
0
votes
1answer
29 views

How can I inform myself that an automatic SQL Server process has worked?

I have a Windows batch file which extracts some data from a remote system and then imports it into an instance of MS SQL Server 2014. The batch file runs SQLCMD and uses SQL files to bulk insert from ...
2
votes
3answers
60 views

Show all stored procedure definitions (content) for editing

Apologies if this has been asked before, the suggested 'related' questions weren't relevant and my own search turned up very little. I need to list the definitions (code) of all my stored procedures, ...
-4
votes
2answers
27 views

Uses of Database Mail [on hold]

What can I use Database Mail for in SQL Server 2012? I have configured Database Mail but would also like to know where I can use it.
1
vote
1answer
20 views

Does our application work with sql-server AlwaysOn?

This is the question a client of ours is asking. For now I have given a generic response that we will support this however they should provide us with a test environment. Our application is using ...
2
votes
0answers
30 views

Moving from MS Access to SQL Server 2012, need help with column history

I'm moving an access database from all the data being in MS Access to MS Access being just a frontend, but I'm having trouble figuring out how to do a sort of column history. I have a ...
1
vote
1answer
22 views

When does SSIS SQL Server Configuration write to the configuration table?

I am using SQL Server configuration in an SSIS pacakge. Other than when you create/edit the SQL Server configuration entry in the SSIS Package Configurations, are there other times that SSIS writes to ...
4
votes
1answer
62 views

Stored procedure with recompile

I have this stored procedure..when i told the developers that it is not recommended to use with Recompile option they replied "This was because this SP can be called with a number of different params ...
0
votes
0answers
14 views

Migrating from SQL Server 2005 (Win 2003R2) to SQL Server 2008R2 (Win 2008R2) new Server [duplicate]

I am pretty new to the DBA field and i have been assigned to migrate all of my Production database from SQL server 2005( server A) to 2008R2 (Server B) and Decommission all of those database from 2005 ...
4
votes
2answers
412 views

Is an SQL Server trace 'considered harmful' in production?

Context: Careful DBAs We've been bought out a few times and our latest overlords have DBAs who keep carefully guard their production database servers. Overall this is good. However, we have run ...
1
vote
1answer
19 views

sql server replication - how to get combination of values from a binary(8) field?

I am using the table sysschemaarticles to collect information in my transactional replication. It is used for a variety of things including adding new articles and finding out who are the subscriber ...
0
votes
0answers
21 views

Domain Alias for Azure Databases

I have 3 databases on Azure's cloud, all with domains names such as xxxxxxxx.database.windows.net. Would it be a bad idea to create domain name aliases for all 3, things such as: database.domain.com ...
2
votes
1answer
105 views

I/O is frozen on Database & also I/O was resumed on Database on daily basis in log with complete Backup

I would like to say that as on daily basis i got the message in my log file. First The I/O is frozen on Database (DatabaseName) message appears in log. The message is like I/O is frozen on ...
2
votes
1answer
37 views

Introduce or not introduce SSIS to an ETL project [on hold]

Given is an ETL process that works fine using traditional SQL. The process is well optimized making use of ALTER TABLE permissions and performing partition switching, index creation, partition ...
2
votes
1answer
81 views

How to capture PRINT statements from TSQL called by CLR stored procedure

I have a CLR stored procedure that (among other things) calls a TSQL stored procedure. The TSQL stored procedure runs some dynamic SQL, and it prints the SQL before it runs for debugging purposes. ...
2
votes
1answer
48 views

Ways to Reduce Database Size and possibly improve performace. Untouched enviroment.

I am new to an environment. The Databases are virtually untouched by a seasoned DBA. I am looking for ways to reduce DB size and possibly improve performance. Unfortunately, I only have WEb edition ...
2
votes
2answers
31 views

Add MS SQL Server to virtual machine in Azure

I'm trying to get TDE in Azure. I read that it's possible only on a virtual machine. I built the virtual box, but didn't add SQL Server when it was created. Can I just install SQL or will I have to ...
0
votes
0answers
53 views

SQL server only using 4 GB ram [on hold]

I have a Windows Server 2008 R2 server running SQL Server 2012 Standard Edition. It won't use more than 4 GB of RAM. I checked max server memory variable and it's a 7 digits long standard number ...
1
vote
0answers
9 views

Connection Reset by Peer Socket Write Error - How to solve in SQL Server?

We have a vendor working on Java (JDBC) application saying they are getting the error "Connection Reset by Peer: Socket Write Error". They are insisting that the SQL Server (SQL Server 2012) is ...
1
vote
0answers
15 views

FILESTREAM access stuck in broken state

Following a reboot, two of our databases were marked as “Recovery Pending” and could not be accessed. These databases are both using FILESTREAM. In trying to fix them, we attempted the following: ...
1
vote
0answers
23 views

Cluster Quorum Voting [on hold]

I have a cluster of 4 SQL Servers setup. 2 of the servers are in RackSpace in Chicago. 1 is in Rackspace, in Reston, VA, and one is in our office in Greenville, SC. I want to change the cluster ...
-4
votes
0answers
23 views

what is update cascading exactly in sql? [on hold]

We have three table declarations for P1(A), Q1(B) and R1(C) with referential integrity in SQL. create table P1 (A primary key); create table Q1 (B primary key references P1(A) on update ...
1
vote
1answer
23 views

SQL Server restore database file access error

I am trying to restore a database from a file on a remote machine. The script I am using is as follows: RESTORE FILELISTONLY FROM disk = '\\server\path\to\file.dmp' RESTORE DATABASE MyDB FROM ...
1
vote
0answers
36 views

Oracle migration to SQL Server

I am working in a Oracle 11g database migration to SQL Server 2012, I did the migration using SSMA v5.3 and all works fine. However, I did re-write code in some objects like triggers and stored ...
-2
votes
1answer
31 views

Stopping the SQL Server service instead of detaching database

I want to copy the transaction and log files for my SQL Server database and attach it to another SQL server on another machine.. I was wondering instead of detaching the database, can I just stop the ...
-1
votes
0answers
33 views

Select query for finding jobs started at same time

I have a 'Job_Status' table with 3 columns: Job_ID (numeric) Job_Time (datetime) Machine_ID (numeric) At a regular interval (1 min), entries are inserted in the above table for the Jobs running on ...