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)

3
votes
1answer
550 views

LIKE character length limitation

The background to this question can be found here. The following part of my stored procedure does not work. Is there a character length limitation for the LIKE clause? t1.ProductList sometimes can be ...
4
votes
1answer
301 views

Is it possible in SQL Server to change default “order by” direction from asc to desc?

This question came up in a discussion at work... given the following T-SQL statement: select firstname, lastname from users order by lastname; the default sort order on the order by clause is asc. ...
5
votes
2answers
382 views

Stored Procedure as Create Table proxy?

With SQL Server it was my understanding, I thought, that you could elevate a users permissions with specific constraints. For example, you need a user to create a specific table object in a specific ...
0
votes
1answer
441 views

How to remove symbol from file

I am using ssis to generate some .dat files which are then sent to linux server for automated load. It looks as windows add some symbol character in file which is not easily identifiable first but if ...
5
votes
2answers
6k views

SAN block size for SQL Server on 4KB NTFS

A potential customer wants to evaluate our storage system. They run Windows 2008R2 x64 with 4KB NTFS on a virtual test machine they've sent us. They did not seem to know this at hand, so I think it's ...
4
votes
2answers
1k views

Can I recover a TDE certificate by restoring the MASTER database?

(We are, fortunately, not currently in this situation, just planning ahead to see what our options would be if it ever occurred.) For a database encrypted with Transparent Date Encryption (TDE), a ...
4
votes
2answers
811 views

SQL Server replication for off site copy

We have our Primary SQL Servers in-house (15 primary servers at the moment (500 databases approx overall), most of the servers have hex core processors). These are mirrored to other backup servers in ...
9
votes
2answers
3k views

Why are non-digits LIKE [0-9]?

My server's default collation is Latin1_General_CI_AS, as determined by this query: SELECT SERVERPROPERTY('Collation') AS Collation; I was surprised to discover that with this collation I can match ...
0
votes
1answer
803 views

Does TRUNCATE TABLE affects isolation level in Sql Server?

As I am working on the project which has SQL SERVER as a database....I'm maintaining isolation level in my project where I enabled snapshot isolation level for my project.... As I have to make some ...
1
vote
1answer
113 views

Does a transaction cover the subroutines?

When I begin transaction and exec a stored procedure, does that transaction cover the changes made by the stored procedure I executed? Would a rollback transaction cancel the changes made by the ...
-7
votes
2answers
108 views

I have table with 17 Indexes if i add 1 more index for search in two columns [closed]

I have table with 17 Indexes if i add 1 more index for search in two columns insert , update and delete queries will be slow.I dont want them to slow...what to do
1
vote
1answer
430 views

SQL Server connection failed for domain user from Mac OS machine

I have SQL Server 2008 R2 SP1. I am using connection string to connect to SQL Server. In connection string I am passing the driver path, server name, TCP port number, user name with which I want to ...
2
votes
0answers
55 views

Is it possible to have a valid backupset with null position?

In database restore process I need to rely on position column exists in backupset record to restore the latest backupset. Restore the latest backup on the database I noticed sometimes position is ...
4
votes
1answer
290 views

Adding indices to views

I have a table that contains XML data in a varchar type field. This field is used to store data from a variety of different XML schemas some of which are related via a record stored in another table. ...
2
votes
1answer
293 views

PK Fragmentation on INT IDENTITY column

Have simple Int Identity as my PK. Table has 2.2 million rows. Zero row deleted, never disabled the Identity. Inserts were via .NET a row at a time with every insert retrieving the ...
3
votes
1answer
470 views

How can I make sure the SQL Server query optimizer uses the exact tables in the query

I have a query running in SQL Server 2008: select count(*) from table1 join table2 on table1.col1 = table2.col2 In the data warehouse where this script runs, a table called thin_table1 is ...
8
votes
3answers
3k views

Restrict access for Windows administrator

As the SQL Server best practices says, "Windows Authentication mode is more secure than SQL Authentication". And now I want to know: is there a way to protect SQL Server from user with Windows ...
1
vote
1answer
52 views

Should I update to sql server 2008 sp2 before restoring the db's or do the update after?

