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

One SQL different Results by using SQLOLEDB or MSDASQL

I'm using VB6 with SQLOLEDB and MSDASQL. By switching the Provider i've notice, that i'm getting different Results with one query. My Query Checks some Server Settings and Execute Backup SQL 1 or ...
1
vote
1answer
22 views

SELECT COUNT(*) to html table

This may be a very simple but its still not clear to me. I'm writing a SQL Agent job to generate output in html format. I need to get results of a query SELECT COUNT(*) FROM TABLE_NAME. I'm able to ...
2
votes
1answer
26 views

SQL Server: dm_exec_requests.wait_time vs. dm_exec_sessions.last_request_end_time

We have a third-party Microsoft Access application that uses SQL Server 2012 as its data store. It is a well known issue that Access often does not tell SQL Server that it has received the results of ...
1
vote
1answer
14 views

SQL Reporting Services (SSRS) - Blocked process on ReportServer, SP CheckSessionLock

We frequently see blocking on our SSRS box which houses both front-end Report Manager ReportingService and the SQL database engine with ReportServer & ReportServerTempDB Catalog databases ...
6
votes
4answers
111 views

Find data size of table for several identical databases on a instance

I have several identical databases with the same schema/table structure within a instance. I need to find the size of one table that they all have. For example, I have 30 databases on a instance and ...
4
votes
1answer
57 views

Identity column in columnstore index

I have an extremely large table IMO (~137 million rows) with lots of repeated data, lots of NULL columns, and such. I am considering exploring this using a table with a COLUMNSTORE INDEX and I have ...
-2
votes
1answer
40 views

Business Date and Route Sequence

+-------------------------------------------------------------------+ |Route |Sequence| Planned Time | Business Date | ...
-1
votes
1answer
25 views

Querying sys.master_files over a linked server

Querying sys.master_files through a linked server, I get no results. Why? How do I work around this issue?
0
votes
1answer
20 views

How to Create Insert Statement from Table Data using sp_export_data without Id?

How to Create Insert Statement from Table Data using sp_export_data without the Id? I have the following statements and want to omit the Identity. How would I accomplish this? This is how I'm ...
3
votes
0answers
14 views

Unable to uninstall Sql Server 2012 Express (With SP1)

My Stack: . Windows 10 Enterprise . SQL Server 2012 Express (with SP1 bundled). ISSUE: . Installed SQL to test for backward compatibility. . When I tried to Un-Install the following prompt is ...
2
votes
1answer
31 views

Can SQL Server Audit be used to track hostnames or IP adresses of the users performing DML on a table?

I have been reading about SQL Server Audit, and so far I have assimilated that it tracks the command that has been executed, and some other additional information(SPID, object ID and stuff). But can ...
1
vote
0answers
13 views

Can i use PGP for securing My database

I have considered TDE and cell level encryption mechanism for securing my database. but these two cannot fully satisfies my requirements.through surfing i found that PGP may help me, but it is mainly ...
0
votes
0answers
11 views

Sql Server remote connection to 2nd instance impossible

After installation of another SQL-Server 2014 instance to a server where a default instance of Sql-Server 2008 R2 is present, I cannot remote connect remote to the new named instance. The default 2008 ...
0
votes
0answers
31 views

SSRS Migration 2008 to 2014 - InternalCatalogException secDesc != null

We're migrating side by side from SSRS 2008 Web to SSRS 2014 Enterprise. I followed the steps: backup encryption key backup databases (ReportServer and ReportServerTempDB) restored databases on 2014 ...
1
vote
1answer
333 views

Can we use TDE as an anti-injection technique

TDE prevent unauthorized access to the data by restoring the files to another server, because it requires the original encryption certificate and master key. If i applied a table level encryption ...
1
vote
3answers
39 views

SQL Server 2012 window function

I've the following table which holds status of jobs in a history table. JobHistory jobOrderId | dateAdded | Status -----------|-------------------------|------- 4909 | 2015-08-26 ...
0
votes
1answer
19 views

Replication from log shipping database

I have a secondary database on a standby and read only mode. The question is .. Can I replicate this database ?
7
votes
2answers
123 views

