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
4 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 ...
1
vote
0answers
6 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 ...
1
vote
0answers
5 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
3 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
2answers
808 views

Identify rows that match on a key but differ in other columns [duplicate]

Supposed I have table temp A and table temp B: IF OBJECT_ID('tempdb..#A') IS NOT NULL BEGIN DROP TABLE #A END IF OBJECT_ID('tempdb..#B') IS NOT NULL BEGIN DROP TABLE #B END CREATE TABLE #A ( ID ...
1
vote
1answer
19 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 ...
2
votes
1answer
26 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
12 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 ...
0
votes
1answer
174 views

copying data from a SQL server-table to a SQLCE-table

I want to copy some data from a MSSQL table to a SQLCE table in database.net. I used the following query, connected to the MSSQL db; update [SQLCE-table] ([column]) SET (column) FROM [MSSQL] I keep ...
6
votes
1answer
20k views

Finding the last time a table was updated

The query: SELECT name AS TableName, create_date AS CreatedDate, modify_date as ModifyDate FROM sys.tables order by ModifyDate; ...will tell me the last time a table was created ...
0
votes
0answers
15 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 ...
0
votes
1answer
443 views

SQL Server replication - set PollingInterval in sp_addmergepushsubscription_agent

I am trying to create replication subscriptions to and SQL Server 2008 R2 via a script. There are 3 subscribers so this script creates the subscriptions by calling sp_addmergesubscription and then ...
5
votes
1answer
2k views

How to restore replication after server crash

We had two databases on one SQL Server 2005 instance with transactional replication between them (3 tables as articles). This server acted both as publisher and distributor. Then the RAID on the ...
2
votes
2answers
171 views

Replication error after server name change

I have changed the computer name of the server where SQL Server 2008 R2 is installed. Old name was WIN-OUJEKRMGXXX New server name is KASURDYYY When I try to configure replication, the following ...
3
votes
1answer
130 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 ...
1
vote
0answers
54 views

Step by step establish a connection between SQL Server 2014 and Oracle 12c

I have two servers (both servers are on Windows OS): Server_A running Oracle 12c Server_B running SQL Server 2014 I want these servers to be able to see each other, so I can SELECT anything I want ...
6
votes
1answer
127 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 ...
2
votes
0answers
24 views

SQL Server Always On Failover Cluster Design

I have two databases. One I'd like to set up in an availability group between two servers (two instances, one on each server). The database is not huge and I'm not expecting it to grow ...
6
votes
3answers
318 views

Tell SQL Server a query is ad hoc and not to optimize based on it

Is there a way to run a one-off query against a production SQL Server database and tell it not to make any future judgments based on that query. E.g. Store execution plans, recommend indexes, etc. ...
4
votes
3answers
83 views

Return even empty groups when grouping by date

I have the following query: SELECT DISTINCT COUNT(CD_BarCode) ,CD_Carrier ,SUBSTRING(CONVERT(VARCHAR,DT_Arriving,103),1,11) Date FROM TB_AGIL WHERE ...
0
votes
1answer
32 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 ...
1
vote
1answer
109 views

How to create a dummy Linked Server in SQL Server 2012

I have a database in two different production servers. I want to keep the schemas consistent between the two. One has jobs that call stored procedures that reference a Linked Server. The other does ...
4
votes
1answer
178 views

Running a SQL Server query with as little impact as possible

I'm looking to create some basic scripts that are aimed at running on production systems. I want them to run with as little impact as possible. They shouldn't affect performance whenever ...
2
votes
0answers
25 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 ...
0
votes
0answers
33 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 ...
0
votes
0answers
9 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 ...
-2
votes
2answers
48 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
votes
2answers
14k views

Operating system error code 3(failed to retrieve text for this error. Reason: 15105)

I tried the following code to try and bulk load into a table in my SQL Server. BULK INSERT dbo.CentralRepository_Associate_Details FROM '/1CAAP/1413/data/csvtest1.csv' WITH (FIELDTERMINATOR = ';') ...
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 ...
3
votes
0answers
43 views

