sql-server-2008

Synchronization

I want to Synchronize two Database in two server in sql server 2008. Database Mirroring is not working for me... I've created Master key, Certificate, endpoints... Everything is perfect.. But, even though, the Mirroring is not working.. Is there any other way to attain synchronization... Plz, Anybody Could help me??? ...

Database replication SQL Server 2008 to Mysql

I have to create real time replication from SQL Server 2008 to Mysql. It should be one directional data synchronizing. Has anybody done this before? Thanks. ...

Linq to Entities and SQL Server 2008 hierarchy id

Does Visual Studio 2008 SP1 / .NET 3.5 support Linq to Entities (ADO.NET Entity Data Model / edmx) with SQL Server 2008 R2? Specifically, the hierarchy id type? If so, do you have a download link, if not is there a published date when this feature will become available? I experimented a bit today after installing GDR R2 to support Sql...

attach/detach v.s. backup/restore

Hello everyone, I am using SQL Server 2008 Enterprise. I need to transfer the database (as a whole) to another server (to make a duplicate database to setup another test environment). I have two choices, (1) making a full backup at source server/restore at destination server; (2) making detach at source server/attach at destination ser...

Using ranking-function derived column in where clause (mssql08)

Hoping this is trivial for a SQL-Ninja... Been trying to get the following query working: This is under MSSQL Server 2008 SELECT ROW_NUMBER() OVER (ORDER BY Date_Time DESC) AS RowNumber, * FROM ( SELECT T.A_ID, T.User_Name, T.Date_Time, T.Value, U.ID, U.Name, U.Field1, U.Field2, COUNT(U.ID) OVER () AS TotalRows FRO...

Working with Time portion of a DateTime Column in SQL Server2008

i have a table in SQL Server 2008 which its name is Table1. Table1 has a column named CreateDate which its data type is datetime. Now, I wanna to get records that their createDate field values are more than for instance 1 hour. ...

SQL Server connection count issue

Hello everyone, I am using SQL Server 2008 Enterprise + .Net 3.5 + C# + ADO.Net. I am using the following SQL statement to monitor connection number, is it correct? If yes, my confusion is, one connection from ADO.Net client maps to only one connection in the following statement? Or one ADO.Net connection could maps to multiple connecti...

SqlBulkCopy.BulkCopyTimeout property

Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 + ADO.Net to develop a console application to do bulk insert copy. I want to use both bulk insert batch and bulk insert timeout property. For the BulkCopyTimeout property, I am confused and want to know whether it applies for the whole bulk or applies to only each batch of the bulk? ...

How to report an error from a SQL Server user-defined function

I'm writing a user-defined function in SQL Server 2008. I know that functions cannot raise errors in the usual way - if you try to include the RAISERROR statement SQL returns: Msg 443, Level 16, State 14, Procedure ..., Line ... Invalid use of a side-effecting operator 'RAISERROR' within a function. But the fact is, the function takes...

How can i modify a table in design mode in SQL Server 2008 ?

I used to modify the tables in SQL Server 2005 but now after creating a table, I want to alter some entites but the SQL Server 2008 never let me do it. Is it about the configuration scope of the SQL Server 2008? or How ? Regards Bk ...

How do I create a SQL table under a different schema?

This is from SQL Server 2008, ssms When I create a table, it creates under dbo. I would like to create it under a different schema, but when I use the 'New Table' dialog, I can never find the field where to specify this. ...

How do I fix this SQL statement to AVG muliple rows from another table?

I am having a few issues with the below SQL. SELECT * FROM (SELECT tbrm_Article.ArticleID, tbrm_Article.CountryID, tbrm_Article.CategoryID, tbrm_Article.Title, tbrm_Article.ArticleDetail, tbrm_Article.Source, tbrm_Article.ArticleDateTimeAdded, ...

OsVersionCheck failed when installing SQL Server 2008 Express on Windows 2003 SP2 Datacenter Edition

I have a VPS at a hosting company and it runs Windows 2003 Datacenter Edition. I just recently installed SP2 for Windows. When I try to install SQL Server 2008 Express the minimum requirements fails. According to Microsoft the OS Version I have should be supported. http://msdn.microsoft.com/en-us/library/ms143506.aspx#Express32 When v...

Edit TOP Row in SQL Server Management Studio

When I right click on the table, I get the option to Edit TOP 200 rows. I went to option and changed this to TOP 1 row. Now when i open that row, that is not the latest but the last row of my database. How can I Edit the latest row inserted in my table? ...

SQL Server 2008: What does it mean to grant a user "AUTHORIZATION" over a schema?

I see the following in one of my database scripts: CREATE SCHEMA [ContosoSchema] AUTHORIZATION [ContosoDeveloper] GO My question: In SQL Server 2008, what does it mean to grant a user "AUTHORIZATION" over a schema? ...

Is SQL Server 2008 compatible with 2005?

I have a problem with my website. When I publish my site on server, I got an error message: The database '----------------------------.MDF' cannot be opened because it is version 655. This server supports version 611 and earlier. A downgrade path is not supported. What can I do about this? ...

SSIS For Each File Enumerator multiple file types

Hi All, Is it possible in SQL 2008 (SSIS) to specify multiple file types in the for each loop control? Something like HH*.* and U*.*. That or a cool workaround would be great. Thanks, ...

Data reader is incompatible... member does not have corresponding column in data reader.

Using VS 2008, SQL Server 2008 and WPF 3.5, I've made some changes to my schema and updated the model. It compiles and runs fine, until the client app calls for a specific entity and I get the following (actual names replaced): The data reader is incompatible with the specified '<Model>.<ViewBasedEntity>'. A member of the type, '<Prope...

OUTPUT clause for Stored Procedure vs Table-Valued Function

I'm studying for the MCTS 70-433 "Database Design" cert, and in the text that I'm studying, one of the self-tests has this question. You have a stored procedure named Get_NewProducts. You wish to insert the results of this stored procedure into the Production.Product table and output the INSERTED.* values using the OUTPUT ...

NHibernate.Spatial and Sql 2008 Geography type - How to configure

I am trying to use Nhibernate with the Sql 2008 Geography type and am having difficulty. I am using Fluent Nhibernate to configure which I am fairly new to so that may be the problem as well. First, the class I am trying to persist looks something like: public class LocationLog : FluentNHibernate.Data.Entity { public virtual new int...