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

learn more… | top users | synonyms (2)

8
votes
5answers
2k views

How can I detect broken stored procedures after a schema change?

I've modified a central table in my database, and sp_depends literally returns hundreds of results, and I'm concerned some of those stored-procedures might not compile anymore after my change. ...
1
vote
1answer
151 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 ...
6
votes
2answers
12k views

Unable to delete SQL Server 2008 R2 login

I had created a SQL Server login some days back. Now I need to delete the same. So I went into SQL Server Management Studio => Security => Logins and selected the login that I want to delete. It ...
2
votes
1answer
36 views

Simple logging of table access

In SQL Server 2008, is there some simple logging of how often a particular table is selected (in an hour, a day, a week, etc.)? I have a large table that is accessed by dozens of applications and ...
4
votes
1answer
58 views

How to get all connected values as a single column

I'm trying to use CTE recursion. This is my scenario SQL Fiddle. It is a simple tree structure: CREATE TABLE [dbo].[AL]( [IdAL] [int] IDENTITY(1,1) NOT NULL, [ID1] [int] NOT NULL, [ID2] ...
3
votes
2answers
506 views

Migration to databases Domain Users do not have access

I migrated databases to new servers, however the applications that were previously used with the databases are failing to load. I have changed the connections and etc. The jobs also seem to be ...
0
votes
1answer
337 views

Milliseconds to datetime

I have this statement EXEC [spProject_Update] @ProjectID = 496 ,@Name = 'Hangman Bollywood iPhone' ,@Description = '' ,@EstimateTime = 2674800000 I will get milliseconds in @EstimateTime. How can I ...
9
votes
3answers
11k views

Can I export a maintenance plan without using Integration Services?

I'm trying to export a simple maintenance plan from an SQL Server instance. I want to check the export into source control, and apply the exported maintenance plan to functionally identical ...
9
votes
3answers
62k views

I can't connect to my servers SQL database via an IP Address

I have setup a server that runs Windows Server 2008, and has SQL Server 2008 Express installed. I can connect to the machine's SQL Server Express database via the MACHINENAME/SQLEXPRESS. However ...
1
vote
2answers
47 views

Is there a way to have multiple error messages displayed with RAISERROR conditionally?

I am thinking of something like the CASE statement for RAISERROR, but I want the remaining code to be checked too, and not skip anything after encountering the first RAISERROR. Right now I have ...
9
votes
4answers
48k views

Location of the mdf file of the database

I have a database Project. My problem is where can I find the .mdf and _log.ldf of my database so that I can transfer my database to another user. I am using Microsoft SQL Server 2008 Management ...
2
votes
2answers
6k views

Using OPENQUERY to execute a script

I have a SQL Server 2008 instance which I want to use to import data from an Oracle server. I have set up a linked server that works correctly when running simple queries like SELECT * FROM table. ...
6
votes
3answers
2k views

Remove field from composite key and collate duplicate data

I'm looking for the best way to go about changing the primary key on a table in my DB without having to completely reinsert data from files again. The modification I'm going to make is going to ...
0
votes
1answer
37 views

Average of last 4 runs of a product on SQL Server 2008

I'm looking to do the exact same moving average from this post: Average of last 4 runs of a product but now on SQL Server 2008, which doesn't support the extended window aggregate functions. Is ...
6
votes
2answers
4k views

Which datatype to store XML data in: VARCHAR(MAX) or XML

I am defining a schema for a new set of resources using SQL Server 2008... In this case, each record (e.g. row) will need to store XML fragments. From time-to-time; although not frequently; I'll need ...
1
vote
1answer
2k views

Convert spatial points data to line data for use in Line Layer in SQL Server Reporting Services (SSRS)

I have a query that returns the fields Order, Lat, Long, SpatialData, <OtherStuff>. SpatialData is a point. I want to create a line layer that draws lines between my points based on the order ...
7
votes
2answers
1k views

Window functions cause awful execution plan when called from a view with external parametrized 'where' clause

I had this issue long time ago, I found a workaround which suited me and forgot about it. But now there's that question on SO so I'm willing to bring this problem up. There's a view that joins few ...
1
vote
1answer
55 views

