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
0answers
435 views

How to update local database data from an online database? [closed]

I have an online database and a local database. How can I update the local database data (only data and not the structure) from the online DB in my application ? The idea is to have an update data ...
0
votes
1answer
127 views

SQL Case Sensitive Query

I have two databases which return different results based on the case of the query. On the first database I run the query FROM [Temp].[Team].[CLASS] WHERE [TABLE_NAME] like '%Link%' and on ...
4
votes
1answer
1k views

SQL Server CPU spikes - possibly non-query related - suggested indicators

I'm looking for suggestions for indicators I could monitor to discover what is causing these cpu "blunted spikes". Some known information: sqlserver.exe is confirmed as the process consuming the ...
2
votes
1answer
58 views

Single statement or batched delete?

I need to delete 6.3 million records from 25 tables in production. I have the following two queries, but I don't know which one will be best: delete jc from Jtable jc join J1Table j on j.JobId = ...
0
votes
0answers
500 views

Based on these DBCC SHOWCONTIG stats, should I index this table?

I have a SQL 2008 Standard server on full mirror (safety). I reorganize all indexes weekly. I am looking into rebuilding a few indexes to improve performance. I ran DBCC SHOWCONTIG on my largest, most ...
2
votes
1answer
752 views

Speed of Searching Text vs INT/BIGINT - SQL Server 2012

I am building an application that will need to handle extremely high amounts of traffic. The traffic will consist of incoming requests for information from a SQL Server 2012 database. When a request ...
2
votes
0answers
143 views

SQL Server Database errors 8935/8934/8977

I received a database from a customer, that i have to try to recover. I'm facing some problems, specifically with the following errors: (Error, Level, State, MessageText, RepairLevel, Status, DbId, ...
0
votes
1answer
69 views

Issues restoring db [closed]

So I had initially received the 'database in use' error, searched for a solution on Google, was led to believe that I might need to change the default db account connects to, changed it and am still ...
3
votes
2answers
4k views

Are there advantages to using temporary tables over derived tables in SQL Server?

I read the derived tables have better performance than temporary tables, but anyway many SQL Server developers prefer the second ones. Why? I must do queries with large data (millions records) and I ...
1
vote
1answer
37 views

Case when missing line logic

I have a case when statement in a extract query which doesn't seem to be returning what i'm expecting DECLARE @Val1 int, @Val2 int,@Val3 int, @Val4 int, @Val5 int SELECT @Val1 = 5 , @Val2= 2,@Val3= ...
10
votes
1answer
2k views

How do I determine if a SSIS transform is non-blocking, partially blocking, or fully blocking?

There are several blogs which claim to categorize SSIS Transforms into blocking (asynchronous), non-blocking(synchronous) and partially blocking(asynchronous). When looking into the specific ...
1
vote
1answer
95 views

Reconciling @@TRANCOUNT

Running SS2005. I have a script that calls procedureA which in turn calls procedureB. procedureA has no explicit transactions. procedureB is split up into several small blocks of non-nested BEGIN ...
0
votes
1answer
38 views

What is the log backup schedule?

I need to see the log backup schedule for a database. Where is this information located in SQL Server Management Studio?
1
vote
1answer
288 views

CDC not picking up changes [closed]

CDC has been set up for one of our databases in our test environment but it's not capturing any of the changes. I've made sure the capture job is running. I've disabled CDCs for the database, enabled ...
0
votes
0answers
52 views

Import and export data from SQL Server table using query [duplicate]

I need to import and export data from a table using a SQL query so I need query example for importing and exporting data. I don't want to export it to txt file as the data is not getting aligned. I ...
1
vote
4answers
5k views

Reset SQL Server sa password

I need to recover my SQL Server 2008 user/pwd. The situation is: I don't know the SA password and Windows Authenticated user is no longer active user (disable user because the user has left job) so ...
1
vote
3answers
10k views

Copy a large data from sql query result

In my sql server 2008, after running the query the data return is very huge say in millions. I tried copying but it gives an exception sql memory error. Can you let us know how can i copy the entire ...
3
votes
3answers
2k views

Best practices for configuring the Drive/Filegroup setup for Microsoft SQL 2008

