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

learn more… | top users | synonyms (1)

0
votes
1answer
32 views

Exclusive access to edit rows

I'm developing a program that allows users to view and edit data. My question: Is there tools (sql server tools, may be users/roles) to implement the following: There are two users: A and B. User A ...
-2
votes
0answers
27 views

SQL job to backup and restore database [on hold]

I need to create an MSSQL job that would run nightly and bakup a database and restore the database with a different name. Example NorthDB (Original Database), NorthDB_test (backup database restored). ...
0
votes
1answer
33 views

How to transfer table in SQL Server 2008 from one computer to another [on hold]

I want to transfer my table in SQL Server 2008 from one computer to another... Is it possible? How to transfer from one computer to another? I am doing my final year project. In my project, if the ...
0
votes
1answer
15 views

Maintaining multiple build versions of asp .net / SQL Server applications

We have new versions of .net applications deployed every week for testing given in form of new build files. Can any one suggest how I can maintain many versions of the builds without having to keep ...
1
vote
1answer
6 views

Run a report by specifying which server to execute the query on

I have a couple of stored procedures that I have written that gathers some information about all of the databases on the server it's stored on. I would like to create a report such that I can select ...
0
votes
0answers
18 views

can't connect to DB using MS SQL Server 2008 Upgrade Advisor

I'm trying to use MS SQL Server 2008 Upgrade Advisor Analysis Wizard, to connect to a networked MS SQL 2000 database. According to the query select @@ServerName, the instance name contains a hyphen. ...
0
votes
1answer
14 views

migrating legacy databases from SQL Server 2000 via SQL Server 2008 to SQL Server 2012: users and logins

I have some legacy SQL Server 2000 databases to migrate to SQL Server 2012. In my dry run, I have done this: I created empty databases of the same names in SQL Server 2008. Then I backed up the SQL ...
0
votes
1answer
9 views

Un-attaching SPL 2008 BD not willing to Attach

I have a 5 year old SQL Server 2008 database. There are actually 3 databases NL_Dev NL_Test NL_Prod Each has a log file. We have been using the development database, but all three seam to be ...
5
votes
2answers
339 views

When was a Database taken Offline

I am trying to find a way to figure out when was couple of my sql databases were taken offline. I checked the the logs but could not find any such info and moreover there is no default trace enabled. ...
5
votes
4answers
1k views

Datawarehouse bad practice?

In our Datawarehouse context, we have to update some record in fact tables inside our ETL. One thing we did is to create nonclustered indexes just before the heaviest queries, and drop them ...
0
votes
1answer
30 views

how to get child categorys based on categoryid

this is my table structure i need to find child categoryids. If CategoryID 1 then 1,2,3,4,10,12,13,14,15,16 when CategoryID 2 then 2,10,12,13,14,15,16
-1
votes
2answers
40 views

Update code works in manual stored procedure but not when run as SQL Server Agent Job

I have a stored procedure that deletes all records from an existing table, and then inserts new records. After the insert I have several update operations that change the value of one field. If I run ...
-4
votes
0answers
47 views

SQL Servers that can be decommisioned [closed]

I am not sure if this would be correct tag for this question: We've been assigned a task to downgrade from enterprise to standard edition. We've figured out this task. But its also required to find ...
0
votes
1answer
30 views

Using dynamic database name for DML in trigger

I am using SQL Server 2008 in my application. Here I need to do database operations between multiple databases. The complexity is database names are user defined except one masster database. I can ...
1
vote
0answers
51 views

Defragmentation of SQL Server 2008 indexes

I hate asking this question, but I am having issues defragmenting indexes. I keep using the various defragmentation methods for defragmenting a SQL Server index such as DBCC INDEXDEFRAG and DBCC ...
2
votes
1answer
90 views

Export all tables in database using SQLCMD

I'm looking to export all tables from a SQL Server Standard Edition database with data into CSV files onto a remote linux server. I setup FreeTDS and am able to connect, do SQLCMD or bcp successfully. ...
3
votes
1answer
51 views

MERGE a UNION query results down to one row per KEY value

