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

learn more… | top users | synonyms (1)

3
votes
1answer
3k views

Restore Database from Network Drive

I not able to restore DB from maped Network Drive, Only from HDD initialized in Native OS, my enviroment is MsSql2008 on Win2008R2 Standard (as virtual in VMware ESX4.1), Win2008R2 Standard ...
14
votes
4answers
3k views

SQL large table design

I have a general question about SQL Server 2008 table(s) design. We currently have a table that is over 600GB and grows at about 3GB a day. This table has the appropriate indecies but is becoming a ...
6
votes
2answers
1k views

Database locking issues?

I have run into a transaction related issue on a SQL Server 2008 production database. A brief overview is that we have a website that has numerous concurrent users around the state, who do GUI type ...
2
votes
2answers
5k views

SQL Server 2008 collation arabic

We are currently having a problem loading arabic into a SQL Server 2008 database. We want to load بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ but in the database it changes to بِسْمِ اللَّهِ ...
6
votes
1answer
3k views

Database Mirroring with TDE

I have the requirement of mirroring a few databases and also using transparent data encryption (TDE) on them as our data must be encrypted while 'at rest'. I have setup TDE on both the principle and ...
8
votes
2answers
397 views

Mirroring the Distributor

Has anyone had success with mirroring the distribution database? We have a dedicated server as a Distributor. It handles all our push replication from prod to reporting. We'd like to build an ...
3
votes
2answers
226 views

How to know dependency on a table

I have a Database Called Total and I have about 40 tables in it.I am trying to move the tables in the database into a different server So I have prepared all the create table scripts but the problem ...
9
votes
5answers
521 views

SQL Server Backups - A couple of questions

We run our weekly backup job at 9pm on Fridays and we are experiencing a couple of issues with regard to disk space (which gets perilously low at times) and performance. We're looking at ...
9
votes
3answers
2k views

How to change the firing order of Triggers?

Realy I rarely use triggers. So I met a problem at first time. I have a lot of tables with triggers (2 or more for every table). I would like to know and change the order of firing triggers for every ...
2
votes
1answer
419 views

SQL Server 08: Union over while

I've done some reading on this, and I keep seeing people say it's a bad idea, but hear me out! I have a stored procedure which needs to find a series of timeslots over a number of days. Due to the ...
2
votes
1answer
324 views

Resource Waits: Mathematical link between Wait Time and Average Waiter Count

Just curious, per BOL Wait Time (ms/sec) is the wait time in milliseconds for all tasks waiting for one or more resources in the category since last update. Average Waiter Count is the number of ...
4
votes
1answer
572 views

An alternative for sp_unbinddefault

I have a column with default value bound to UW_ZeroDefault and I am trying get rid of it. As I understand it, this default has been created by using CREATE DEFAULT then the column has been bound to ...
11
votes
3answers
4k views

Schema design - best practices?

I understand the capabilities of SQL Server Schemas, but what are the best practices? Sure they give another layer of security, and provide logical grouping of database objects within the database, ...
1
vote
1answer
258 views

File MDF growth SQL Server 2008

I have SQL Server 2008, I have 20 GB free on HD when I try to insert row in any table my HD was full before finished. I try to insert about 200,000 rows each row with around 100 columns. The ...
1
vote
2answers
13k views

How to get table columns with datatypes (and lengths) using PowerShell?

I'm trying to get column names with data types (and lengths) for SQL Server instance using PowerShell. I got this far: #Load PSSnapin Add-PSSnapin *SQL* #Get column names $colNames = dir ...
5
votes
2answers
2k views

How do I clear a table from SQL Server's cache?

I have a few tables in my database that should not be cached. How do I tell SQL Server not to cache a table's pages or how do I flush a single table from the cache? Flushing all the cache is not an ...
1
vote
1answer
288 views

Running a sql server Trace of 1 GB using sqlcmd

I am load testing two sql server instances. I have a trace file from sql server 2000 database with a file size of little less than 1 GB. I am running this using the sqlcmd utility and it is been ...
4
votes
3answers
1k views

