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

What is fragmenting my index on a table with stable traffic?

I am using Ola Hallengren's solution for optimizing indexes. I run it on Sunday every week. For the last three weeks every time it runs it reports that the clustered index on the database's biggest ...
0
votes
0answers
17 views

MDF/TempDB Growth, SQL Server 2005 Enterprise

Here's my scenario: SQL Server 2005 Enterprise Records from Database A being added to Database B Size of Database A MDF file: 3.15 GB I have separate drives for Data, Logs, and System. I ran a T-SQL ...
0
votes
0answers
18 views

how can I track down the source of “Internal connection fatal error”?

I'm working on a 6-700 line SQL script today. I'm running it from SSMS. Pointing at a SQL 11.0 db. About half the time I run it, I get: An error occurred while executing batch. Error message is: ...
-2
votes
0answers
20 views

Hi is there any to check that database table contains MULTIVALUE Columns [on hold]

In my project i want to check that whether the database is in the 1st normal form. TO check that i need to check whether there is any multivalued column in any table.
2
votes
3answers
73 views

Re-writing a sub-select as a condition on a column generated with 'over (partition by …)'

I am wondering if it would be possible to use over (partition by...) clause in order to avoid using a sub-select in the example below: declare @t table ( id int ,code char(2) ...
-1
votes
0answers
27 views

Getting error creating database in SQL Server 2005 [on hold]

I'm an error message when trying to create a database in SQL Server 2005: An exception occurred while executing a Transact-SQL statement or batch. Service Broker message delivery is not enabled in ...
0
votes
3answers
21 views

Case when not return more than one value

I try this, but the SwitchCase can not return more than one value. WHERE CP.NumIntAut IN ( CASE WHEN @NumIntAut IS NOT NULL THEN (@NumIntAut) ELSE (SELECT NumIntAut FROM ...
1
vote
1answer
45 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), ...
3
votes
2answers
121 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
6 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
1answer
18 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
19 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
24 views

Is there a standard mechanism for moving data to a remote database? [on hold]

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

500 databases or 1 database with 500 tables or just 1 table with all the records? [on hold]

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
25 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
31 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
17 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
92 views

WITH Clause UNION Issue

WITH [ProgressInvoicesPeriodCost] AS ( SELECT ProgressInvoices.ProjectId , ProgressInvoices.PeriodId , SUM(ProgressInvoiceDetails.TotalThisInvoice) AS TotalThisInvoice ...
0
votes
2answers
38 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
168 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
1answer
44 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
30 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
13 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
183 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
33 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
127 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
38 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
61 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
39 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
36 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
152 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
48 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
45 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
133 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
23 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
36 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
34 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
46 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
25 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
25 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
48 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
87 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
91 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
129 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
18 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 ...