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

learn more… | top users | synonyms (1)

4
votes
2answers
2k views

Can I have different publishers and one subscriber in replication?

I have the same databases in three cities which each database have three tables: 1- tbl_worker 2-tbl_workshop 3-tbl_users and cities are:city1,city2,city3 city2 and city3 insert informations in ...
1
vote
1answer
751 views

Can't run query using “localhost\sqlexpress”

I am trying dynamically build an SQL Statement that includes linked server. That works. When I use "localhost" to reference the current local machine SQL Server, that doesn't work. For example: ...
2
votes
2answers
2k views

How To Restore A Replicated Database

I am replicating our live database using transaction replication. This is basically to have a backup copy of our database in the case of server failure. The replicated database is read only, so I ...
3
votes
1answer
264 views

Does blocking always mean open transaction?

This may seem a bit dull question but does blocking always mean that there is open transaction and that may cause transaction log grow to infinity because open transaction prevents log truncation ...
1
vote
1answer
331 views

How to take Snapshot of Restoring Database

I have set up log shipping with my database to make a backup. The backup copy of the database is in a status called '(Restoring...)'. I understand this is to be expected? Is there a good way I can ...
6
votes
3answers
22k views

Read XML file in SQL Server 2008

How can I read an XML file and store the data in XML to our table in SQL Server 2008?
3
votes
1answer
546 views

SQL Globalization - DateTimeOffset

What is the recommended best practice when it comes to storing date/time for an application that needs to support multiple timezones? Which is best ? Use the SQL DateTime data type and insert ...
5
votes
1answer
7k views

How to find the date a login password was last changed in SQL Server 2008?

I'm porting stored procedures from Sybase 15 to SQL Server 2008. In Sybase this statement calcs an expiration date by adding a number of days to syslogins.pwdate (Date the password was last changed) ...
3
votes
1answer
300 views

How Commit works in a transactional push replication with updatable subscribers

I want to know if in a transactional push replication with updatable subscribers, a commit is only done when all subscribers have succeeded to make it, or if it only guarantees the correct commit in ...
3
votes
1answer
9k views

Why TRY CATCH does not suppress exception in trigger

I have a trigger on a table (source) that data should be copied to the other one (target) in other database. I am trying to implement custom synchronization process for data: I want that target ...
6
votes
1answer
549 views

How to back up a small database in SQL Server 2008 R2 Express Edition

I will shortly be migrating a database from SQL Server 2000 (part of SBS 2003) to SQL Server 2008 R2 Express Edition The database is small, and there are only a few hundred short transactions per day ...
2
votes
1answer
149 views

What is the Server name for SQL Server2008?

I have sucessfully installed the Microsoft® SQL Server® 2008 Management Studio Express from the following link: http://www.microsoft.com/download/en/details.aspx?id=7593 file name: ...
2
votes
5answers
2k views

Setting up a Redundant Sql Server 2008 Configuration While Retaining High Performance and Minimal Downtime

We have a situation where we are moving to a new hosting facility and are attempting to configure our new database environment. However, none of us are formal DBA's so a lot of what we are doing is ...
5
votes
3answers
1k views

Best solution for High Availability and SSRS on SQL Server 2008 R2?

I have 2 Physical Servers with SQL Server 2008 R2. – SQL Server 1(Active) & SQL Server 2 (Passive) Web Application is developed using .Net 4.0 Framework. I want to know the best solution to have ...
1
vote
2answers
164 views

CTAS with clustered index on SQL Server

Is it possible to create a table with a clustered key from a query in a single step or do I have to do this: select 1 as id into foo; create unique clustered index pk_foo on foo(id)
4
votes
3answers
117 views

Is it much more expensive to use procedures that get lists and deriving a count in the application vs. a separate stored procedure for the count?

I would like to know if returning a count is much more expensive than returning a dataset in regard to processing performance? I assume there is a bandwidth increase in delivery to the application ...
2
votes
2answers
314 views

How do redundant indexes impact query performance?

