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
2answers
21 views

Possible to upgrate SQL Server 2012 express to 2012 Standard?

I need to do an in place upgrade of SQL server 2012 express to standard without losing any data. Is this possible? Is it as simple as just running the setup for the standard version? TIA
3
votes
1answer
355 views

Benefits of SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

I use SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED in the majority of my general SQL queries, mainly because this was drilled in to me when originally learning the language. From my ...
2
votes
1answer
65 views

Multiple indices on a table

I have run SQL Profiler and I can see that I'm "missing" some indexes (non-clustered) on a table. How is it best to handle indexes that can be a "subset" of another index? Index 1 UserId, ...
1
vote
2answers
67 views

How to break down RELATIONAL data into HIERARCHY data structure?

I have a query that returns the following dataset: RELATIONid MAPid D1id D2id D3id 4999 4999 626 1250 7 5000 5000 626 1250 8 For the next step, I need to bind those ...
2
votes
2answers
25 views

Indexing order by columns

Based on the query below it was suggested that I create an index on the column in the order by clause. My understanding is the sorting is done on the result set and not the table. The person ...
3
votes
0answers
43 views

Need a way to prevent log shipping from kicking users out

We have SQL Server 2012. A service we use requires us to use log shipping, however we are tired of having users being kicked offline every 15 minutes. Are there any creative ways to get around this ...
5
votes
1answer
60 views

Can CLR execution continue after 'THROW' is encountered in T-SQL?

I am calling a T-SQL stored procedure from a CLR stored procedure. and the THROW statement in T-SQL stops the execution of CLR without going into the catch block. Is there something I can change in my ...
1
vote
2answers
20 views

SQL Server - Copy data from restored version to live database table

I am using SQL Server 2014. I have a database called LabDB. I have a issue where some data was deleted in the database. What I like to do is to restore the backed up version of the database in ...
2
votes
2answers
34 views

Weblogic Error: Connection test failed [closed]

I am trying to create a SQL Server 2014 data source in weblogic through admin console. When I click on test configuration, I get the following error: Message icon - Error Connection test failed. ...
0
votes
1answer
60 views

execution plan question

I have this query running for long time (@P0 nvarchar(4000)) select emaildmo0_.Id as Id7_ ,emaildmo0_.CreatedDate as CreatedD2_7_ ,emaildmo0_.EmailAddress as EmailAdd3_7_ ...
0
votes
1answer
34 views

Multiple Cascade Paths (Not really) - Sql Server

In my database I have a table with 2 columns referencing the same column in a separate table. I know this creates a race condition, but I have a check in place to make sure they don't point to the ...
3
votes
1answer
38 views

Execution plan for COMPUTE BY

I understand that the COMPUTE BY feature is deprecated. Out of curiosity I would like to know how the query processor executes a COMPUTE BY query. The execution plan does not contain any hint: How ...
2
votes
1answer
78 views

Update one column based on count of records of grouped value in another column

Given a table CREATE TABLE TABLE_ITEMS ( serial_num int null, item_group int null ); INSERT INTO TABLE_ITEMS VALUES (0,1), (1,1), (2,1), (3,1), (4,1), (0,2), (1,2), (2,2), (3,2), (4,2), ...
0
votes
0answers
67 views

view server state permission was denied

The strangest thing is happening on my SQL Server Management Studio. When I right-click any table, I get a "VIEW SERVER STATE permission was denied on object 'server', database 'master'. (.Net ...
2
votes
1answer
30 views

Local SSMS client is not connecting one particular server

My SSMS is not connecting to one particular server say X except X it is connecting to all the other servers. Could not find the root cause for this problem do any one have idea here? Guy sitting next ...
6
votes
1answer
134 views

sp_cursoropen and parallelism

I'm running into a performance problem with a query that I can't seem to get my head around. I pulled the query out of a cursor definition. This query takes seconds to execute SELECT A.JOBTYPE FROM ...
1
vote
4answers
37 views

SQL Server : auditing AD Users - how can we identity AD User account from AD Groups

