This tag is for SQL Server 2008, major build version 10.00.xxxx.

learn more… | top users | synonyms (2)

0
votes
2answers
15 views

Custom ORDER BY

Are there other ways to use ORDER on my results? 20150507094958A DISPOSED 2015-05-07 09:50:00.853 Samuel MONEY 20150507094958A DISPOSED 2015-05-22 09:25:00.000 Jeff AUTOMOBILES ...
2
votes
0answers
14 views

Upgrading SQL Server 2008 Standard to Enterprise

I'm trying to do the upgrade but when it asks me for the Product Key for the current version, I can't find it. When I go on the MSDN website for it, it says that a key is not necessary for this ...
0
votes
1answer
17 views

Index design question

This query runs for 60 seconds: SELECT mychecklis0, .... FROM dbo.MyChecklistStatus mychecklis0_ WHERE mychecklis0_.AppFormSubSectionId=@P0 AND mychecklis0_.ProfileId=@P1 There is an index created ...
-1
votes
0answers
28 views

how can I delete records when my disk drive is full?

My data folder of SQL as filled up the space of my local drive. I have 150KB free space left in the drive. So I have to delete some records to regain space. But when I run the delete query it says ...
0
votes
0answers
2 views

Database engine installation failed

Being asked to implement an application for purchasing management, the database managing system which I have to install, is SQL Server 2008. I am having some issues while installing the main ...
2
votes
1answer
28 views

Pivots giving too many results

I'm trying to learn how this pivot thing works. I don't think I'm understanding it quite right. I just want to do a simple count for a bunch of item types that have some statuses. The table I'm ...
1
vote
1answer
39 views

Upgrade to SQL Server 2012 [on hold]

We are currently running SQL Server 2008 Standard edition, 4 processors / 16-core and 32 GB RAM. In the last 3 months number of requests per week raised from 11.1 millions to 72.1 million and the ...
2
votes
1answer
18 views

How to do housekeep the database in sql server 2008 by specific date range?

I have database with around 160 GB size. The database contains the data is from 2013 to until today, there are 180 tables, I want to remove the records in specific date range like 2013 to 2014 in all ...
1
vote
0answers
23 views

Moved tempdb, now File 'tempdev2' does not exist

I moved the tempdb first locating the files: use master select name, physical_name from sys.master_files where database_id = DB_ID('tempdb'); GO then I moved each file: use master go alter ...
1
vote
1answer
20 views

SQL Server Failover cluster installation fails `RequireKerberos` to value '1'

Hi I am trying to create a SQL Server Failover cluster. Windows Cluster is configured and working as expected but now when I try to install SQL Server it throws the following error: OS: ...
2
votes
1answer
15 views

SQL Server 2008 Edition Upgrade Enterprise Evaluation to Standard problem

On my Windows Server 2012 machine SQL Server 2008 evaluation time has expired. After Edition Upgrade nothing happens, SQL Service doesn't start. In service log still is information about expired ...
3
votes
1answer
23 views

Information about a column and the data it holds?

I'm working with a table that has 3 different dates associated with each item in the table. I don't understand what each time is so I want to know if there's a standard place that the person who made ...
1
vote
0answers
14 views

How Columns_update() Function Works in Trigger To Find Updated Columns Name

I am in confuse about trigger function Columns_Update(). i Have Basic Idea about this function that it returns a varbinary and it is use to get updated Columns in Trigger even i have Find The code ...
0
votes
0answers
28 views

Why are my jobs not running and next run is not scheduled? [on hold]

My SQL server agent had stopped. So I started it. After I started it, the activity monitor showed that "Agent XPs are disabled". Then I ran EXEC SP_CONFIGURE 'Agent XPs',1 GO RECONFIGURE After ...
2
votes
1answer
26 views

SELECT all rows when a variable is null [closed]

How do you select all values when @Troop is NULL. And if there's a better way to do this all together then what would that be? WHERE DateModified BETWEEN @BeginDate AND @EndDate AND ...
1
vote
2answers
40 views

Rollback Committed transaction in SQL Server

Is it possible to rollback a committed transaction? I have deleted all the data in a table. The delete statement is inside Begin Transaction and I have committed the transaction with a commit ...
-2
votes
1answer
41 views

