sql-server-2008

SQL Server 2008 - Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

I've just installed SQL Server 2008 Developer edition and I'm trying to connect using SQLCMD.exe, but I get the following error: H:\>sqlcmd.exe -S ".\SQL2008" Msg 18452, Level 14, State 1, Server DEVBOX\SQL2008, Line 1 Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Has anyone seen...

What is the difference between Wide and Nonwide tables in SQL 2008?

I was looking at this page on MSDN: Maximum Capacity Specifications for SQL Server 2008 And it says the following: Max Columns per 'nonwide' table: 1,024 Max Columns per 'wide' table: 30,000 However I cannot find any information on the difference between 'wide' and 'nonwide' tables in SQL 2008. If I wanted to define a 'wide' table,...

How to dynamically generate table column definitions in SQL Server 2008 function

IN SQL Server 2008 I have a situation where I need to return a dynamically generated table, and the columns are also dynamically generated. Everything in this was generated by queries, as I started with one id, then I get the column names and types, which is why the casting. Following is the final query, that will return the table I wa...

How to avoid the "divide by zero" error in SQL?

I hate this error message: Msg 8134, Level 16, State 1, Line 1 Divide by zero error encountered. What is the best way to write SQL code, so that I will never see this error message again? I mean, I could add a where clause so that my divisor is never zero. Or I could add a case statement, so that there is a special treatment for zer...

Calculating DB backup size

Is there a way to know the size of a database full backup file before we actually do the backup? I did some analyses and figured sp_spaceused could give a close figure but thats not all, there seem(s) to be one/more factors other than the used space that go into determining the size? Has anyone been down this path before? Any ideas? ...

SQL query does not use available index (SQL Server 2008)

I have the following table in SQL Server 2008: Session ( sessionid varchar(10) startdate dateteime enddate dateteime --rest of the fields go here ) I have the following two nonclustered indexes created: Inddex1: SessionID,startdate,enddate Inddex2: startdate,enddate I have the following query select * from session where startdate>...

Why is this query faster with multiple selects rather than using between?

I have a table in Sql Server 2008 Express which contains 18 million records. The structure looks something like this (simplified): Id, GroupId, Value, Created Id is the primary key with a clustered index GroupId is a non-clustered index In this case, every 10 rows get a new groupId meaning that records 1-10 have GroupId 1, records 11-...

How is data stored in SQL server?

How is data stored in SQL server? ...

SQL server 2008 features/benefits?

Duplicate of: known and “unknown” incompatibilities between sql 2005 and 2008? SQL Server 2005 vs SQL Server 2008 [closed] Advantages of MS SQL Server 2008 over MS SQL Server 2005? And many more. Hi I have been using SQL server 2000 for a few years but now have access to SQL server 2008 for development. Apart from the obvious th...

Why can't I install SQL Server SP1 (KB968369)?

Hi, I have a Windows Server 2008 x64 machine. I have the "Microsoft SQL Server 2008 Service Pack 1 (KB968368)" as an "optional" update available from Windows Update. I choose to install it, my computer installs it for a while, I restart, and that update is available again. Why doesn't my computer install it? Thank you. ...

How to load huge (but simple) hierarchical XML file into an SQL table

I have a very large (2.5GB, 55 million node) XML file with the following format: <TopNode> <Item id = "Something"> <Link>A link</Link> <Link>Another link</Link> <Link>One More Link</Link> </Item> <Item id = "Something else"> <Link>Some link</Link> <Link>You get the idea</Link> ...

SQL Server 2008: Share data between Compact 3.5 and Express

Question: How can we connect a SQL Server CE DB to a SQL Server Express DB? We can't use Merge replication because you can only be a Subscriber in SQL Server Express, not a Publisher. More background information: We have an application structured as follows: 1) Our headquarters, running SQL Server 2008 2) Branches, running SQL Server ...

SQL Server 2008 Change Data Capture, who made the change?

I asked a question on SOF a week or so ago about auditing SQL data changes. The usual stuff about using triggers came up, there was also the mention of CDC in SQL Server 2008. I've been trying it out today and so far so good, the one thing I can't see it supports is keeping a track of who actually made the change. Who executed the stat...

My fulltext index option in sqlserver2008 is greyed out?

My fulltext index option in sqlserver2008 is grade out? is it a seperate install? ...

How to install fulltext on sql server 2008?

Hi, Trying to install fulltext on my sql server 2008 box. I went to 'programs and features', selected sql server 2008 and now I get this popup asking to choose either: add/ repair or remove. I click on add, and it asks me for the location of sql server CD? I extracted the ISO we have, not sure which file to point it too? ...

Why different SQL results?

Why would the following queries return different result sets? select count(ml.link_type),mc.conv_string from MSP_CONVERSIONS mc,MSP_LINKS ml where ml.PROJ_ID = 4 and mc.STRING_TYPE_ID = 3 and mc.CONV_VALUE *= ml.link_type group by mc.conv_string select count(ml.link_type),mc.conv_string from MSP_CONVERSIONS mc left outer join MSP_LINKS...

SQL Server 2008 web management scripts?

Hello, does anyone know what SQL Server 2008 management scripts exists (except myLittleAdmin)? Thanks Clarification: I'm looking for web based management script (which supports SQL Server 2008) other than myLittleAdmin. ...

storing passwords in SQL Server

What is the recommended practice for storing user passwords in SQL Server 2008? I am storing user details for an intranet, and would like to get advice on best way to store a user details such as name, password and user access privillages etc. I am thinking of creating a nvarchar column and then encrypt this text before inserting into t...

Why does SQL choose an incorrect index in my case?

I have a table with two indices; one is a multi-column clustered index, on a 3 columns: ( symbolid int16, bartime int32, typeid int8 ) The second is non clustered on ( bartime int16 ) The select statement i'm trying to run is: SELECT symbolID, vTrdBuy FROM mvTrdHidUhd WHERE typeID = 1 AND barDateTime...

SSIS 2008 Execute SQL output parameter mapping datetime2 problem

Hi, I'm trying to use an Execute SQL Task in SSIS 2008 to map a store procedure output parameter to a package variable. The package variable is SSIS type DateTime and the store procedure parameter is SQL type DATETIME. The SQL Statement is EXEC GetCurrentDate @CurrentDate=? and in the parameter mapping screen, the parameter is mapped t...