This tag is for SQL Server 2008, major build version 10.00.xxxx.

learn more… | top users | synonyms (1)

0
votes
1answer
41 views

Managing SQL Server 2008 R2 transaction logs when using principal/mirror databases [duplicate]

My system has the main database as a principal (reads/writes only to that database) and then a mirror database on a different site that receives all database updates from the principal database. This ...
2
votes
0answers
67 views

send custom email when SQL Server job fails

I have setup a profile and account for sending mail using DatabaseMail. I have a SQL JOB. If the job fails, I receive an Email Till this point, everything works fine. This is what the email looks ...
8
votes
3answers
208 views

When a previously-fast SQL query starts running slow, where do I look to find the source of the issue?

Background I have a query running against SQL Server 2008 R2 that joins and/or left-joins about 12 different "tables". The database is fairly large with many tables over 50 million rows and about 300 ...
7
votes
3answers
855 views

logical reads vs. scan count

I'm joining a small table (1,000 rows) against a large table (8M rows) in SQL Server 2008. The join uses a nonclustered covering index on the large table, and the join can produce three possible query ...
1
vote
3answers
121 views

How to view an encrypted view or stored procedure

I am working on a third party database. When I try to view the definition of a view by right clicking, CREATE TO and then to NEW QUERY EDIT WINDOW, I am getting an error: This property may not ...
0
votes
2answers
9 views

One of the Database Ownerhas been Removed and corresponding property changes in sql server

A database has been created on SQL 2008 by a user named user1 ,on dec 2013.Today ,we are going to remove that user(/owner) from the server.What will be the owner property of the database show then?
12
votes
5answers
2k views

Is ROLLBACK a fast operation?

Is it true that RDBMS systems are optimized for COMMIT operations? How much slower/faster are ROLLBACK operations and why?
3
votes
2answers
343 views

Ola Hallengren with database mirroring

I am about to setup Ola Hallengrens database maintenance plan. We have our database mirrored and I was just wanting to know if I need to run the script on both my Sql Server instances or only the ...
6
votes
5answers
2k views

SQL Server in a state of confusion: does the database exist or doesn't it?

Got a really weird, annoying problem.. Somehow the instance of SQL Server 2008 R2 running on our server has gotten somewhat corrupted. First, we noticed that the database we created yesterday was ...
1
vote
0answers
95 views

SQL Server 2012 Publisher SQL Server 2008 Subscriber version issue

So I have a setup where one virtual machine is a SQL Server 2012 publisher and I need to setup merge replication on a SQL Server 2008 subscriber on a different vm. When setting up the subscription ...
5
votes
2answers
161 views

Capture very expensive queries

I have an Sql servers of 2008/2012. Some users run very expensive queries, such as updating 1G rows in one transaction or cross join several very big tables, and it causes the server no response from ...
0
votes
2answers
28 views

Having DB Mirroring and Replication together

Can anybody help me understand why do one go combination of Database Mirroring + Replication. Why can't I just have Database mirroring for high availability of my database. What is the need of ...
4
votes
1answer
53 views

How can a connection for one DB block a connection to another DB in SQL Server?

We have an interesting scenario. For weeks, we have been experiencing 'outages' on SQL Server 2008 -- where our websites have slowed to a crawl and mass timeouts for all customers who have DB's ...
4
votes
3answers
126 views

SQL Server- Table partitions on SSD

I have a table in my database that has about 250m rows. I'm new with databases but I have read up about partitioning the table to increase performance. One of the important points that I seem to ...
0
votes
1answer
56 views

How to convert sql server table data into MS Access(.mdb) file

I have SQL Database table with 6664055 rows, I want to convert this SQL Server table data to MS Access format(.MDB), How Can I do this?
1
vote
3answers
2k views

how to Export a document contain tables name, columns names and column description from SQL Server 2008?

I created a db in sql server 2008 and I wrote for some columns description to describe them, What I want now is to find a way to export these tables design including the description for each column ...
4
votes
4answers
1k views

RSync Database File Deltas in SQL Server 2008

Alright, I feel like this is a terrible idea, but I need some help understanding why this is bad: I'm still working on implementing a disaster recovery/business continuity solution for our ...
0
votes
1answer
28 views