I would like to identity which accounts on our servers belong to AD Users. Currently, I find a plethora of accounts from users that should in fact be part of AD Groups registered on the same SQL ...
1
vote
3answers
32 views

SSL to individual database

Is there a way to setup an SSL connection to an individual database, or does it have to be done at the instance level?
3
votes
1answer
68 views

Replace NULL with empty string [closed]

Due to precedence set within my organization, I need to replace NULL values in certain columns (roughly 15-20) with the empty string. While the solution comes quite easily in more traditional ...
0
votes
1answer
46 views

How would I grant select on a table being used in a different database to a user role in SQL?

I have a view that's selecting rows from a table on a different database. When calling this view from my application I get an inner exception thrown saying the application user is not able to access ...
2
votes
2answers
41 views

CLR/C# equivalent to XACT_STATE()

I am porting a set of T-SQL stored procedures to C#/CLR. In the T-SQL, we use XACT_STATE() to determine if an error requires rolling back to a savepoint or rolling back the transaction entirely. I ...
-1
votes
2answers
76 views

Deadlock from select statements

I am getting deadlock from 2 select statements. What is the reason for that? And how can I fix this issue? Deadlocked processes: 11278 Victim process: 5185 Lock type: Index/(Key) Both ...
2
votes
2answers
73 views

Execution plan has TOP operator for query without TOP or ORDER BY

I have product sales by month temporary table.(subset of much larger historical table) I'm running query to find new product not previously sold in the previous months for a specified 6 month range. ...
0
votes
2answers
39 views

Extrapolating gaps in hourly data

I have data in the form of DateTime -- Status -- Duration Seconds 12:00:00, Available, 10800 15:00:00, Unavailable, 460 I need to translate that into DateTime -- Status 12:00:00, ...
-1
votes
2answers
12 views

Users unable to access Database

we have an SQL Server called sql01. On this,we have attached a number of databases, including the SSRS report server, which people can access. I have created a new database called ToolingSystem and ...
1
vote
2answers
28 views

Restrict Full access to certain User of Database

The scenario is the following: Given SQL Server Instance created and handled not by me Creation of Database and User on given Instance by me Question: To my limited understanding, the sa login ...
3
votes
1answer
101 views

Hiding a SQL Server vs Turning Off SQL Browser

Can anyone explain the difference between turning off the SQL Browser service and Hiding an instance through the SQL Server Configuration Manager? I've always assumed they do the same thing and have ...
4
votes
0answers
42 views

Two servers, different execution plans. Several orders of magnitude difference in run time

Two servers, Development and Live. Live server is an Amazon RDS SQL Server Web instance. Both servers have identical schema and data. There is a good spatial index on the geometry column. On my ...
1
vote
1answer
59 views

How to resolve foreign key references across different databases (iSeries and SQL Server)

I've got a system that has a DB2 iSeries database. We are rewriting a portion of the system and implementing it using SQL Server and Entity Framework. Originally, I was lead to believe that there ...
0
votes
1answer
27 views

MS SQL Server Incremental(differential) backup interrupted due to Full backup

I have a manual full backup happening every night, post which I am taking differential backup after every hour but after three to four differential backups a full backup happened through third party ...
-1
votes
0answers
19 views

Compare the rows of the same table which have different data for two different dates

I have a table which contains different data for different dates. I need to compare the current date table with yesterday's day table using the id(i.e for the id in today's table I need to search ...
2
votes
1answer
37 views

Running SSRS and SSAS from different server than the primary database instance(SQL Server Engine)

Right now both SSRS, SSAS and SQL Server Engine are on the same server. We are using 2008R2 Enterprise. We are thinking to upgrade to SQL Server 2012 or 2014. and We want put on separate serve the ...
2
votes
1answer
95 views

Excessive CPU use in vendor SQL Server DB

Background: I've got a SQL Server 2012 DB provided by a vendor so modification of queries and tables is limited. We do own the DB though, so we can add and maintain indexes. Indexes haven't been ...
1
vote
1answer
31 views

Update query could not be bound

