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

SQL Server stored procedure validity checking [closed]

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
21 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
2answers
59 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
119 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
68 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
22 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
25 views

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

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
24 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
366 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
29 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
51 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
80 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
41 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? [closed]

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

Issue in MergeJoin Transformation [closed]

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

How do I update and insert specific set of rows to an existing table using Merge in SQL Server 2008 R2?

I have a table in the database that I need to update based on the records being passed to it. I am given a table-valued-parameter that has the same schema as the existing table (for all intensive ...
1
vote
0answers
26 views

Average Waiter Count increasing

I am in a nightmare. We have deployed an application to a UAT environment, which has only 7 users. Since then, we have noticed in the logs, a lot of deadlocks, and processes being victims and things. ...
-1
votes
1answer
26 views

full windows server backup with database files but not backed up through sql server

I am new to this and I have been backing up a windows sbs2011 server each night doing a full backup. The sql files are included but not backed up using sql backup program. Now one of the database ...
0
votes
0answers
24 views

Why creating the missing index still shows it in the missing index dmv?

I followed the steps in this blog post to create the missing index and to clear it from the missing index dmv after running a select statement which uses the indicated column in the where clause and ...
2
votes
2answers
63 views

Monitor Database Memory usage SQL Server

In our PROD environment, there are two servers on which we have system critical database. The management requirement is to monitor these databases for high memory usage or access or long running ...
2
votes
0answers
57 views

Covering Index - Insert Performance

We are running some performance tuning on our database in SQL Server. The database in itself is pretty small with around 13 tables. But there are multi-level relationships between tables. When I try ...
0
votes
2answers
64 views

How to insert or update using single query?

I have a table test having columns id which primary key and auto incremented and name. I want to insert a new record if annd only if there are no records.For example input is id=30122 and name =john ...
5
votes
4answers
1k views

Datawarehouse bad practice?

In our Datawarehouse context, we have to update some record in fact tables inside our ETL. One thing we did is to create nonclustered indexes just before the heaviest queries, and drop them ...
1
vote
2answers
47 views

How AlwaysOn Availability Group secondary replica catches up with primary after secondary server long downtime

Can someone point me to the MS article or blog post that explains in details how AlwaysOn Availability Group secondary replica catches up with primary after secondary server long downtime? I did ...
1
vote
2answers
55 views

T-SQL — Why do ALTER and UPDATE statement only run when separated into their own batch?

I have update and alter statements that are only running when they are put into they're own batch. Below is my shortened version. It'd probably be a good idea to skip the code and read my question ...
2
votes
1answer
85 views

SQL Server service account Windows privileges and rights

My question is, if you create a new domain user account for each of the SQL Server processes, what permissions should be set for each account? Or does the SQL configuration manager actually take care ...
1
vote
2answers
63 views

MySQL to SQL Server - Unixtime being major problem

I'm trying to convert this query to SQL Server. It already has a lot of updates. Still, I don't know what to do from here ( i'm not the best when it comes to programming in MySQL ) SELECT ...
1
vote
1answer
101 views

SQL Server: grant select access to a user in a view and not in its tables

I have a SQL Server 2012 instance with a few databases. In one of them I created a view, that selects tables in more than a database. I want a user to be able to select that view, but it must not ...
2
votes
0answers
41 views

How to identify whether a log backup or job executing a SP is causing High Page Reads/sec

For one of my servers( SQL server 2008R2) we can continuously witness High Page Reads/sec during business hours say: from 7 AM to 9 PM EST. I kept the counter settings to monitor the same and found ...
1
vote
2answers
52 views

Query data before a commit transaction

My understanding is that, in a MS SQL Server Management Studio window, after doing a "begin transaction" and then making some changes like add data to a table , you can only query that table and those ...
0
votes
1answer
29 views

Modifying a result set in a Stored Procedure, then returning that modified set

I am currently in the process of designing my database for a mobile/web application. When I look at competing apps I see a massive flaw in how they handle user locations. Due to the nature of the ...
1
vote
1answer
59 views

How to migrate data of to another sql server

Good day, I have a database running on a virtual machine hosted at our ISP. It is a fairly large database which has about 5GB of data inserted into it every day (network logs). It is partitioned ...
1
vote
1answer
42 views

AlwaysOn with TDE

Recently, I setup an availability group with 3 nodes. The 2 synchronous nodes are on the same domain, "domain 1". The third asynchronous (DR) node is on a different domain, "domain 2". I have a new ...
1
vote
2answers
53 views

SQL ssis delete imported rows from source table

I have setup a simple SSIS package that copies data from a source table to a destination table which works. I would like to get the package to also delete the data in the source table that has been ...
0
votes
1answer
49 views

Login to SQL Server 2008 R2 remotely

It seems this is a common problem over the internet so let me give you details on my environment and the steps I did: Client - Windows 7 32-bit with SQL Management Studio Server - Windows Server 2008 ...
0
votes
0answers
26 views

SSRS 2008R2 SQL Service Account Connection Issue

In our SSRS report manager page we get the below error on the Datasources. This all worked fine previously and seems to suddenly have stopped working. I have no idea what the issue could be. All SPN ...
-1
votes
2answers
49 views

Update code works in manual stored procedure but not when run as SQL Server Agent Job

I have a stored procedure that deletes all records from an existing table, and then inserts new records. After the insert I have several update operations that change the value of one field. If I run ...
4
votes
0answers
50 views

On Prem SQL Server: Log shipping via Azure Blob Storage: Possible?

This is about on premise, regular SQL Server 2014, Standard edition. This is NOT about SQL Azure. The only part of Azure in this conversation is Azure Blog Storage, as a transport for some bits (SQL ...
7
votes
1answer
97 views

DENY overrides GRANT in SQL Server?

I'm studying for exam 70-462 and I'm practicing with some exercises I find around the web. In the site "Microsoft Questions and Answers" there's one solution I don't understand. The solution's last ...
1
vote
1answer
37 views

Monitoring the rows in a table

I'm trying to achieve the following tasks in SQL Server. I have a table that I need to monitor its growth. The table shouldn't be containing more than X amount of rows, if there are that many amount ...
0
votes
2answers
33 views

Will reindexing use the empty space or just grow table?

I have a table which is 170 GB and it has 98 GB of free/empty space. The free space was created by a massive deletion. If I run DBCC REINDEX or ALTER INDEX REBUILD, will the index use that free space ...
2
votes
2answers
74 views

How should I (re) index the table while keeping the transaction log small?

I have a 170 GB table in a database. It has 70% fragmentation on its index (index has multiple columns in it). The last time I tried DBCC REINDEX the transaction log blew up in the hundreds of GBs. ...
1
vote
2answers
113 views

OLAP or OLATP - How to determine

I have SQL express server with database that is used by one application. I am trying to optimize the DB but am not sure if the DB is OLTP or OLAP. There is no analysis server installed, the DB is ...
0
votes
0answers
29 views

Moving results from an MS SQL query in Excel - line breaks in data

I select all the output from my query by clicking in the left upper corner in the MS SQL Server Management Studio results window. I right-click, then select "copy with headers." Then paste into ...
4
votes
1answer
129 views

How to avoid using Merge query when upserting multiple data using xml parameter?

I am trying to update a table with an array of values. Each item in the array contains information that matches a row in a table in the SQL db. If the row already exists in the table, we update that ...
0
votes
1answer
17 views

How to order the where clause and join columns in a covering index?

Simple query example: Select t1.A, t1.B, t1.C, t1.CustomerID from table1 t1 join table2 t2 on t1.CustomerID = t2.Id where t1.A = 'x' and t1.B = 'xx' and t1.C = 'xxx' I created a non clustered with ...
0
votes
0answers
13 views

Are linked servers always heterogenous connections?

I have a test server and a production server, both SQL Server 2008 R2. My app's testing is done on the test server, but a related app (not under my control) has test databases in the development ...
0
votes
1answer
30 views

SQL Server Table Index To big

I have a table that has approximately 450k records here is the structure of it CREATE TABLE [dbo].[Reviews]( [ReviewID] [int] IDENTITY(1,1) NOT NULL, [AuthorName] [nvarchar](50) NULL, [AuthorURL] ...
0
votes
1answer
43 views

DELETE from Linked Server table using OPENQUERY and dynamic criteria

I'm attempting to run a DELETE statement from my local MSSQL Server to delete appropriate records from a table in my remote linked server using OPENQUERY(). I'm using the following code, but it seems ...
3
votes
1answer
31 views

Change linked server login per-query

Given the situation below, can I specify that the pre-configured linked server login should not be used for a particular remote stored procedure call? I have two SQL Server instances: [LOCAL] ...