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)

2
votes
3answers
49 views

Is inserting multiple queries takes same time as that of single query?

I have a requirement where I have to insert a lots of rows.For inserting we use like this insert into emp(name,age) values('abc',12); This will insert only one row.For inserting multiple rows we ...
0
votes
0answers
15 views

Update a set of SQL statements

dbo.MatchFirstName(@FirstName) and dbo.MatchLastName(@LastName) are table Value Functions(TVFs). Problem: In my Update statement i.e Update #Temp after Insert, I want only those rows to be ...
0
votes
1answer
39 views

Query on 250 million records

I have a table with below structure CREATE TABLE [dbo].[ColumnValues]( [Id] [int] IDENTITY(1,1) NOT NULL, [ColumnId] [int] NOT NULL, [Value] [nvarchar](max) NULL, [OutputArea] ...
0
votes
2answers
25 views

SQL Server tuning: Disk queue to OS drive: How to optimize?

I expect to see the disk queue move on the data, tempdb, log and backup volumes. I do not expect to see the OS drive (C:) which has zero SQL files present, show disk queue impact. Assume it is to ...
0
votes
1answer
31 views

Exclusive access to edit rows

I'm developing a program that allows users to view and edit data. My question: Is there tools (sql server tools, may be users/roles) to implement the following: There are two users: A and B. User A ...
1
vote
0answers
11 views

Can I use SPARSE somehow on a non-nullable bit column with mostly false values?

I have a table that stores the results of queries that are run at least once a day. There's a bit column that represents whether the row is from the most recent run of a particular query with a ...
0
votes
1answer
37 views

Uexpected values inserted in table

I have a table called FunctionWeights which contains data as follows: My query is as follows: select @constVal = FunctionWeight from dbo.FunctionWeights where FunctionWeights.FunctionName = ...
-1
votes
1answer
28 views

Debugging Remote Connection Failure of SQL Server 2012

I am running SQL server 2012 web edition on Windows Server 2008 R2. I have followed all these steps http://blog.citrix24.com/configure-sql-express-to-accept-remote-connections/. But still unable to ...
2
votes
1answer
16 views

How to pass multi-valued characters in SSRS Report?

I have a SSRS report that has 3 data sets feeding off one data source. The main dataset is a stored procedure that is aggregating some data based on a set of parameters powered by the other two ...
0
votes
2answers
29 views

Initial Discovery process

I am looking to better my knowledge without actually being in the field, I was wondering what initial steps you take when you are assuming the responsibility of a server with SQL-Server installed on ...
5
votes
1answer
134 views

Why can a non-clustered index not be dropped using online=on option

When attempting to drop a non-clustered index using the online option such as DROP INDEX [IX_MYINDEX] ON [dbo].[myTable] WITH ( ONLINE = ON ), I receive the following error message. Msg 3745, Level ...
0
votes
2answers
35 views

Are some these indexes redundant?

Let's say I have a table of 4 columns: A, B, C, D. A primary key is on A, B, C. Index1: is A, D, B, C in that order Index2: A, B, C, D in that order and the primary key index: A, B, C There are ...
1
vote
1answer
29 views

How do I drop all constraints from all tables?

I want to drop all default constraints, check constraints, unique constraints, primary keys and foreign keys from all tables in a SQL Server database. I know how to get all the constraint names from ...
1
vote
1answer
22 views

Confused about sys.dm_io_virtual_file_stats num_of_reads/writes column

I'm trying to use the sys.dm_io_virtual_file_stats DMF to generate so IO wait information across a number of my servers. I came across this post by Paul Randall: ...
0
votes
0answers
20 views

Server 2012 Linked Server From An Instance

I have 3 SQL Server 2012 Instances, 2 on SiteA on the same server SiteAServer. I have 1 on SiteB on server SiteBServer. SiteADefaultInstance SiteASecondInstance SiteBDefaultInstance ...
2
votes
1answer
32 views

Can I throttle individual databases instances on one SQL Server 2005 box

I am running a very old server that has a database that is being permanently retired within 14 months. My company will not invest anymore in hardware or software for this system as we are moving to a ...
-2
votes
0answers
30 views

Multiply operation/field causing the record set to 'ungroup'?

I'm trying to sort a query for a report but every time I add a Multiply operation to it the record set result becomes a mess and if I try to GROUP BY I get the legendary ...either an aggregate ...
2
votes
2answers
51 views

Database cannot be opened. It is in the middle of a restore?

I've set up log shipping using standby mode (The "Disconnect users in the database when restoring backups" is unchecked). I tested running the following code on secondary server/database. declare @a ...
0
votes
0answers
27 views

Sql server 2014: backup log to 2 destinations

We want a single job to back up log to azure and file system every time. So we can log ship from file system and from azure at the same time. I seem to recall that the redgate sql backup tool has a ...
1
vote
2answers
20 views

How to configure an instance to listen on port 1433 to allow remote connection

Trying to connect using SQL Server Management Studio 2012 on a Windows 8.1 Client computer from outside the cluster's domain. Cluster is a two node Virtual Cluster made from Windows Server 2012 R2. ...
0
votes
1answer
31 views

Long running query…only on replicated database

I have an issue I can't seem to solve and wondering if anything jumps out at you. I have a query that I got from one of our developers, it runs in about 5 seconds on our production database and also ...
0
votes
1answer
23 views

Improving lots of Left Joins ( SQL Server 2008 - procedure )

This query is running with 8 minutes to complete. I'm trying to help the programmer with this task. I've created indexes and stats, update_stats and rebuild indexes but none of this is helping us. ...
1
vote
1answer
58 views

Get all rows in table A even if no rows in table B in CROSS JOIN

I Have This query SELECT * FROM ( ( SELECT SUM(Auditoria.Importe - ISNULL(Auditoria.Pago, 0)) AS Deuda FROM Auditoria INNER JOIN Articulos_Auditoria ON ...
2
votes
1answer
147 views

SQL Server Isnull Returning 1900-01-01 when field is null

I am using SQL Server 2012. The following piece of code is returning 1900-01-01 when the DOB field is null. I wanted (and expected) it to return an empty string ('') but it's not. How should I ...
1
vote
1answer
42 views

DataBase Back Up - with a Not Null Column [on hold]

Can I include a default value to be entered in the Not Null columns when I do database back ups ? If so How can I do that?
2
votes
1answer
55 views

Updating large table worked before, now taking hours

BACKGROUND: I am using a non-production SQL Server to manipulate a large data set and run a few basic calculations. The original data file I have, which is about 30M rows, is missing records (not ...
0
votes
1answer
35 views

SSRS make a conditional format on the column

In a SSRS matrix report I'm trying to make a conditional format on the 'Total' column By checking one of the columns for a specific value, For example: In case in one of the Groups (Toys, Clothing, ...
0
votes
0answers
13 views

Validating Excel Counts against Database Inserts

I have to design a SSIS package which uses Excel Source files and inserts the data into SQL Server Database. The problem is that I've created the packages top transfer data, but now I need to ...
0
votes
2answers
56 views

Can't restore database?

Im trying to restore, let's say, db1. But some of my colleagues are using db2. We're in the same sql server. Why can't I restore my db1.bak even if Im the only one who's using it...? I tried "Take ...
0
votes
0answers
7 views

Replication from Database A to Database B without taking new snapshot

I have Database A which is my publication database. Database B was a subscriber but something went wrong and we need to re-do the transactoinal replication. Database A is over 200GB and takes a ...
0
votes
0answers
19 views

How to convert multiple rows of records into column based table? [on hold]

I'm working on a dynamic tables, which stores data and fields as rows in one table. I have a table like this: ID 100 Name One Hundred ID 99 Name Eng. Ahmed I want to ...
2
votes
0answers
19 views

Update matching keywords from first table to second table in SQL

I have two tables where 1st table is Englishgermankwds_tbl and 2nd is Kwd_UploadRecored the data of the tables is as follows Table Englishgermankwds_tbl English_Keywords ...
0
votes
0answers
31 views

Bring back the replaced database?

Story: I tried to restore my backup database using a different name (The backup database name is "db1" and db1 is still existing in sql server. In restore, I renamed the "To Database" field into ...
0
votes
1answer
15 views

Maintaining multiple build versions of asp .net / SQL Server applications

We have new versions of .net applications deployed every week for testing given in form of new build files. Can any one suggest how I can maintain many versions of the builds without having to keep ...
0
votes
0answers
10 views

Cross Server Transaction takes longer when executed from stored procedure

I have a stored procedure on ServerB which executes an update statement joining with another table on ServerA. Something like.... USE [DatabaseA]; GO SET XACT_ABORT ON; --<-- Since cross ...
3
votes
2answers
53 views

SQL Server stored procedure validity checking [on hold]

How can I check the validity of a stored procedure programmatically? Meaning that if no errors are found it will execute. How can I detect things like invalid tables names in "from" or "join" clauses? ...
0
votes
0answers
18 views

can't connect to DB using MS SQL Server 2008 Upgrade Advisor

I'm trying to use MS SQL Server 2008 Upgrade Advisor Analysis Wizard, to connect to a networked MS SQL 2000 database. According to the query select @@ServerName, the instance name contains a hyphen. ...
3
votes
1answer
43 views

How to properly increment an int identity in SQL Server if the Identity Increment isn't set?

When I use SQL Server with an int based identity column, I always use the auto increment. But I'm needing to insert into an existing table that doesn't have the property set, and I'm wondering what ...
4
votes
2answers
87 views

SQL Server 2012 memory consumption outside the buffer pool

I've got an instance of SQL Server 2012 SP2 Enterprise Edition consuming ~20GB of memory higher than the max. memory limit. The instance is limited to 65GB but the physical memory in use from the ...
1
vote
3answers
62 views

CASE with CHARINDEX and CONVERT

I have a column of characters in SQL Server 2014 that I have to convert to numeric and give them the opposite value (- to + and + to -). The data looks like this: -0000000000002999 ...
1
vote
0answers
17 views

Is It Safe to Remove Local Service Accounts?

I have changed my SQL Server services to use domain service account. The server still has NT Service\MSSQL$INSTANCENAME and NT Service\SQLAgent$INSTANCENAME listed under Security\Logins. They each ...
0
votes
0answers
22 views

A Domain user cannot modify SQL database related c# application [on hold]

I have already asked this question on STACKOVERFLOW.COM and I was guided to ask it here: I wrote a C# application which uses a SQL Server database. I have set the following connectionString and ...
1
vote
1answer
23 views

SQL Server Specific term full text search is not working

I'm trying to perform an specific term full-text search in SQL Server. It looks like the way to do it is by wrapping the keywords in double quotes, which I'm doing in my app: Query = "\"" + ...
5
votes
2answers
339 views

When was a Database taken Offline

I am trying to find a way to figure out when was couple of my sql databases were taken offline. I checked the the logs but could not find any such info and moreover there is no default trace enabled. ...
1
vote
1answer
25 views

JDBC connection error for SQL Server Database

I have a SQL server names as MS8AT09\AT09. I am able to login to the server through Microsoft SQL server Management studio. While trying to login to same server through JDBC I am facing the error as ...
0
votes
1answer
44 views

How to prevent or notice automatic connection retry in SQL Server and OLE DB

I have a c++ application that connects to SQL Server 2005 using OLE DB / Native client. If the connection gets broken or for example the session is killed from the database something causes the ...
0
votes
2answers
79 views

Recover data in a SQL Server table without backups [duplicate]

We are having a database without backup to restore. (we didn’t keep backups as client not having enough space in his SQL Server 2012). Unfortunately some data has been lost and we need to recover ...
4
votes
0answers
35 views

Why and how sometimes I get the “absent table error” while there are definitely Sch-M lock?

I have a synthetic test, which reproduces some error we have on the production environment. Here are the 2 scripts to reproduce it: 1st DBCC TRACEOFF(-1,3604,1200) WITH NO_INFOMSGS; SET NOCOUNT ON; ...
0
votes
0answers
19 views

What open source or third party software is available to extract data with local ODBC connection and then upload to web server? [on hold]

Can someone recommend a utility or software solution to extract data from a client side local database with a ODBC connection and then also upload the records to a web server?
0
votes
0answers
26 views

Issue in MergeJoin Transformation [on hold]

I am using Sort and Merge Join transformations to combine two tables from two different databases. The issue I am facing is the two sort transformations are giving outputs of around 20k records. ...