This Tag is for SQL Server 2008 R2, major build version 10.50.xxxx

learn more… | top users | synonyms

1
vote
0answers
29 views

Recover master database [closed]

I got the followng error 2015-05-13 12:04:31.00 Server Using locked pages for buffer pool. 2015-05-13 12:04:31.10 Server Using dynamic lock allocation. Initial allocation of 2500 Lock ...
0
votes
1answer
77 views

SQL Server restore full backup + partial differential backups

I created a full backup of my database using SQL Server Management Studio wizard, and then I perform differential partial backup each day via cmd to the same file. SQL Server version is 2008 R2. ...
4
votes
0answers
35 views

SQL Server 2008 R2 Partitioning - same FileGroup, 1 File, 2 partition_numbers - HELP

It's my first go at partitioning in SQL Server, I learned from the Brent Ozar guide which is fantastic :) A few times I have ran into a weird scenario; when I run: SELECT * FROM ph.FileGroupDetail ...
0
votes
1answer
29 views

Will SSDT-BI work with SQL Server 2008 R2?

Sorry if this is redundant, but due to the crazy naming of the tools, it's hard to find the answer to the question. Question 1 Will SSIS packages, reports and so forth built with Microsoft SQL ...
0
votes
1answer
40 views

SQL Server 2008 R2 - Moving nodes in mirrored environment

Was hoping that I would find this documented somewhere, but I've searched and searched. Finally asking the question myself: I have SQL Server 2008 R2 in a HA setup (primary/mirror/witness) I want to ...
2
votes
0answers
31 views

DB backup is not being restored to another DB. It is showing “Specified cast is not valid” error [closed]

I have been experiencing "Specified cast is not valid" error while restoring backup of DB. Version of SQL server management tool from which I am taking the backup is "Microsoft SQL Server 2008 R2 ...
-1
votes
1answer
20 views

SQL statement for comparing actual products and plan products

