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

Drop permission from a dbowner

How can we remove the drop permission from a user or a role like dbowner? Want to restrict the dbowner from dropping the database.
7
votes
1answer
148 views

Deadlock when update different rows with non-clustered index

I'm solving a deadlocking issue while I noticed the lock behavior is different when I use clustered and non-clustered index on the id field. The deadlock issue seems to be solved if clusted index or ...
0
votes
0answers
29 views

SQL query to return a column per date in date range with sum of contract utilisations (value/duration)

My question is similar but more elaborate than another already in stackexchange.com "SQL query to return a column per date in date range?" I have the following data: Customer Start_date ...
0
votes
1answer
48 views

SQL Server 2012 Tuning process exited unexpectedly. DTAEngine

I am using Windows Server 2012 x64 and SQL Server 2012. I am running the Database Tuning Advisor with these settings : Advisor plan cache. Database workload master. Check my database all the ...
2
votes
1answer
26 views

How to search double quotes in fulltext search in sql

I have double quotes in my Keyword. How can I search this in my fulltext search query. I have this query SELECT top 10 K.[KEY], 10, K.[RANK] FROM CONTAINSTABLE(ProductKeywords, Keywords, '("19*") ...
2
votes
1answer
41 views

How to pull a list of applied service packs and cumulative updates from SQL Server 2008 R2?

I want to list all the SPs and CUs applied to a SQL Server 2008R2 instance. Example: 10.50.4260 2720425 http://support.microsoft.com/kb/2720425 CU#1 for SQL Server 2008 R2 SP2 10.50.4000 2630458 ...
1
vote
0answers
45 views

Multi-victim deadlock in SQL Server

I have been seeing a lot of deadlocks occurring on a system with deadlock graphs similar to this one: I have been advised that it is a multi-victim deadlock but I cannot re-create a deadlock graph ...
1
vote
1answer
54 views

Insert with OUTPUT correlated to sub query table

I am modifying the structure of a database. The content of several columns of the table FinancialInstitution has to be transferred into the table Person. FinancialInstitution is linked to Person with ...
0
votes
1answer
40 views

Is this application creating stored procedures on the fly? [duplicate]

We are running a transaction program that uses MS SQL Server. Lately as our number of users and locations have grown, speed/response seems to be an issue. When looking at *sys.dm_exec_sql_text*, I ...
3
votes
0answers
19 views

Object Auditing with Availability Groups

We are about to implement Availability Groups and it brought up a question. We currently use auditing to see which objects are no longer used in production. We also take a backup each night to use ...
3
votes
2answers
74 views

SQL Server Database Mirroring is going to die. How can I guarantee high availability now?

The Database Mirroring feature of SQL Server is going to die: This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan ...
0
votes
0answers
20 views

Computation of Server Capacity in regards to Records [closed]

right now i am doing an upgrade for a server and i want to know the possible capacity of my storage given the number of records from table(database)... what will be the computation? Thank you very ...
-1
votes
1answer
76 views

Steps to start carrier in Database administration [closed]

Hi I am a fresher and joined in a small software company where they given me the opportunity to maintain their database. Just now I know to query the database,to write stored procedure and learnt some ...
1
vote
0answers
42 views

Importing bulk csv file to oracle database

I am going to import a bulk csv file to oracle database. This file contains around 200m records. I was wondering what is the best way of importing this file? I check the performance of SQL developer ...
-3
votes
0answers
41 views

Querying for commentator repo and poster repo for different values of the comment ID (stored in a table) in SEDE [migrated]

How can I modify the following query SELECT CASE WHEN U.Id = P.OwnerUserId THEN 'Poster' ELSE 'Commenter' END AS [User], U.Id AS [User Link], U.Reputation AS [User Rep] FROM Comments AS C INNER ...
1
vote
1answer
53 views

How do I solidify my SQL Server / T-SQL Knowledge? [closed]

I am a C# developer and not a database admin, but I have been using SQL Server for application developnment for over 4 years now and was really interested in getting a more complete understanding, and ...
0
votes
0answers
21 views

SQL Server Replication Monitor Throwing “Specified cast is not valid. (ReplicationMonitor)” Error

The publisher is running SQL Server 2008 R2 on a Server 2008 R2 box. The subscriber is running SQL Server 2012 on a Server 2012 box. I have tried launching the replication monitor from both servers ...
1
vote
1answer
36 views

Index against a subset of rows?

Is it possible to create an index against a subset of rows fulfilling a certain condition? If it is possible how does one ensure the index is used?
0
votes
1answer
90 views

Why query optimizer doesn't use negative filter index

I have a table that has following structure, as you can see, there are one clustered index and two non-clustered indexes, one non-clustered index is IX_ParentId_Include, and another one is ...
1
vote
2answers
50 views

Should I include as much information as possbile to help the optimiser?

Reading the article "Dynamic Search Conditions in T‑SQL" I saw the following statement in the "Using sp_executesql" section. Double Feature You may wonder why there are two conditions on the ...
1
vote
0answers
32 views

SQL Server 2008, SOAP Endpoint, http.sys, timeout

I am debugging a SOAP webservice hosted by SQL Server 2008. I know that those are deprecated in future versions and we should consider a different technology, of course. There is an exposed procedure ...
0
votes
1answer
66 views

Finding login or user name of last person to use a DB

The boss has asked for a list of DB names along with size and name of last person to use that DB. I've found resources for when a DB was last accessed but for by whom. How would I solve this? ...
0
votes
0answers
41 views

When is transaction removed from sys.dm_tran_active_transactions?

We are having some issues with clients getting Transaction Timeout when connecting to our clustered SQL Server 2008 R2. To investigate the problems I have been digging into ...
1
vote
1answer
31 views

SQL Server 2008 R2 - Limit viewing on database list

In SQL Server 2008 R2 I have user1, he owns 3 db (db1 , db2, db3) and I want he can see only these 3 db when he login by using SSMS. I did REVOKE VIEW ANY DATABASE FROM PUBLIC, but then he cannot see ...
2
votes
0answers
62 views

Querying for reputation of the commenter and its addressee using SEDE [closed]

How can I modify this Data Explorer query for the case when user of the comment is same as the poster, then the query should look for the tagged user in the comment and print the tagged user ...
0
votes
3answers
69 views

SQL Server: CONVERT From ISO8601 To DateTime Within Query

I have a Microsoft SQL Server 2008 R2 database where the DateTime column is not a datetime data type, but varchar(50). Our website logs that data and I don't really have control over it (I'm sure a ...
0
votes
3answers
63 views

Is table partitioning improving performance? Is it worth it?

I have just been involved in a project on which I will have to develop a data migration process and a web interface that uses an already existing SQL Server DB. This DB was developed by another person ...
2
votes
1answer
31 views

Can SQL Server Bulk Copy cause timeouts when querying the table

In SQL Server 2008 R2, can using BulkCopy to upload thousands of rows of data cause problems for queries taking place on the same table? Specifically could it cause the queries to time out? The ...
1
vote
1answer
37 views

Cannot Copy Database

I am working with SQL server 2012. I want to copy a database along with all the data. I just want to create a dev DB. I know SQL Server 2012 has a Copy Database... wizard. But when I run that wizard, ...
1
vote
2answers
82 views

Detecting changes in a SQL Server table

In my application, with a DB running on SQL Server 2012, I've got a job (scheduled task) that periodically executes an expensive query and writes the results to a table that can later be queried by ...
1
vote
1answer
66 views

Return every instance of a string contains search

I have this sample table and data CREATE TABLE [dbo].[SampleTable]( [Id] [int] IDENTITY(1,1) NOT NULL, [TextColumn] [nvarchar](1000) NOT NULL, CONSTRAINT [PK_SampleTable] PRIMARY KEY ...
0
votes
2answers
39 views

How to verify data dumps between two MS SQL and MySQL

I'm trying to verify data exported from MSSQL and imported into MySQL is 100% accurate using MD5 hash. On Linux, I'm using md5sum and WinMD5 on Windows. The encoding is the same: UTF8. I tried both ...
0
votes
0answers
23 views

LocalDB in Management studio, login failed for Windows Administrator account

When I try to log in to (localdb)\v11.0 from Sql Management Studio (2012).. I get this error TITLE: Connect to Server Cannot connect to (localdb)\v11.0. ADDITIONAL INFORMATION: ...
0
votes
1answer
26 views

Insert / Edit Rows by Selecting FK row

When inserting or editing rows ("Edit Top 200 Rows") for a table with a FK constraint, can the editor be configured to select the foreign row, rather than me having to look up the FK?
0
votes
2answers
51 views

Performance counter MSSQLInstance\SQL Errors\Errors/sec\Info Errors whats in it?

Im wondering what kind of errors would show up in the: SQL Errors\Errors/sec\Info errors performance counter. I read the TechNet article it just states: Information related to error messages ...
0
votes
1answer
47 views

Which should I use on my DB? - Clustered Index or Non Clustered Index or Both [duplicate]

I just need advice on how I am going to optimize my database. | Date | Time | Area | Block | Data1 | Data2 | Data3 | DataN | I have that format of tables on my database. Each tables has 30-days of ...
0
votes
2answers
33 views

Which should I use on my DB? - Clustered Index or Non Clustered Index or Both

I just need advice on how I am going to optimize my database. Date ---- Time ---- Area ---- Block ---- Data1 ---- Data2 ---- Data3 ---- DataN I have that format of tables on my database. Each ...
0
votes
0answers
11 views

Replication failure after old domain controller shut down

We changed domains on our SQL Server 2008 R2 about 6 months ago with no issues while the old domain controller was still up. The old controller was taken down today and our replications started ...
0
votes
0answers
57 views

How control 27 locations and 27 databases? [closed]

We have 27 locations and 27 databases (all are SQL Server 2012 R2) All of them are the same (same tables,views,...), with different data for each location and separated from each other (in each town) ...
3
votes
1answer
34 views

Loopback Linked Server

Is there any benefit in use a Loopback Linked Server, maybe in a security or performance level, because I really don't get the idea ? I google it for several minutes and I find nothing about it.
-1
votes
0answers
56 views

CTE Hanging with Larger Data Set

I have a CTE that creates a hierarchy and looks for circular references. The table it searches lookes like this: Parent_IndicatorID | Child_IndicatorID | SortOrder My CTE is the following: ;with ...
0
votes
0answers
25 views

Install SQL Server 2012 missing vs_Setup.msi from Visual Studio 2010

I am trying to install SQL Server 2012 Enterprise with SQL Server Data Tools included. I understand that SQL Server Data Tools is part of what was formerly known as BIDS. The installation for SQL ...
3
votes
2answers
46 views

Replication with FileStream

I need to setup database replication (for high availability) on a database that uses FileStream. This is on SQL Server 2012 Standard Edition, so Always On or Peer-to-Peer replication is not an option. ...
1
vote
1answer
47 views

SQL Server and SQL anywhere compatbility

I wish to install a SQL server DB on a VM already running a SQL anywhere DB. May I encounter a compatibility issue ?
1
vote
1answer
195 views

How can I create a Foreign Key to a Compound Primary Key with a single column?

I am working with a 'lookup' style table that is already in place, which has a compound primary key (not my design) in Microsoft SQL Server 2012. I want to add a foreign key to it in another table, ...
0
votes
0answers
28 views

ssis ado.net destination has failed to acquire the connection

I am Transferring data from sql server source db to sql server destination db (cross db). but some times getting error "ssis ado.net destination has failed to acquire the connection.The connection may ...
0
votes
1answer
39 views

How to know DB size using backup file without restoring it

Is there anyway so that we can estimated/know size of database using backup file without restoring it?
4
votes
1answer
45 views

Is it possible to return a custom error for a logon trigger?

I'm trying to get a logon trigger to return a custom error. Thus far everything I have tried causes it to return the standard error: My trigger looks like this: CREATE TRIGGER Test_Logon_Trigger ...
1
vote
1answer
65 views

Performance hit with column alias

I have a database in SQL Server 2008, with the final data table having about 2 million rows. The development team is implementing a new application and they have suggested changing the column name to ...
2
votes
1answer
55 views

SQL Server on Mac

Can SQL Server engine express edition be installed in a Mac OS? I use a MacBook at home and would like to use it as a testing/learning platform for SQL Server.