SQL Server 2008 (major build version 10.00.xxxx). Please also tag with sql-server.

learn more… | top users | synonyms (2)

1
vote
1answer
70 views

Is my mssql 2008 standard suitable for web edition 2014

A web edition seems enough for me when I read this. I thought it had a 2gb size limit before? I have three databases our current db and am not doing anything fancy. Just some server agent jobs from ...
0
votes
1answer
25 views

Syncing Database to Application (polling)

I have created a windows application that uses a MS SQL 2008 database server. There are two types of the application: 1) Client Application 2) Host Application The client application is able to ...
-1
votes
1answer
128 views

Issues after applying Sql 2008 sp4, 'sqlagent100_msdb_upgrade.sql'

The build version was 2008Std.2531 went to apply SP4 and the upgrade would not complete preventing the engine to come on line. After some assistance and using the -t902 the engine is up but the SP is ...
0
votes
0answers
33 views

FreeTds with 2 sql server instances

I have python scripts on a Linux machine that connect to Microsoft sql server to get data. The server was initially 2008 version. Now it has both 2008 and 2012. How can I point the tds to connect ...
4
votes
1answer
85 views

Scenario of huge SQL Server Database backup

I use SQL Server and have a huge database with large compressed backup size (about 250 GB). The backup scenario of this database is: Create full backup at the first day of each month. Create ...
8
votes
2answers
100 views

SQL Server equivalent of Oracle USING INDEX clause

Is there a SQL Server 2008 equivalent of the USING INDEX clause in Oracle? Specifically for the construct: CREATE TABLE c(c1 INT, c2 INT); CREATE INDEX ci ON c (c1, c2); ALTER TABLE c ADD CONSTRAINT ...
0
votes
1answer
31 views

Create Table error [closed]

I am using Microsoft SQL Server 2008. My version of Server Management Studio is 2014. I am attempting to create a table in a database I imported from a Microsoft SQL Server 2005. Here is my code: ...
1
vote
3answers
71 views

Why is Convert being used in this statement and how does it differ from CAST?

This is a piece of code on MSDN page for OVER clause: USE AdventureWorks2012; GO SELECT BusinessEntityID, TerritoryID ,DATEPART(yy,ModifiedDate) AS SalesYear ,CONVERT(varchar(20),SalesYTD,1) AS ...
0
votes
0answers
24 views

Aggregate SQL function question [duplicate]

Simple question Table "state" sID | state_descr | doorID | time 1 | open | 1 |2015-05-01 00:00:01 2 | open | 2 |2015-05-01 00:00:02 3 | close | 1 ...
1
vote
2answers
23 views

Restore Database or Restore Files?

I am copying a database from a live environment to test environment. I've made a .bak file from the live database and copied the file to the test server. Question is, should I use "Restore Database" ...
0
votes
2answers
108 views

Restore DB from SQL Server 2008 R2 to 2014 Express

I'm trying to restore a database backup made in SQL Server 2008 R2 to the 2014 Express version. Is this even possible? If I choose restore from device and select my backup file, I see no database in ...
2
votes
3answers
286 views

Student who got MAX marks in subject

I am facing one issue in getting student name who scored MAX marks in each subject. Here are my tables below First one is Student table having STUD_ID , STUD_NAME & Second one is MARKS ...
1
vote
2answers
162 views

How do I sum data over 3 month ranges?

I have a report where I need to add totals for a column and group them by company selected. I have to do this in T-SQL for 4 ranges: 0-3 Months, 3-6 months, 6-12 months, >12 months I am confused about ...
1
vote
2answers
90 views

Space Management in SQL Database

This question has been moved from Game Development Stackoverflow I am trying to create a new type of MMORTS game. Current Situation Everyday each user deletes and creates : 1,500 rows of data in ...
1
vote
0answers
35 views

How to manage old replication issue

Background We are using SQL Server 2008 and we had a merge replication configured (before i joined the company). After that they stopped using it and the didn't delete it and configured transactional ...
1
vote
0answers
113 views

CPU Time Slower in SQL Server 2014 than in SQL Server 2008

We’re upgrading a virtualized database server from an old SQL Server 2008 R2 Standard (vmware) to a new shiny SQL Server 2014 Standard server (hyper-v). We were doing some performance testing and to ...
0
votes
1answer
42 views