The indexes are affecting the ADD/UPDATE operations however I was wondering whether the redundant indexes will affect the SELECT query performance or not? How the redundant indexes are handled by ...
5
votes
3answers
2k views

Is there a way to see the access log of a table?

I am using MS SQL Server 2008. I have a table in a database, in which records are being inserted and deleted. E.g. Initially the table is empty. A Java program (probably) inserts few records in it. ...
1
vote
2answers
2k views

How can I check the status of transactional replication?

How can I check if there are commands waiting for being executed in the subscribers and find if there is any error occurring in my publication. I want to be able to do this programmatically so the ...
0
votes
1answer
417 views

access 2003 to sql server 2008

I search a way to export an access 2003 database to sql server express 2008. the export is on la (other computer than the server). the computer have office 2003. the computer doesn't have admin ...
0
votes
1answer
263 views

SQL logs filling up with “Setting database option Compatibility_Level” messages

On several of my servers, I have "Setting database option Compatibility_Level" messages filling up the SQL log and application event log to the tune of twice every 5 seconds. This makes finding ...
0
votes
1answer
741 views

check if linked server table column exists

I have several access databases that I'm copying over to the sql server, connecting to as a linked server, and then pulling data from each night. I need to be able to identify if the current access ...
2
votes
1answer
2k views

Meaning of SSMS database icon preceded by scroll with red x

SSMS 2008 R2, connecting to a 2008 instance shows the above glyph in SSMS Object Explorer. None of our other instances show that icon. I've moused over it in the vain hopes that I'd get a useful ...
0
votes
2answers
187 views

Can You Access A Replication Database

I am using SQL server 2008 R2. I have a live database, and a replicated copy of that live database on a different server. It is using Transactional Publication replication. When I take our software ...
10
votes
2answers
2k views

How large is “too large” for SQL 2008 Web Edition?

For our soon-to-be-hosted application I need to choose between SQL Server 2008 Web edition and SQL Server 2008 Enterprise edition. There isn't any "must-have" functionality: the application currently ...
5
votes
1answer
106 views

Possible pitfalls of condensing 2 SQL Server instances into 1

I currently have 2 SQL Server 2000 database instances (each running on a different physical server), each containing around 12 databases (not all are active). We are planning an upgrade to SQL Server ...
2
votes
1answer
269 views

Why are views not copied over when using SQL Server Log Shipping?

I have 2 Sql Servers (2008) with Log Shipping setup between them. The receiving server is configured to keep the database in Read-Only mode. When creating a view on the primary server, this view is ...
2
votes
2answers
2k views

SQL Server 2008 R2 SQL Server has encountered x occurrence(s) of I/O requests taking longer than 15 seconds to complete on file '

When I alter or create a stored procedure directly on production or QA database, after a few seconds I start experience timeouts and application becomes unavailable. Log files shows this error: ...
2
votes
2answers
214 views

SQL aliasing to redirect traffic between databases on the same server

In order to upgrade a database with no client disconnects, I clone an existing database and put it in a readonly mode. Now, I want all user traffic to be redirected from the original database to the ...
1
vote
0answers
1k views

Problems with cross forest authentication in SQL Reporting

We're currently running an SQL 2008 R2 Cluster with Reporting Services running, all for use with System Center Operations Manager 2007 R2 (RU3). Our users are on a different domains to the SCOM and ...
1
vote
2answers
3k views

Print database_size from sp_spaceused

Using SQL Server 2008, I have found that the database size can be obtained using exec sp_spaceused This procedure returns two tables: database_name | database_size | unallocated space reserved | ...
3
votes
1answer
1k views

How to get super parent from table with self relationship

i need to create Function that will return the super parent of a given id from a table the table look like table1 (id, parentId, someData) the parentId is related to the id for example i have 1 - 2 ...
2
votes
2answers
1k views

How to change DB file location with Replication

I need to move few DB files to another location on same server due to low disk space. Replication is present with that DB and this scenario is on subscriber server. Is there any way to do this without ...
0
votes
2answers
50 views

sql server firewall

I look for installing an sql server express. I check some post/tuto and saw that I need to enable tcp/ip, but did I need to do something with the firewall even if the database is only use on lan. ...
3
votes
1answer
166 views