For every insert statement I see sp_executesql in SQL Server Profiler

Working on tuning our database and queries for one of our products, I decided to pop open Profiler in the QA environment and see what it shows. I saw for every insert I called, a call was made to ...
4
votes
1answer
238 views

SQL Server transactional replication - behaviour of a MERGE command on the subscriber(s) vs. publisher

Background I have two instances of SQL server running on two different machines: One is a publisher, the other is a subscriber for a single (large) database. The replication type is transactional. ...
4
votes
1answer
2k views

Is there a way to force sp_send_dbmail to use ANSI, or to not include the Unicode prefix?

This is pretty trivial, but if someone has the answer handy, I'd appreciate it. I use the msdb..sp_send_dbmail sproc as a lightweight way to distribute simple reports. This often entails producing a ...
2
votes
1answer
2k views

“Linked server does not contain table” error when using VFPOLEDB provider linked server

I am receiving the below error when attempting to run any queries via a linked server in SQL Server 2008 R2 using the Visual Fox Prox OLE DB Provider v9.0.0.3504. I am attempting this as I need to ...
4
votes
1answer
726 views

How to get text for default language

I have so tables: and so data at Language table: and so data at Text table: I have to return text for requested language if it exists and text for default language if it does not exist. Is it ...
1
vote
2answers
263 views

Case-sensitive query - SQL Server 2008

How can I rewrite as Latest Developer a record which was created as LATEST DEVELOPER via SQL query?
5
votes
1answer
528 views

Is there a way to have SQL Server format a number into ordinal form?

Data 1, 2, 3, 4, 11, 21, 99 I want to get 1st, 2nd, 3rd, 11th, 21st, and 99th I could roll my own, but is there any function built into SQL server that could so this for me? Corollary: I will also ...
2
votes
1answer
492 views

SQL Server 2008 Mirroring Pauses without warning

I have several databases mirroring with a witness. All 3 machines are local to our network and have generous nics. Monitoring the mirroring, it does not seem like there is a lot of network traffic. ...
1
vote
1answer
141 views

Migrating or Synchronizing SSAS Changes

Assume you have 2 SSAS databases, DB1 and DB2, that are identical. Now they branch off. Changes A and B are made to DB1 and changes C and D are made to DB2. Is there an easy method to migrate ...
2
votes
1answer
99 views

Full Text Search in SQL 2008

When I attempt to search in the full-text catalog which is my created earlier, I haven't been finding any word within database. For example: My word: Where CONTAINSTABLE(TABLO,*,' "*Where*" ') ...
2
votes
2answers
4k views

Attach SQL Server 2008 R2 on SQL Server Express 2008

I have a database on SQL Server 2008 R2. I want to attach it on a SQL Server Express 2008 instance running on Windows 2003. I set the SQL server compatibility level on the database to SQL Server ...
16
votes
4answers
8k views

Task scheduler for SQL Server Express

I have an ASP.NET MVC app which works with database under SQL Server 2008 R2 Express edition. There is a need to perform a regular task on updating some records in the database. Unfortunately the ...
1
vote
1answer
427 views

How to restore a database from a newer version of SQL Server

I have SQL Server 2008 and I want to restore a database from SQL Server 2008 R2. When I try to restore, SQL Server produces an error message that the database came from a newer version of SQL Server ...
13
votes
3answers
2k views

Why might a table's data space take up 4x the size of the raw data?

I have a table with 490 M rows and 55 GB of table space, so about 167 bytes per row. The table has three columns: a VARCHAR(100), a DATETIME2(0), and a SMALLINT. The average length of the text in ...
5
votes
1answer
495 views

Can filtered indexes help improve queries that are based on a time entered or should this be avoided?

I'm just learning about the new filtered indexes in MS SQL 2008 and I'm trying to understand where they would hurt and where they would help. I can see that adding a filtered index to an employees ...
3
votes
1answer
608 views

Attach Database Trigger

