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
2answers
268 views

SQL Server 2005 replication for a data warehouse

We are trying to implement some kind of Data Warehouse at my current employer. Most of our data is in a SQL Server 2005, but we might also integrate some Access databases and some databases in a SQL ...
3
votes
0answers
203 views

Why is my CPU usage increase after setting database to read-only on SQL Server 2008 R2

I administrate a reporting database. We run all the denormalization process on a DB1 daily then we copy all the data to an another database DB2 on the same server which is queried by web applications ...
0
votes
1answer
151 views

How to understand what Columns Have Changed in Merge Replication

I am using merge replication in SQL 2012. Some of my merge articles use column level tracking. I am trying to understand how to use the 'lineage', and 'colv1' fields in the MSmerge_contents table to ...
3
votes
1answer
4k views

How to grant a user UNSAFE ASSEMBLY permission

How can we assign a user , e.g.: the database owner (DBO) the UNSAFE ASSEMBLY permission? I'm asking it to enable a user to create an assembly and don't know the SA password, so EXEC sp_changedbowner ...
1
vote
1answer
814 views

Converting ZIP code string to integer in SQL Server

I have a SQL Server table pairing zipcodes and lat/long geometry, such as below ID ZIP5 geom 1 356HH 0xE610000001044E00....FFFFFFFF0000000003ID 2 35677 0xE6100000010404000000068....000003 ...
4
votes
1answer
114 views

What is a good auto-generated key for a federated database?

I am about to split a large database into a bunch of federated instances. Currently, most of the primary keys are auto-generated identity ints. Obviously, that's not going to work in a federated ...
3
votes
2answers
1k views

Does adding page compression to a table also compress existing indexes?

I am creating a series of new tables that will have page level compression enabled. Will this affect the indexes as well, or will I have to also specify compression when creating the indexes? create ...
3
votes
1answer
334 views

TempDB size issue after applying Indexes

I added several indexes to a SQL Server 2012 database to help with performance a couple of days ago. Today our partition with TempDB on it ran out of space. TempDB went from less than 10 GB to 38 GB. ...
0
votes
1answer
107 views

seeking a confirmation — SQL Server backup performance [duplicate]

Possible Duplicate: Is SQL Server Backup single or multi-threaded? Does SQL Server uses a separate writer thread for each backup device (backup file) or separate thread is used only when ...
2
votes
1answer
400 views

Migrating database from SQL Server 2005 Enterprise to SQL Server 2008 Standard

I'm attempting to migrate a database from SQL Server 2005 Enterprise to SQL Server 2008 Standard. I've run into an issue because there is a partition function defined in the database of the Enterprise ...
0
votes
1answer
88 views

UTC date in DMV dm_broker_queue_monitors

It seems that the DMV dm_broker_queue_monitors returns UTC time rather than local time. Why is it so? I am wondering how to get local time from this view? I can get current time offset, but that is ...
1
vote
0answers
101 views

MS SQL to MySQL Conversion

Is there a tool available that converts queries written as triggers, stored procedures and functions written in MS SQL 2008 to MySql? We switched databases and now I need to rewrite a bunch of queries ...
8
votes
1answer
129 views

How can I prevent SSMS from re-writing my code when saving a view?

I'm creating a view that uses a statement with a WHERE clause similar to this: WHERE ( col1 IS NOT NULL OR col2 IS NOT NULL ) AND NOT EXISTS (SELECT ...) ...
5
votes
3answers
810 views

Storing terabytes of data in SQL Server

I need to develop a production system capable of storing a 100 kb textfile and a serial number for every piece produced. I know the approximate output over 2 years, the time the data has to be stored, ...
12
votes
2answers
455 views

SQL Server 2008 Performance issue with very strange resolution

I'm a long time DBA (12 years in SQL). I'm running SQL Server 2008 Enterprise in a Win 2008 clustered environment. 128gb memory and 32cpu in each cluster node. Not wimpy. I've got the weirdest ...
5
votes
2answers
368 views

Why does OBJECTPROPERTY return NULL?

Say you want to query a database to discover the types of trigger it contains. One way to do this is to use the OBJECTPROPERTY function on all trigger objects in the database. Sometimes the ...
2
votes
1answer
210 views

UDF performance suddenly degraded