Why SQL Server installs multiple services for AS and RS, but only one for IS?

When I install multiple SQL Server instances on a same computer, every instance gets its own SQL Server Service for Analysis Services and Reporting Services. But I get only one service for Integration ...
3
votes
2answers
3k views

SQL Server 2008 R2 MERGE statement to replace single INSERT AND UPDATE statement combined

for performance reasons, we're considering changing our standard stored procedure for saving data (INSERT and UPDATE combined in a single stored proc): ALTER PROCEDURE [dbo].[spCustomerSave] ( ...
3
votes
2answers
3k views

How to optimize this dynamic stored procedure

I have a stored procedure which is retrieving data using 20 tables. Sample of the procedure: CREATE PROCEDURE GetEnquiries ( @EnquiryDate DATETIME = NULL ) AS ...
8
votes
1answer
3k views

Compact Large Objects in Reorganize Index task

I'm setting up a maintenance plan in SQL Server 2008 R2. On the Reorganize Index Task it has an option for "Compact Large Objects". What does that mean and do I want to turn it on?
3
votes
2answers
546 views

Tool to create a TSQL script from a SQL Server 2008 trace file

Are there any tools available to create an executable tsql script from a SQL Server trace file? Is there an easy manual way?
5
votes
2answers
6k views

How to know if I am running SQL Server 2008 R2?

I ran @@version. This is what it gave me: Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) Sep 16 2010 19:43:16 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on ...
2
votes
1answer
393 views

Return Output from SQL Function using command line SQLCMD

I have a SQL Function that returns an Integer as the Output. I need to execute it via sqlcmd and I only want to get it's integer output. However right now I'm getting back this type of output: ...
1
vote
0answers
3k views

Transactional replication subscription not showing in SQL Server Management Studio [closed]

I tried to set up 3 SQL instances, one publisher 2 subscribers, to replicate data between them. I did it using the GUI wizard and all went fine in the Publisher: my publication appears under "Local ...
2
votes
2answers
307 views

UDF And Query Plan Caching

I have a multi statement table value UDF. That builds a temp table then returns it as the result. The first time its executed it takes 5 seconds, subsequent executions with the same parameters take 1 ...
2
votes
2answers
155 views

How can I prevent/detect that a end user restored a backup?

We need to prevent the SQLServer 2008 .mdf file from being replaced by the end user of our application. we collect data in the MDF that is important to us. If the user saves an old copy of the MDF, ...
1
vote
2answers
322 views

Best type to use in a composite key when one of the values varies in type

I am building a data store for the content of multiple blog sites which have been scraped. Each of these sites is going to have an entry in a Blog table BlogId Url ...
5
votes
4answers
4k views

SQL Rebuild Index, Recovery Model, and db log filesize?

I have a database that we currently run transaction log backups throughout the day, every 30 minutes to be exact, and we run a full backup each day at 2am. Every Saturday at 3am, we have a job setup ...
2
votes
2answers
444 views

How do I connect to a SQL Server 2008 instance on my network?

I have 2 SQL instances in 2 virtual machines. I'm able to see the other instance in one machine but I cant connect to it. Probably some permission problem...but I don't know where to look. Can ...
4
votes
4answers
3k views

Empty strings in VARCHAR(MAX) consuming space which cannot be recovered

I have a table with a non-nullable VARCHAR(MAX) column where every row contains an empty string (third party database so I can't change it). I see a huge amount of space use, over 15GB for 1 million ...
0
votes
1answer
2k views

Upgrade older SQL 2008 to 2008 R2 on active/passive cluster

I have an active/Passive SQL Server 2008 cluster in production that I need to upgrade to SQL Server 2008 R2. I just want to make sure I understand all the steps before starting this in production. ...
2
votes
2answers
509 views

Clustered monotonically increased index insert performance

I have a table with field Id (bigint, IDENTITY) as primary key and clustered index on it. I inserted 400 rows and saw execution plan. I got: the relative query cost for this insertion 36% and for this ...