Recursive cte addition in SQL

I need to add the total value to the parent nodes.(totaling the total value to base to top levels). 118 records are there and 1-8 levels. Root ACCCODE='00001' Root ACCPARENTCODE='0' Eg: adding ...
2
votes
1answer
22 views

Searching SSIS packages for the use of specific tables

I have a number of SSIS packages, how can I search them to find the use of specific tables? I need to make tables changes and I am trying to assess the impact of these.
3
votes
3answers
164 views

Make a column for each count(*) in a day of the week

I have a table of people who are doing piece work. Every entry in the table has a user-ID, name, and a Date for each report they enter. I need to make a weekly report of what these people have done ...
1
vote
0answers
39 views

SQL Server 2008: DoMiniDump () encountered error (0x80004005) - Unspecified error

We're running a SQL Server 2008 database and are getting the following output(error?) in our logs: 06/23/2015 21:56:41,Server,Unknown,Process 214:0:42 (0x73b0) Worker 0x0000000BB2CC61A0 appears to be ...
1
vote
0answers
35 views

Export using BCP as ASCII text

I have a script that stores data in a temporary table to be exported by running BCP using xp_cmdshell. The trouble is that BCP insists on exporting the data in Unicode and I need it to be in ASCII. ...
1
vote
1answer
44 views

Dropping old and creating a new clustered index

I am wondering what is the best approach for dropping and creating a new clustered index on a table within SQL Server 2008. My primary concern is the length of time it will take to perform this ...
-2
votes
0answers
10 views

I want to move the listbox one to another listbox and update the particular listbox value [migrated]

Here, Below i used the code. I am new in VBA. I am trying to move the one list box to another listbox, but I am not able to update the database table. I am struggle on few days. Why this error came ...
2
votes
4answers
70 views

SQL Server 2008 backup script

I have a lot of SharePoint 2013 databases to backup and if update fail to restore, so I want to automate this operations. ALTER DATABASE [TEST_1] SET OFFLINE WITH ROLLBACK IMMEDIATE GO BACKUP ...
0
votes
1answer
36 views

How to make sum of minutes into (Hours : Minutes) format

