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

Set bit in Table A if values are present in Table B

I have two tables, Containing up to ~10 million entries. TableA which has 3 columns: IDA (bigint), IDB (int) and CHK (bit). (IDA, IDB) is the primary key. TableB which has 2 columns: IDA (bigint), ...
1
vote
1answer
19 views

To make sql server instance back to multi user mode

I have made a change at instance level, ‘Properties/Connections/Maximum number of concurrent users’ to 1, disconnect all other users from the server. Since some of the users were logged in and left ...
0
votes
1answer
5 views

Machine account causing a Token-based server access validation failed with an infrastructure error

As the error suggests the SQL log is filling with the error: Login failed for user 'xxx\xxx$'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous ...
0
votes
0answers
8 views

HTML column in a full text index?

Using sql server management studio, I want to create a full text index where a certain field is treated as html, tags should be ignored and umlaut-codes should be taken into account. How can I do ...
0
votes
2answers
14 views

Meaning of 'show variables LIKE '%_database'

Despite being a newbie in db administration, I have been assigned to move our crm from mysql to mssql. I have reached a point where I have met a query I dont understand and it cannot execute in sql ...
0
votes
1answer
17 views

Is there a standard mechanism for moving data to a remote database?

I have my application installed in data centers across the world, performing various functions, with each data center having its own local database for the application. Certain reporting data is ...
0
votes
0answers
14 views

Why would I not specify ROWLOCK to get rid of page locks?

I have a query that goes something like this: SELECT TOP (1) * FROM MyTable WITH (UPDLOCK, READPAST) ORDER BY SomeColumn ASC; This answer says that it's hard to say for sure but it will probably ...
1
vote
3answers
42 views

500 databases or 1 database with 500 tables or just 1 table with all the records?

I currently have an application that is used by a single end customer. For ease of discussion assume the application only needs a single database table for all records. I now need to support ...
0
votes
0answers
10 views

SQL Server Replication Snapshot Agent login fails

I have setup TRANSACTIONAL REPLICATION from ServerA to ServerB ServerA = Primary Server = SQL Server 2008 R2 Enterprise ServerB = Secondary Server = SQL Server 2008 R2 Standard Edition. I ...
1
vote
1answer
29 views

Merge Problems SQL Server

I'm trying to create a procedure that will take the values from a temporary table, and load them into another table. The second table has a composite unique constraint across its three columns (Not ...
0
votes
1answer
16 views

Replication not updating XML Schema collection

So the problem I'm facing is that replication from our Main instance to our Data Warehouse instance is failing because it isn't picking up XML schema updates. Thus, when it tries to bulk copy the data ...
1
vote
2answers
85 views

WITH Clause UNION Issue

