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)

0
votes
1answer
9 views

SQLDriverConnect fails when attempting to connect to Failover_Partner

SQLDriverConnect fails when attempting to connect to Failover_Partner. Connection string being used: Driver={SQL Native Client};Failover_Partner=tcp:dby;Server=tcp:dbx; ...
0
votes
1answer
26 views

Why do my backup policies fail when a database's guest user is disabled?

I'm attempting to implement Policy Based Management on a SQL Server 2012 instance also acting as a Central Management Server using the Enterprise Policy Management Framework. The job running the ...
0
votes
1answer
25 views

Convert multiple databases into schemas MSSQL

Due to a high amount of databases being created on my project and the rising cost per databases I had the following question: Is there a way to convert multiple databases in MSSQL into one database ...
3
votes
2answers
24 views

Avamar SQL Agent running against live SQL Server databases

We use a large company as our service provider. The tech people from that service company are pushing very hard to install something called the Avamar SQL Agent which purportedly will be used to ...
3
votes
1answer
50 views

How to benchmark Microsoft SQL Server

in my company we have multiple virtual machines hosting SQL Server 2008 R2 and some of these machines perform differently than others, some because of very busy Vmware hosts some because of slower ...
0
votes
1answer
32 views

deleting a table referenced by many foreign keys

I have a table that I want to drop and create again, because I want to add the IDENTITY property to a column, wich is not possible directly. The problem is that I can't drop it, because my column is ...
0
votes
1answer
43 views

Lost DMK encryption password for master database

Back story: My company has TDE encryption enabled for some of our databases. The password that the master key was encrypted by for one of our servers is lost. We do have the backup .key file, however, ...
0
votes
0answers
22 views

SQL Server Data access does not connect unless we provide the port number

I have configured SQL Server 2008 R2 named instance on Windows Server 2008 R2 to listen to only one IP,1433. Some Office 2010 clients are trying to connect using the external data to SQL Server using ...
2
votes
3answers
183 views

Using expressions in the SELECT list to thin down a CASE statement

I have a query I'm working through rewriting - it has a huge bunch of case statements in the select list that all basically look like this: select Column1 = case when (Something = 2) and ...
0
votes
0answers
46 views

Technical documentation for Replication [on hold]

My boss wants me to write a technical paper on replication, I don't know where to start or what to write about. We held a discussion and he talked about: Managed Code (we use VB.NET) Triggers ...
2
votes
1answer
26 views

Multiple Table Pivot

I have a few tables that need to be converted into a single new table. I'm positive (un)pivot is the solution to the problem. However, I'm uncertain what the best way is to unpivot data from ...
1
vote
0answers
51 views

Outer Apply vs Left Join Performance

I am Using SQL SERVER 2008 R2 I just came across APPLY in SQL and loved how it solves query problems for so many cases, Many of the tables I was using 2 left join to get the result, I was able to ...
2
votes
1answer
96 views

How to find number of days since beginning of fiscal month?

This relates to my question How to find XXth day of previous month in SQL server? The fiscal month starts on 26th of each month. I need to find out from any date: The date of the start of the ...
3
votes
1answer
148 views

Active/ Active SQL Server Clustering on AWS

I need to design and implement a highly available SQL Server 2012 clustering on Amazon AWS. In the white paper presented by Amazon, they provided an example of Active/ Passive SQL Cluster. Do you know ...
1
vote
1answer
166 views

Snapshotting Database Tables

I have a reporting database (in SQL Server) that takes nightly snapshots of the production data (Oracle) for users to query against for the next day, but now the requirement is getting to be that they ...
1
vote
0answers
50 views

Why does my query end up with two seeks instead of one and how do I fix that?

