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

Hot Swapping Sql Server Databases

I manage a database in SQL Server for a business's customer transaction. The data is updated four times daily from a very complex Oracle database. The SQL Server database is then connected to by a ...
2
votes
1answer
470 views

SQL Server connection fails over VPN

I have an OpenVPN network consisting of VPN server (Linux), client (win8) and SQL Server (win 2008 server, SQL Server 2005), I'm trying to (of course) connect client to server. When I try to connect ...
0
votes
1answer
65 views

Comparing Environments [closed]

I am a SQL Server dba. I have been asked to compare our production environment to test from a number of different perspectives. These are windows patch level,sql service pack, to database size and ...
3
votes
1answer
371 views

Clustered Index - Query Performing Index Scan

Why does the below query perform an Index Scan rather than an Index Seek? I would have thought the Index would act as a covering index? CREATE NONCLUSTERED INDEX [IX_CustomerFileDate] ON ...
4
votes
2answers
2k views

Log Reader Agent is not running - The job failed

I created a transactional replication on PRE-PROD (via TSQL) and everything works as expected. On PROD platform replication is not working. While inspecting Replication monitor, I get this error ...
1
vote
0answers
55 views

SQL Server 2008 upgrade and clean

After upgrading a SQL Server 2008 instance to SQL Server 2012 (in-place upgrade), there appears to be numerous 2008 instance components (namely the 2008 SSMS in start menu, in add/remove programs ...
18
votes
2answers
452 views

Is there a complete list of Online operations for each SQL Server version?

As we are about to change some of the large tables in our 5TB database I found myself needing a list of the operations that can be performed online and the which require full locks to be held while ...
0
votes
1answer
71 views

how to select rows matching a condition with a default

I have a table id | title | lng | vi_id -------------------------------------------------------- 1 | 'IX#001323' | 1 | 12 2 | 'IX#001323 heb' | ...
10
votes
2answers
41k views

SQL server databases stuck in restoring state

I have a Sharepoint server. I guess our network administrator has miss configured his back up tool (I guess he uses Symantec backup exec) and now some of my databases are stuck in restoring state! ...
0
votes
1answer
2k views

Archival strategy for a table with 25 million records in SQL Server 2008 R2 Enterprise [duplicate]

I have a table that stores some audit information and currently has 25 million records. There is a process that inserts to this table every 30 minutes. This is historical data and is not used for any ...
3
votes
2answers
2k views

What can cause slow queries with low resource usage?

I am writing an application which builds a database on a SQL server. The application loads data into some staging tables, then executes a series of stored procedures which merge the staging tables ...
2
votes
3answers
1k views

how to dump MS-SQL DB using PHP with MS-SQL-SRV.? [closed]

I had created a MySQL database dump in php successfully using this below code. $dbuser='root'; $dbname='Student'; $dbtable='StudentDetails'; $dbhost='localhost'; $dbpass='root'; ...
0
votes
4answers
615 views

Can migration from MS Access to SQL Server or … make database faster? [closed]

A company asked me to migrate their database from MS Access to SQL Server or MySQL because they think that on those engines their database will run faster. But I wonder if their problem isn't because ...
0
votes
1answer
142 views

How can it take longer to replay a captured trace than to capture it

I am attempting to use trace captures to determine how much of a performance issue was database related and how much was code related. However, the trace is taking longer to replay that it took to ...
2
votes
2answers
771 views

Speed up bulkinsert on sql server

We're doing some testing and this involves adding 10.000 rows every 10seconds in a table that has 4 int columns and one of them is clustered index. When we run the app the first bulkcopy takes around ...
3
votes
1answer
56 views

Standard ways to return SQL Server database to a specific state

What are the most efficient ways to save the exact state of a SQL server database and then be able to bring it back to that state at will? I am testing code performance against a database and each ...
1
vote
1answer
563 views

Error installing Clustering with SQL Server 2012 on Windows Server 2012

We are installing SQL Server 2012 on Windows Server 2012 and trying to accomplish clustering. We've setup all the core functionality on the servers: advanced cluster preparation on all nodes and ...
1
vote
1answer
2k views

How to pass a table of values to a stored procedure from SSIS?

I am really new to SSIS, so I apologize for the "dumb" question. I know open ended "Best Practices" questions are seriously frowned upon, so I will try to be as specific as I can. I have a basic SSIS ...
-2
votes
1answer
205 views

Why do I need Transaction logs at all [closed]

We use Microsoft SQL Server as a repository of images and data about those images. We record in real time and never care about recovery. If the database slows down and can't handle the number of ...
-1
votes
1answer
464 views

default value with select case on xml

select case 'NULL' when 'NULL' then 'f' end as out output: f but select case (select (SELECT LEFT(l.list,LEN(l.list)-1) FROM (SELECT o.Reciting_Path + '|' + o.Declaimer +',' AS [text()] ...
1
vote
1answer
148 views

Data Compression Enhancement in SQL Server 2012

Is there any specific enhancements in SQL Server 2012 for Data Compression Feature? Last time I checked SQL Server 2008 R2 introduced support for Unicode characters so columns with NCHAR data types ...
0
votes
1answer
345 views

SQL Server 2008 Script Changes from Database Diagram

I have a database diagram which I have made several changes to using SSMS, however instead of committing the changes I want to generate a SQL script to apply them instead. Is there a simple way to do ...
0
votes
0answers
204 views

Publishing SQL Server in mdf format onto GoDaddy SQL Server admin [closed]

I have created a website with a database in .mdf format. I successfully uploaded my website and created a database in GoDaddy windows hosting. Can anyone tell me how to publish a locally created ...
1
vote
0answers
175 views

Performance implications of the NEWSEQUENTIALID() re-sequence on restart

I see a very good case why I should use NEWSEQUENTIALID() as PK. It would be internal to my system and has good performance similar to IDENTITY() but better than NEWID(). However, NEWSEQUENTIALID() ...
0
votes
1answer
929 views

Database stuck in restoring mode during log shipping

The error log say - The database is marked RESTORING and is in a state that does not allow recovery to be run.
0
votes
0answers
196 views

SQL Server 2008 R2 replication server runs faster than primary

I run a simple query like select * from table and i take the following results: primary database : 90 seconds replication database : 2 seconds The tables are identical and have the same indexes in ...
1
vote
1answer
65 views

Adding index in table suggestion?

I have a table called Products with ID(PK, Clustered), Name, Price, Brand, ...., RetailerID, SKU, ModelNumber. My query have SELECT .... FROM Products WHERE RetailerID = @RetailerID AND ( ...
0
votes
1answer
321 views

TEMPDB Round Robin is not working!! It is filled up

I have a 16 Core CPU processor and I have created 8 tempdb datafiles with initial size as 2,000 MB with 10% growth restricted to 10,000 MB. The log file is unrestricted and it is in simple recovery ...
1
vote
1answer
149 views

how to prevent dropping sysadmin user by another user in sql server

I have a legacy application installed on my server which has configured to work only with one user "sa" and there is time bomb like script written inside this application which whenever it finds ...
0
votes
2answers
334 views

SQL Server 2000 - How to find unused indexes

In SQL Server 2000 - how can we find unused indexes, so that we can drop them.] I have scripts for 2008 but don't know how to do it in SQL Server 2000. Please help. Regards
6
votes
1answer
614 views

Better to use a RANGE RIGHT or RANGE LEFT Partition Scheme

I'd like to know if it is better to use a RANGE RIGHT partition scheme or a RANGE LEFT partition scheme? Is one of these options by default a better choice, or is it heavily dependent on the actual ...
2
votes
2answers
1k views

Deploy SQL Server Backup Maintenance Plan in multi-tenant environment

We have a multi-tenant environment in which I've been trying to deploy a standardised maintenance plan across all servers. I've been running into issues importing the maintenance plan properly, as ...
2
votes
3answers
98 views

MS SQL Server instance name

Quick question guys! Will there be any issues if I use the default instance (MSSQLSERVER) for both test and production environments? They are on separate physical servers. I'm using MS SQL Server ...
2
votes
2answers
3k views

How to send an alert based on SQL Query results

I currently have a maintenance plan in place that does a backup, re-indexing, etc. If a task fails, it sends me an email alert. I would like to add a "T-SQL Statement Task" that will execute a query ...
3
votes
1answer
334 views

Best practices for handling language

I am a coder, not a database admin, so my question may be a little obvious to some. I just cannot find the correct search term to find the answer. I'm trying to create a database structure for both ...
3
votes
2answers
1k views

What does a TRUNCATE TABLE write to the Log file in SQL Server?

I know it does not log everything like a DELETE would but I am not sure what it would write to the log file.
2
votes
1answer
4k views

SQL server agent job built on SSIS package not working

I transferred a job from the old SQL Server 2005 to an upgraded SQL Server 2008 R2 instance, and I scripted out everything, changed the data source and other details... "This job should copy some ...
2
votes
1answer
160 views

Does a SQL server unique constraint partially or fully fail a multi-row write?

If some rows of a writing query fails a unique constraint, will only those writes be rejected, or will the entire query fail?
4
votes
1answer
621 views

Database having only db_datareader shows invalid properties for a index

If a SQL server database user has only public permission in server roles and for a particular database only db_datareader and public permission then while trying script index as CREATE To option in ...
3
votes
1answer
190 views

Transactional Replication: can create 52 publication, but creating 53rd leads to problems

My apologies in advance for a long post, but I was really trying to make sure I do my due diligence before turning to the community for help, so here it goes. I am working on a proof of concept with ...
0
votes
1answer
3k views

Sql Server Fix Users

I Create a user in my database with following command : CREATE USER Test WITHOUT LOGIN I created a login with the Test Name. I want to link Test user with Test Login. When I use following command ...
1
vote
2answers
622 views

Are logs in the LDF file being removed after a checkpoint?

Using the fn_dblog I can get the active portion of the online transaction log of my database. But after every checkpoint I can only see 2 entries showing the beginning of the checkpoint ...
3
votes
2answers
541 views

Should I add multiple secondary indexes to search

I have a search screen on my app where the users can use up to 4 parameters to search. I have written a stored procedure to facilitate the search. Select ID, FirstName, LastName, ...
0
votes
2answers
107 views

Copying a restoring database in SQL Server 2012

I've got two SQL Servers, one of these servers (Server A) is backing up transaction logs on some database and uploading them to the other (Server B). Unfortunately I have no access to Server A, I ...
2
votes
0answers
49 views

Identical query & instance but other execution plans & performance [duplicate]

I have 2 identical queries . One is executed with parameters, the other is executed with hardcoded values. Somehow sql server is creating 2 different execution plans for the 2 queries. The first one ...
0
votes
0answers
65 views

SQL Server 2008R2 - Data Collection

I set up Data Collection for simple and basic monitoring of instances of SQL Server 2008 R2 (/2012) (is simple, accessible for and with very nice colors for my boss :-) But one of instances showing ...
-1
votes
1answer
2k views

Difference between Clustered Index and Unique Clustered Index? [closed]

I got difference between clustered index and unique index here. But what is the exact difference between clustered index and unique-clustered index? AFAIK creating clustered index can be done for a ...
1
vote
2answers
1k views

SQL Server 2012 error when exporting to Excel

Let me start off by saying I know little and less about SQL. I received a .bak file from a client earlier today and they want me to move it to a new database (not SQL). I've created a SQL Server 2012 ...
1
vote
1answer
94 views

How, when and why does implicit changing of transaction isolation level happen?

RCSI (Read Committed Snapshot Isolation) is the setting of a database changing the behavior of (the default) Read Committed isolation level in SQL Server. This is, as I understand, the context of ...
0
votes
0answers
223 views

How to move SQL server transaction replication from one server to another server [closed]

Currently we have SQL Server 2005 as a publisher and SQL 2008 R2 as subscriber for one of our database (about 350 GB in size). I want to move the replication to our different server (Which also has ...