This is a lengthy query, it polls one LIVE database for certain sales information, then a UNION runs the same exact query on the ARCHIVE database for the same information. The results show each ...
0
votes
1answer
26 views

Allow public use of functions without giving them database control

I came up with a set of functions that I would like to be accessed from a variety of places. SQL seemed like the best place for this due to accessibility, but I receive this error when trying to use ...
3
votes
1answer
61 views

Error when using views on a linked server

I have this query: SELECT DescTipoentrevistador FROM Alfabase.dbo.tblTipoEntrevistador WHERE CodTipoEntrevistador IN ( SELECT CASE WHEN EXISTS ...
2
votes
1answer
273 views

Performance of query with complex where clause on 10M rows

We have a query that destroys our production server when run. It is part of a reporting functionality and the bad part looks as follows: SELECT DISTINCT mt.ID AS ID FROM ...
1
vote
1answer
102 views

Tempdb files don't exist

I have a strange behaviour on one of my SQL Server's tempdb. It has six tempdb files, according to SSMS and queries, all pointing to S directory. Each of them have ~5gb of initial size. The weird ...
0
votes
0answers
21 views

Extremely high memory usage for datacube with 25k records

I have a system with 16GB memory (8 allowed for SSAS) and limiting it to looking at 25k rows of orders. I have 4 dimensions. Date, Customer Data, Sales Person, and Orders (has just ID and date) I have ...
0
votes
2answers
54 views

Stored Procedure never completes with Exec, but i can run the Query in SSMS

Im with a problem here. If i run "exec pr_BuscaLog -2', it will run forever ( days, without end )... BUT, If i select the Query and F5, it runs in seconds. I updated STATS but it didn't work. Some ...
1
vote
1answer
50 views

Correct way to uninstall SQL Server 2008 ( or above )

Since University I've been facing this problem... How do I uninstall SQL Server? What I've done is: Delete everything in "control panel" related to SQL Server. But, is there a right way to ...
5
votes
2answers
70 views

Finding the query causing the missing index DMVs

How can I find the query causing the missing index DMVs suggesting to create a particular index? Thank you.
2
votes
0answers
36 views

SQL Server transaction log reported full when it isn't [duplicate]

The transaction log for database 'WebDB' is full. No, it isn't. Its 90% free. The transaction log backups run normally. My hardware guy tells me the hardware is running perfectly, with plenty of ...
0
votes
1answer
37 views

How to get average according to last update time?

There is table - Item below, how can I get the average Value according to its 15 minute value from last record time? I am using SQL Server 2008. Table -- Item Table 15min_AVG
0
votes
0answers
17 views

Missing index recommendation for an already existing index [duplicate]

SQL Server missing index DMVs suggest to create an index which already exists. The existing one and the suggested one exactly overlap each other; they are single (same) column index with no included ...
2
votes
1answer
63 views

Help Changing Collate of ALL databases

I have approximately 80 Databases with various collations. I would like to modify the collation of all 80 databases. I have the following code: USE [COLLATE_ADM] GO SET ANSI_NULLS ON GO SET ...
1
vote
1answer
24 views

Clear missing index DMVs

How can I clear missing index DMVs such as dm_db_missing_index_group_stats, dm_db_missing_index_groups and dm_db_missing_index_details? I don't have an option to restart the server or taking it ...
2
votes
1answer
47 views

Listing expired SQL logins

For audit purposes, we need to list all SQL logins with their creation and expiration dates. Is there a way to script this for all of my SQL Servers, rather than performing the task manually through ...
2
votes
1answer
63 views

How to remove identity specification for multiple tables

I am having total 109 table in Database and now i am migrating to Amazon server with identity insert and now i want to remove auto increment column specification for all tables. How set auto increment ...
0
votes
1answer
34 views

Cannot connect from computer to server database

I'm trying to connect from my computer to a server which has a SQL Server 2008 instance installed. My computer and the server are in the same domain and the name of the server is "SERVER". The ...
1
vote
0answers
28 views

Why database replication fails when database mirroring is broken?

I'm trying to understand what effect database mirroring can have on replication in SQL Server 2008. Here is current environment: (don't ask me why it was done this way or to change it) Server A: SQL ...
3
votes
0answers
92 views