Database is not showing up in the SSMS [closed]

I have a test database and I was able to see the database in SSMS and all of a sudden Its not listng my database and When I checked the mdf and ldf files they seems to be locked . I am using Sql ...
2
votes
1answer
15 views

Can I restore a differential backup to the 2nd newest full backup?

At 12:30 pm we pulled a full backup and shipped it, and set all users in read-only mode. At 11pm that night another full backup was triggered. Assuming no changes occurred during that time span, at ...
1
vote
1answer
47 views

Can't eliminate index scan

I have a query, and even using SQL Sentry, I can't eliminate the index scan. This is the query: SELECT TOP 30 codCliente FROM ( SELECT t1.CodCliente, codcampo, valor, t1.chavealeat ...
5
votes
1answer
312 views

CDC system tables missing from backup

I am migrating a database that uses CDC from SQL Server 2008 R2 to SQL Server 2012. There are CDC-related tables under the "System Tables" branch in Object Explorer: cdc.ddl_history ...
3
votes
2answers
92 views

Unable to query SQL server metadata through linked server

I have a scenario where a user wants to do the following through a linked server: SELECT * FROM [DBTEST].[AdventureWorks].sys.objects WHERE object_id = OBJECT_ID(N'dbo.DatabaseLog'); The linked ...
2
votes
1answer
74 views

How to get all messages raised when a statement fails

Executing the below query will generate two error messages ALTER TABLE [MFClassProperty] DROP CONSTRAINT [FK_MFClassProperty_MFProperty] Error messages are: Msg 3728, Level 16, State 1, Line 3 ...
1
vote
0answers
123 views

Two servers with the same exact specs taking way different times to run the same query

I have 2 servers with the same exact specs: Test Server and Production Server The same exact database with the same exact data is on both of these servers. I remote into each server using remote ...
1
vote
1answer
53 views

SQL server UPDATE statement is processing records that should be eliminated by WHERE clause

I am getting a very odd error. Consider the table below. CREATE TABLE #MyTable ( Key1 INT , Key2 INT , x SMALLINT , y INT , z INT , a FLOAT , b FLOAT , c SMALLINT , s FLOAT ) -- insert ...
2
votes
1answer
34 views

Better way to update table with value from another table

I'm trying to rewrite the following query to make it more efficient: update c set c.cartype = (select Id from carTypes where carType = 'Coupe') from cars c inner join doorcount dc on c.Id = ...
3
votes
2answers
319 views

Is SQL Server 2008 going to be obsolete “soon”?

I was thinking about it today. We are in 2015. Close to SQL Server 2016, but almost every company I see, is still using SQL Server 2008 R2. I'm studying SQL Server 2008, 2012 and now, 2014 (5 months ...
2
votes
1answer
133 views

Categorize age ranges and display in one column

I want to see the data as follows Member Age Category Test1 25 Under 30 Test2 55 51-60 Test3 67 Above 60 I have used the below query (from an answer to my previous question) to ...
-4
votes
1answer
159 views

Query to calculate age of a member based on the Date of birth and Current date [duplicate]

I have a requirement to calculate the age of a member based on the Date of birth and Current date, and then classify that age into categories like Under 30, 31-40,41-50,51-60 and Above 60. Can some ...
0
votes
0answers
166 views

ERROR: Failed to convert parameter value from a String to a DateTime

I have faced this error: Failed to convert parameter value from a String to a DateTime when trying to pass multiple selected dates from checkboxlist to my parameter to be used in sql. I have tried ...
0
votes
0answers
28 views

Stored procedure deadlock on another process

Is it possible to reproduce a deadlock situation on a stored procedure (which executes about 10 other stored procedures) when you don't know the exact process it's being deadlocked on? When this is ...
2
votes
1answer
88 views

Can I create a SQL Job to run on specified dates?

I want to create a new SQL job that runs the beginning of every quarter: 01/01 04/01 07/01 10/01 Is this possible? I know i can set it to run every 90 days but that's not exact. I am using SQL Server ...
15
votes
2answers
717 views

How to Drop Table with Non-Printable Character on its name

I have a legacy table with a name containing non-printable characters (CHAR(31), to be specific). The non-printable character is beside a underscore, and I've discovered that the shortcut ...
0
votes
1answer
30 views

