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
1answer
151 views

Describe Interim Table and Basic Concept behind it?

Hy Everyone... Can anyone describe me what is interim table in sql Server 2008? what is the basic concept and structure behind it. thanks in advance.
11
votes
3answers
8k views

general memory requirements for sql server 2008 r2

I'm not experienced with DBA work, but I'm trying to make a case for requesting additional resources for our sql server and was hoping I could get some smart folks to provide a rough rough estimate of ...
4
votes
5answers
28k views

Why is SQL Server consuming more server memory?

Sqlserver is consuming 87.5 % of my server Ram. This recently causes alot of performance bottleneck such as slowness.I Research on this issue. One common solution i could find on the internet is to ...
1
vote
0answers
145 views

Inline TVF with One Row Result

I have several times converted scalar functions into inline tvf. Usually this is the basic design I used in inline tvf: CREATE FUNCTION TVF(@ID INT) RETURNS TABLE AS RETURN( WITH BASE AS( ...
8
votes
3answers
3k views

Does disconnecting the network stop a query?

I recently executed an update query against 100,000 records. I realized I'd made a mistake while the query was running and quickly unplugged the network cable. Does the update query stop ...
6
votes
2answers
7k views

Connect to SQL Server 2012 from an Windows XP client

We have an SQL Server 2012 Standard database, to connect to it we use SQL Server 2008 Management Studio (since 2012 SSMS is not supported on Windows XP). The problem is that SQL Server 2008 gives all ...
4
votes
3answers
3k views

Select rows after a specific ID

I have the following query, it chooses from a news articles table. Due to multiple sorting factors, I cannot locate the next page of date. The parameter I have is the last ID in the query result set, ...
5
votes
1answer
436 views

Changing autogrow settings with database mirroring

Recently I changed the Autogrow settings for some of the databases on our SQL Server 2008 R2 server. These are involved in a database mirroring configuration, with the principal on SERVER1 and the ...
5
votes
1answer
86 views

Transfer logins to another server

I moved a database from SQL Server 2005 to SQL Server 2012. Is there any way of restoring all the logins on the new server?
4
votes
2answers
143 views

SQL Server logs in Gmail

First off, I'm using SQL Server 2008 R2. When I set up my maintenance plan and got to the "Select Report Options" step, I selected to email the report to the Operator I already have set up. This ...
2
votes
1answer
3k views

Reporting Services TempDB keeps going into restoring mode

I am looking into an issue with SQL Server 2008 Reporting Services. It has been working fine until yesterday morning. Now I notice that ReportServerTempDB keeps on going into Restoring... mode. I ...
3
votes
4answers
4k views

Can I force a user to use WITH NOLOCK?

Can I force a user's queries to always run with the hint NOLOCK? e.g. they type select * from customer But what is executed on the server is select * from customer with (nolock) This question is ...
7
votes
3answers
663 views

How to determine Windows Server start time using T-SQL

I am looking for a way to find out when the Windows Server was last started using only t-sql commands. I am trying to stay within the default security configurations (i.e. I don't want to enable ...
2
votes
1answer
2k views

ORDER BY items must appear in the select list […]

Using Microsoft SQL Server 2008, I get the following error. Msg 104, Level 16, State 1, Line 43 ORDER BY items must appear in the select list if the statement contains a UNION, INTERSECT or ...
0
votes
0answers
78 views

How do I get let SQL Server 2005 know that I changed host name in Amazon AWS server?

I am using an Amazon AWS SQL Server 2008 R2 server for dev purposes. In order to follow a new naming convention, we changed the name of the host. I then tried to let SQL Server know about this ...
1
vote
1answer
23 views

New instance with same @@VERSION as existing instances

I have a SQL Server 2008 R2 server with several instances installed. Is there a way to add a new instance and have it be to the same build as the existing (and updated / patched) instances?
9
votes
5answers
8k views

.bak file not visible in any directory in SSMS

I have a .bak file created today by someone else, manually created through SSMS 2008 R2. I'm trying to manually restore the database, unfortunately the file isn't appearing when I go to browse it. I ...
11
votes
2answers
987 views

DBCC CHECKDB unfixable corruption: Indexed view contains rows that were not produced by the view definition

TL;DR: I've got an unfixable corruption in an indexed view. Here the details: Running DBCC CHECKDB([DbName]) WITH EXTENDED_LOGICAL_CHECKS, DATA_PURITY, NO_INFOMSGS, ALL_ERRORMSGS on one of my ...
9
votes
2answers
2k views

When does sp_executesql refresh the query plan?

You'll have to forgive my naivety as I'm not a DBA but my understanding is that over time the statistics of a database change and a stored procedure must be recompiled to keep the query plan up to ...
1
vote
1answer
50 views

How to distinguish the current operation is done from system or from sql server management studio

We want to record who insert or update the records in sql server database, so we add "CreatedBy" and "ModifiedBy" fields. When the records is operated from the system, we can easily get the person. ...
6
votes
2answers
638 views

SQL Server Tuning a table for massive inserts

I'm trying to solve a performance issue and I need advice. I have a table, which about twice a day has a massive surge of inserts coming in, and exactly at the same time everybody is trying to read ...
0
votes
2answers
246 views

Full text catalog does not allow me to hit on singular forms

I have created a full text catalog for a column under database name -> "Storage" -> Full Text Catalogs. It is accent sensitive and "default catalog" is set to false. The language for the column ...
2
votes
3answers
8k views

overwrite table with data from another table - SQL

Our users want to refresh a QA database from production but want two tables (lets call them T1 and T2) to retain the original QA data. So I copied two tables from QA (DB1) to a temp QA database (DB2). ...
0
votes
1answer
44 views

Apply profiler template to saved log

I need to check for deadlocks in my customer's system. He provided me with unfiltered logs. Can I filter them after running the trace somehow? (I don't have direct access to his server) It seems ...
4
votes
1answer
5k views

Importing a large column (8000 chars) from Excel using SSIS

I'm trying to set up a regular import of an excel spreadsheet that we get from a vendor. I'm using SQL 2008 R2 SSIS to import it into a table. The problem connection manager is an OLE DB connection ...
1
vote
2answers
226 views

How to avoid timeouts during big DML operations

I have a big insert script I need to run. Its about 55,000 records and 160 columns. The script is already created and I can't create it again. The problem I have is that this runs for about 4 hours ...
10
votes
2answers
8k views

Need to understand parallel query execution error

Today we experienced a degradation in performance on our production sql server. Durring the time this occurred we logged several "The query processor could not start the necessary thread resources ...
3
votes
1answer
2k views

Cannot rename the table because it is published for replication

I need to rename some tables in my DB - SQL Server 2005, with this: EXEC sp_rename 'dbo.TableName', 'Tmp_TableName', 'OBJECT' but I can't do this - I get this exception - Cannot rename the ...
2
votes
1answer
358 views

Is the Service Broker good for publishing data between servers?

I'm trying to find a better solution when publishing data to a remote table. So we have Server A and Server B. Server A holds a master table which should be replicated to Server B. Currently, we ...
2
votes
0answers
224 views

always on availability group with different speed disks

I'm looking to set up SQL Server 2012 installation with an Always On Availability Group, where the 'passive' replica will be hosted at another site on the WAN and using synchronous data commit - the ...
3
votes
4answers
5k views

Cannot remove unused filegroups

I wanted to remove some unused filegroups/files in a SQL Server Database but am stuck because SQL Server thinks the filegroups/files are still in use. Some background: We had some partioned tables ...
0
votes
1answer
458 views

Full text query slow on first run [closed]

I have SQL Server database which has size of 65GB and 6 million rows. We have essays in tables and the average size of an essay is 450 words. When I run a query for the first time, it takes 3-10 ...
3
votes
1answer
427 views

Splitting different parts of a string

I have an SQL Server database where there is a cell with a delimiter (\) separated string. An example of this string would be: category_path ============= RootCategory\Middle Category\Child ...
5
votes
1answer
7k views

SQL Server Maximum and Minimum memory configuration

What are the correct settings for min-memory and max-memory in this use case? The server has 8GB ram, dual Intel Xeon processors, running Windows Server 2008 R2 / Sql Server 2008 Standard Edition. ...
2
votes
0answers
319 views

A Tool to Manage Tracking Query Performance Improvements [duplicate]

I'm building a BI system on SQL Server 2012. I have a test set of data with some tens of millions of rows. Currently many functions and stored procedures are unacceptably slow. I'm looking for a tool ...
1
vote
3answers
1k views

How can I drop a stored procedure whose name is in a variable?

Given a variable that contains a stored procedure name: DECLARE @stored_procedure_name sysname; SET @stored_procedure_name = 'some_stored_procedure_name'; How can I drop the stored procedure?
3
votes
1answer
5k views

Why is my Amazon RDS instance so slow?

I currently run a Windows Server with SQL Server Express. I'd like follow best practice and separate the application from the database, so I've created an RDS instance and exported my database. ...
2
votes
1answer
4k views

Can not find 'NT AUTHORITY\NETWORK SERVICE'. on Sql Server 2012

Hi How do i fix this Error? when i run my MVC app i get this error though my web.config is find. the error is on my DB call Sample: Cannot open database "Sample" requested by the login. The login ...
1
vote
2answers
2k views

Updating a table efficiently using JOIN

I have a table that has the details of households and another that has the details of all the persons associated with the households. For the household table I have a primary key defined using two ...
1
vote
3answers
2k views

Restore database - maintenance plan task

I need to schedule a task that restores a database once a week from a backup. I have setup maintenance plans for backing up databases (Management > Maintenance Plans) but cannot find out how to make a ...
3
votes
2answers
481 views

Workaround for Anti-Semi Join bug

I built the following SQL Server query, but it is encountering the anti-semi join defect in SQL Server 2005 which results in inaccurate cardinality estimates (1 -- urgh!) and runs forever. Since it is ...
4
votes
1answer
505 views

Understanding MS SQL Server Date Types

Consider the following: declare @dt datetime, @dt2 datetime2, @d date set @dt = '2013-01-01' set @dt2 = '2013-01-01' set @d = '2013-01-01' select convert(varbinary, @dt) as dt, ...
1
vote
0answers
163 views

Optimising Large SQL Server Tables [closed]

I have a large table with around 50 million rows and 15 columns. Whenever I read, I always need all columns so I can't split them. I have a clustered index on the table with 4 keys (ALL INT) and I ...
10
votes
1answer
3k views

AlwaysOn AG, DTC with failover

Problem: How can I run Distributed Transaction Coordinator (DTC) on all servers in an AlwaysOn Availability Group (AG)? I do NOT need to maintain transactions over failover/switchover events. Setup: ...
1
vote
2answers
3k views

How can I “shift” certain column values to different rows in an existing table?

I'm implementing a queue as a ring buffer in a table along the lines of what Thomas Kejser talks about here: Implementing Message Queues in Relational Databases If the ring buffer fills up, I have to ...
1
vote
2answers
4k views

How to make SQL Server Management Studio use latest version of SQL Server?

I'm upgrading my dev machine from Windows 7 to 8. While installing earlier versions of Visual Studio it installed SQL Server 2005. I then went to this site and downloaded and installed SQL Server ...
5
votes
1answer
425 views

How to get output from trigger on linked server

Fair warning, I know this isn't the best way to do this, but I'm trying to extend some existing code without needing to do a rewrite. Anyway, I've got two SQL Server 2012 installs, one local in my ...
0
votes
3answers
394 views

Sql Server 2012 Restoring Master and Migrating a server

I am migrating an entire SQL Server instance with 10 databases on it. It has many jobs and users. What is best practice regarding the master database? Should I backup and restore this too, or script ...
1
vote
1answer
122 views

Number of times a table is read, written to and updated

Is there a way I can find out the number of times a table is read, updated, added to or has had rows deleted during a trace? I am creating the trace in SQL using sp_trace_setstatus, not using the Sql ...
2
votes
1answer
70 views

Logging and Replaying database updates/inserts SQL Server 2008

I am in the process of migrating our client's database to the Azure Cloud SQL Server and setting up data sync etc. All of this is ok, but I need to reduce the amount of time the client's system needs ...