How to add (sum) two fields (Data Type=Money) into hours:Minutes format Query: SELECT ( SELECT ISNULL(SUM(action.service_time), 0) AS Expr1 FROM dbo.act_reg AS action INNER JOIN dbo.act_type ...
7
votes
3answers
428 views

Accidentally change database name (SQL Server 2008)

It didn't happen to me YET. But I was thinking about this. I was messing around with my training environment, and by mistake I clicked in the database name, and then I touched the letter A. Let's ...
0
votes
0answers
15 views

Better diagnose information in sqlcmd

I'm tired of running SQLCMD scripts that include a large number of files: :On Error exit :r ".\tables\table01.sql" :r ".\tables\table02.sql" ... :r ".\tables\table99.sql" ... and getting ...
3
votes
1answer
85 views

Bad Plan after a couple of days

I have this query that runs fine for a couple of days (from the application) and then slows down to where it can't even finish. If I rebuild the plan, it flies. There is a signifigant amount of data ...
2
votes
2answers
76 views

SQL Server 2008 - combined index + other separate index on one column

Lately I've been refactoring the SQL Server indexes of the products that I have developed for my employer. One of these products is an online dashboard containing multiple user levels. Each user (on ...
1
vote
1answer
41 views

How to get the sum of filtered fields in SQL

How can I filtered values in SQL? When I execute this query, I'm getting the result below. SELECT Stock_TBL.StockID, Stock_TBL.ItemCode, Stock_TBL.ItemDescription, InvoiceItems_TBL.StoreName, ...
3
votes
1answer
48 views

Get the would-be row count without running twice

So I have a stored proc that utilizes a paging function to only return a subset of the query along with the actual total row count. In other words, it takes parameters for the start and end rows to ...
0
votes
0answers
25 views

Query Performance BIT column vs New Table

Would it be more efficient to flag 50 rows with BIT 1 / 0 in a table with 2000 rows OR create a new table to hold only 50 PK values from the previous table The query on this would just be a WHERE ...
1
vote
0answers
31 views

Schedule data from instance to instance have I maxed out tableDiff

We have a process which uses tableDiff. From one SQL Server 2008 R2 instance to another identical instance. It has worked very well for a long time! I have a situation where one table now has ...
0
votes
0answers
30 views

Retrieving a record for the last date received and returning the value of another column in that row

I have the following query which is returning me total number of expected records : select a.New_FirstName + ' ' + a.New_LastName as 'Account Name', a.New_MPRNNumber,MAX(b.New_readdate) as 'Last SC ...
2
votes
1answer
34 views

reading content of master database at a different server

I have a query for example select * from sys.databases select * from sys.configurations I believe this information is stored at master database. I would like to have a look at configuration ...
0
votes
3answers
54 views

Query for total downtime of site using datestamps and status columns

what want to find the total downtime for a site. I'm thinking I can subtract the 'down' DateStamp from the following 'up' DateStamp. then add the totals together for all downtime. I want to get a ...
1
vote
0answers
82 views

How to create a Linked Server from SQL Server 2008 to DB2?

( This is an edit...the real post was really big ) I'm having problem with my SQL Server 2008 to DB2 linked server. I'm getting this error: TITLE: Microsoft SQL Server Management Studio The ...
1
vote
1answer
26 views

always error “cannot insert value NULL” sqlserver

I want to update table "tmpiscunitmap.tr_kpi_id" year_period=2016 with value from table "tmp_kpi.tr_kpi_id where year_period=2016" with condition tmpiscunitmap.tr_kpi_id = tmp_kpi.tr_kpi_id on ...
1
vote
1answer
31 views

SQL Server Query For Getting data in Specific Format

We have two tables. One is PriceGroupTable and other is PricesTable. There is a one-to-many relationship between them. Please refer to the attached pic for more details. I am looking for a SQL ...
1
vote
1answer
14 views

Join tables up together to get different counts of account type per postcode are

I am trying to deterine the amount of account types per postcode range. I have the following code that works but I would like help in refactoring it as only 1 line of code changing between each ...
1
vote
0answers
20 views

How to mark loser as winner in p2p replication conflict resolution

We have sql server 2008 databases in 2 different regions that are p2p replicated. Now we can see there are some unresolved conflicts - most of them update/delete conflicts. The way our system is ...
1
vote
0answers
9 views

How I can read errors that occurred in the BBDD as processes incomplete in MS-SQL?

How I can to recognize the processes that failed on the SQL Server/bd, processes that any user run/exec. For example the last rollback occurred in the bd after some process failed. Would reading ...
4
votes
1answer
112 views

Preventing full backups for unmodified/slightly modified databases

Is there a way to either: ensure that unmodified databases are skipped during SQL backups, or even better choose between DIFF or FULL backup depending on the percent database changed since last ...
0
votes
1answer
34 views

Getting error: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value [closed]

I am getting the error The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. for the following query. After checking some questions here I was able to know ...
-1
votes
0answers
31 views

SQL Server Cluster hardware and OS upgrade question

We have a 2-node and a 3-node SQL Server Cluster running on Windows Server 2008. It is time to update the hardware and the OS. Can you point us to resources on how to migrate to new hardware running ...
0
votes
1answer
36 views

Version error while restoring database [duplicate]

Can anybody resolve the issue where I am trying to restore a database to a SQL Server 2008 server from a backup file taken from a SQL Server 2008 R2 server?
3
votes
1answer
206 views

SQL Server DOUBLE keyword

There is a reserved keyword DOUBLE in SQL Server, but I know that it's not a data type (other languages' double is float or real in SQL Server); does anyone know why this is a keyword? I've tried to ...
2
votes
1answer
41 views

sql server listen on multiple ports

I have a push subscriber in transactional replication (and the distributor is the publisher), in this subscriber I configured sql server port on 1433, and I have a web application which connect to ...
0
votes
2answers
41 views

DB Re-index failure

I'm managing a DB (SQL Server 2008) with a two step SQL Agent job that is triggered to initiate a DB Re-index. However on the second step the SQL Agent job fails. Where can I find logs that detail the ...
0
votes
2answers
20 views

Find constraint disabled in SQL Server

i'm doing an audit of constraints in SQL Server. How to find all constraints that are not enabled? This, after using the next declaration: alter table mytable nocheck constraint all