I need some helps for writing SQL statements to compare count of actual products and plan by like below 2 Input tables: CREATE TABLE PRODUCT_PLAN ( PRODUCT NVARCHAR(50), START_TIME ...
1
vote
0answers
38 views

Statement succeeds, data missing [closed]

I have two reports from the same customer, where they claim that an error occurred that implies a SQL Statement didn't execute. These are very simple statements, setting a value in a single column. I ...
4
votes
2answers
79 views

Have full SQL Server restore but losing 1 day of data

I have SQL 2008 R2 64bit and it is backed up with ASIGRA SQL backup. The issue I have is that we had corruption on the server and the DB got corrupted yet the LDF file is in tact and does have all the ...
1
vote
1answer
21 views

SSIS Package Security

I am writing a Package for one of my client according to his requirements. Package development is totally complete now time is to protect it with some security. Is this possible I encrypt all the data ...
11
votes
2answers
455 views

Help with PIVOT query

I have a table with below structure : CREATE TABLE [dbo].[AUDIT_SCHEMA_VERSION]( [SCHEMA_VER_MAJOR] [int] NOT NULL, [SCHEMA_VER_MINOR] [int] NOT NULL, [SCHEMA_VER_SUB] [int] NOT NULL, ...
0
votes
0answers
113 views

Sudden High CPU Usage On SQL Server 2008R2

Our SQL Server is experiencing sudden high CPU usage since 12:30am today. This server is used internally so nobody should be accessing the server at that time. I'm not sure why 12 hours later the CPU ...
2
votes
1answer
66 views

Replace value using several criteria in another table

Brief illustration : If I want to replace a single string using multiple criteria from another table, I can use this statement : -- assume table_2 has column 'value' containing records such as 'd', ...
1
vote
1answer
81 views

Moving SQL Server 2012 Database to SQL Server 2008 R2

I follow the answer of Mr. Kin in this post How to move a database from SQL Server 2012 to SQL Server 2005 I run the query without errors, but when I check my blank database created on SQL Server ...
1
vote
1answer
25 views

Cannot Create Backup Device - SQL Server 2008 R2, Error 1326 (permissions look ok)

Trying to create a backup device for a new db. I'm using management studio and just using the "New Backup Device..." wizard and giving UNC path to the backup directory. There is a pre-existing db on ...
1
vote
0answers
16 views

source control for SQL Agent Jobs

Our SQL Agent jobs execute different DTSX packages at various steps. e.g \DEVLserver\DTSX\package1.dtsx I want to keep the agent job script in TFS but when I promote it is there any way to change or ...
3
votes
1answer
39 views

xp_cmdshell in a transaction

I need to run multiple scripts in a certain folder in a transaction and rollback if there are any errors. At this point I'm just trying to get the rollback to work without a try catch. Currently when ...
0
votes
2answers
29 views

How to access to DB Instance from another DB Instance with Windows Authentication

i have two database servers DB_INSTANCE1 DB_INSTANCE2 is it possible to access from DB_INSTANCE1\DB1 SQL script to DB_INSTANCE2\DB2 tables without using SQL Logins ? (not every database servers are ...
1
vote
1answer
51 views

How to confirm if the backups are going to tape in SQL Server 2005 and 2008 R2

We have many of our SQL Servers where we take the backup locally on the server as well as over the network to other server in case of disaster. Also, we have a process set that server support team ...
0
votes
0answers
15 views

Does foreign key and cascade take advantage of filtered index?

I have a table T2 referencing another table T1 The referring column ref_T1 has a nonclustered unique index on it, filtered for value <> 0 When I delete a few rows from T1 and the forein key ...
2
votes
1answer
61 views

Couldn't restore database and couldn't change Single user mode to Multi user mode

I am unable to restore a database. The database is stuck in single user mode. I cannot change to multi-user mode. I was restoring the SQL Server database from Prod to Dev as I have done many times ...
0
votes
0answers
30 views

How to identify a client application whose host_process_id points to sqlserver.exe

I am in the process of trying to identify a client application which uses one of the SQL Servers I support (2008 R2). Periodic queries against sys.dm_exec_sessions regularly return sessions whose ...
1
vote
1answer
41 views

How do I reduce SharePoint 2010 SQL server log files? [duplicate]

I have a work place portal built on SharePoint 2010 and the SQL Server drive space is full. I am using SQL Server 2008 R2. Of the 800 GB disk space, the log files have taken approximately 730 GB. ...
0
votes
1answer
42 views

Soft delete to improve performance: all wrong?

A few years back I read soft delete would improve performance of deletion, because instead of actually removing the item and impact the clustered (and all other) indices, it would just change a value. ...
2
votes
2answers
88 views

String that contains letters representing a negative number

I would like for every string that has a letter on the end make it a negative value. <field> = '00000000014545p';--Varchar(15) <field> = '00000000012645x';--Varchar(15) <field> = ...
0
votes
0answers
20 views

How do I tell what roles a Windows Domain Login is in in SQL Server [duplicate]

The following question answers what roles is a user in in SQL Server: http://stackoverflow.com/questions/3609318/listing-users-and-their-roles-in-sql-server That only works for SQL Users, it doesn't ...
1
vote
1answer
66 views

Question about the UNION operator and its implicit data type conversions

Is there a limit to the number of UNION operators to combine query results? I have an odd situation where I have a table called TransmittalSheet TS that have a double (1 to Many) relationships with ...
1
vote
0answers
28 views

Restricting SQL Server access for Azure

I have SQL Server 2008 R2 running on a dedicated server together with a web site hosted on that same server. We now wish to access the SQL Server databases from an Azure Web API, however for security ...
1
vote
1answer
45 views

What does: SET @Variable1 = (Select field1 From INSERTED) mean?

I'm trying to understand an existing Trigger on one of my tables (DocumentDistribution), that it seems is the bridge table between DocumentInfo and DocumentSource tables. I don’t understand how this ...
0
votes
1answer
127 views

The SQL Server Network Interface library could not deregister the Service Principal Name

After windows patching (windows 2008 R2 , SQL Server 2012 Sp2). I could not start SQL Server Service . I get error 1067 and this from the error log* The SQL Server Network Interface library could not ...
2
votes
0answers
48 views

Output in SQL Profiler has results with Database ID as NULL

I ran profiler to filter out certain applications connecting an environment but the results has application for Database_id "NULL".. Am I missing anything ? Also another question , does all the ...
1
vote
0answers
70 views

SQL Server 2005 Cluster Service pack 4 upgrade failure at remote user account

I built SQL Server 2005 ENT Cluster on Windows Server 2008 R2. I need to upgrade it to SQL Server 2005 SP4. However, I get this error at the Remote User Account screen Enter the remote user ...
2
votes
0answers
27 views

Unable to install SQL named instance as it says RS feature exist, even after dropping it

We are trying to Un-install a named instance from one of our servers. But, don't know why it did not un-installed the reporting services even after proper selection was made during uni-install. ...
3
votes
2answers
103 views

How to backup full transaction logs for SQL Server 2008 R2

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 ...
1
vote
2answers
45 views

Dynamic SELECT and place result in variable columns

Edit: I use Microsoft SQL Server Management Studio, I believe it's SQL 2008R2. Sorry, new to this. I've got a complex question, at least, I think so since I can't find the answer after excessive ...
1
vote
1answer
35 views

What should we do when same column fields occurring multiple time in many tables?

I have more than 20 tables in my database. There are some columns which occur in almost all of the tables. In that case what should I do? Do I put all those columns in every table or is there a better ...
2
votes
1answer
104 views

SSIS Packages get stuck in SQL Agent jobs [closed]

We run about a dozen scheduled SQL Agent jobs which run SSIS packages. Intermittently, every scheduled job will get stuck in a running state. i.e. we'll arrive in the morning and notice that there's ...
1
vote
1answer
34 views

Manage max table storage space in case of excess data (size in GB)

My scenario is that I am using sql server 2008 r2 on my end. I have created a database named testDB. I have a lot of tables with some log tables in this. some tables have contain lakhs of records in ...
0
votes
0answers
91 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 ...
2
votes
2answers
68 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 ...
1
vote
1answer
90 views

Index to filter a view before joining the underlying tables [closed]

Using SQL Server 2008 R2 Suppose you have a query like the following select top 1 * from view_cms_user where UserId = 1234 or UserPasswordRequestHash = 'anxazno121o3n' view_cms_user is basically: ...
3
votes
1answer
333 views

Storage size of a bigint table

I am working with a table that has this format : CREATE TABLE dbo.ID_STORE ( WORKING_ID bigint PRIMARY KEY CLUSTERED ) The table stores around 2 millions rows, but the stored ids are not ...
5
votes
3answers
279 views

Check if any of the values is in a subquery result

I have a complicated subquery that returns a list of order IDs. I need to get a list of customers who have these orders. The problem is that there are two ways of assigning a customer to an order (one ...
2
votes
0answers
31 views

How to prevent misuse of rights in monitoring application?

I have a monitoring application that runs on the computer of each user in my organization. This application needs to insert some monitoring data in several tables of a database (MS SQL Server 2008 ...
2
votes
2answers
53 views

SQL Server total memory less than target memory, lot of extra memory unallocated

The situation is the following: We have a SQL2008r2 server (64bit on 64bit Windows) with SSRS installed on it. The Max Memory is set to 6GB, the server has 12GB total memory. The target server ...
1
vote
2answers
279 views

Error when restoring SQL Server 2008 R2 backup on 2012

I am trying to restore a .bak file (backup taken on SQL Server 2008 R2, compatibility level 100). I am restoring the backup on SQL Server 2012 edition. I get the below error. Unfortunately the ...
6
votes
1answer
273 views

How can we determine the SQL server version and edition from the available set up, before actually installing it?

We are going through the downgrade activity from SQL Server 2008 R2 Enterprise to Standard edition. To kick off the above activity we were looking for available standard edition of SQL server. We ...
0
votes
2answers
43 views

How to Get the Last Day of the Previous Month?

Is there a quicker and easier to read way in order to get the last day of the previous month in T-SQL? I have found this piece of source code, which does the trick, but looks obfuscated unless ...
0
votes
1answer
88 views

How to read files using the OPENDATASOURCE method?

I am trying to understand what a particular piece of source code does. The original author has written the following excerpt: /*******************************************/ -- Inserează în tabela ...
2
votes
0answers
50 views

SQL Server 2008 R2 : Unexpected timeout with SQL Agent Job/powershell

I have a SQL agent job set to execute a SQL query against a single database and then save each row into a different file with powershell before zipping the files up and emailing me. In one of my SQL ...