WITH [ProgressInvoicesPeriodCost] AS ( SELECT ProgressInvoices.ProjectId , ProgressInvoices.PeriodId , SUM(ProgressInvoiceDetails.TotalThisInvoice) AS TotalThisInvoice ...
0
votes
2answers
32 views

How To Ignore SQL Update Notification

I have a very weird situation. One of our SQL Servers has a software update notification pending for Microsoft SQL Server 2008 R2 Service Pack 1 (KB2528583). However, this server is already at SP2. ...
3
votes
1answer
160 views

Does the SQL Server backup process use a buffer cache?

When a full database backup command is executed: Does the backup process use only the memory that has been assigned to the SQL Server (instance)? Does the backup process "flush out" the page ...
0
votes
0answers
38 views

Seeing multiple CXPACKET blocks when trying to load data from a INSERT SELECT

We are trying to load data and are getting multiple CXPACKET waits. The activity monitor says "running" however, it appears nothing is happening. I am selecting close to 5 million rows which I ...
4
votes
0answers
28 views

Is there a way to suppress DBCC TRACEON/OFF messages in the Error Log?

We have quite a few dataloading processes that run throughout the day all day long. These processes are setting the 610 flag on for their connection then turning it off when they are done. Because ...
0
votes
1answer
12 views

Header is added when exporting column of type image with BCP to files

I export a column of type image to files using this command: EXEC master..xp_cmdshell 'BCP "SELECT file_name FROM file_table WHERE id = 11 " queryout "C:\bcpdir\test.xml" -T -N' In SQL Management ...
5
votes
3answers
149 views

Corrupted mdf file causing the backup job to fail

We have ran into a problem with one of our SQL server 2008 databases. It appears that something is corrupted in its datafile and this has caused our daily DB backup jobs to fail. The last successful ...
-4
votes
0answers
26 views

personal database [on hold]

Normalize each of the following datasets by splitting them into multiple tables where repeating fields are placed into a separate table with a foreign key. For each dataset, show how many tables ...
0
votes
1answer
30 views

How to check SQL database files for physical fragmentation?

I search the Internet and did not find clear explanation if I have to try defragmenting physical database files when my DB resides on SAN. I understand that there are tools and procedures inside some ...
2
votes
3answers
123 views

Transaction Isolation level different threads massive number of Writes

I have a lot of threads that writing to DB some data in two tables. tbl_raw_data and tbl_parsed_data where tbl_parsed_data have foreign key to tbl_raw_data. I also need the writing to be superfast. ...
0
votes
1answer
32 views

SQL database disaster recovery in a second datacenter using storage

I have the following: Data Center (1) has a set of two Microsoft SQL database servers. They are clustered using MSCS and shared NetApp storage FAS3250 system. This provides me with local ...
2
votes
1answer
60 views

How to solve SIDs mistmatching in SQL or orphaned users?

I moved and restored a database from a backup into another SQL Server 2008R2 about a year ago. I wasn't aware of the concept of orphaned users. From what I understood, is that we can end up having ...
0
votes
1answer
36 views

Invalid object when selecting from temporary table

I'm creating a temporary table called #PrevStatus. I've confirmed that the create statement is correct. When I run, exec (@TableQuery) which contains the table create statement and then right ...
1
vote
1answer
48 views

What should I monitor on the SQL Server machine? [on hold]

I need to create some alerts, logging jobs and monitors on a machine that is going to run SQL Server 2012 Standard for an ERP system. The OS will be Windows Server 2008 R2 Standard/Datacenter (if it ...
0
votes
1answer
35 views

Index file - size changed

I realised today that my index file(which is about 250GB) is smaller than yesterday for about 7GB. Everything, I done in the meantime, was index rebuild. Is it possible that index rebuild is the ...
-3
votes
1answer
18 views

Disk space Report for CMS [on hold]

I want to take the disk space report from centralized server with the help of CMS i have to run that query & i want the query for last errorlog report for all the servers in CMS, can i have the ...
5
votes
1answer
137 views

What is a non-clustered index scan

I know what table scan, clustered index scan and index seek is but my google skills let me down to find a precise explanation into non clustered index scans. Why and when a query uses a non clustered ...
1
vote
2answers
47 views

How to get statement which causes error 3609?

How to find out which statement causes error Msg 3609, Level 16, State 1, Line 4 The transaction ended in the trigger. The batch has been aborted.? The code seems very straight-forward: -- 1. Check ...
1
vote
1answer
26 views

Oracle OLEDB Connections hang in SQL Server: Can I restart Instance?

There is a killed/rolled back query on this instance that was originally attempting to execute a SELECT on a remote Oracle Server via OLEDB. This query was running for over two days before it finally ...
2
votes
0answers
44 views

SQL Server migration from 2005/2008 to 2012 [duplicate]

We need to upgrade two SQL Servers for our projects to SQL Server 2012. Since we’re not db-admins or familiar with such migrations, I wanted to ask you if you could tell me what we have to be aware of ...
2
votes
2answers
131 views

SQL Server Performance

This is rather a generic question. I've always understood that SQL Server likes RAM, the more the better. If for example I had a SQL Server with just a single 2GB database and 8GB RAM, would there ...
1
vote
1answer
22 views

What happens on the primary when log cannot be restored on the secondary on Log Shipping

I would like to setup a log shipping but I have a concern as to what would happen if the restore operation on the secondary would fail for some reason. I want the primary database keep working no ...
0
votes
1answer
35 views

How to export an image column to files in SQL Server?

I will migrate from a database. There is one column of type image that I would like to export to binary files on the file system. One file for each record. How can I do this with SQL Server?
2
votes
1answer
32 views

How do you calculate the CPU Affinity Bitmap?

I am trying to calculate the bitmap for my 32-core server. I want my instance to use cores 30 and 31. I know that CPU 0 gets assigned a value of 1, CPU 1 gets assigned a value of 2, CPU 3 gets ...
0
votes
1answer
44 views

Why the operation is not rolled back?

I have the following code in a trigger (AFTER INSERT, UPDATE): BEGIN IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION; RAISERROR('Does not allow modifications in the past', 16, 1); RETURN; END; ...
0
votes
1answer
24 views

ODBC SQL Server driver on Linux/nginx

Writing here because really can't figure out what to do. I have a site located at ftp server. And now it moves to a new server based on Linux/nginx. And everything is fine except SQL Server ODBC ...
2
votes
0answers
22 views

Find the current task of a long time running indexes reorganize operation

In a scheduled maintenance window, I've manually rebuilt/reorganized some indexes of a SQL Server 2012 database. It was an offline task, since my SQL Server license does not allow online ...
0
votes
0answers
46 views

Delete and merge duplicate records from joined tables?

I am trying to delete duplicate records from the output of the query below. If they also meet certain conditions i.e., 'different address type', then I would merge the records. From the following ...
3
votes
1answer
86 views

Database is happily available even during log growth?

I’ve been creating a process to go through all our databases and analyze the log structure, backup, shrink, and resize appropriately taking operational requirements and VLF sizing/amount into account. ...
3
votes
3answers
61 views

Disabled SSL on SQL Server, now connection fails

I have a customer that is worried about the latest SSL vulnerability POODLE. They have a utility (IIS Crypto 1.4) that disables SSL 2.0-3.0 on the servers they run it on. They have disabled SSL on ...
2
votes
2answers
128 views

How to detect DBCC ShrinkDatabase completion percentage?

Recently we have archived some of data from one of very large production database and need to shrink all data files to reacquire disk space. Problem is that its taking too much time and we are ...
0
votes
1answer
17 views

Can't map invalid columns based on column names in a .dtsx-Package

I have the following problem. I currently have to modify a .dtsx-Package which was originally created by a coworker who is not arounf anymore. This package contains some logic but above all it does ...
0
votes
2answers
65 views

Can I stop a SQL database backup after it has already started?

I am looking to do a full database backup of a SQL database in SQL Server 2008. My questions are: *Can I stop, pause, or cancel the backup after it has started if it is taking too long or slowing ...
1
vote
2answers
56 views

Does a database backup reduce size/increase free space of the log file?

Novice question, sorry! Got a SQL Server database and the log file is massive and keeps growing every day. I've archived data from the database and then done a full backup. I was expecting the log ...
0
votes
1answer
25 views

How do I select all child table records based on condition [on hold]

I have two tables - demographics and PatSubs. Both tables are linked by CaseNumber filed. PatSubs may have one or many substance entry for the CaseNumber. If I do the following: USE [njpies2013] GO ...
0
votes
1answer
44 views

what is running VSS on my server

Client's SQL Server farm DBs are backed up by third-party tool that does not use VSS. About half of the instances show backups being made by some tool that is using VSS. I can disable SQL Server VSS ...
0
votes
0answers
26 views

db connection uses an anonymous logon instead of the domain user

I have this PHP code running under IIS: $serverName = "someServer\someServer"; $connectionInfo = array( "Database"=>"SOME_DB"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) ...
0
votes
1answer
47 views

Doing a insert across two databases with same collations and getting an error

SQL query : insert DB1.dbo.tbl1 select distinct Number, Name, 'Unknown', 'Unknown', 'Unknown', NULL, 'No', 'GL', 'N/A' from DB2.dbo.tbl1 T2 where T1.Number not in (select distinct AccountNumber ...
0
votes
1answer
58 views

What happens in this strange SQL Server Mirroring situation?

Let's assume that two SQL Server instances (S1 and S2) are in synchronous mirroring or in a synchronous Availability Group. Now the following happens: A write happens on S1 and transaction commit is ...