Is it possible to write a trigger when someone makes a change at the server level such as attaching or creating a database? I have a dev server where anyone can add a copy of the product database for ...
0
votes
3answers
659 views

SQL Query Declaration problem

I have a view as shown below.The View is good running.When I attempt to run view,I got the following the error.What might the problem? Incorrect syntax near the keyword 'Declare' SQL Query: create ...
5
votes
3answers
534 views

Which is quicker: Select of existing row vs Update where no row exists?

Which would run the fastest? Select from a table using the primary key (integer, clustered index, 1,000,000+ rows) Attempt an update on a different table, where the row does not exist? (where ...
3
votes
2answers
138 views

SQL server 2005 backup statistic

I'd like to share with you this simple snippet (answering my own question) and I'm also curious how do you control your SQL server backups.
2
votes
2answers
158 views

Is it fine to run a public website on the sql express db?

Is it fine to run a public high traffic website on a sql server 2008 express db?
4
votes
3answers
2k views

How to sync the data between two identical DB

The thing is I've two identical databases, one is in my localhostserver at my laptop and the other one is on the office main server. Is there any automatic way or software that can synchronize the ...
1
vote
1answer
34 views

How to know which website is causing the sql server to stop responding?

I have multiple databases on the same sql server 2008. Some times the server stops working and I should restart it to make it work again. Is there an easy way to know which application or website ...
2
votes
2answers
1k views

Determining maximum table size, type of engine and type of indexes supported

How many types of indexes are available with SQL Server 2005 and SQL Server 2008? MySQL has a variety of options like: Hashed, BTree, etc. What are the choices in SQL Server? I also want to determine ...
4
votes
2answers
296 views

How do I track the usage of XML indexes?

My XML indexes are not listed in sys.dm_db_index_usage_stats Does this mean they aren't being used? Or does this particular DMV not track XML index usage? (Books Online doesn't appear to answer the ...
3
votes
3answers
3k views

What's the difference between Linked Server solution and SSIS solution?

When I want to move data between two databases (e.g source: Oracle, destination: SQL Server), I think I have two options: Linked Server and SQL Server Integration Services. But is there any benefit ...
5
votes
1answer
7k views

How to get the foreign and primary key details for a table in SQL Server 2008

I would like to use 2 queries, one that lists all the foreign keys for a given table with the following information Schema name, foreign table name and the other that lists all the primary keys. Is ...
0
votes
1answer
614 views

How to create a backup schema script including System Tables in Sql Server 2008 R2?

I need to back up my entire DB including one table that's allocated in "Tables -> System Tables". When I try to generate the sql scripts to back up my DB this table isn't mapped in this scripts. Do I ...
0
votes
2answers
101 views

what are steps should i do to make my local sql server connects to a remote sql server on my server?

I want my sql server to remote connect to the server sql server, so that I can access databases from my local machine. How to do that in steps, or if there is an article online that will be nice as ...
1
vote
2answers
368 views

Scheduled backup errors

I am trying to do the following. I have about 50 DBs and a network NAS that acts as backup machine. I have made an sql script(lets say backup.sql) with 50 lines each of these say "BACKUP DATABASE ABC ...
0
votes
1answer
96 views

What would cause the speed difference between servers?

I have this query on my dev server: select snStudyNumber as ProjectNumber from CDB.cdb.Quotes q inner join CDB.cdb.LineItems l on q.PK_quID=l.FK_quID inner join ...
2
votes
2answers
316 views

Indexing of Data Warehouse tables?

Maybe I have misunderstood something but I can recall reading an article which said that there is no reason to create non-clustered indexes on very large data warehousing tables? That is because ...
3
votes
1answer
911 views

Replication slows down on massive deletes

First of all, I'm not a DBA, but I'd like to get advice how to deal with the following issue. We have few database servers based on SQL Server 2008 R2 SP1. They have been organized as shown below, so ...
2
votes
2answers
727 views

Determine last usage date of a linked server

We have a tonne of linked servers on our database server that we would like to clean up. Is it possible to determine the last date a linked server was used? e.g. the last time a query was performed ...