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

learn more… | top users | synonyms (1)

0
votes
0answers
14 views

Error when trying to access linked server from another machine

I have created a linked server from a Excel source and when I query or test the connection from the locally from the server everything is good but if I try the same from another machine with DBMS I ...
0
votes
1answer
43 views

SQL Server 2008 R2 error on database engine

Database 'msdb' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information. (Microsoft SQL Server, Error: 926)
2
votes
2answers
849 views

Need advice on abnormal login auditing

Recently i am facing some slow issue for my web application. And i have check my visitor report and it shows normal traffic rate as usual. And then i check my db login auditing and find below login ...
1
vote
1answer
44 views

SQL Server 2014 .bak file error - The media family on device 'D:\..' is incorrectly formed

Worst case scenario - the server crashed and the 2014 SQL Server .bak file had to be recovered from the failed disk. The .bak file I have is over 20gb in size but is unusable when trying to restore ...
0
votes
0answers
15 views

Backup SSRS Encryption Keys Using Powershell

I have made the following script from google for backing up the SSRS Encryption keys: cls $pwd = "sa@123@123" $SSRSClass = Get-Wmiobject -namespace ...
3
votes
2answers
58 views

What happens with statistics when reverting to a database snapshot

Lets say I have a database FOO for which I created a snapshot (named FOO_snap). Now I'll run thousands of queries on this DB. After that I will revert DB to FOO_snap. Will I lose all of the statistics ...
-2
votes
0answers
28 views

sql server database query take more time [on hold]

This query is taking more than 2 hrs to execute.please support me on this issue to reduce the time taken by this query. use [SIS]; select TOP 1 [Current LSN] as lsn, [End Time] as ...
5
votes
2answers
3k views

What can I do to speed up this SQL Query?

I've created this SQL query with the help of @Dems :-) Here is some detail, I tried to make a SQLFiddle but I kept getting errors with my variables... This works in Sql Server 2008... My question ...
30
votes
2answers
55 views

SQL Server unpredictable select results (dbms error?)

Below is simple example, which returns strange results, that are unpredictable and we cannot explain it in our team. Are we doing something wrong or is it SQL Server error? After some investigation ...
0
votes
1answer
80 views

same query different servers,different execution plan and time

I have this query and it runs less than 2 minutes on Test but on Prod it takes 10 minutes. Both are the same version,CPU,RAM,OS the same. I have four tempdb files on Prod but one one Test. I ...
2
votes
2answers
80 views

How to backup full transaction logs for SQL Server 2008R2

I have a 32GB Database with over 7GB logs (DB name: XYZ). I'd like to copy the DB with all of the logs. I thought that I can simply run: ... ALTER DATABASE XYZ SET RECOVERY FULL; BACKUP DATABASE XYZ ...
-3
votes
0answers
21 views

Cannot connect to database server 2008-r2 [on hold]

I installed SQL Server 2008 r2 but when I try to connect to Db instance with any application, (Sql management, Sharepoint ecc) I got the message that cannot find any Sql database Server. Every SQL ...
3
votes
1answer
225 views

Updateable Subscriptions: Rows do not match between Publisher and Subscriber

I have transactional replication with updatable subscribers set up in SQL Server 2008. It has 3 subscribers and 1 publisher. I had to setup replication again due to some errors related to the database ...
-1
votes
0answers
24 views

Generating new empty values while retrieving data from a database [on hold]

I have a Pettycash table Like this: PettycashId LedgerName OppositeLedgerName amount While I retrieving data like this: Select PettycashId,Ledgername,OppositeLedgername,Amount from Pettycash ...
0
votes
1answer
17 views

Analyse and report disk usage growth historically

Is it possible to use historic information to show disk usage growth? I haven't keep much in the way of database setup and disk usage information. So I can't say how much disk growth has occurred in ...
2
votes
1answer
283 views

What means Command column in sp_who2 and text column in sys.dm_exec_sql_text?

I have a script that shows commands being fired in SQL Server 2008 database as follows: --shows who is active and executed commands declare @SPID int=null, @Status varchar(max) = null, @LOGIN ...
2
votes
0answers
16 views

MS SQL Parsing with XPath Performance