SQL Server 2008 R2 I know this is a common problem (eg: http://connect.microsoft.com/SQLServer/feedback/details/524983/user-defined-function-performance-is-unacceptable) - but ive only just learned ...
1
vote
1answer
87 views

Partitions and Indexes, in which cases should be used

I know some knowledges: Partitions used to achieve better performance (like described in this article) And indexes used to increase performance in selection operations. And as result my question: ...
1
vote
0answers
60 views

i want to modify Redgate source control Git.xml file to include commit and push

Below is an excerpt for the git.xml file in redgates source control <element> <key type="string">Commit</key> <value version="1" type="GenericHookCommand"> ...
2
votes
1answer
482 views

Index with multiple leaf levels

I have a three-column (int, smallint, smallint) composite clustered index with three leaf levels. My question is how and when does SQL Server create multiple leaf levels (index_level 0) for the same ...
2
votes
3answers
2k views

SQL Server dbo permissions for specified databases

Can I assign SQL Server dbo permissions to a user, so it applies only for specified databases on a server? Currently using SQL Server 2005.
3
votes
1answer
2k views

SQL Server 2008 unable to backup due to Failed to flush the commit table to disk in dbid 11 due to error 2601

I tried to backup the SQL Server 2008 database using the following code: BACKUP DATABASE [DataStore] TO DISK ='E:\SQLServerDatabase\DataBasebackUpOct302012.bak' and I get the following error: ...
5
votes
2answers
2k views

What can I do to speed up this SQL Query?

I've created this SQL query with the help of @Dems :-) Here is some detail, I tried to make a SQLFiddle but I kept getting errors with my variables... This works in Sql Server 2008... My question ...
0
votes
1answer
68 views

How many connections reads queue

Is there a way to get to know how many external tasks (console applications) is reading queue? I am using Service Broker external activator. What i want is something similar to information i get ...
15
votes
1answer
544 views

Is it safe to rely on a shadow volume backup of the mdf and ldf files?

We are looking at replacing traditional SQL server backups with a VSS based backup of mdf and ldf files. As a db person I'm somewhat twitchy about this, and yet I can find no evidence that this won't ...
2
votes
1answer
768 views

SQL Server backup devices

I'm trying to find out how to detect if a backup device exists using T-SQL. This is how I create my backup device: EXEC master.dbo.sp_addumpdevice @devtype = N'disk', @logicalname = ...
5
votes
1answer
423 views

Calling a .NET method in a SQL Server script

In the data migration process, I need to convert some columns values form the source system before writing to the target table. I've been provided with a Csharp code which reads a string and do the ...
3
votes
1answer
111 views

SQL query returns different results when index is dropped

In SQL Server 2000 SP4, I have a query SELECT <fields no aggregates> FROM PS_VED_VCH_TAO5 A ,PS_BUS_UNIT_TBL_AP B ,PS_RT_DFLT_VW C WHERE A.PROCESS_INSTANCE = 594170 ...
2
votes
1answer
103 views

Execute job every time database changes - execute job on each change-event

I have a transactional-replication running in my database, and I need to execute a service on my website that refreshes the cache every time the database changes. So i guess i have two options to ...
0
votes
2answers
3k views

SQL Server : Is it possible to have a linked server link to another linked server?

Hello to all and thanks ahead of time for taking the time to look at my question! I'm trying to do a work-around to access a 32bit Advantage Database Server 8.1 database with 64bit SQL Server 2008R2. ...
3
votes
1answer
407 views

Applying user-defined fields to arbitrary entities

Currently we have an old (rather crude) system that has user-defined fields, which are mapped against rows in arbitrary tables. This was an after-the-fact modification based on a customer request, and ...
1
vote
3answers
255 views

Same query taking 0.2 sec in Oracle database but 4 mins in SQL Server

SELECT A.Field1 FROM Table1 A INNER JOIN Table1 B ON A.Field2 = B.Field2 AND A.Field3 = B.Field3 AND A.Field4 = B.Field4 AND B.Field1 = "string1" AND B.Field2 = "string2" AND A.Field5 = (SELECT ...
1
vote
1answer
623 views

Tabular mode disabled during SSAS installation

I am trying to install SSAS in Tabular Mode. However, i find that the radio button is disabled. I am installing it on a separate instance as well. The regular Multidimensional SSAS had been installed ...
2
votes
0answers
498 views

Finding Microsoft.AnalysisServices.Xmla dll in SQL Server 2008 R2

I'm not able to find Microsoft.AnalysisServices.XMLA.dll that I need to import using Microsoft.AnalysisServices.Xmla; I have found some articles and answered questions for SQL Server 2005 and 2012. ...
-5
votes
3answers
507 views

SQL Server Express with 20000 databases won't start

I have a SQL Server Express instance with 20,000 databases (twenty thousand databases).. and the service won't start. I get error message 1053: The service did not respond to the start or ...
1
vote
1answer
307 views

Store table in separate filegroup in SQL Server

I have big SQL Server database, with a lot of blob data in some tables. For performance optimization, I want to move one table to separate hard drive. I created new filegroup, and "row data" file. ...
1
vote
1answer
41 views

I have deleted a table, by exporting over the same table, and selecting the 'drop destination table before insertion'

I understand this might not be the best forum, but I could sure use some help right about now. If not, please suggest a forum where I can. I was trying to backup a table, by using the export wizard. ...
3
votes
2answers
761 views

How to compare two SQL Servers instance level objects for a migration?

I'm currently working on a SQL Server migration (from a SQL Server 2005 to a 2008 R2 server, on a new physical server). The databases themselves will be transferred using a database backup and ...
0
votes
3answers
55 views

Query Optimizing Request

I am very sorry if this question is structured in not a very helpful manner or the question itself is not a very good one! I need to update a MSSQL table call component every 10 minutes based on ...
5
votes
4answers
798 views

Create a plan guide to cache (lazy spool) CTE result

I normally create plan guides by first constructing a query that uses the correct plan, and copying it across to the similar query that doesn't. However, that is sometimes tricky, especially if the ...
3
votes
2answers
1k views

SQL Server Concise List Of Trace Flags

I did my 5 minute research and have not come up with a concise list, or even a list really except for Trace Flags (2012) which is a bit lacking. Looking at this query which uses 8691, I was wondering ...
2
votes
3answers
988 views

Table with identity column in merge replication

I have a table in SQL Server 2005 and I have an IDENTITY(1,1) property set for an ID column. Records are inserted in a table at a local server as well as a remote server. I am using Merge ...
1
vote
2answers
300 views

How to connect to SQL Server Analysis Server via Management Studio command line

I can connect SQL Server Management Studio to a SQL DB by passing command line parameters like this: "C:\Program Files (x86)\....\Ssms.exe" -E -S SERVERNAME -d DB_NAME -nosplash (Obviously -E is ...
6
votes
5answers
1k views

Connect to SQL Server behind NAT from remote machine

The scenario is that this is a SQL Server behind a corporate firewall with your standard setup to allow only minimal outbound traffic and zero inbound. However, port 80/443 are open, per the usual ...
1
vote
1answer
888 views

Query performance of a NULL vs an empty ('') varchar in SQL Server 2012

I have 3 indexed fields in a query: int, int, and varchar(250). The query performs well when all 3 conditions are specified with real values. The int columns always have values, but there are plenty ...
2
votes
2answers
1k views

Merge two records in the same table, keeping foreign key relationships intact for both

I have a table, called SITES, that has three columns, lets say it looks like this: ID Name Path 1 Google http://www.google.com/ 2 Microsoft http://www.microsoft.com/ I also have ...
2
votes
1answer
214 views

How to choose working database in DB2?

In SQL server I can use the USE statement to switch between working databases. Is there a similar command for DB2?
3
votes
1answer
248 views

How are foreign keys resolved when creating tables in batch?

I am creating a database version management tool with the goal of being able to recreate a database from scratch using text/sql files contained in source control. As part of establishing a baseline ...
4
votes
1answer
481 views

Calculating Median Value within a Group By

I have a SPROC which calculates the Mean duration of a request / response cycle within 10 minute intervals. This works well and suits my needs for plotting charts. What I would like to do next is ...
0
votes
1answer
89 views

Logging of incorrect row in SQL Server Integration Services

I newbie to SQL Server Integration Services and I have a problem: Data loaded from file looks like this: 1 'a' 'b' 2 'a' 'b' 1 'c' 'd' And this rows would be loaded in table like this: CREATE ...