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
20 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. ...
1
vote
1answer
21 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 ...
1
vote
2answers
10 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
25 views

SQL server only using 4 GB ram

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
8 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
20 views

Cluster Quorum Voting

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 ...
-3
votes
0answers
16 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
10 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
27 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 ...
-1
votes
0answers
23 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 ...
0
votes
0answers
22 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
32 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
91 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
0answers
15 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 ...
4
votes
0answers
38 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
18 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, ...
7
votes
2answers
284 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
30 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
125 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
31 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 ...
2
votes
1answer
51 views

SQL Server : create dynamically queries to select all related data in DB based on entry table and ID

I'm tasked to create a SQL statement which will create (and run?) multiple other queries which will select all related data outgoing from an given ID (uniqueidentifier) and a given table name. It ...
1
vote
3answers
84 views

Finding all date ranges that overlap a target date range

Say I wish to store when staff are on holiday (FromDate, ToDate) and then I wish to find all staff that are on holiday between two given dates (QFromDate, QToDate). Now assume that I have many such ...
7
votes
1answer
660 views

Why is it bad practice to install SQL Server to the root of a drive

When I install SQL Server into the root of my drive, for example D:\, I get an error when I run a database deployer from a third party piece of software. But when I move my SQL Server instance to ...
1
vote
1answer
30 views

Manual sql failover machine with replication

I hope this is the correct place to ask this question. We recently experienced one of our virtual machines being offline for 3 days due to issues in the data center hosting it. This quickly brought us ...
0
votes
1answer
29 views

Issue in installing SSIS MS-SQL2012

While installing the MS SQL Server 2012 Enterprise Edition, everything goes through fine but I'm not able to install Integration Services alone. I get the error as following: The following error ...
1
vote
0answers
27 views

Why does my query search datetime not match?

select * from A where posted_date >= '2015-07-27 00:00:00.000' and posted_date <= '2015-07-27 23:59:59.999' But the result contains a record that has posted_date today: 2015-07-28. My ...
1
vote
0answers
14 views

Column Store Indices versus Dimensional Tables

I have a Data Warehouse and want to think ahead one year when I may get a database update allowing me to use column store indices. My dimensional tables are mostly junk dimensions containing columns ...
5
votes
2answers
87 views

sql server max memory includes SSIS?

I have installed 2 instances of sql server plus SSIS on the following server. Note the amount of RAM is nearly 384 GB And this is the max and min memory settings that I have applied to my 2 ...
2
votes
2answers
26 views

MS SQL Server ensure only one of the several records for a given item has a column with true value

I have a table like this Computer(id, NIC_name, is_primary). My primary key is (id, NIC_name) and is_primary is a bit field for a boolean value. I would like to ensure that for all computers with same ...
3
votes
1answer
31 views

Bidirectional Replication Push and Pull with SQL Server

Please bear with me, I'm a developer working with a client without access to a strong DBA. I have a question about bi-directional replication with the following setup and requirements: MSSQL Server ...
2
votes
2answers
90 views

Potential issues migrating from SQL Server 2014 to 2012 by scripting tables and data?

I have a very simple question. What would be the typical "gotchas" involved with scripting all the data to migrate a 2014 SQL server database to 2012? Is this a pretty solid process? Are there ...
2
votes
1answer
20 views

Hosting SQL Server and SSIS/SSRS in same VM

I have SSIS / SSRS and large number of databases currently being hosted on the same prod server (SQL1, SQL Server 2008R2). Since SQL1 already has SSRS/SSIS installed, would it be a good option to ...
0
votes
1answer
21 views

Data migration from SQL Server to MongoDb [on hold]

I need to migrate some data from Sql server to MongoDb collections. Data structure could be not equivalent. I need to set custom mapping rules. Can you advice me a tool that is able to perform that ...
0
votes
2answers
31 views

Statistics that are neither auto_created nor user_created

So far, I was under the impression that there are two types of statistics objects in SQL Server: automatically-created statistics, which are created by SQL Server on index columns or single columns ...
0
votes
2answers
15 views

Cannot open backup device Error

I have a SQL Server Agent job that backs up a database on a remote server to a network drive. Linked Server, I believe is set up correctly but I get the following error: Msg 3013, Sev 16, State 1, ...
1
vote
3answers
84 views

SQL Server Max memory limit

I have my SQL Server 2008 R2 installed running on 32GB ram. I need to decrease the limit SQL Server uses to 28 GB and I have set the same to 28GB but it is still taking more. I have seen posts saying ...
2
votes
1answer
20 views

How to copy non clustered indexes in transactional replication

I create transactional replication ,but forget to include non clustered indexes and now my subscriber have only clustered indexes (primary key) and I want to transfer all nonclustered indexes to ...
1
vote
1answer
37 views

How to restrict access to SQL Server user in some period of time

I have two SQL Server users 'A' and 'B'. I use user 'A' for ETL and 'B' for reporting. My requirements is to restrict user 'B' access while user 'A' performing ETL (Extraction, Transforming and ...
1
vote
0answers
30 views

SQL Server Mirroring Removed

Does anyone know how to tell when SQL Server mirroring was removed from a database? My log file is flooded with login failures but I can't find mention of removing of a mirror. Is there any DMV way ...
0
votes
0answers
23 views

SQL Server Setup The network path was not found (uninstall node)

We have a cluster with 8 nodes. this instance is installed on 2 nodes S141 (active) and S142 (passive) I want to uninstall with the command: Setup.exe /Action=RemoveNode /qs /INSTANCENAME="SQL16" ...
-1
votes
1answer
39 views

How to do superscript in SQL Server 2012 query? [on hold]

I am trying to change superscript in SQL query string. Example: Select 'Your submitting date is 2nd January 2016'; As above query, I want to change nd to superscript.
1
vote
2answers
35 views

Drop and Create Script not working

I'm fairly new to databases, but I'm beating my against the wall trying to do something that (I believe) should be fairly trivial. I'm using SQL Server Management Studio 2012 and am trying to delete ...
0
votes
1answer
56 views

Multi-threaded inserts vs serial

I have a large database application on SQL Server 2012 Standard Edition which receives data from hardware in chunks of 500-1000 (100 byte) rows every few seconds through a stored procedure. Would a ...
0
votes
3answers
75 views

SSIS - Best way to insert large number of rows

So here's the scenario: I have an XML file, which is in size of 500GB, and with data of around 600 million rows (once on a database table). I'm using SSIS for the operation, and since it consumes a ...
3
votes
1answer
119 views

How to get exact year difference between two dates in SQL Server?

I have a date of birth column to which I need to compare the current date and return the difference as age. Currently I am using the following query : DECLARE @DateOfBirth date = '2000-07-27' DECLARE ...
2
votes
2answers
40 views

Database design appoach confirmation

I am working for a mortgage company in migrating a legacy application to new application for managing claims, means lender fore close a loan and request for a claim to get its funds from government or ...
0
votes
0answers
28 views

Maximum character length for a column if I concatenate all the columns together in SQL Server for SSIS packets [on hold]

I have a project requirement which extracts data on a daily basis and sent to another data warehouse. Each query has different set of data and number of columns returning are different and also the ...
1
vote
0answers
15 views

BULK INSERT clent and session requirements

I'm setting up an ETL process using SQL Server 2014 and SSIS. My Bulk Insert Task is utilizing a source file and format file on ShareA targeting a DB on InstanceA. The package is run via SSA job on ...