I'm making a move from SQL Server 2008 to SQL Server 2008 R2 (Azure VM) as part of a hosting provider switch (from MyHosting to Azure). Should I update the VM to R2 SP2 before restoring the db's or do ...
5
votes
1answer
211 views

Logical reads amount difference with almost identical indexes

I'm trying to figure out why two identical queries are taking slightly different times when executed under two indexes that are almost identical, in SQL Server. The mentioned query is quite simple, ...
2
votes
2answers
169 views

Using SQL Server 2012 for Business Intelligence Features Only, No Database Engine

I would like to implement SQL Server 2012 purely for the Business Intelligence Features: SSIS, SSAS and SSRS on its own server. I current have SQL Server 2008R2 Database Engine installed on another ...
0
votes
0answers
1k views

SQL Server 2012 SSIS\SharePoint Kerberos auth [closed]

I have some issues setting up Kerberos together with SQL Server and SharePoint. Any help will be much appreciated! =) GOAL: Use Kerberos to avoid double-hop issue. USAGE: User logs onto ...
0
votes
2answers
93 views

Getting the exact edited data from a column in SQL Server

I have two Tables: Articles(artID, artContents, artPublishDate, artCategoryID, publisherID). ArticleUpdated(upArtID, upArtContents, upArtEditedData, upArtPublishDate, upArtCategory, ...
2
votes
1answer
807 views

Should I use Asynchronous Mirroring?

I plan on setting up mirroring on a SQL 2012 database which is currently in production. My concern though is how much it will affect the performance of the principal database. I am using mirroring ...
1
vote
1answer
2k views

SQL Server - Must be first statement in query batch - what and why?

I cannot find a list of type of objects that while being created the command must be the first statement in query batch. So far I ve found that function/stored_procedure/view must be the first. Does ...
1
vote
1answer
365 views

Installing Full Text Search on SQL Server 2008 R2 Express

I can't for the life of me install full text search on my SQL Server 2008 R2 instance. Every installer I have tried shows me this: I've tried: SQLEXPRADV_x64_ENU.exe SQLEXPRWT_x64_ENU.exe ...
0
votes
1answer
122 views

Changing data type from DATE to CHAR(10) with a query

I want to alter the date type in a database that has 40 tables from DATE type to CHAR(10) type, without opening the tables and manipulating them in Management Studio. i.e. only with a script/query. I ...
1
vote
1answer
1k views

Installing SQL Server 2000 x86 Enterprise on Windows 2003 x64

I have inherited (lucky me) a very old accounting system which will be retired over the next 18 months. In the meantime, for various reasons, I need to upgrade the DB server. It's currently running ...
4
votes
1answer
554 views

Replication between SQL Server 2005 and Azure database

Is it possible to set up transitional replication between a SQL Server 2005 and a SQL Azure database? My server is nearing end of life and I would rather migrate to a cloud infrastructure instead of ...
4
votes
1answer
237 views

Error in SQL Server 2012 OUTPUT clause

Given the following SQL code against the AdventureWorks Database: begin transaction; drop trigger Sales.iduSalesOrderDetail; alter table Sales.SalesOrderDetail add LineNumber int null; go with ...
0
votes
1answer
247 views

SQL Server merge replication across domains

I'm getting the following message when trying to set up merge replication on SQL Server 2008 R2: The Merge Agent failed to locate the partitioned snapshot for this subscription in the expected ...
4
votes
1answer
4k views

Give permission to select from system tables

I have a database Microsoft SQL Server 2008 r2. A user called marie is defined, who can access tables on the main database; this works well. Now, I would like marie to be able to perform this query: ...
1
vote
3answers
291 views

How do you manage SQL jobs that belong to a database?

We just had an issue where we lost msdb on one of our servers along with all of the jobs which we created for a multitude of databases. The fact that we didn't have a backup of msdb is one issue, ...
2
votes
1answer
208 views

Parameter triggers different execution plan, but why?

I have a table CREATE TABLE [dbo].[Numbers] ( [Date] [date] NULL, [Time] [time](3) NULL, [Value] [char](10) NULL ) and the table has > 10 Billion rows, therefore it ...
2
votes
1answer
79 views

Synchronize Queries Retrieving Sessions And Locks From DMVs

I have a SQL script that I run when I want to see what is happening in the database. The script has many queries that return information from DMVs, but the two I use most are "Requests" ...
3
votes
2answers
684 views

Identify NON-ANSI joins in SQL Server 2008 R2 on a Database that's in 2000 (80) compatibility mode

We have a very old database running on SQL Server 2008 R2. The database is running in 2000 (80) compatibility mode and has oodles of NON-ANSI joins in stored procedures, views and functions. We need ...
3
votes
1answer
2k views

SQL Server 2008 - is “NT AUTHORITY\ANONYMOUS LOGON” login “mandatory”?

My spider senses are tingling when I found this "NT AUTHORITY\ANONYMOUS LOGON" account on a SQL Server logins. I tried to research the matter and I even have a book about SQL Server management. Also ...
2
votes
1answer
367 views

Does installing SQL Server Database Engine and Reporting Services in Azure require two virtual machines?

We are evaluating moving a large-ish web application comprising ASP.NET, Classic ASP and SQL Server Reporting Services into Azure, and we want to know the "best practice" for installing the Database ...
4
votes
1answer
155 views

Worth investing in MS SQL? [closed]

Not trying to start a war here, but I would like some thoughts. I work for a small nonprofit that is eligible for generous charity licensing from Microsoft. I am the database/web coder and my ...
4
votes
1answer
2k views

Indexing strategy when using the between operator SQL Server 2008

I have a large table ~25 million rows with the structure CREATE TABLE [dbo].[rx]( [pat_id] [int] NOT NULL, [fill_Date] [date] NOT NULL, [script_End_Date] AS ...
1
vote
1answer
405 views

Commit Insert but Hold Lock

I have implemented what is effectively a reliable queue through the following: CREATE TABLE Queue (MessageID UNIQUEIDENTIFIER, Message varchar(255)) --Enqueue Command DECLARE @MessageID ...
2
votes
2answers
166 views

Disaster recovery plan - Having multiple servers

I work in an organization where departments are in different buildings. I have a data centre in the main building. All the in-house applications connect to the SQL Server residing in the server in the ...
7
votes
1answer
2k views

SQL Server distribution database log file grows uncontrollably after full database backup

We have a merge replication environment that is pushing to 8 subscribers. This is working fine. Our distribution database is setup in Simple recovery mode. We have a maintenance plan that will backup ...
1
vote
1answer
452 views

How to troubleshoot SQL Server Merge Replication Conflict?

I have SQL Server 2008 R2 Merge Replication setup. I have 2 publications for the same database with 20+ subscribers. The logic of our application prevents changing the same data from 2 subscribers ...
2
votes
2answers
2k views

32-bit ODBC driver on 64-bit SQL Server [closed]

I am unable to use an ODBC 64-bit driver with SSMS 2012 running on a SQL Server 2012 64-bit instance. However, I believe that the 32-bit driver works. My question is can I use SSMS 2005 32-bit to ...
9
votes
2answers
3k views

Difference between SQL batch, statement and RPC?

What is the difference between SQL batch, T-SQL statement and Remote Procedure Call? How can I tell if part of the T-SQL code is a batch or statement?
4
votes
1answer
552 views

The backup of the file or filegroup “fileStream” is not permitted, because it is not online

I'm trying to backup a database, which has been created by someone I don't have access to. I get this error message: The backup of the file or filegroup "fileStream" is not permitted, because it ...
8
votes
3answers
1k views

Query is slow for certain users

I have a couple queries called from a C# .NET web application which are always fast for me (I am an local admin on the SQL Server) but for a group of users (domain group with required permissions), ...
7
votes
1answer
585 views

selecting more fields causes catastrophic failure

I have a connection to a linked server from sql server 2012 to pervasive sql. When I do select field1, field2, field3 from mytable everything works! However, when I do select field1, field2, field3, ...
4
votes
2answers
266 views

Integration Services Catalogs - Version Description

In Integration Services Catalogs I can see what versions of a package/project are available and if necessary revert to an older version. On this dialog I see a field "description" however I found no ...
2
votes
3answers
3k views

Detecting SQL Server Utilization with a query

My current project will send queries to an sql server constantly and It may use 100% of the memory or CPU. How can I check if the server is nearing full utilization in a stored procedure so that I ...