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
votes
1answer
935 views

In the domain of SQL Server backup, what is a backup set, backup device, backup media, backup media set, backup media family

I'm not a native English speaker and I've read the descriptions in BOL but still can't understand what exactly are they. Can anyone explain in an easy understand way? Thanks.
0
votes
1answer
113 views

MS SQL and MYSQL [closed]

I was going through some theoretical concepts about SQL based databases. One thing that I found interesting was that MySql and MS SQL are Relational-SQL-Database Management-Systems. Since they both ...
0
votes
0answers
3k views

0x84BB0001 Error when installing SQL Server 2012. Could not create a handshake [closed]

I have hopelessly attempted to install SQL server 2012 onto my 64 bit Windows 8 machine. The database engine always fails to install with error 0x84BB0001. Native reporting also fails, I reckon from ...
2
votes
3answers
3k views

Single DB shared across multiple servers

I've planned to host many servers (50+) each will have more than 20K users stay connected. There is lot of shared data amongst users (e.g. a user needs to refer data prepared by another user). If I ...
2
votes
1answer
274 views

Setting up simple question & answer database

I am having trouble thinking this (simple) table relation through. I am setting up a quick SQL DB to populate labels and textboxes dynamically on screens. This is just to prove we can do it, so it ...
6
votes
1answer
672 views

Deadlock graph with a lock on an index on a seemingly unrelated table

I have a deadlock graph from a deadlock where one process is doing a SELECT and one is doing an UPDATE. This seems like the classic case where the SELECT gets a NCI lock to perform a join and then a ...
1
vote
1answer
2k views

sql agent job hangs without any errors or warnings

Problem: we have a SQL Agent job which runs everyday in the morning at 4:00 am. This job hangs sometimes without providing any errors or warnings. It just hangs. BUT when i stop the job and run again ...
0
votes
1answer
286 views

Having trouble with a T-SQL scalar variable during a create table [closed]

I am still a beginner, but I am having trouble with a T-SQL scalar variable during a create table. Can anyone tell me what is wrong with this script? -- T-SQL MSSQL SET NOCOUNT ON DECLARE @tt = ...
6
votes
2answers
608 views

SQL Server Transaction Logs in the Cloud

It is a common practice to place the transaction logs (*.ldf) on a separate physical disk system than database files (*.mdf, *.ndf). In a virtual machine cloud environment, is it okay to put the ...
2
votes
0answers
263 views

Last Known Successful DBCC CHECKDB

I understand that looking at DBCC PAGE is supposed to show me the last known good DBCC CHECKDB but I am not seeing this work correctly. I have a database that I know is corrupted. If I run DBCC ...
0
votes
1answer
189 views

SQL Server Table keeps big after schema change

I have a table in SQL Server 2012 with 460.000 rows. This Table has the following Schema: We had an issue with our application so all 500.000 rows were created with Comments filled up with spaces. ...
1
vote
1answer
789 views

How to avoid log space error while executing SSIS packages?

I'm executing ssis package with more than 70 million data's. But I'm facing issue as log space full error message while executing the package. Is there any option to resolve this issue?
2
votes
1answer
191 views

How can I rename a table, but also all FK etc. references to that table?

I would like to e.g. rename my Applicant table to ApplicantProfile, as applicant is an abstract entity that has a profile. The profile is not the applicant. Simply renaming the table is hopelessly ...
1
vote
2answers
102 views

How can I use with differential backup of SQL Server

It's said differential backup could be restored only after it's base. It sounds like I just divide the one step full restore into two steps. And I can't see the benefit here. How can i use with ...
2
votes
1answer
266 views

Internal architecture of cursors

I know that cursor isn't very good idea, but I have some questions for internal structure of cursor. First step in cursor is determining result set which cursor iterate over. So, did cursor execute ...
0
votes
0answers
41 views

Consolidate does not work with my subquery [duplicate]

Possible Duplicate: SQL Subquery , One to Multiple rows Following query I have written returns the result as expected, example 121350 rows. SELECT ...
0
votes
0answers
25 views

SQL services wont start due to incorrect drive letter [duplicate]

