Questions tagged [sql-server-2008-r2]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
144 views

tables inheritance stored procedure

create table CustomerTypes( CustomerTypeID int primary key identity(1,1), CustomerType varchar(11) ); insert into CustomerTypes(CustomerTypeID,CustomerType select 1, 'Regular' union all select 2, '...
3
votes
1answer
2k views

Migrating SSRS 2008 to 2016 - ReportSync cannot see Data Sources

I am trying to migrate our SSRS 2008R2 server to a fresh install of SSRS 2016. I am using ReportSync and have managed to get connect to both servers OK. I created a test folder with a test report on ...
0
votes
1answer
8 views

How to connect to Microsoft Dynamics Rms 2.0 Running sql2008r2?

Would anyone know anything about Microsoft Dynamics Rms 2.0 (2012)? We are having trouble connecting our sql server to the client side cashier (windows 10 pro) this software sunset in 2016 I believe ...
0
votes
1answer
172 views

How to add Reporting services sharePoint features in SQL Server 2008R2

I am facing some issues related to SSRS on SQL Server 2008R2, how can we have install below features: Reporting Services- SharePoint Reporting Services Add-in for SharePoint Products Any one could ...
5
votes
4answers
7k views

Stored procedure working when run manually, not running in SQL Agent Job

When I execute a Stored Procedure through a SQL Agent Job, I get the following error message: Executed as user: NT AUTHORITY\SYSTEM. XML parsing: line 10, character 33, unexpected end of input ...
0
votes
0answers
36 views

Event log filling up with Sql error

Windows event log filling up with ERROR 1: "The activated proc '[dbo].[SqlQueryNotificationStoredProcedure-]' running on queue 'test.dbo.SqlQueryNotificationService-' output the following: '...
2
votes
1answer
126 views

Can't understand difference in fulltext results - contains, contains with wildcard, freetext

I have a table with an fulltext index on the column named Filecontent. The table has a row where content contains "W 917". For context, the content column on this rows contains much more ...
0
votes
2answers
107 views

SQL Server 2008 R2 Auditing

I am new to database administration, and I need to implement auditing of all users of multiple databases. Can we audit multiple users of a multiple database by creating just one audit specification? ...
0
votes
0answers
12 views

Ensure 'Adjust memory quotas for a process' is set to 'Administrators, LOCAL SERVICE, NETWORK SERVICE' vulnerability for Windows 2008 R2 SQL

I have a MSSQL Windows 2008 R2 server. Vulnerability for "Ensure 'Adjust memory quotas for a process' is set to 'Administrators, LOCAL SERVICE, NETWORK SERVICE'" has been found. Current ...
6
votes
1answer
1k views

SQL Server - Files timestamps unchanged so what is it that's being backed up?

Please see the below snapshot, showing the timestamps of all the data files as well as transaction log files for one of the SQL Server instances under my management. This is a production instance. ...
0
votes
1answer
124 views

How can I get the last second of the last month as a default parameter value?

I am trying to get the last second of the last month as a default value for a parameter. I can get the last day of the last month from this query on social.msdn.microsoft.com last month last day ...
0
votes
1answer
1k views

Sql Server log: is 'Backup|Log was backed up' the same as 'BackupDatabase: Log files done'?

One transaction log file is growing and growing for a couple of days and I can't find out why. Now I figured out that either the way the activities are stored in the sql logfile OR the behaviour of ...
0
votes
4answers
85 views

Is there anyway to view historical performance of SQL 2008 R2 database?

So.. I was wondering, is there a way for me to generate any report for the historical performance of a MS SQL database? I'm originally an Oracle DBA, but now I'm requested to support a few SQL ...
3
votes
1answer
117 views

How can INDEX rebuilds be going parallel when MAXDOP is set to 1

I am periodically running into a THREADPOOL wait issue with a SharePoint data store of hundreds of databases using a SQL Server 2008R2 Standard Edition instance (recently migrated to an Azure VM). It ...
0
votes
3answers
81 views

How to insert/combine values from multiple tables?

I have multiple tables (12 for each month) that have 3 columns each ("code", "test_name", "value") Example: January code | test_name | value 0001 name1 17 0002 name2 45 0005 name5 ...
1
vote
2answers
106 views

Identifying Unused \ Garbage Objects of a database

How do I find in use db objects from all application pages is there any tool or trick I can use, just like we do search in Visual studio for an object in entire solution
2
votes
1answer
85 views

VLF count suddenly growing and unable to reduce it

Owing to reductions in IT resources, I am now finding myself having to manage this with limited knowledge and so am seeking advice, please. We have 2 SQL servers with replication of multiple ...
0
votes
1answer
115 views

I am receiving the following error - The definition of object x has changed since it was compiled

One of my clients have been receiving this error that is causing issues in their process. Basically, they are thinking the error is related to replication of stored procedures that they assume I ...
4
votes
3answers
9k views

Fix Linked Server Without Restarting SQL Server Instance

Problem: Occasionally a nightly job will fail, and when I look into it, it is the result of a query across a linked server failing. But for some reason that query seems to remain 'open' in some way ...
0
votes
3answers
49 views

How to remove database from explorer after deleting .MDF and .ldf files

I wanted to know if I can delete or remove the database shown in the object explorer after someone has manually deleted the MDF and ldf files from the database folders.
3
votes
2answers
76 views

Concerns regarding changing virtual NIC on SQL Server 2008 R2 / Windows Server 2008 R2

I have SQL Server 2008 R2 running on Windows Server 2008 R2 in a virtual environment (ESXI 5.5). Client has been advised to switch the existing E1000 adapter with a VMXNET 3 adapter because they were ...
1
vote
2answers
53 views

How to remove dbcreator server role?

I was able to add the dbcreator server role to a user of a SQL Server DB, thanks to this nice question/answer: create-database-permission How can I REMOVE that permission? Is there a stored procedure ...
1
vote
1answer
194 views

Sql Server Database 2008 R2 is in recovery mode still after 16 hours

Sql Server 2008 R2 Database is in recovery mode still after 16 hours for one of the database which is is Simple Recovery model. The data file is 200 GB and Log file 90 GB. We have to do Crash ...
0
votes
1answer
116 views

Does SQL server 2008 log instance level security permission changes

I just recently logged onto one of our Test environments to find i did not have permissions, turns out my instance security Login had been disabled I have a feeling towards whom may have done this ...
1
vote
1answer
78 views

SQL Server 2008 ignoring QUERYTRACEON 4136 and ARITHABORT ON

A slow Stored Procedure is extremely faster (going from 2 secs to 8 millisecs) with QUERYTRACEON 4136 and ARITHABORT ON, on the local SQL Server 2008 I use to develop. The "fixed" SP, on another SQL ...
2
votes
1answer
4k views

How to search a given date value in all tables of present in database

I need a query to search for a particular date 2017-04-01 in every table in my database. My database has many tables and I don't know in which table this value 2017-04-01 exists. Please suggest a ...
0
votes
1answer
25 views

Change the sql table output - Rows to Columns [duplicate]

I have a result from recursive query that gives me Table1 (SQL Server 2008 R2). I need to convert the Table1 to Table2 and I don't know the best and simplest approach to do it. Any suggestions? Table1 ...
0
votes
1answer
194 views

Query Tuning and Index Tuning - SQL Server

I've been asked to improve the performance of the following query. I can't amend any existing Indexes but I can create new ones. The table structures can be found in this SQL Fiddle The row sizes of ...
0
votes
1answer
25 views

Rebuild or Reorganize index

I am using SQL server 2008 R2. The DB is normally used from 9 am to 9 pm and the maximum db size is 10 GB. Whether rebuild index offline causes any problem, if it is done during midnight (when no one ...
1
vote
1answer
82 views

Running select affects performance of stored procedure called from code

In what scenario would running the same select statement in SSMS as that in a stored SP which is currently timing out start making the SP (which is being called from a service every minute (30 sec ...
0
votes
1answer
131 views

Need Help With SQL Server 2008 Join With 3 Tables

I am wondering if someone can solve this for me please. I am trying to do a join on two tables. One is a date calendar table with dates from the year 2000 until 2050. This table has column named ...
0
votes
1answer
84 views

Query distinct emails not logged in within a period of time

I need help in writing a query to return distinct emails that have not logged into ABC database in the past 5 months. The exact task I have been asked is as following: Create a table in ABC ...
0
votes
0answers
30 views

Missing tables in AdevntureWorksDB

Recently I found some old questions that involve querying data from AdevntureWorksDB across several operations(DML,DDL). One such question was : Create and execute a query that computes the total ...
1
vote
1answer
175 views

SQL Server SUSPECT Database - 2x in one week

Maybe this isn't appropriate for here, but I'll post and someone can suggest somewhere else.. sorry for so many characters.... We've had the same database go SUSPECT twice this week, (and I'd really ...
5
votes
1answer
165 views

Extracted data WAY bigger than deficit left from deleted rows

I recently undertook an exercise to free some space up in a production DB (SQL Server 2008 R2) due to disk constraints. Just one table in particular takes up 98% of the DB. Records that were not ...
0
votes
1answer
56 views

SQL server row count

I had an activity for restoring a full database in SQL server 2008. I had to restore the database will norecovery since I had to restore the differential backups as well which will be shared everyday. ...
4
votes
1answer
149 views

What is the best design for dynamic assignment of locations for variable sized grid boxes to occupy?

I want to build a database that will have limited single locations to put boxes. It's divided by lanes and bays. Imagine a 4x4 grid, with a total of 16 slots, and every time I query the tables, I ...
1
vote
1answer
171 views

Cross database reference select access with disabled login for DB user

We have two databases (DB1, DB2) with the following view structure. DB1: T1, T2, T3, ..... Tn (Tables) V1 (View consuming {T1, T2, T3 ..... Tn }) Inside DB2 we have to create a view V2 which will ...
0
votes
1answer
84 views

Replay trace file and filter on error>0?

I have captured a trace file using the replay template. It includes all columns available, of course including ERROR. When I replay this trace file, the "trace configuration" window pops up, I declare ...
0
votes
1answer
33 views

SQL query speedup/optimization

I am using SQL Server 2008 R2.I have tried to improve the following query in different methods. Method 1: DBCC DROPCLEANBUFFERS SET STATISTICS TIME ON SELECT count(*) FROM [prglog].dbo.[errorlog] ...
1
vote
1answer
56 views

sp_delete_backuphistory not working

I am using sql Server 2008 R2. We are using below query for reducing the msdb size. use msdb exec sp_delete_backuphistory '01-MAR-2020' When i execute this query in server whose msdb size is 15GB ...
0
votes
1answer
23 views

Replication types

How can I find out, if my current replication pattern is any of following or not? I am using SQL2008R2. 1)Peer to peer replication 2)Bidirectional transactional replication
0
votes
1answer
83 views

How to send an email with embedded values

I need to do a stored procedure that sends an email when a value reaches 100 with this wording in the body: "100 daily file downloaded from the user:USERID" where USERID is the user that reached 100. ...
0
votes
1answer
35 views

Can I change database compatibility level from 80 to 90 or higher with log shipping?

I have a database on SQL 2008 R2 with compatibility level 80 and I want to change it to 90 or 100. I assumed that after changing, I may find a regression in our application's performance. Many backups ...
0
votes
1answer
40 views

SQL server replication (publisher, subscriber, distributor) on top of AlwaysOn

I am assessing the migration from SQL 2008R2 to SQL 2017 AlwaysOn where we have replication (publisher, subscriber, distributor) setup on SQL2008R2. There are various restrictions if one wants to ...
1
vote
1answer
636 views

Database corruption extends beyond nonclustered index issue in SQL Server

Background I have a server running SQL Server 2008 R2 on the matching MS OS. Over the last few months this server had a RAID drive failure on two separate occasions (which simply required hotswapping ...
0
votes
1answer
22 views

Xquery Speedup/Optimization

I am using Sql server 2008 R2. To speed up the query execution in sql i have changed xquery part of it.I Have used cast method to query xml column and i got following results. DBCC DROPCLEANBUFFERS ...
0
votes
1answer
93 views

Define Database Size

I want to create a database with Size limitation. I am using sql server 2008r2 edition. Maximum size should be only 20GB. That means it should allow only 20GB space for particular database. How can ...
1
vote
1answer
101 views

Improve SQL query performance, need help [closed]

I don't see any missing indexes on the execution plan apart from Hash Match, Parallelism and Index Scan. I get 218,673 rows in 5 minutes. Planning the improve the performance. Here is the sql query, ...
0
votes
3answers
43 views

how to count second col if first col value is null and avoid duplicate count

I'm making sales statistic report to calculate scanned documents station wise using below Query: SELECT RIGHT(CONVERT(varchar(11),DATEADD(MONTH,DATEDIFF(MONTH,0,InvoiceDate),0),13),LEN (CONVERT(...

1
2 3 4 5
76