What versions can I have for setting up SQL Server Transactional replication

Can anybody help me knowing what versions can I have replication for Publisher , Subscriber and Distributor. Do I need to have all 3 servers as same sql server version or can I mix the versions ? ...
2
votes
1answer
78 views

Avoiding Deadlocks

We currently have a trigger-based system in place that does the following: When records in certain tables are modified, a trigger fires that makes a field NULL in a varying number of records in ...
2
votes
2answers
1k views

Could not continue scan with NOLOCK due to data movement SQL Server 2008 R2

I have SQL Server 2008 R2 installed on a Windows 7 laptop. I create a new database via SQL Management Studio and when I right click and select Properties, I get the following message. Cannot show ...
1
vote
1answer
3k views

How do I remove a SQL Server 2008 instance from command prompt w/o removing the server?

I want to remove a SQL Server 2008 instance (just the instance, not the server). I know how to do it in SQL Server 2005, its "C:\Program Files\Microsoft SQL Server\90\SetupBootstrap\setup.exe" /QUIET ...
4
votes
5answers
3k views

Managing Transaction Log Size using a Maintenance Plan [duplicate]

Are there any best practices for configuring a Maintenance Plan in SQL Server 2008? Currently, I'm removing database backups and transaction logs greater than 40 hours old, then backing them up. ...
1
vote
2answers
324 views

sql server-percentage calculation

Sample data : LINE_NO E_FIELD F_FIELD G_FIELD HSA_STATUS FAMILY CACHE_FAMILY Count 23053B 00000 00000 00000 S SUMMIT WER 43 23053B 00000 00000 00000 T ...
8
votes
3answers
1k views

Database starts always in recovery mode

Everytime I restart my server, the database is always in recovery mode, and it takes about 20 minutes for it to behave as normal. This always and only happens when I restart the server, so I have a ...
0
votes
0answers
207 views

SQL Server to MySQL sync, using Workbench, FreeTDS, and iODBC on 10.9

I've been struggling to get the MySQL Workbench to behave properly to complete the following: With Mavericks (OS X 10.9), connect to a SQL Server and create a migration job to a MySQL server. The ...
-1
votes
2answers
642 views

Error installing SQL Server 2008 - all componets installed successfully except database engine

Below is the error I copied, please someone help me, I have tried at least 10 times in the last 3 days. It is SQL Server 2008 R2 and I wanted to install it on Windows 7. Microsoft SQL Server 2008 ...
-3
votes
0answers
37 views

SQL Server 2008 installation errors [closed]

I am stuck here. I tried reformatting my laptop, re-installing SQL Server 2008 but I keep getting these errors. I don't know what to do. I really need this program for my project. Damn. I got these ...
0
votes
0answers
30 views

unable to connect to my pc in sql server 2008 due to error 2

I am getting a message : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the ...
5
votes
1answer
69 views

Method or Counter to track dropped connections in SQL Server?

Our production server is running SQL Server 2008 (non r2). I'm working on investigating and issue that appears to be networking or connection related, where our web server is losing or dropping ...
1
vote
0answers
47 views

SQL command in stored procedure continue on error

To perform Checkdb on all database of server i am using a stored procedure which loops over a view which contains list of databases in server and the stored procedure performs checkdb on all databases ...
3
votes
1answer
571 views

How are bit fields sorted for an index?

I am building a compound index, and I'm not 100% sure which way to include a bit field that is part of the table. The index will be for something similar to a list of forum topics, where I want the ...
3
votes
2answers
495 views

Can I get notification when event occur?

SQL Servers has Traces and XEvents. These are used to capture and analyze what is going on with our SQL Server Instances. Events are stored in the stack for later analysis. For example, If I decide ...
8
votes
1answer
7k views

How to force drop database in SQL Server 2008

I'm trying to force drop a database, but after dropping the database, when I try to recreate the database, I'm getting the error cannot create file C:\Program Files.....[databasename].mdf because ...
1
vote
4answers
85 views

Backup from Server1 and restore it to Server2?