Possible Duplicate: SQL services wont start due to incorrect drive letter after windows restore SQL services wont start due to incorrect drive letter after windows restore Had a server ...
1
vote
1answer
385 views

How to delete and create user remotely on SQL Server 2000

My boss wants to make sure that no one runs a job accidentally so we are setting up lots of safeguards to ensure that no one sleepwalks, log into the system and run a job. We are updating the ...
4
votes
1answer
337 views

What are the advantages of a monitor server for log shipping

I'm researching and implementing log shipping as part of disaster recovery for our SQL server. I've seen that a monitor server is recommended (but not required) for monitoring the log shipping ...
1
vote
3answers
2k views

SQL services wont start due to incorrect drive letter after windows restore

SQL services wont start due to incorrect drive letter after windows restore Had a server crash, was successfully able to reinstall windows and restore the server SQL and all the necessary services ...
2
votes
1answer
72 views

How to create an object and then alter it

I'm using sql server 2012: I would like to script out creation of an object(if it doesn't exist first), and then alter it. I'm trying to avoid the usual drop/create as it would impact stats. It ...
0
votes
2answers
569 views

Restore to a point between two full SQL Server backups

I have two SQL Server database backups from Server1. Backup1 was made on, say, 2013-01-01 and Backup2 was made on 2013-01-03. What I want to do is restore Server2 to the intermediate state on ...
1
vote
1answer
3k views

Read only/Standby database - Set user permissions

Example database: WarehouseDB Example user: reporting Database state: Read only/Standby mode How do I give the user 'reporting' access to only WarehouseDB without giving them sysadmin privileges? ...
5
votes
1answer
2k views

SQL Server OPENQUERY vs Regular Query against AS400

I log into a SQL Server database which has an AS400 server as a linked server. I've discovered that running queries against this AS400 server is MUCH faster if I run the select in an OPENQUERY... ...
13
votes
1answer
10k views

Why does SQL Server 2012 Express use 9.5GB of RAM on my server?

I am building an application in which I plan to embed SQL Server 2012 Express as the primary datastore. When testing on my development machine (Win7-32 with 3GB RAM), I never observed the ...
8
votes
2answers
545 views

At What Point Does Having an Index Become Efficient

I've found a lot of resources that mention that adding an index to a table makes searches faster and inserts slower, but only if the table is large. This creates a tradeoff, which is a design ...
3
votes
1answer
3k views

Rename Primary Key constraint on Azure

I'm trying to change primary key on a table in Azure storage. The plan is to create a new table, move data over and drop the old table. The problem is that I need all the constraints names to be the ...
2
votes
1answer
1k views

Decryption not working when SQL Server database copied to new server

I am copying a database from an old server to a new server. The database has an encrypted column. From my searches I see that I need to backup the master key from the old server and restore it in ...
2
votes
2answers
512 views

Speed up data transfer from db to application

I have build an application that handles data stored in a MS SQL server database. This server is hosted externally of our company and has to be connected to via SSH because of company rules. On a ...
1
vote
1answer
65 views

Is it a good idea to have an index when the column value changes several times over record lifetime?

I have a table where one of the columns represents an object state - let it be State of type int. The State value starts with 1 and changes to 7 with values in between. Over a row lifetime there're ...
3
votes
0answers
442 views

SqlDependency permissions

The db is SQL Server 2012. All data tables are in the dbo schema. All data access is done via stored procedures in a different schema (user rt). I want to add query notifications for some tables, so I ...
10
votes
2answers
554 views

Setting READ UNCOMMITTED when reading DMVs

I've seen several people call SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED before reading system DMVs. Is there ever any reason to do this, assuming you aren't mixing calls to DMVs and tables in ...
1
vote
1answer
2k views

Is it bad to assign specific processors to SQL Server 2008 R2 cluster instances?

I have a SQL Server 2008 R2 failover cluster with a passive node and an active node. The servers are physically identical. I have two instances of SQL Server, one set to use all the CPUs in the ...
3
votes
2answers
263 views

Find top by values by percents using range in SQL Server