I have these two tables: CREATE TABLE [TaskItems] ( [ItemId] UNIQUEIDENTIFIER NOT NULL, [LastOperationTime] DATETIME NULL DEFAULT GETUTCDATE(), [OwnerId] ...
6
votes
2answers
10k views

What is the easiest way to move data from Oracle to SQL Server?

One of our products supports both Oracle and SQL Server as database backend. We have a customer who wishes to switch from an Oracle backend to Microsoft SQL Server, which isn't a typical transition ...
0
votes
0answers
21 views

Installer Error while Installing SQL Server Reporting Services

I have a Windows 2008 R2 Server 64bit, I have already installed SQL Server 2008 R2 SP2 64bit Enterprise Edition, Which is working fine, without any issues. Now when I am trying to install Reporting ...
-2
votes
0answers
14 views

creat an Avilabilit Group SQL Server 2014

when i am gonna creat an AG the following error shown the following folder locations do not exist on the server instance that hosts secondary replica ...
4
votes
4answers
10k views

T SQL Table Valued Function to Split a Column on commas

I wrote a Table Valued Function in Microsoft SQL Server 2008 to take a comma delimited column in a database to spit out separate rows for each value. Ex: "one,two,three,four" would return a new table ...
0
votes
0answers
7 views

Users Characteristics

I'm really battling an issue where I have a Users table that has a growing number of user characteristics (regligion, smoking preferences, etc). The strategy I've used thus far has been to add a ...
0
votes
1answer
98 views

Is it possible to speed up this PARTITION BY query?

I've got a timeserie table. Each datapoint has also a statut field which indicates its providing source. I'd like to request last available datapoint as of date T but there could be several results, ...
1
vote
1answer
21 views

Changing compatibility level of database causes performance improvement of stored procedure

We have a Web Application in a Windows Server 2012 Datacenter (IIS 8), running under .NET Framework 4.0, which connects to another Windows Server 2012 Datacenter with SQL Server 2012. My Database has ...
1
vote
2answers
83 views

Is there a more efficient way to run this query for first/max transaction?

For each account, I need the first transaction date, the largest transaction amount, and the time taken to get from first to largest. Data is truncated and reloaded frequently, and I have read-only ...
2
votes
1answer
71 views

Finding rows with duplicate values

I have a one to many relationship between the Account table and a ScheduledPayment table. One account can have many payments but there should be a maximum of one payment per day. Although unlikely, ...
4
votes
2answers
789 views

Optimistic concurrency check failure when updating linked server table with timestamp column

I’m trying to update a table in a database on a linked server using code like this: declare @FirstName nvarchar(30); declare @LastName nvarchar(50); declare @AccountNumber nvarchar(30); set ...
0
votes
1answer
39 views

PAL Report - 64-bit Windows Server 2008 R2, issues

I don't know anything about SQL Server, however I found the following issues while running the PAL report. It seems that RAM is the primary issue and it has to be increased. Kindly suggest. ...
0
votes
1answer
63 views

Copying a table in SQL Server database to Oracle database

I am new to database management. I need to copy a particular table "Attendance" in SQL Server database to Oracle database. There is no connection between the two databases. Also, "Attendance" is ...
1
vote
1answer
28 views

Break AG Cluster

I have a 2 node cluster setup and we use AlwaysOn HA with it. Currently we have two AG's and each one has three separate databases in each AG. We want to break the cluster and have three databases ...
0
votes
0answers
48 views

Will SQL Server 2014 not cause problems with a SQL Server 2008 DB?

I will be doing development work on a database created in SQL Server 2005 that will be moved to SQL Server 2008. I have no problems moving them; I've done it before and it's always been painless ...
1
vote
0answers
162 views

SQL Server table scan when query parameter doesn't exactly match column

I have a table with two columns, ID (bigint IDENTITY PRIMARY KEY) and TestId (nvarchar(50) NOT NULL). I've created an index on TestId. I insert a million rows as a test with random values for TestId. ...
2
votes
2answers
544 views

Loop through all databases and remove all users

We are doing a conversion from one system to another which is requiring backup/restores. I am trying to create a process that will remove all users after the restore on the new servers as no user ...
1
vote
0answers
42 views

500GB Data Warehouse - how to split it into FileGroups?

OK, so I have: 500 GB DW 5 GB in smaller DBs 220 GB TempDB 350 GB in Log files. My machine is Fujitsu Primergy 64 cores (with HT) and 192 GB RAM. I have several IO locations: 540 GB in-server ...
0
votes
1answer
24 views

Msg 823, Level 24, State 2 for Clustered Column Store Index in SQL Server 2014

CREATE CLUSTERED COLUMNSTORE INDEX CCI_TempTable1 ON dbo.TempTable1 ON[PRIMARY] After firing this query I found the error. Msg 823, Level 24, State 2, Line 20 The operating system returned error ...
-6
votes
0answers
35 views

Absent and Leave [duplicate]

The code you sent me which is show only absent not leave but I have to show those employee leave SELECT DISTINCT subDate.absent_date,SMEmployee.EmployeeID,SMEmployee.BadgeNumber, ...
2
votes
3answers
40 views

Collect results of many sql server jobs

I intend to create a simple job on a bunch (100+) sql servers (of differing flavors) that does a simple automated query periodically (like weekly). These jobs then need to push the result out to a ...
1
vote
0answers
47 views

how to resolve intermittent SQL backup issue?

We have this issue on aprox 100-300 SQL machines each month and it's never re-occuring. If you re-run the backup it will complete. The problem exists in both win2k8 and win2k12 machines. Backup ...
0
votes
1answer
34 views

Frustrating SQL Server and VS Express 2013 Issue

I recently reinstalled Windows and am trying to set up SQL Server again with an existing database. I've tried installing SQL Server 2012 and 2014, and continuously get the same error. The error says ...
2
votes
3answers
4k views

SQL Server 2008 Database Restore Error - Cannot open backup device 15105

I am trying to restore from a backup and getting the following error Msg 3201, Level 16, State 2, Line 1 Cannot open backup device 'Z:\FULL_BACKUP.bak'. Operating system error 3(failed to ...
0
votes
1answer
68 views

converting then outputting varbinary(max) FOR XML PATH

I have a vendor application that has stored some of its text data in a varbinary(max) column. I am exporting this data (from several tables with different data types), ideally using FOR XML PATH. What ...
0
votes
4answers
5k views

Backup and restore database - occured system error 5

In my work I made backup of database and I receive file .bak. Now I would like restore this database in my machine. But I get the following error: Cannot open backup device 'C:\Program ...
1
vote
2answers
152 views

Improving a search query

I have a query for search function. Basically search function allowed user to define what they "have" and "want". Then this query will filter out all the possible result which created by other user. ...
1
vote
1answer
53 views

Migrate Management Data Warehouse to a New Instance

Is there a defined procedure to follow for moving a SQL Server 2012 management data warehouse to a new server\instance? We intend to setup an MDW on a test sql server instance first, but will then ...
0
votes
2answers
25 views

Adding DATETIME() and Status column with xp_FileExist result

I'm trying to add a two columns in addition to the results of xp_FileExist. Here's my T-SQL: DECLARE @path varchar (100) DECLARE @file varchar (100) SET @file = '<location>\*.txt' SET @path = ...
3
votes
1answer
82 views

SQL server job has not run and also no entry logged in its history

I have scheduled a SQL job to run daily at 3am in the morning which creates a batch. It has not run today and i am also not able to fathom what's the reason behind its failure. There is no entry in ...
0
votes
1answer
91 views

Is this a good case for multiple SQL instances on a VM?

We have a suite of applications utilizing SQL Server have the following characteristics: Users create/destroy DBs via a UI, so DBs appear/disappear without DBA assistance. DBs of the same name can ...
3
votes
1answer
65 views

Single year column and multiple weeks columns into single year/week column with PIVOT

I have a table that looks roughly like this. (Pk int, Year int, Week1, Week2, .., Week53) The values in each "Week" column are sales data. What I want to do is create a new table from the first ...
0
votes
1answer
43 views

How to identify unused tables

We are planning to merge 2 or 3 region databases who are using almost the same version of SQL Server 2008 R2, have exact tables and most stored procedures for our end users reports.. in the process, ...
0
votes
1answer
45 views

Number of TempDB files if we can't use parallelism

Currently we have 4 cores and 4 tempdb files. I just came on as the DBA about 2 months ago and, for some reason, 3 of the tempDB files are 2GB and 1 is 1GB. Obviously, that is not best practice. ...
2
votes
1answer
410 views

Inline edit SQL Server database rows from Visual Studio

I'm pretty sure Microsoft have pulled one of the most useful features for performing quick edits on a SQL Server Database within the Visual Studio IDE. It seems to have only affected SQL 2012 ...