sql-server-2008

Load points from SQL Server Multipoint data type into table

I'm kicking around the idea of using the new geometry datatype to represent a vector in the database. The multipoint geometry data type would work well for this, but my question is, is there a way to populate a two column table with the x,y values in a multipoint, where each point is a row in the table, and the X and Y point values go i...

Accessing XML stream from ADO against SQL Server 2008.

We are migrating ASP code that used ADO to connect to SQL Server 2000. For the most part the code migrated without a hitch to SQL Server 2008 after defining the connection, but one type of query is throwing an error that puzzles me. Against SQL 2000, we would use code like this: set oCommand = Server.CreateObject("ADODB.Command") oComm...

Having trouble connecting to SQL Server 2008

I'm working on an application written in VB6 and I'm having trouble connecting to a SQL Server 2008 database that has been set up on a server in our office. Here are the symptoms: When I try to connect using a connection string via ADO in VB6, VB6 hangs and then finally gives me the error: "Run-time error '-2147467259 (80004005)': [M...

why I cannot drop procedure from different schema using drop procedure statement in sql server 2005

As simple as it is : drop procedure schemaName.procName Gets the following error msg: Msg 3701, Level 11, State 5, Line 2 Cannot drop the procedure 'procName', because it does not exist or you do not have permission. Edit: I tried also using Sql based authentication - still does not work Strange that I am able to drop the proced...

SQL Server 2008 Page/Row Compression Thoughts

Have other people here played with SQL Server 2008 Compression at either the page or the row level on their datasets much? What have your impressions been on performance both speed and disk-space wise? Has anyone ever seen compression demonstrably hurt performance? On some of our huge fact tables we've been playing around and noticing...

Adding a new role to existing User SQL server 2008

Hi, I'm attaching a new database programatically using VB.net application. I wrote DB scripts and execute them using command object. After attaching the db, I have to create logins and add roles. If the login am going to create is already existing on that target SQL server then am just adding the roles using (EXEC SP_addrolemember), pro...

Key DataType for a high volume SQL Server 2008?

I in the process of designing a database for high volume data and I was wondering what datatype to use for the primary keys? There will be table partitioning and the database will ultimatley be clustered and will be hot failover to alternative datacentres. EDIT Tables - think chat system for multiple time periods and multiple things...

What is the equivalent for LOCK_ESCALATION = TABLE in SQL Server 2005?

I have a script that was generated in SQL Server 2008, but I need to execute it against a SQL Server 2005 database. What would an equivalent statement for the following be in SQL Server 2005? ALTER TABLE dbo.Event SET (LOCK_ESCALATION = TABLE) ...

How can parallelism affect number of results?

I have a fairly complex query that looks something like this: create table Items(SomeOtherTableID int,SomeField int) create table SomeOtherTable(Id int,GroupID int) with cte1 as ( select SomeOtherTableID,COUNT(*) SubItemCount from Items t where t.SomeField is not null group by SomeOtherTableID ),cte2 as ( select t...

SQL Server 2008 installation error: Previous releases of Microsoft Visual Studio 2008

Hello everyone, I got this weird error which mentions I should install VSTS 2008 SP1, during the process of installation of SQL Server 2008 developer edition. But actually I have VSTS 2008 SP1 installed. Any ideas what is wrong? Here is my screen snapshot. http://i41.tinypic.com/9teo7m.jpg thanks in advance, George ...

known and "unknown" incompatibilities between sql 2005 and 2008?

as usual, we'd like to think that there won't be any trouble migrating our applications to the latest sql version... but... but... but... well, just to be prepared, has anybody stumbled into some nasty incompatibility issue? (for example, I remeber that after migrating from 2000 to 2005, one linked server we had to a sql 6.5 server ...

SQL Script to take a Microsoft Sql database online or offline?

Hi folks, If I wish to take an MS Sql 2008 offline or online, I need to use the GUI -> DB-Tasks-Take Online or Take Offline. Can this be done with some sql script? ...

How can I embed Microsoft SQL Server 2008 Report Builder into my forms?

I don't want to open Report Builder from Report Manager. I want to embed Report Builder into my forms. Is there any way? ...

Creating SQL Server 2008 Add-Ons: current equivalent of sqlwb.exe

I'm trying to create a simple Add-On for SQL Server 2008; it is simply going to pass a parameter from SQL 2008 to a console application. Although Add-Ons are not specifically supported, according to these articles (1, 2), it is possible in 2005 and I'm assuming also in 2008. However, I've fallen almost at the first hurdle; I can't seem ...

Connect different Windows User in SQL Server Management Studio (2005 or later).

Is there a way in SQL Server Management Studio 2005 (or later) to change the Windows Authentication user (as you could in SQL Server 2000 and older)? This is the general connection properties dialog I am referring to (note the greyed out UID/PWD when selecting Windows Auth; sorry, I'm new so can't embed an img). FYI - One workaround is...

Downgrading SQL server 2008 to SQL Server 2005

Are there any issues backing up a database from SQL Server 2008, and then importing it into SQL Server 2005? I had upgraded to SQL Server 2008, but 2008 seems to be too problematic so now I want to downgrade. Are there any problems in doing this? ...

WHERE Clause to find all records in a specific month

I want to be able to give a stored procedure a Month and Year and have it return everything that happens in that month, how do I do this as I can't compare between as some months have different numbers of days etc? What's the best way to do this? Can I just ask to compare based on the year and month? Thanks. ...

sql server 2008 takes alot of memory?

I making stress test on my database which is hosted on sqlserver 2008 64bit running on 64bit machine 10 GB of RAM. I have 400 threads each thread query the database for every second but the query time does not take time as the sql profiler says that, but after 18 hours sql takes 7.2 GB RAM and 7.2 on virtual memroy. Does is this normal ...

Trouble logging in to SQL2008

I recently installed SQL2008 and am having trouble logging in from another application. I have set the security to shared authentication and have specified a password for the SA login. I am able to log in using SA and password from the management studio and also from command prompt using the osql command, but when trying to log in from...

"<>" vs "NOT IN"

I was debugging a stored procedure the other day and found some logic something like this: SELECT something FROM someTable WHERE idcode <> (SELECT ids FROM tmpIdTable) This returned nothing. I thought it looked a little odd with the "<>" so I changed it to "NOT IN" and then everything worked fine. I was wondering why this is? This is ...