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

learn more… | top users | synonyms (1)

7
votes
4answers
13k views

Replicating a remote MySQL database to MS SQL Server 2008

I want to replicate the contents of a MySQL database to a MS SQL Server 2008 database. Is this possible? Can anyone outline the steps required in order to achieve this? Thanks.
0
votes
1answer
3k views

INSERT INTO remote table on different server with OUTPUT clause gives error

I have a procedure which makes one or two inserts into a remote table. To accomplish the second insert, I need to know the recently inserted Id of the first insert. To make this work my insert clause ...
8
votes
2answers
1k views

SQL Agent powershell context reference

At my new job, we have multiple named instances on each servers. Server1\Dev Server1\DevIntegrated Server1\QA I have a SQL PowerShell script in the works that calls out to the OS, invokes ...
2
votes
4answers
4k views

SQL Server: cold backup, shutting down services?

One of our collagues told me that they are doing "cold" backups for SQL Server so that they are shutting down services and then taking a backup somehow. I think this is all wrong! Am I right? I think ...
2
votes
1answer
2k views

SQL Server 2000 to SQL Server 2008 linked server issue

Here's my scenario: I've got a linked server going from a SQL Server 2000 machine to a SQL Server 2008 machine. To aid in moving databases with a minimum of config changes, most of our connections ...
0
votes
0answers
121 views

how do i bulk copy a huge amount of data and keep the same table updated through stored procedure in SQL SERVER [duplicate]

Possible Duplicate: How to move data from big table In my project i need to fetch datas from different tables in a data base and create a new table with the same colmn names for all those ...
7
votes
2answers
189 views

Meeting with DBAs regarding server upgrade project - Common concerns

I'm more of a network/windows admin and I've been tasked with overseeing a SQL server upgrade project. I need to meet with the DBAs and discuss their needs / wants regarding the upgrade. I don't want ...
4
votes
2answers
382 views

Best way to design this mileage table?

I will be populating a Miles Per Gallon (MPG) table. It's coming from an odometer source. It's currently set up as so: id (primary_key) , truck_num , start_date , end_date , ...
1
vote
2answers
1k views

Does shrinking a SQL Server transaction log remove transactions from the log?

I know shrinking the log is counter-indicated and has been covered many times, but I just encountered the following, baffling scenario: We had a run-away query attempt to delete so many records that ...
0
votes
2answers
704 views

remote database connection issue

is it possible to connect ASP website which is on web server to connect to SQL server 2008 database which is on another database machine? In my case the database machine has windows XP SP1 installed ...
0
votes
2answers
372 views

How do I record SQL transactions with SQL Server Express

With a test migration from 2000 to 2008R2 Express, one function from the client application fails silently. I'd like to find out what SQL is running and why it fails. I think I would have attacked ...
4
votes
1answer
262 views

SQL Server 2008 Replication - Fixed Overhead of Replication?

We are using SQL 2008 Transactional replication to replicate data from our production database to our reporting database. We recently created a new 'Global' database that we would like to have ...
6
votes
3answers
922 views

non-clustered unique indexes on sql server partitions

SQL Server 2008 requires unique non-clustered indexes created on a partition to include the partition field in the index definition. I'm wondering why.
4
votes
1answer
242 views

What units is this metric in?

Im currently using the following query to get the Page Life expectancy from sql server: declare @PLE int select @PLE=cntr_value from psql1.master.sys.dm_os_performance_counters where ...
1
vote
2answers
2k views

Flat file manager TextQualifier not working

I've a CSV text file which contains col1,col2,col3 "abc,cdef",a,b When I use the Flat File Source and preview the a bc,cdef appears on first column. But when i run and view the result in ...
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 ...
15
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 بِسْمِ اللَّهِ ...
8
votes
2answers
412 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
228 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 ...
10
votes
5answers
527 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
440 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
339 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
613 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 ...
14
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
274 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
14k 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
297 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
239 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
742 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
268 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
566 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
528 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
144 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
460 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 ...
14
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
496 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
631 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
709 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
560 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.