Can we create multiple users in one login in SQL Server 2008?

I have one database where I want 4 users in that particular database, so do I have to create 4 logins, one for each user ? I want multiple users from one login. I tried to create a second user by ...
1
vote
1answer
31 views

How do i insert a value into table2 from a trigger on table1

i have 2 tables with a column name WHO, and im using these 2 tables to create a view. where FSwho.who = FStasks.who if i enter a new record into FStasks where FStasks.who = LIZ, but theres no record ...
0
votes
2answers
43 views

Can I see Table I/O per month?

I'm using SQL Server 2008, and will migrate DynamoDB some tables. I want to get I/O statistics of read bytes, and write bytes from table. I don't know how to do this. What command should I use?
0
votes
0answers
11 views

RadPdf Server Installation

I am trying to setup RadPdf on remote SQL Server. I have one static user name and password on that server like usrABC123. RadPdf Service is trying to connect to database with local system account and ...
3
votes
0answers
486 views

Auditing - parameter values not being written to log

I am using auditing to track usage of some procs in the database. In the log I can see a record for the Procedure being run and, immediately afterwards,the SQL statement that is being run. The ...
2
votes
0answers
88 views

How Much Overhead Does Web Sync Add?

I am running merge replication in SQL2012 using web sync. Has anybody done any experiments to compare the performance of web sync to connecting to replication using a straight TCP/IP connection? ...
2
votes
0answers
128 views

Tools for maintaining many dev/test environments on the cloud [closed]

The company I'm currently working with is "moving to the cloud" (isn't everyone these days?) In this case, they are moving to AWS, and they want a simple and effective way of managing multiple (SQL) ...
-1
votes
0answers
1k views

Installing over a SQL Server 2008 Express default instance named “SQLEXPRESS” [closed]

We have a system in which there a SQL Server Express 2008 default instance called "SQLExpress". Normally the SQL Server Express default instance is called "MSSQLSERVER". Now we have an application ...
3
votes
1answer
2k views

Event 4104, MSDTC Client 2

I am using Idera SQL Diagnostic Manager to monitor a Windows Server Failover Cluster with two SQL Server 2008 R2 clusters configured to run with one SQL Server cluster on each node. It just started ...
1
vote
1answer
47 views

SQL Server IO per session

Activity Monitor can show real time the overall IO performance in MBytes/s on a server, but cannot show the same per session level. I know about DMVs, and sp_who2 to retrieve session level io ...
6
votes
3answers
10k views

How to map another server through SQL Server Management Studio

I am trying to map another server by giving the command EXEC xp_cmdshell 'NET USE H:\\568.256.8.358\backup_147 1234abc /USER:cranew /PERSISTENT:yes' I got an error with this: network path ...
0
votes
0answers
12 views

Connecting SQL Server using Server IP Address

This works when I try it internally (Within the LAN network) sConnString = "PROVIDER=SQLOLEDB;" & _ "Data Source=192.168.1.200,1433;" & _ "Initial Catalog=MyDB;" ...
0
votes
0answers
23 views

Advice on query optmization - Multiple Unions

I'm trying to understand how this might be better optimized. I currently have these three different queries to union the results of each. The first case finds all records with the where condition of ...
2
votes
2answers
188 views

Convert hexadecimal to varchar

I have a column with values saved as hexadecimal. When I run this query: select column from table where column like '%22639935-KCN%'; This is the output I get: ...
4
votes
1answer
86 views

Finding changed column values

Table 1 ID |COL2|COL3|COL4|COL5| ROW1| 1 | 1 | 1 | 1 | ROW2| 1 | 3 | 2 | 6 | ROW3| 1 | 1 | 1 | 1 | ROW4| 1 | 1 | 1 | 1 | ROW5| 1 | 1 | 1 | 1 | ROW6| 1 | 1 | 1 | 1 | Problem ...
2
votes
1answer
53 views

Query Each Database in A Table [closed]

