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
0answers
14 views

Modeling global and private parameters

I'm trying to model a database that will be used for management and execution of SSIS packages. The entities are Client, Job and Package. A Job is the managed unit that references Client and Package. ...
0
votes
2answers
30 views

Log File Size near 100% - How to find Active Transaction [duplicate]

The transaction log file size is nearing 100% on one database. I run the below and both return 0 so no active transaction running. The last query tells me that the database is in SIMPLE mode, but ...
0
votes
0answers
18 views

Storing Configuration for bespoke maintenance plans

I got fed up with creating maintenance plans on several SQL servers. So I've devised a script that generate a series of SQL Agent Jobs (with notifications) that utilises Ola Hallengren's SQL Server ...
0
votes
1answer
33 views

Simplest way to edit single entry in XML column?

As I understand MS SQL Server Management Studio doesn't allow directly editing/replacing entries in XML columns via GUI (copy/paste doesn't work etc.). What is the easiest option to replace a single ...
1
vote
3answers
38 views

Removing chat history for a particular user from database

I'm currently developing a web chat application using SignleR and SQL server this is my database schema so far I've added an option where the user can Clear Chat history for a particular ...
1
vote
1answer
29 views

PostGIS vs. SQL Server for GIS data

So I'm recently starting at a new company and have a lot of ArcGIS users who seem really keen on going forwards with a PostGIS instance to serve some data to our customers. While I don't have an issue ...
1
vote
1answer
37 views

Query hint? for deduplicated CTE in Merge

Referring to this link: Optimizing MERGE Statement Performance The following criteria are given for ideal performance: Create an index on the join columns in the source table that is unique and ...
0
votes
0answers
30 views

How I can monitor SQL Server 2012 databases to determine the security privileges that are called by different processes

Is there any tool that can identify the SQL privileges or roles that are being called on query by query basis. We need to know which ones are being used at each time on a Microsoft SQL Server 2012.
-1
votes
1answer
23 views

aggregate type problem

i have that procedure : Create PROCEDURE [dbo].[spMerrShenimetBazePerPagese] @PunetoriId int AS Select p.PunetoriId, p.Emri, p.Mbiemri,p.Vendlindja,pg.Muaji, Sum(p.Paga) as Paga, Sum(pg.Bonusi) ...
1
vote
1answer
25 views

SQL Server Builtin Logins Migration

I am in the process of scripting existing SQL Server 2008R2 logins for migration to a new server instance. I see that the existing logins contain the below... Windows Groups: ...
0
votes
2answers
35 views

Reducing database size to restore to SQL Server Express

I have a SQL Server 2008 R2 database, about 15 GB. I want to copy it for a partner, who is using SQL Server 2008 R2 Express. I deleted many tables and rows, and now I am sure that the data is ...
0
votes
2answers
21 views

Connection problems with ManagePartition executable

I'm currently running MS SQL-Server 2014 and we have some tables that have been partitioned and I'm trying to use the ManagePartition application here(http://sqlpartitionmgmt.codeplex.com/) I've ...
0
votes
0answers
38 views

table check constraint, greater than > not accepting

CONSTRAINT CK_BABY_YOUTH_CHILD CHECK (case when Passenger_Type='Baby' then Reference_ID >=0) This is my table check constraint, i have no idea why sql server is not accepting ">". Please ...
0
votes
2answers
61 views

What do cursors do internally?

I was optimizing a stored procedure written in cursors (DECLARE cur_name CURSOR... The client saw this SP ran for more than a day so, my manager assigned this to me. Upon searching, I used table ...
0
votes
2answers
53 views

Dynamic Table partitioning on a daily basis

I have a SQL Server database which contains two tables -- Acks and Logs. These two tables are related in logic but not in a relational database way. Basically, every message that comes in gets saved ...
0
votes
0answers
28 views

sql server 2012 execute as query [on hold]

Please look at this question and i have two options You administer a Microsoft SQL Server 2012 database named ContosoDb. The database contains a table named Suppliers and a column named IsActive in ...
0
votes
1answer
19 views

In what way are Access tables linked with SQL server?

I have a mdb file with lots of OBDC linked tables that are linked to the tables in SQL server elsewhere. I can not see any information on how they are "linked". It is a little scary not knowing ...
1
vote
1answer
47 views

Can I use attribute name to identify XML element?

Rather than using the element index COLUMN[1]/@value below, is it possible to retrieve the column value by specifying an attribute name such as: COLUMN[@name=”Prod_ID”]/@value? When I tried, I got ...
1
vote
2answers
163 views

How to get Identity Column to jump ahead (by say 1000) on SQL Server 2012

I am using SQL Server 2012 and I would like to keep my pre-existing data but to cause the ID (identity) column to skip by 2000 rows. Why is this happening? I have a scenario where I may have ...
0
votes
0answers
63 views

Memory Issue - SQL Server 2008r2

I am trying to troubleshoot a memory issue on a 2008r2 instance. Very high resource semaphore waits are present and a general slowdown of queries,backups,dbcc checks. Only one instance of SQL Server ...
1
vote
1answer
17 views

How To Merge Database Projects on Visual Studio 2013

Can I have multiple database projects to the same SQL Server database? Like, one main project referencing multiple subprojects. I have an application which multiple modules and each modules has it's ...
1
vote
1answer
33 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; ...
1
vote
1answer
17 views

No results from traceid from sys.fn_trace_getinfo(0);

SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The above command returns no results. There should be a bunch of trace event id being traced.
5
votes
3answers
80 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 ...
0
votes
0answers
35 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 ...
0
votes
1answer
43 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 ...
2
votes
1answer
31 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 ...
2
votes
1answer
100 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 ...
0
votes
0answers
53 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
3answers
207 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 ...
3
votes
1answer
94 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 UNIQUE PRIMARY KEY, [LastOperationTime] DATETIME NULL DEFAULT GETUTCDATE(), [OwnerId] ...
1
vote
0answers
54 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
0answers
18 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 ...
0
votes
1answer
36 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 ...
0
votes
2answers
26 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 ...
1
vote
2answers
34 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 ...
0
votes
0answers
26 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 ...
0
votes
1answer
41 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
38 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 ...
1
vote
1answer
31 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
51 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 ...
0
votes
1answer
48 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, ...
1
vote
0answers
44 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 ...
3
votes
2answers
66 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
25 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 ...
1
vote
0answers
50 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 ...
0
votes
2answers
26 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 = ...
0
votes
0answers
174 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. ...
0
votes
1answer
45 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, ...