What will be easier way to group records by range of percents. Here what I try to accomplish Select top percents between 50 and 75 * from myTable order by PKI Here is way I did this but I have ...
4
votes
2answers
738 views

Backup Only Database Schema Everynight

I have an instance with 15 databases on SQL Server 2012. I will set up to backup system which will work every night. I want to backup only the schema because several databases are very big. I haven't ...
0
votes
0answers
9 views

speed up data transfer from SQL server to application [duplicate]

I have build an application that handles data stored in a MS SQL server database. This server is hosted externally of our company and has to be connected to via SSH because of company rules. On a ...
4
votes
2answers
970 views

How to keep off-site developer databases up to date with production?

We have a production database running on SQL Server 2008 R2 with files stored in it. We were concerned about the size of the database so we've opted to enable FILESTREAM so the files would be stored ...
3
votes
0answers
281 views

Are the following statements concerning sys.dm_exec_requests true?

Parallel plans mean that cpu_time can be greater than total_elapsed time. Therefore, per-query wait time is not possible to determine accurately from DMVs on servers with more than one CPU thread. ...
2
votes
2answers
1k views

How can I do a differential query (delta plus/minus) telling me what rows are in view A that are not in view B and vice versa?

I have two views which use radically different means to accomplish what I hope is the same end view. One uses complex query expressions and walks entire giant tables and is highly expensive, and the ...
1
vote
0answers
599 views

SQL Server keeps crashing [closed]

I have had SQL Server 2012 on my server for about 6 months. Over the last few weeks, a problem has developed, whereby the SQL Server stops functioning, and any attempt to connect or query returns the ...
2
votes
0answers
185 views

Configuring SQL Server Job agent

I am trying to configure the SQL Server Job Agent using the following scripts USE [msdb] GO CREATE USER [mydbuser] FOR LOGIN [mydbuser] GO EXEC sp_addrolemember N'db_datareader', N'mydbuser' GO EXEC ...
-1
votes
3answers
430 views

What is a good Diff tool when comparing on-premise to SQL Azure? [closed]

We're working on migrating our database (~400 tables) from SQL 2008 R2 to SQL Azure. We're currently in the proof-of-concept stage, figuring out the process we'll be following. We have a process that ...
2
votes
0answers
679 views

SQL Server Reporting Services Slow TotalTimeDataRetrieval Fast ExecuteReaderTime

I wrote a report that is executed by a few hundred users each day and the underlying stored procedure for the data set only takes milliseconds to execute. According to the ...
3
votes
3answers
5k views

Inserting rows into other table whilst preserving IDENTITY

I'm performing ETL logic on a SQL Server table. I'm going to be synchronizing data from one table to another. For all of the records that need to be added to the target table based on the source ...
3
votes
2answers
3k views

Shrink database operation in maintenance plan failed

See updates below I have a nightly DB maintenance plan and it's causing some strange behaviour. About 1 out of 10 runs it causes the DB to not response to queries. It takes about 5 minutes for the ...
5
votes
1answer
88 views

SQL Server help tables?

If I write in SQL Server : SELECT number FROM master..spt_values WHERE Type = 'P' ORDER BY Number I get a list of sequential numbers which I can already use, instead of writing a table with ...
10
votes
4answers
22k views

How does paging work with ROW_NUMBER in SQL Server?

I have an Employee table that has one million records. I have following SQL for paging data in a web application. It is working fine. However what I see as an issue is - the derived table tblEmployee ...
4
votes
2answers
214 views

Performance on SQL Join

I have a query which takes ages to run mainly due to a join between 2 tables on a PK and FK. The Key is prefixed with 2 letters (which is always the same, RN) followed by 7 digits So RN1234567 for ...
1
vote
1answer
865 views

Bandwidth usage in Sql Server

Our compagny has a central Sql Server Database which is connected to many applications (Web, Backend/Frontend services, backoffice, ..) This database is hosted in a small country (for taxing ...
1
vote
1answer
101 views

Stateful views in SQL Server

Actually I got stuck while searching a materialized view approach in SQL Server. My problem was that I have two databases and I have created some views whose functionality is to read data from one DB ...