IF we have two Servers installed with SQL Server 2008 instances, Server1 has three drives C, D and E with 100, 500 and 500 GB respectively and Server2 has three drives C, D and E with 100, 300 and ...
0
votes
2answers
96 views

Join two subquery in hql

How can I write this sql query in as hql: select count(distinct s.id) as prepaid, count(distinct ss.id) as postpaid from (select * from subscriber where subscriber.ispostpaid=0) s join (select * ...
3
votes
2answers
3k views

Why is this stored procedure for linked server job failing in SQL Server Agent?

I have this stored procedure that runs this code: This piece of code uses the MERGE Statement to update Local Tables form remote tables in an Access Database that is linked by LINKED Server in SQL ...
0
votes
0answers
37 views

I need advise on if I should rebuild my index [duplicate]

I have a SQL Server 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 ...
0
votes
2answers
41 views

Do I need to have enterprise server in order to have multiple data sources in SSRS

I am currently running a single server setup of SSRS on MSSQL Server 2008 R2 Standard Edition and would like to know if I can have multiple data sources in this type of setup. The reason I ask this ...
0
votes
2answers
51 views

How should I structure my time based index?

So I have this table in SQL Server 2008. Let's just say it's called TimeSheets. Now, that table has two columns I am concerned with. TimeSheetDate and UserCustomerKey. TimeSheetDate is a ...
6
votes
1answer
820 views

How to get online the database which has missing/corrupted FILESTREAM files?

I've corrupted the files related to FILESTREAM in a database. The .mdf and .ldf files are still intact, but when I try to get the database online, it complains, saying that the files related to ...
5
votes
3answers
1k views

Why do linked servers have a limitation of 10 branches in a CASE expression?

Why does this CASE expression: SELECT CASE column WHEN 'a' THEN '1' WHEN 'b' THEN '2' ... c -> i WHEN 'j' THEN '10' WHEN 'k' THEN '11' END [col] ...
4
votes
2answers
3k views

How to recover a corrupted msdb database in SQL Server 2008?

One of our clients' SQL Servers got corrupted. we were forced to uninstall all instances and all SQL Server programs in add/remove programs and then reinstall SQL Server because their backups were ...
2
votes
2answers
85 views

Scripting all of available databases to .sql files containing schema+data+users with single command

I have a SQL 2008 Express with 80 databases in it. I want to move these databases completely to another server which is hosting a SQL 2008R2 Enterprise instance. As i'm told it is better to script ...
3
votes
1answer
79 views

Simple method to setup SQL Server for development access

I've created a virtual development box and installed SQL Server 2008 with mixed authentication. Then I connect to SQL Server via SQL Server Management Studio using my Windows account but when I try to ...
1
vote
2answers
94 views

Move a huge databases from one SQL Server to another

I have customers databases located on my SQL Server 2008 machine. The size of these databases are around 300 GB. I would like to move them all to another SQL Server 2008. Is there a way to shrink ...
3
votes
2answers
2k views

bcp in of datetime type data results in an “Invalid date / time format”

I am familiarizing myself with the bcp utility, and I have a large table containing datetime data awhich I bcp out in several ways: native, character, delimited. I then bcp in to a truncated table ...
3
votes
1answer
101 views

sql server service broker queue pass parameter to stored procedure

Stored Procedure Create PROCEDURE [dbo].[InitServiceLog] ( @name varchar(max)=null ) AS BEGIN SET NOCOUNT ON; insert into [AdventureWorks].[dbo].[ServiceBroker_Log](Service) ...
3
votes
0answers
500 views

Severity 016 Backup virtual device fail

My backup on one of my servers is failing once a week. This is the alert I'm getting: DESCRIPTION: BackupVirtualDeviceFile::PrepareToFreeze: failure on backup device ...
5
votes
4answers
2k views

What's a good tool for visualizing SQL Agent jobs?

I find the built-in MS SQL Studio tools for managing Agent jobs to be a little frustrating. What tools out there have you found helpful? Offhand, there are three things I'd like to see in such a ...
-1
votes
2answers
90 views

Create Automated Indexing for huge SQL Server Table [closed]

i have Huge SQL table like 800mil record. it takes about 30gig of disk space without any indexing on it. what is the best method to apply index in it? also this table gets about 50,000 record ...