What is the cause of this problem with CONVERT()?

Consider the following two statements: PRINT CONVERT(NUMERIC(38, 0), 0x0100000001, 0); PRINT CONVERT(NUMERIC(38, 0), 0x0100010001, 0); Both statements return -1; isn't that incorrect since the ...
1
vote
1answer
46 views

Best way to document Dwh views [closed]

I works in a company that provide Dwh views as an API for external Customers (We use MS-SQL 2008 & 2012). every once in a while we release new views and updates the existing views. We have ...
5
votes
2answers
115 views

Keeping iterator in consistent state

I was reading this post to understand how things are done in Sql Server: http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ If I understand it correctly, data is being sent ...
0
votes
0answers
45 views

Upgrade from 2008 RTM to 2008 R2 RTM failed due to perf-ReportServer-rsctr.dll is being used by another process

I was upgrading SQL Server 2008 RTM on Windows Server 2008 R2 SP1 to SQL Server 2008 R2 RTM. I got this error: The process cannot access the file ...
0
votes
2answers
55 views

How can i know the relationship in the database in sql server 2008? [closed]

I want to know how can I determine relationships between data which is not determined by the primary key in the design. For example, I have three tables in the database like this :- table 1: fields ...
0
votes
1answer
71 views

Run CDC Cleanup job at specified time

I have enabled cdc and using it , it works fine now the problem is that we have many tables in a database and also we have many databases so how to configure cdc cleanup job to run again and again ...
7
votes
2answers
388 views

Simple DELETE, but complicated execution plan

When I run this delete: DELETE FROM ETLHeaders WHERE ETLHeaderID < 32465870 ...it deletes 39,157 rows. It should be simple because it is deleting on ETLHeaderID which is the clustered index and ...
-5
votes
2answers
118 views

Microsoft recommends using Rowversion over timestamp , but i can not find “rowversion” data type inside my sql server 2008 R2 [closed]

MS on this link http://msdn.microsoft.com/en-us/library/ms182776.aspx mentioned that we should use rowversion data type over Timestamps. Now inside my sql server 2008 R2 I want to create a column with ...
0
votes
0answers
23 views

Cannot add “rowversion” data type in sql server 2008 r2 management studio, or even to modify existing column data type [duplicate]

I want to create a column with Rowversion data type, but inside my SQL Server 2008 R2 Management Studio, I cannot find such a data type: Also when I tried altering existing column named timestamp ...
2
votes
0answers
34 views

Can I convert SQL Server 2008 full db to SQL Server 2005?

Recently I converted my SQL Server 2005 database to SQL Server 2008. Now I can't attach that db to SQL Server 2005. I do not have any backup of that db file as well. I have tried to generate scripts ...
1
vote
3answers
63 views

SQL Query in suspended state causing high CPU usage

Environment detail: SQL Server 2008 R2. I have applications running on JBoss that access the DB using JDBC driver. Issue: My online DB server was experiencing high CPU usage. Using the following ...
0
votes
0answers
27 views

SQL Transaction Logs Overwrite

Server Detail: SQL Server 2008 R2 Production Set Up: In a production environment, I have a DBMR job scheduled to take transaction log backups for all the databases present in a DB server. This job ...
4
votes
1answer
37 views

How do I determine the spid of the session that is making a query on a linked server?

I have a session running on a SQL Server instance that is blocking other sessions (holding on to a lock without releasing it). Querying sys.sysprocesses yielded the hostname of a different SQL Server ...
1
vote
1answer
70 views

Standard data types for email address, telephone number , first name, rixh text editor, etc

I want to build a database for our system using Sql Server 2008 R2. but i need to know what are the best data types for storing these info:- Email address Telephone number with extension, such as ...
-1
votes
1answer
62 views

How to know which columns value is different between two rows

I am trying to compare two addresses from the same ID to see whether they match. For example: Id Adress Code Address 1 1 123 Main 1 2 123 Main 2 1 ...
2
votes
1answer
96 views

Identify unattached File Size in SQL Server

From a similar post on this forum, I have modified the below code as per comments and able to get the orphaned files in the drives. The code is : EXEC sp_configure 'show advanced options', 1; ...