SQL Server 2014 - Full text index never stops populating

I have a server that is running SQL Server 2014. I have full text indexes on some of my tables in my databases. The problem is that it's always saying populating and it never finishes. So my queries ...
2
votes
0answers
22 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
1answer
55 views

Remote access to SQL Server 2008 R2 on Windows Server 2012 R2?

I have SQL Server 2008 R2 (named instance) on a Windows Server 2012 R2: Enabled remote access to SQL Server Enabled shared memory & TCP/IP protocols & named pipes for the SQL Server ...
2
votes
1answer
72 views

What server configuration and database should I use?

I am new to Database's and want to work toward installing a Database in the small company I work at for production and eventually other uses. The company has only 15 employee's and three departments. ...
15
votes
2answers
162 views
+250

Does CPU utilization affect the cost of foreign NUMA access?

Scenario Let's assume I have a SQL Server with 4 sockets with each 1 NUMA node. Each socket has 4 physical cores. There is 512 GB of memory total so each NUMA node has 128 GB of RAM. A key table is ...
7
votes
1answer
106 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 ...
3
votes
3answers
41 views

Finding out what permissions are required by the SQL Server Agent Jobs

I've been looking at this for a while and I can't work out an easy way to do this. As it stands every job in the database runs under SA level rights (horrifying thought) I'm sure some of the jobs ...
-4
votes
0answers
24 views

SQL Server stored procedure clockin [on hold]

How to create a stored procedure with clockin, clockout columns and I want to show the time worked from them and the min_leave_time when user clockin and out for breaks on a 8 hr. shift with lunch ...
-1
votes
0answers
32 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 ...
7
votes
6answers
27k views

Shrinking the log file does not reduce size

I have a database which had mdf size of 350 MB and ldf size 4.9 GB When i try to shrink the log file it's not shrinking. I know shrinking a database is not good and it should not be done. But still i ...
-2
votes
0answers
18 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.
2
votes
0answers
9 views

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 ...
1
vote
1answer
45 views

Aggregation by positive and negative values

I have a table called "PROD_COST" with 5 columns: +----+----------+------+-----------+-------------+ | ID | Duration | Cost | COST_NEXT | COST_CHANGE | ...
1
vote
0answers
28 views

Design of hard drive RAIDs

My task is to reconfigure a main server that houses the company's applications and data. The server is capable of handling everything. I wanted to find out if anyone has a suggestion on the best ...
2
votes
1answer
52 views

RAID 10 array configuration for SQL Server

I have a question regarding RAID 10 and SQL Server. My plan is to purchase an HP DL380 G9 with the 24 drive config. The question is how to break up the array. The drives will be divided between the 3 ...
3
votes
1answer
596 views

SQL Server 2012 Publisher SQL Server 2008 Subscriber version issue

So I have a setup where one virtual machine is a SQL Server 2012 publisher and I need to setup merge replication on a SQL Server 2008 subscriber on a different vm. When setting up the subscription ...
4
votes
1answer
43 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 ...
4
votes
1answer
536 views

Cannot Delete FileStream Group from Sql Server 2008

We have migrated all our varbinary(max) column data to Azure Blob Storage and so we want to remove the old filestream columns that remain in our Sql 2008 database and the filestream filegroup but when ...
3
votes
2answers
6k views

TempDB Log Space and ACTIVE_TRANSACTION

Our monitoring solution (SCOM) is currently flagging that the tempdb log is running out of space. However we have auto grow set to 1GB chunks for the log and we have 25GB of space left on the drive. ...
3
votes
2answers
201 views

Error: Cannot Generate SSPI context

When someone tries to connect to a SQL Server instance, the error shows up: It's not possible do generate SSPI context. Yesterday we had a blackout (don't know how to say this expression in ...
1
vote
2answers
300 views

Bi-directional synchronization between local SQL Server 2005 and a SQL Azure using SQL Data Sync

I need to synchronize an Sql Server 2005 database in an SQL Azure database. In other posts I've read that I can do this using Sql Data Sync but I don't know if SQL Data Sync can make the ...