I have a UI that allows a user to select certain data points they want to filter the results by. There are things such as location, department etc. Once they have selected all of the options, I ...
1
vote
0answers
15 views

Dynamic Paramterized Replication to a PUSH subscription

I have a publication that I want to filter by suser_sname() filter. This works perfectly fine when I'm using a pull subscription. However, I need to use a push. How do reflect this suser_sname() as ...
1
vote
2answers
47 views

Running a T-SQL job under another user

I cant find my proxy user to "Run as" that user !? I am confused which kind of proxy user is appropriate to run a job with a simple T-SQL command. (I have created a credential and proxy but cant find ...
2
votes
3answers
963 views

Twice job results in sql server, last one is left in progress

I have the job MP - Create CSV which execute a package SSIS in sql server 2008, when I check for the job history I see the result at step 0, I expand and I have 2 results for the step 1. Fist result ...
0
votes
1answer
849 views

Machine account causing a Token-based server access validation failed with an infrastructure error

As the error suggests the SQL log is filling with the error: Login failed for user 'xxx\xxx$'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous ...
0
votes
0answers
16 views

Problem running SSIS package remotely using PoSH

For various reasons I'm trying to run an SSIS package remotely using Powershell. I've enabled remote scripts on my server using the following command. Set-PSSessionConfiguration -Name ...
3
votes
1answer
119 views

best way to consolidate data

I have three select statements which have the bulk of their columns which are the same except a few. So here is an example select *orgid='0' ,'P' as OrgType* , Lang ,*cast(Null as varchar) as ...
0
votes
2answers
49 views

Query to get data in one status not in another status

I have a table with status column with different status values like 'A','C','E','I'. My data is like this: ---------------------------------------------- TagNo TruckNo VerifiedDateTime ...
6
votes
4answers
23k views

"Could not find stored procedure' even though the stored procedure have been created in MS SQL Server Management Studio

I have created a table testtable inside the database testbase that have the following structure: product_no (int, not null) product_name (varchar(30), not null) price (money, null) expire_date (date, ...
0
votes
0answers
39 views

SQL Server consuming large amount of RAM [duplicate]

I have Server 2012 with two 2.10 Ghz processors and 64GB of RAM. I have SQL server 2008 installed on this server. but this SQL server is consuming 70-80% of memory. I have limited SQL memory to 24GB ...
0
votes
0answers
17 views

Is it possible to retain access to table that will be dropped and recreated?

I have a GIS table which is small and is dropped and recreated from MAPINFO. Each time I drop and recreate that table I grant access to roles created. Is it possible to sustain access during drop and ...
0
votes
2answers
42 views

MS SQL Server 2008 Transaction log file back up failure

I've done some reading around this subject here and on StackOverflow but nothing really answers my question enough for me to go forward. I'll explain we have a MS SQL 2008 server running, the ...
2
votes
2answers
1k views

Datawarehouse - Dimension, Fact, or Degenerative dimension

I am building a warehouse for a billing system that bills a number of services/utilities on the same invoice, as such I am having real trouble conforming to a recognised design method for the ...
-4
votes
0answers
25 views

Not able to attach database backup file .bak into SQL Server 2008 [closed]

I have a database backup file named iyym.bak. How can I attach the database to my SQL Server 2008? I tried inside SQL Server Management Studio the following: right click on data base folder in ...
2
votes
1answer
22 views

SQL Server : GRANT REFERENCES Fails With Msg 15151 as Windows User with sysadmin role and also as 'sa' [closed]

Okay, what am I missing? Someone please hit me with the proverbial clue-by-four. On SQL Server 2008 R2, I execute this command: GRANT REFERENCES ON ASYMMETRIC KEY ::IRESKey to XYZZYEXT; I get this ...
1
vote
2answers
46 views

Get time elapsed between log entries

At a company, fluids are prepared and held in tanks, following a preparation/recipe. The preparations move from tank to tank depending on needs. The tasks are logged in sequence into a table. What I ...
0
votes
0answers
32 views

Is There a Standard Way of Commenting T-SQL Source Code? [closed]

The T-SQL stored procedures that I am facing right now have a very crowded, uncommented look that looks quite puzzling to an unauthorized viewer. The first reaction has been either to continue ...
0
votes
0answers
12 views

Informatica is causing Convert_implicit in SQL Server 2008

In our project a datafile is loaded into SQLServer using Informatica. The source column is defined in Informatica as UniChar.60 The target column in SQL Server is defined as varchar(60) But when the ...
3
votes
1answer
492 views

SQL Script to Drop old AD logins, Inactive SQL Logins and all related Users

Related Question: SQL Server script to delete accounts no longer in Active Directory Whilst the above question points out the rather handy sp_validatelogins procedure, i'd like to extend this ...
2
votes
1answer
99 views

SET CONTEXT_INFO for tracking specific SQL requests

I've got a problem where I'm seeing some very strange lock waits, with the process at the top of the lock wait tree in the 'sleeping' 'AWAITING COMMAND' state. I can see the machine name and ...
7
votes
5answers
4k views

What's a good tool for visualizing SQL Agent jobs? [closed]

I find the built-in MS SQL Studio tools for managing Agent jobs to be a little frustrating. What tools out there have you found helpful? Offhand, there are three things I'd like to see in such a ...
0
votes
1answer
45 views

DB Permission: User can drop only their created db's?

I want to set permission against a user, which can create database and drop on their created databases neither any database. Any idea/suggestion ?
0
votes
1answer
284 views

Copy+Pasting currency value from SSMS 2012 to excel does not complete or calculate new value

So I'm trying to copy and paste some query results into Excel, and for some reason it seems to be not properly completing the first value. Let me explain what I mean by this. In Excel the cells I am ...
2
votes
3answers
11k views

Generate create script for all indexes

I am working on documenting my databases, and I would like to create a list of all of the indexes in my database. The reason I want to do this is so that I can track changes to my indexes overtime. ...
0
votes
1answer
655 views

syspolicy_purge_history job failed at step 3

In one of my sql 2008 sp1 standalone instance, syspolicy_purge_history job is fails at step 3 Erase Phantom System Health Records.... Below is the command - (Get-Item ...
3
votes
1answer
460 views

SQL Server 2012 Publisher SQL Server 2008 Subscriber version issue

So I have a setup where one virtual machine is a SQL Server 2012 publisher and I need to setup merge replication on a SQL Server 2008 subscriber on a different vm. When setting up the subscription ...
0
votes
2answers
31 views

Mapping a Login to a User

On my production system I login to SQL Server with CPSDOM\mconnors. When I execute SELECT CURRENT_USER; it returns CPSDOM\mconnors. We use Windows authentication on our DBs. On my test system I ...
0
votes
1answer
45 views

SQL Server Deadlock on delete

I have a query like this: with xx as ( SELECT [FilePath], ROW_NUMBER() over (partition by [FilePath] order by [FilePath]) as RowNumber FROM [dbo].[foo] ...
1
vote
2answers
3k views

unable to bring database online from recovery pending

I am trying to bring a SQL Server database online and accessible that is in Recovery Pending state. The SQL Server service uses an Active directory account that is a domain administrator and a ...
0
votes
2answers
51 views

Find tables with modified data after a specified datetime [duplicate]

I am performing few inserts and updates on my database using tool provided by app supplier. I want to compare the updated database and backup after running the tool. But my database size is around ...
0
votes
0answers
36 views

Decimal Data Type as Primary Key

One of my tables is set up like this: create table dbo.Source ( testID decimal (10,3) PRIMARY KEY , column 2 somedatatype , column 3 somedatatype ) Whenever I perform SSIS into this table ...
1
vote
1answer
48 views

Full text index does not honour deleted words - They are still indexed

I have a full text index defined as 'Automatic' radio button checked on in its Catalog. When I modify a word in the full text indexed column, the new word appears in the sys.dm_fts_index_keywords but ...
0
votes
1answer
552 views

SQL Server Error - HRESULT E_FAIL has been returned from a call to a COM component

I have a huge 200MB .SQL file. When I try to open this in SQL server management studio 2008, I get the error -Error HRESULT E_FAIL has been returned from a call to a COM component. What could the ...
3
votes
1answer
601 views

SQL Server Troubleshooting Replication and Long-Running fn_dblog query

I am trying to get (pull) Transactional Replication working again for a subscriber. Currently, in Replication Monitor I am seeing messages in the Publisher to Distributor tab and the Distributor to ...