Using SHRINKDATABASE to shrink a Database by a certain amount

I have a database which the users are going to do some data cleansing on. They should do this every 6 months but have left it for 18 months. After they have cleansed the data I want to shrink the ...
2
votes
1answer
47 views

I want to get all records according to per day

I want to get all records according to per day Group by user id and count L point and R point and M point, according to user id and get record according to per day CREATE TABLE ...
6
votes
1answer
216 views

Skip multiple rules during SQL Server installation

I want to install SQL Server 2008, but I get 2 errors which prevent me from going forward. I know from this post how to skip one rule. Is there a method to skip both? I am using Wine (PayOnLinux) on ...
8
votes
2answers
696 views

Can't find process that is creating backups

We have an instance of SQL Server 2008 installed on a customer server. The customer's IT department is in charge of the various backups of the machine. The SQL Server log shows there is a full backup ...
0
votes
1answer
128 views

Dynamic SQL To Send HTML Email

I am creating a cursor to iterate the values stored in my table, then attempting to use dynamic sql to set the select statement for my html body email. However, anytime I try to execute my statement ...
0
votes
0answers
20 views

Intermittent SQL Server 2008 backup failures

We have been getting occasional backup failures when backing up a database to a network share. The error is: Write on "\..." failed: 1398(There is a time and/or date difference between the ...
2
votes
0answers
95 views

SQL Server 2008 Expr. SP2 install fails - “failed to retrieve data for this request..”

I tried to install SQL Server 2008 Express SP2 but the installation process fails with the following error message "failed to retrieve data for this request.." First the window "SQL server ...
3
votes
1answer
69 views

Joining from database A to view in database B; where is processing done?

If I join tables from database A to a view in database B (same server), are the joins within the view in database B processed on database B before joining to the tables in the current database?
3
votes
1answer
98 views

SQL Server 2008 : force user to change password at next login

How can I force users to change their password at next login? I want all my user change their password at next login to choose new password with new policy. user must change password at next login ...
1
vote
1answer
53 views

How to restrict table access to a application

I would like to know how I would go about restricting access to a table so that only a certain application can access the data within. Where I work, we have a database application that rather ...
2
votes
0answers
18 views

Check a constraint after adding a Foreign Key [duplicate]

If I add a foreign key constraint with the following command: ALTER TABLE [abc] WITH CHECK ADD CONSTRAINT [fk_some_col] FOREIGN KEY([some_col_id]) REFERENCES [xyz] ([some_col_id]) Is there any ...
3
votes
2answers
72 views

Need to convert 21:45 to 21.75

I have a datetime column with a time portion of 21:45; I need to convert it to 21.75. I tried: CONVERT(VARCHAR(5), DATE,108) This converts it to 21:45, now the client wants this be 21.75.
1
vote
1answer
67 views

Getting Today's , MTD, YTD Sale and profit

I have a database which give me sale and profit for each date. Schema looks like following : Date Sales Profit 2015-03-07 133333 12348 2015-03-08 214563 34545 2015-03-09 ...
0
votes
0answers
50 views

How to free up disk space on a drive which has BiztalkMsgBoxDB_log file in it

I have been asked to analyze a issue regarding one of the biztalk servers. I was asked to free up space on a particular drive, where I found the only file BiztalkMsgBoxDB_log.bak is taking up close ...
1
vote
1answer
98 views

Table variable for large amount of data [duplicate]

One of our stored procedure was using Cursor to update rows. Total rows to be updated varies from 1000 to 2000. In our scenario, this stored procedure was taking 50 minutes to complete the update. I ...
1
vote
2answers
249 views

SSIS package with log provider configured using expression - creates multiple log files, fails if I change original target folder

I have created a small SSIS solution to illustrate my problem. Unfortunately it looks like I can't attach it here, so I will try to explain. I can send the solution to people individually. SSIS SQL ...
0
votes
0answers
25 views

SQL TDE Key Format

I'm trying to find the Key Format that SQL TDE uses. Is it PKCS? If so, what #? I haven't been able to identify this based on research done on MS website. And, there is no mention of key format during ...
2
votes
1answer
193 views

Using a Linked Server to import data from Excel

I have read a lot about linked servers being bad when there are multiple hops across servers and distributed joins. What if I am just using a linked server to import data into SQL Server from an ...