We have it set so that any database that shows an error code during the server scan is set to write the database name into a table. What I want to do is then have an email generated that will send the ...
-1
votes
1answer
42 views

SQL command or trigger needed to capture changes in tables [duplicate]

I want a query or trigger that will identify what changes done in the database tables from the Third Party Software such CMS etc. I want to check that which data is modifying with time. There is no ...
6
votes
4answers
5k views

“TASK MANAGER” process is taking over a single-user mode database. What is it?

This is a duplicate of the question I asked on stackoverflow, but I was advised, that someone here could have a better idea what is happening. I have a sporadic problem, when upgrading SQL Server in ...
0
votes
0answers
28 views

Case Statement to Identify Multiple Errors

I'm trying to write a statement that identifies any of 200 potential errors / illogical combinations in a data set for each line item. My first thought was to write a case statement for each error ...
1
vote
1answer
41 views

Can I bring a warm standby SQL Server database online and then return to standby mode?

What I'm trying to do falls outside of the normal SQL Server work flow so might be impossible. I'm implementing a system that serves out copies of a large production database to multiple test / dev / ...
1
vote
1answer
64 views

Issues installing patches on SQLserver 2008

There are multiple issues with a server I manage, we cannot start management studio on it and when we try to install patches to SQL Server the setup never shows up. I run the patch as an ...
3
votes
2answers
1k views

Can I get notification when event occur?

SQL Servers has Traces and XEvents. These are used to capture and analyze what is going on with our SQL Server Instances. Events are stored in the stack for later analysis. For example, If I decide ...
0
votes
1answer
30 views

Sql Server Security Scenario

I need some advice/help... I need to implement database security in some Databases but I don't know how to do that with this given scenario... Using LDAP Auth We have Table1 In Table1 one we have ...
3
votes
1answer
1k views

Replicating Triggers

I am doing some analysis on merge replication and triggers for a project. I have two tables, Product and Audit that I am replicating. I have an update trigger on the Product table which is ...
0
votes
1answer
40 views

Error from Program Compatibility Assistant when installing SQL Server 2008

I am new to this so please do not mind if this is dumb question. I am receiving an error while installing SQL Server 2008 on Windows 8.1 I have .net 4. I have windows installer 4.5
0
votes
1answer
45 views

SQL Server Backup - move to new server - Media Failure

I've got a server in the UK with SQL Server 2008. It's very locked down firewall-wise. We want a local duplicate of the DB to test and build a new report. Backing up the relevant DB, and then ...
0
votes
1answer
32 views

A login is a member of db_datareader and public roles only, but it is not read-only

I'm an accidental DBA in a small company that doesn't have a dedicated DBA. I need to set up a read-only login/user for SQL Server 2008 database using SQL Server authentication that could be used by ...
0
votes
1answer
11 views

Unable to backup after recovery model change [duplicate]

Previously I had the recovery model as SIMPLE. I have altered it to FULL. While trying to perform BACKUP LOG, I am getting an error saying BACKUP LOG cannot be performed because there is no ...
1
vote
2answers
223 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 the option to restart the server or taking it ...
1
vote
1answer
32 views

Back-end with encription and user-control for MS Access2003-VBA

My client has an Access 2003 "multi-user" (<6) "database" (<3k records) with "encryption" located in a LAN folder and an easy Form I polished with VBA(DAO library). Access 2003 encryption can be ...
1
vote
1answer
25 views

Retire a SQL instance without impacting the primary server?

I have a SQL Server 2008 instance (TST01) that has some databases on it that are being migrated, still a few weeks of work to finish up, before the server is retired, this is a Virtual Server. There ...
10
votes
2answers
7k views

How and when does SQL Agent update next_run_date/next_run_time values?

I've been working on code in T-SQL to add new schedules to a SQL Agent job using the sp_add_jobschedule proc in the msdb database. When I add a new schedule (typically a run-once at a specific ...
1
vote
1answer
84 views

How to backup SQL Server database once evaluation period has expired

I'm using Microsoft SQL Server Management Studio from last one month that is evaluation period software. I'm not able to login in management studio. when I enter my user name and password it gives the ...