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
17 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 ...
0
votes
3answers
18 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
3 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
14 views

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

On VMWare if you are going to create a new SQL 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 of ...
2
votes
0answers
14 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
12 views

SSIS Error - Login Failed for user 'sa'

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

Stored Procedure to create 1 row in parent table and multiple rows in child table

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
60 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 ...
0
votes
1answer
16 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
17 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
21 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 = N'Product', ...
1
vote
2answers
45 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
23 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
19 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
19 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
28 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
54 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
24 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
16 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
27 views

Moving from access to SQL2012, need help with column history

I'm moving an access database from all the data being in access to access being just a frontend, but I'm having trouble figuring out how to do a sort of column history. I have a tasks.description ...
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
59 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
13 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
408 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
18 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
20 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
101 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
36 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
74 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
47 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
30 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
50 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
13 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
22 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
19 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
35 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
32 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 ...
2
votes
1answer
74 views

Password generator function

What's the best way of creating a password generator user defined function function in SQL Server if it is not possible to use non deterministic funtions within functions? I would like to create a ...
2
votes
2answers
103 views

Fire and Forget SQL Triggers?

I have a 3rd party app that uses SQL Server as a back end. Specifically we have it on SQL2000, SQL2008 and SQL2008R2. Any solution must be available to all, but solutions for only some would still be ...
1
vote
1answer
23 views

SQL Server 2014 AG Listener

I have built a two node SQL Server 2014 Always On cluster on the same subnet. I need to create two availability groups/listeners in the same instance for two sets of databases. Do I need two separate ...
7
votes
1answer
82 views

SET STATISTICS IO- worktable/workfile

I am executiong query, that produces plan: Statistics IO: Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob ...
0
votes
0answers
21 views

Getting issue while creating SQL Server Agent job [on hold]

Getting error while copying SQL Server Agent job from SQL Server 2012 to SQL Server 2014. I restored databases in SQL Server 2014. But still facing below error. Msg 14234, Level 16, State 1, ...
8
votes
2answers
310 views

Why is table variable forcing an index scan while temp table uses seek and bookmark lookup?

I am trying to understand why using a table variable is preventing the optimizer from using an index seek and then bookmark lookup versus an index scan. Populating the table: CREATE TABLE dbo.Test ...
1
vote
0answers
32 views

Row locks on selects

select t.*, row_number() over ( partition by t.Entity_Identifier order by t.Message_Sequence ) as seqnum from Process_Activity t (ROWLOCK) where t.Process_Id = Is it possible for ...
2
votes
1answer
127 views

Dropped Index during Database Engine Tuning Advisor

I was analyzing a query using "Database Engine Tuning Advisor". During this time the database started to get blocking, long running queries and ended by restarted the instance. When I checked after ...
1
vote
0answers
33 views

Will longer DB transactions make calls to other DB wait?

I have a fundamental question but unable to find precise information online. I opened up a DB transaction (SQL Server) and making multiple inserts, updates, delete etc; the entire process takes about ...
0
votes
0answers
15 views

Can we swap out SQL Server with HBase on our .Net application?

In a current application we use SQL Server. The data flow consists of using TVPs for better-than-bulk-insert performance by passing in DataTables. As part of the data addition process, old records ...