I'm trying to do a simple update query and I'm getting this error: The multi part identifier "customers.customer_name" could not be bound Query: Update Suppliers Set City = (select s.city ...
1
vote
2answers
26 views

Custom ORDER BY

Are there other ways to use ORDER on my results? 20150507094958A DISPOSED 2015-05-07 09:50:00.853 Samuel MONEY 20150507094958A DISPOSED 2015-05-22 09:25:00.000 Jeff AUTOMOBILES ...
1
vote
4answers
49 views

Grouping Data Using Joined Tables with Certain Distinct Values

I am struggling to get my head around how to do this so please bare with me while I explain. We have an order system which records orders, order lines, items, users etc. What I am interested in in ...
2
votes
1answer
106 views

How do I import XML to a SQL Server table?

Can anyone help me work towards fixing my solution to import my XML data into a SQL Server Table? I have done my research, but this task has been very hard for me to accomplish. Everything I have ...
1
vote
1answer
22 views

Index design question

This query runs for 60 seconds: SELECT mychecklis0, .... FROM dbo.MyChecklistStatus mychecklis0_ WHERE mychecklis0_.AppFormSubSectionId=@P0 AND mychecklis0_.ProfileId=@P1 There is an index created ...
1
vote
1answer
31 views

Problem locating rows with dynamic SQL

I'm new at SQL in general, so I'm have a few problems with some of my stored procedures I'm designing. My procedure takes in 3 parameters. A location (or table name basically, a varchar), a room ...
2
votes
2answers
73 views

Unexpected gaps in IDENTITY column

I'm trying to generate unique purchase order numbers that start at 1 and increment by 1. I have a PONumber table created using this script: CREATE TABLE [dbo].[PONumbers] ( [PONumberPK] [int] ...
1
vote
1answer
34 views

How to do a SELECT inside of a PIVOT

I am trying to SELECT values from a column in my database in order to perform a PIVOT on those values without hard-coding them. SELECT * FROM (SELECT ItemType, [Status] FROM ...
0
votes
0answers
29 views

Property error when linking SQL Servers

I'm running into an issue linking SQL servers. The servers I have are: Server A - SQL Server 2008 R2 Server B - SQL Server 2014 I can set B as a linked server on A with no problem, but setting up A ...
1
vote
1answer
78 views

Missing Index Not Displaying In Execution Plan

I recently installed SQL Server Management Studio 2014 (Developer Edition), and I noticed that I am no longer seeing the missing index feature. What I have done: Ran the workload through Database ...
1
vote
0answers
6 views

Database engine installation failed

Being asked to implement an application for purchasing management, the database managing system which I have to install, is SQL Server 2008. I am having some issues while installing the main ...
1
vote
0answers
19 views

Create new server in SQL Server instance [closed]

In our office we have two servers (development and Test). I need to create a new server for practice purpose. How can do it?
1
vote
1answer
101 views

should we keep the log file or the data file on the fastest drive?

SSD = solid state drive We have a specific question about tempDB performance on server CRM01 (Marketing CRM server - running large queries): On CRM01, tempDB data and log files reside on the solid ...
3
votes
2answers
146 views

Does .bak file also contain backup of ldf file?

I am running MS SQL Server, which is holding mdf and ldf files of sizes 110 GB and 245 GB respectively. My question is, if I take .bak backup of said database, will it result in 355 GB (110+245) ...
0
votes
0answers
12 views

Cannot upgrade from SQL Server 2008 R2 SP2 standard edition to SQL Server 2014

When I run the upgrade wizard, it says "the specified edition upgrade is not supported". I have SQL Server 2008 R2 standard edition (SP2) and it has been added in the supported list on MSDN website. ...
2
votes
1answer
28 views

Pivots giving too many results

I'm trying to learn how this pivot thing works. I don't think I'm understanding it quite right. I just want to do a simple count for a bunch of item types that have some statuses. The table I'm ...
4
votes
1answer
55 views

MSSQL suggestion to create nonclustered index - on 2 columns, reversed

I have a query, where MSSQL 2012 suggested a create a nonclustered index as follows: CREATE NONCLUSTERED INDEX [<name>] ON [dbo].[tblUserCourses] ([courseID]) INCLUDE ([userID]) I created the ...