sql-server-2008

VS2010 ultimate DataBase Project + SQL Server 2008: Updating Project from Database

Hello everyone, this is a quick question: I have this Database Project in a Web app solution with the real database. I want to update the database using SQL server managment studio, and then update the corresponding VS project. This can be done? I know that you can update the scripts in the project, but I'm not the SQL kind of guy, ...

Clustered index on frequently changing reference table of one or more foreign keys

My specific concern is related to the performance of a clustered index on a reference table that has many rapid inserts and deletes. Table 1 "Collection" collection_pk int (among other fields) Table 2 "Item" item_pk int (among other fields) Reference Table "Collection_Items" collection_pk int, item_pk int (combined primary key) Becaus...

How to approach performance issues?

Hi, We are developing a client-server desktop application(winforms with sql server 2008, using LINQ-SQL).We are now finding many issues related to performance.These relate to querying too much data with LINQ , bad database design,not much caching etc.What do you suggest,we should do - how to go about solving these performance issues? On...

COM+ Applications returns an error when when I try to add a new application

Error message returned 'An error occurred while processing the last operation. Error code 800401154 - Class not registered The event log may contain additional troubleshooting information.' The other thing is, the is a red arrow icon displayed over My Computer (Component Servers -> Computers -> My Computer). I have searched everywhere ...

Truncate the underlying table in a view

I'm currently in a situation where we are creating a "facade" database which basically consists of a set of views which are simply a select from an identically named table in another database. The idea is that the application can be repointed to the facade database with minimal changes to the actual code. This seems to work ok for inser...

How to group columns for a Reporting Services Matrix?

I want to display data in a reporting services matrix. It is an access peak matrix, in a way that days are rows, and hours are columns. My procedure returns data like this: Day / Hour / Peak 2010-05-01 00:00:00.000 2010-05-01 00:00:00 0 2010-05-01 00:00:00.000 2010-05-01 01:00:00 0 2010-05-01 00:00:00.000 2010-05-01 02:00:00 0 2010-05-0...

Best way to auto-restore a database every hour

I have a demo site where anyone can login and test a management interface. Every hour I would like to flush all the data in the SQL 2008 Database and restore it from the original. Red Gate Software has some awesome tools for this, however they are beyond my budget right now. Could I simply make a backup copy of the database's data fil...

SSIS - Upgrade from 2005 to 2008 - How to set a project property when I don't have a project

I have about 160 SSIS packages that I'm trying to upgrade from 2005 to 2008. When I run SSISUpgrade.exe on them, I get the following error messages on many of the packages: Error 0xc0209303: ...: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_64BIT_ERROR. The requested OLE DB provider MICROSOFT.JET.OLEDB.4.0 is not registered -- perhaps no 64...

How do I drop SQL Databases? sp_delete_database_backuphistory woes

I want to delete some SQL Databases on my server, but I'm having problems. My login has the roles: public dbcreator serveradmin When I right click the database and hit Delete, it says that Delete backup history failed for server 'MYSERVER' (Microsoft.SqlServer.Smo) Additional Information: The EXECUTE permission was deni...

SQL2008 merge replication fails to update depdendent items when table is added

Setup: an existing SQL2008 merge replication scenario. A large server database, including views and stored procs, being replicated to client machines. What I'm doing: adding a new table to the database mark the new table for replication (using SP_AddMergeArticle) alter a view (which is already part of the replicated content) is updat...

Solving Slow Query

We are installing a new forum (yaf) for our site. One of the stored procedures is extremely slow - in fact it always times out in the browser. If I run it in MSSMS it takes nearly 10 minutes to complete. Is there a way to find out what part of this query if taking so long? The Query: DECLARE @BoardID int DECLARE @UserID int DECLARE @C...

How to identify the culprit in "Error converting data type varchar to numeric"?

An insert statement with a large number of values returns 'Error converting data type varchar to numeric.' How can I find which value actually triggers the error? MS SQL Server 2008 is used. ...

SQL Server 2008 FTS CONTAINSTABLE Not Returning More Than Five Rows

I have a single table called "Indexes", it contains one nvarchar and three ntext columns (all Full Text Indexes). Index is up to date. CONTAINSTABLE(Indexes, *), 'test', 5) //5 results No matter what I change the above keyword too, it only returns the first 3-5 results. It should roughly return 90-120 results, for the above query. SE...

Two Instances of Sql Server (2005 and 2008)

Hi All, I installed Visual Studio 2008 Professional in my machine and It had installed SQL Server Express 2005 database in machine, and I use it very fine! I installed SQL Managment Studio and works great. So, in this week I Installed Visual Studio 2010 Pro in machine and the setup installed the SQL Server express 2008 and it overwrite...

How to close and open access to SQL Server 2008 in Windows application?

Hi, I'm using SQL Server 2008 (without application server or anything). Numbers of users can be up to 1000. Windows Authentication is used. The question is: How to handle modes, so some users will be allowed to work in read-only mode some users won't have access to db for some time My versions: Using a table w...

Adding more OR searches with CONTAINS Brings Query to Crawl

I have a simple query that relies on two full-text indexed tables, but it runs extremely slow when I have the CONTAINS combined with any additional OR search. As seen in the execution plan, the two full text searches crush the performance. If I query with just 1 of the CONTAINS, or neither, the query is sub-second, but the moment you a...

How to predict result set row count?

I have an application where I create a big SQL query dynamically for SQL server 2008. This query is based on various search criteria which the user might give such as search by lastname, firstname, ssn etc. The requirement is that if the user gives a condition due to which the formed query might return a lot of rows(configurable for max...

What is the SQL command to forcibly close all other connections to the a database

What is the SQL command to forcibly close all other connections to the a database. This is for SQL Server 2008 ...

backup SQL Server 2008 database on a network drive

Hi, I need to backup my SQL Server 2008 database to another PC on network. I've even mapped network drive and assigned it another driver letter. But when I try to select .bak file while exporting, only C: shows up. I've even restarted my SSMS. Can somebody point out what else I may need to do? Thanks! ...

Can Visual Studio.NET 2008 integrate SQL 2008?

Visual Studio 2008 ships with SQL 2005. I would like to integrate SQL 2008. Are there significant reasons why one could not/ can not do this? ...