Should I mark a composite index as unique if it contains the primary key?

Given some table with a primary key, e.g.: CREATE TABLE Customers ( CustomerID int NOT NULL PRIMARY KEY, FirstName nvarchar(50), LastName nvarchar(50), Address nvarchar(200), Email ...
0
votes
1answer
20 views

Restore / Create a database with a data file (MDF) from backup the same but with two data files (MDF and NDF)

I must restore/create a db (in a new instance) in one file(mdf) from a backup of the same but with two files of data (mdf and ndf) How can I do it? This is what I try... but it did not work ...
0
votes
1answer
41 views

Run Query Against All DB's on Server

I am trying to run this against all the DB's on my server and not just on "TEST_1". Is there a simple way to do this? Ideally the select would also return the DB name. use TEST_1 go declare ...
3
votes
1answer
34 views

sql server deadlock error - Shared (S) and Intent-Exclusive (IX) locks under Serializable isolation

Deadlock errors such as below happen frequently on our 3rd party vendor database: <?xml version="1.0" encoding="utf-8" ?> - <deadlock-list> - <deadlock victim="process743288"> ...
6
votes
3answers
76 views

Totals(sums/counts) across multiple child tables query optimization

We have 12 types of expenses in our database, some have fairly differing data minus the Amount fields. We have multiple places in the application and reports that require single and multiple expense ...
2
votes
1answer
65 views

Using a Linked Server to import data from Excel

I have read a lot about linked servers being bad when there are multiple hops across servers and distributed joins. What if I am just using a linked server to import data into SQL Server from an ...
1
vote
1answer
26 views

Where does SSMS Last database backup date come from?

The backup date for several of my databases do not appear in msdb.dbo.back upset yet the correct date appears in SSMS when I select a db name, right click, properties, there in the general tab is the ...
-2
votes
1answer
28 views

How to give a user “create any database” permission in SQL Server? [on hold]

Is it different from the dbcreator permission? Can anybody explain the process?
1
vote
1answer
35 views

How to measure the performance improvement that NUMA brings?

I am testing how one of our stored procedure is working on SQL Server Standard vs SQL Server Enterprise editions. I have created two virtual machines and install a SQL Server(SQL Server 2014) and ...
1
vote
0answers
18 views

SQL AlwaysOn Availability Groups network performance

Our customers are asking to implement our products while configuring AlwaysOn Availability Groups ( between two FCI with Asynchronic commit ). The DR server is geographically far from the Production ...
3
votes
2answers
83 views

TDE on Replicated Databases

I have implemented Master-Slave replication between two databases, now i have to implement Transparent Data Encryption(TDE) in master database. is it possible to implement TDE in master only? whether ...
3
votes
2answers
57 views

Using sp_getapplock to implement a queue. Is it correct? Is there a better way?

I've been reading a series of posts by Paul White about SQL Server Isolation Levels and came across a phrase: To emphasise the point, pseudo-constraints written in T-SQL have to perform ...
0
votes
0answers
9 views

SSDT project with working linked server references

I have a VS 2013 solution with two databases. One of them is supposed to got to about 10 of production servers. The other ohne will have a linked server object for each production server and will ...
1
vote
1answer
26 views

Whay does the SQL Server Service account has the “”Impersonate a client after authentication" Right?

Our database is running on SQL Server 2008 hosted on a Windows 2008 Server. We have found that the security policy “impersonate a Client after authentication” is enabled for the SQL Server service ...
0
votes
0answers
17 views

Howto avoid queries to get considered in statistics [duplicate]

Is it possible to run my (administrative) queries in a way that they do not get considered in Sql Server statistics like e.g. Cpu intensive queries, long running queries etc.? Is there an option like ...
2
votes
1answer
31 views

How to create test environment for lost transactions

I have a problem that I hope you can help me to solve. I'm using SQL Server 2008 R2. I need to create a test environment in which I'll be able to artificially 'create' lost transactions. Due to ...
0
votes
0answers
20 views

Compare 2 tables and display only the columns that do not match [duplicate]

I wanted to compare 2 identical tables and displat only the columns that do not match.. Suppose I have table temp A and table temp B, IF OBJECT_ID('tempdb..#A') IS NOT NULL BEGIN DROP TABLE #A END ...
3
votes
1answer
147 views

Is REPEATABLE READ the right choice for validation before modifying data?

In my database I have a Task table. This table has a number of fields that are foreign keys to other tables. There are also a few link tables, that have Task on one end. When a new task is created ...
7
votes
1answer
153 views

Is there a performance difference in committing and rolling back a read-only transaction?

I open a (repeatable read) transaction (BEGIN TRAN) to do some work on certain records. First thing I do is checking if the data I need to change is in the database. In some cases there will be and ...
0
votes
0answers
10 views

What does a blank DQS Status column mean?

I'm attempting to use a DQS Transformation in SSIS to harmonize geographic data. For each column being cleansed, there are three output columns- _Source, _Output and _Status. The _Status column ...
1
vote
2answers
54 views

Index planning for many columns with different usage

I've a table with 80 columns and that is a base table for most of the application. Daily load inserts almost 8,000 records and update upto 2,000 records. This table is now having more than 5 million ...
-2
votes
2answers
51 views

What does the FullAccess. infront of table mean in SQL Server query? [on hold]

What does the "FullAccess" in the below query refer to? I have a table named ReceivedClaimFact but I do not have any Schemas named FullAccess in my Database. The query runs successfully though. ...
1
vote
1answer
15 views

Query Relating Rows W/O A Corresponding Value

I have a table setup like this: ID Code DateActive DateInactive statusCode 15 20090413 null A 15 null 20090416 I 15 20100101 ...
-1
votes
2answers
51 views

SQL Server : create table within stored procedure

I have a stored procedure that will be run by a user with public permissions. When operational, it will be called from an Excel spreadsheet and the results presented on a given tab. The procedure has ...
2
votes
0answers
35 views

How do I provide a failsafe for retrieval of data from excel to SQL

So say there is a process in place for importing data from excel spreadsheet to SQL using SSIS. And there are two tables, one with new data and one with data from its previous run. I sometimes have ...
2
votes
0answers
36 views

SQL Server 2014 Avaliability Group DbMgrPartnerCommitPolicy

I have an environment with 2 Windows Server 2012 R2 servers, both with SQL Server 2014 Expensive edition. Whenever a change happens in the AGs (such as: AlwaysOn Availability Groups connection with ...
-1
votes
0answers
35 views

How can I take table as input dynamically from user?

I am new to SQL server and want to take table name and column names as input from user dynamically. Also, need to perform cursor implementation of comparing records on it. I have completed the ...
9
votes
1answer
138 views

How to set up indexed view when SELECTing TOP 1 with ORDER BY from different tables

I am struggling to setup an indexed view in the following scenario so that the following query performs without two clustered index scans. Whenever I create an index view for this query and then use ...
-2
votes
0answers
19 views

Upgrade from SQL Server Express Edition to SQL Server 2008 R2 [on hold]

Can I upgrade from SQL Server Express to SQL Server 2008 R2? If there is away can you please provide the steps for me.
3
votes
0answers
32 views
+100

Does RSS Profile has an effect on SQL Server with NUMA setup?

I'm curious whether the RSS Profile which is default NUMAStatic on Windows 2012 R2 could/should be changed for SQL Server with a NUMA setup. Has anyone done performance benchmarks on high load SQL ...
4
votes
1answer
46 views

Select when group by contains more than one row with the same value?

I am trying to write a query that returns one row from table A whenever a column in joined table B contains multiple distinct values for a single matching row in table A. (A -> B is a 1 -> many ...
0
votes
0answers
11 views

Cannot Generate SSPI Context Error [duplicate]

I have a weird situation, in my instance i created 2 AG (AG1 and AG2) using the same service account. for couple of both are working fine connecting to Listener1 and Listener2. Last week, one of the ...
1
vote
1answer
46 views

Aggregation by positive and negative values

I have a table called "PROD_COST" with 5 columns: +----+----------+------+-----------+-------------+ | ID | Duration | Cost | COST_NEXT | COST_CHANGE | ...