I am a software developer for a small company. I wish we had a dba but not in the cards at this point for this company. I was working on migrating our 75gb SQL Server 2000 database to SQL Server 2008 ...
2
votes
1answer
507 views

Check constraint for Canadian postal code?

Is there a way to check if a Canadian postal code is valid? Not sure if something like this would work: PostalCode varchar(10) CHECK(PostalCode>='t1w1v1' and PostalCode<='t9w9v9'
2
votes
1answer
450 views

How can I use running total aggregates in a query to output financial accumulations?

I am attempting to write a query that will be consumed by a SSRS 2012 report. Given a paid invoice, with a certain set of account allocations towards which the money paid towards it must be saved, I ...
2
votes
1answer
142 views

Turn Off Alerts

We have a SQL Server 2008 R2 database instance running on a VM. Nightly, between 10p and 12a, we are getting the following error message: DATE/TIME: 2/3/2014 10:16:37 PM DESCRIPTION: Database ...
2
votes
1answer
195 views

Copy FileGroup to Another FileGroup

we run Microsoft SQL Server 2008 R2 on production server. We need create new tables and load a big amount of data on them (roughly 1 TB!) I am wondering if it is possible to insert this dataset on ...
1
vote
1answer
335 views

Linked Server - login trying to access database that is not default

Trying to create a linked server from server A (2005) to B (2008 R2). Everything worked when created. The login on server B was mapped to two databases: DataBase1 and Database2. Database1 was the ...
7
votes
3answers
8k views

SQL Calculated Field in both SELECT and GROUP BY clause

Often in querying my MS SQL Server databases, I need to create a calculated field, such as this (CASE WHEN A.type = 'Workover' THEN 'Workover' ELSE (CASE WHEN substring(C.category, 2, 1) = 'D' ...
0
votes
1answer
251 views

Problem connecting to AlwaysOn Cluster

Good day, I created a AlwaysOn HA cluster in Azure, 2 Server 2012s both with SQL 2012 Ent updated and patched on the same subnet.. These are the guides I followed: Tutorial: AlwaysOn Availability ...
5
votes
1answer
528 views

How to avoid a race condition with cross db proc calls? and other concerns

I am not even sure this question is necessary but I am curious to know everyone's thoughts. I have two databases on the same server, dbFoo, dbBar. dbFoo has the following table please note this is a ...
0
votes
1answer
1k views

Partition tables based on month and year in SQL Server

I have a sales table which I need to partition based on month and year of sales table structure S_ID numeric(18,0) S_CustID numeric(18,0) S_TotalCash numeric(18,0) S_Paid ...
1
vote
1answer
169 views

Is it possible to restrict SQL Server DB_Owner when connecting using SQL Server Mgt Studio? [duplicate]

Here is the back story. A developer created an EXE program. The exe program has the ability to access a SQL Servre database. In order to do that we create an Active Directory group. Let's call this ...
2
votes
0answers
200 views

Use Matlab or SQL Server to do mathematical computations? [closed]

Current situtation I am working with a dozen of CSV files containing financial simulations in form of 100'000x100 matrices. Each file is around 100Mb large. Until now, only analyse these files with ...
0
votes
0answers
57 views

SQL snapshot and execution plans [closed]

I have a question.. when a query is executed the execution plan is compiled if the snapshot is reloaded does that mean the snapshot compiled is blown away? and if so is there a way to keep the ...
1
vote
1answer
470 views

automatic transactional replication failover to noce2 with AG failover

I am working on to set up high availability group like SQL01,SQL02,SQL03(DR) and SQLRPT01 as the reporting server which has our reporting DB. * From SQL01 to RPT01, I am running transnational ...
1
vote
3answers
421 views

AlwaysOn Availability Groups Delayed Replica

With AO SQL 2012, is it possible to configure one of the member as delayed replica? I know ideally we would like this to be synced but in case of human error, it would give us the ability to check on ...
1
vote
0answers
105 views

Data replication vs parallel shard query

I'm not a DBA, and I'm wondering how a SQL Server database can scale to fit the needs of a social network. I'm not interested in NOSQL, and I understand that caching plays an important role in ...
4
votes
1answer
2k views

Why is SQL Server 2012 working set memory low?

I have recently migrated a 100gb database for a busy website from: MS SQL 2008 Standard Edition R2 Windows Server 2008 48gb RAM to MS SQL 2012 Web Edition Windows Server 2012 64gb RAM I have ...
1
vote
1answer
383 views

Transaction Replication Without Snapshot

So I have looked up many other people trying to get Transaction Replication Without Snapshot working and I'm stuck. I've followed what everyone has said so I don't know what I'm missing. Prod server ...
4
votes
2answers
1k views

if-then-else gives a boolean headache

I have three statements to combine but I cannot find the correct solution for SQL Server 2008 R2: I need to concatenate three columns into one but in three different ways depending on the result in ...
1
vote
0answers
79 views

Diagnosing high cpu load

Let me start by saying our SQL servers are hosted by a third party. Every once in a while our monitoring software will show that cpu usage on one of our servers goes way out of line with normal ...
4
votes
1answer
968 views

Database under heavier load — all SQL queries start timing out after a period of hours/days

I make a web application which has experienced heavy growth in the past week and it appears my database is seizing up because of it. You can see that everything seemed to be OK until about 3AM this ...
0
votes
2answers
300 views

SQL Server storage limits on Azure

Looking at SQL Server maximum capacity limits on here: http://msdn.microsoft.com/en-us/library/ms143432(v=sql.120).aspx Database size can be as big as 524,272 terabytes. Here, you could see VM size ...
2
votes
1answer
330 views

Comparing Agent Jobs on Two Servers

I'm currently building a process in Powershell where we can copy SQL Server Agent jobs from one server to another server just by entering the server names. The script uses the SMO library to obtain ...
0
votes
1answer
46 views

SQL Server 2008 R2 Resource Managment

I have a server running Windows Server 2008 R2 Enterprise 64Bit, with 256 GB RAM. I am running SQL Server 2008 R2. With normal usage, SQL Server is using about 232 GB of RAM. Occasionally it will ...
1
vote
1answer
45 views

Rebuild the Fulltextcatalog

I have a Database (80GB) that is able to store attachments. These attachments are full text indexed. For some reasons I had to rebuild the fulltext catalog and this 30 hours. Our business users ...
3
votes
0answers
110 views

SQL server job has not run and also no entry logged in its history [closed]

I have scheduled a SQL job to run daily at 3am in the morning which creates a batch. It has not run today and i am also not able to fathom what's the reason behind its failure. There is no entry in ...
1
vote
1answer
432 views

SQL SERVER Virtual Log Files

I am new to SQL SERVER, could anyone please explain that why do we have VLFs' in T-LOG and why not have 1 T-log itself. I am aware that VLFs' are logical but my question is why VLFs'? what is the ...
4
votes
2answers
2k views

Should I pause Mirroring and stop SQL Server services before running windows updates?

I am running Windows update on my SQL Servers (which are in a Principal-Mirror partnership, in High Safety mode). I am starting with updating the mirror and I was wondering, to increase safety, ...
5
votes
1answer
168 views

Why are zero length spaces being returned from a Union All against an empty table in SQL Server 2005 but not SQL Server 2012

Supporting an existing VB6 app with a SQL Server 2005 back end and we're migrating our database server to SQL Server 2012. Created a backup of the production database and restored it into a dev ...
1
vote
0answers
90 views

Replication topology advice - central subscriber

I'm seeking guidance and advice about how to set up replication in MSSQL to deal with the following criteria. We have a central server hosted at a data center - this is where our web app is located. ...
2
votes
0answers
135 views

Maintaining Referential Integrity with a Filestream enabled database

We have a production database which is filestream enabled and has grown, within a year, to about 20Gb as it stores documents. On many occasions we need to bring the live data back to UAT or Dev ...
1
vote
2answers
373 views

SQL Server Linked Servers and Remote Statistics

I'm trying to get a better understanding of how SQL Server uses statistics on remote SQL Servers (e.g. a Linked Server). I understand that the user needs db_owner/db_ddladmin rights to be able to use ...
1
vote
1answer
118 views

The meaning of the Roles in SQL Server 2008 R2 [closed]

Just because I’m confused around this issue I’d like to ask the following questions, and please I would like to receive clear and easy understandable answers. Not deep analyze. 1.What is the Roles ...