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
-4
votes
0answers
24 views

Logical Reads of query is high

I am using SQL Server 2008 R2. The Queries executed and the IO statistics of the the queries are below. Queries: Query 1: select COUNT(*) from [TestRec].dbo.[TestRec] WHERE ([TestRec].dbo.[TestRec].[...
-2
votes
0answers
33 views

SQL clustered index

I am using SQL Server 2008 R2. I have a table with columns Date, Time, ID(PK) , col1 , col2 , col3. Some of my queries uses date in where condition,while other uses date and time. The id column is ...
0
votes
1answer
53 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. ...
0
votes
1answer
32 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] ...
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
1
vote
1answer
40 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
36 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 ...
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 ...
-2
votes
0answers
24 views

Rearrange Month Wise data in sql query

Currently I am retrieving data month wise from below query select month(EntryDate) as m, sum(QTY) as QTY,Sum(IWeight) as Weight from ConIssuance where delid is null group by month(EntryDate) Order ...
0
votes
3answers
35 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(...
0
votes
0answers
39 views

Error “There is insufficient system memory in resource pool 'internal' to run this query.” even after updating to SP3 on SQL Server 2008 R2

We are getting this error : “There is insufficient system memory in resource pool 'internal' to run this query.” everyday, and the error lasts for about a minute, after that the queries are executed ...
0
votes
1answer
34 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
12 views

SQL EXECUTE TASK IN SSIS WITH ORACLE CONNECTION

following my previous question: Oracle source with SSIS 2008 on how to connect to an Oracle instance, which ended up working for me. However, I am currently stuck trying to run a merge statement on ...
0
votes
1answer
34 views

what is the impact of changing log shipping schedule timing jobs?

I have two severs primary and secondary log shipped server , after configuring it, I noticed that the latency of last copied file and last restored file increased and the alert of monitor sever fired ...
1
vote
1answer
29 views

Where Database Alerts & Operators Exist In SQL Server?

My SQL Server database server has crashed. I have system databases backup. I will reinstall the sql server but i don't know how to find my operators, alerts and config settings. Is there a way to find ...
0
votes
1answer
29 views

Should I install SQL Server 64 bit or 32 bit

Sorry if this question is lame. For production purpose, i wanted to know when to install SQL Server 64 bit package and when to install 32 bit package when the client's PC has: - 32 bit OS and 64 bit ...
0
votes
1answer
33 views

odd OS memory consumption by two nearly-identical SQL 2008 R2 instances

Instances are legacy, something we have to carry for the next 3 years, 2008 R2 64-bit, both SQL Server and Windows Server OS. Two copies on two nodes. Both servers are set to consume "Maximum server ...
2
votes
2answers
46 views

Select rows based on values from 1 column being the same?

An example of my database table film id | scene id | value id ----------------------------- 0 | 0 | 7 0 | 1 | 1 0 | 1 | 0 1 | 2 | 8 ...
0
votes
0answers
32 views

Weird logging message problem

We've got a stored procedure that's running in a SQL Server agent job on multiple servers. It has the little block of code to log debugging information. It's the same code on both machines, but on ...
0
votes
1answer
73 views

Validation logic for Mobile Number Column in SQL Server

I am creating a validation script and need help with mobile number validation logic with below details. Mobile number must be: 10 digits in length. Cannot begin with a 1 or a 0 (For example:...
0
votes
0answers
36 views

Review of scheduled bulk deletion on a production database

I have a EU privacy requirement to delete production data regularly. The script runs weekly when the traffic is quiet. I wondered if there is any way to improve this script. I can't delete directly ...
0
votes
1answer
38 views

Restrict server login by user AND machine (within or not within a domain): is it possible?

I'm trying to setup a SQL Server 2008 R2 instance, restricting access to my database so only specific users on specific machines can login there. Let's say, we have 3 devs: John, Jill and Steve, with ...
0
votes
1answer
66 views

Enable sysadmin user to restart SQL server from management studio

I have SQL server login with sysadmin role, but I cannot stop and start SQL server when I connect from remote management studio, just from local server management studio. How can I enable it? I use ...
1
vote
1answer
31 views

Duplicating rows based on a count column SQL Server [duplicate]

I have the following table: MyTable PlaceID NameID Code CodeCount 1 1 1234A 2 1 2 1234A 3 1 3 1234A 1 2... 2... 3... 3... I want to select 1234A where ...
0
votes
1answer
69 views

Speeding up “duplicate” checks

We have an events table that is reasonably large (~35 million rows) The original table is like this, CREATE TABLE [dbo].[Events]( [EventID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL, [...
0
votes
0answers
85 views

An expression of non-boolean type specified in a context where a condition is expected, near 'List'

myconn.Open() Dim command As New SqlCommand("Select * from Food where Food List = @list", myconn) command.Parameters.Add("@list", SqlDbType.VarChar).Value = txtbox1.Text Dim ...
0
votes
1answer
150 views

calculate running balance of debit credit using union all

i'm making account statement for which i need that account balance before today and with each transaction row of debit or credit plus and minus from initial opening balance on the basis debit/credit ...
0
votes
1answer
13 views

How to export my query output to CSV in SSMS

I have some outputs in SQL Server Management Studio, but want to export them to CSV for easy transmission to another db. I have seen command to export to xml but not CSV. Thanks Abdulmojeed
0
votes
2answers
16 views

T-SQL Update Random String Value in Column

I have a table that contains a file path column containing data like this. C:\ABC\Files\AA.dat C:\ABC\Files\AA.Unbound.qp C:\DEF\AA\GGG Build 1 Modules\Random123.qpp C:\DEF\AA\GGG Build 1 Modules\...
0
votes
0answers
14 views

Count Split across Shifts

I have a table which registers orders with a PlanStartTime and PlanEndTime. The customer has three shifts in a day starting from 7 AM - 3 PM, 3 PM - 11 PM, 11 PM - 7 AM (next day) Say an order is ...
0
votes
1answer
36 views

Index Fragmentation - log issues

I have a few questions that I want to understand in order to take informed decision. I am not a DBA by profession, I have done some administrative tasks in the past and now I would have to create a ...
0
votes
0answers
18 views

Source type is -1 in Sql Import Export wizard

I am trying to import/export data from one database in a server to a new table in a different database, using SQL Server import and Export Wizard. (SQL Server Management Studio 2008). I choose "...
0
votes
2answers
95 views

why there is no incremental backup in sql server [closed]

How i can change my database backup type from full backup to incremental backup? Is that possible? Why there is no option for incremental backup type.
0
votes
1answer
41 views

Details of transactions in SQL SERVER 2008 R2

I need following details: Username of the user who initiated the transaction Origin of the query i.e. Whether Query executed in SQL server New Query Interface or Transaction due to editing in Table ...
-1
votes
2answers
37 views

How to get First in and Last out in multiple records with night shift:

We have Date, Time, EmpId, InOut, Shift_Start_Time and Shift_End_Time of an employee. Need your help to write a sql for these conditions: 1.Consider the records which Time is falling between ...
1
vote
1answer
70 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
0answers
305 views

Unable to connect to SQL Server from one machine; “an existing connection was forcably closed by the remote host”

Connecting to the SQL Server (2008 R2 SP3 - KB 4057113) with SSMS version 18 yields: A connection was successfully established with the server, but then an error occurred during the login process. (...
6
votes
2answers
218 views

Optimize/Speedup query

Below query is used for inserting and updating the tables in the SQL Server database. The XQuery is slow while executing in SSMS for first time. Query insert new <ROW> Update BalanceTable set [...
0
votes
1answer
52 views

SQL Server Express 2008R2 - restore db failing due to size limit, but file is under 10GB

I'm trying to restore a live db to a test db, but I keep getting a '..failed because the resulting cumulative db size would exceed...limit of 10240' error, yet my database is under 10GB, I feel like ...
0
votes
0answers
44 views

Can Temporal Tables be implemented in SQL 2008 in a way that can be migrated to SQL 2016?

We have a system that is currently used by customers that have versions of SQL from 2008 R2 all the way to 2019. We want to start introducing, in a limited way, Temporal Tables, even for customers ...
0
votes
4answers
66 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 ...
0
votes
1answer
22 views

How To Grant A User In AD Groups Which Is Denied To DML Commads, To Update On A Spesific Tables

I have a Active Directory user account named SQLQRY in my sql server. SQLQRY is permitted only read data. Those users can use onyl select statement. I need to give just update and delete permission on ...
1
vote
1answer
65 views

Deny All DDL & DML Commands In Sql Server

I want to deny all ddl and dml commands to AD and SQL Server users over all the databases on my database server. How can i do that?
0
votes
1answer
75 views

Stored procedures prefixed with sp_MSdel<TableName>, sp_MSins<TableName>, sp_MSupd<TableName>

I noticed in the database I manage a bunch of stored procedures for delete, insert, update prefixed with sp_MSdel, sp_MSins and sp_MSupd. Does anyone know what tool creates these stored procedures? ...
0
votes
1answer
51 views

why a convert from varchar do date fails on a different row everytime it runs?

I have a database with a field like this (Dont know why it's varchar): 19950105 i'm trying to convert it to DATE as DDMMYYYY. I could do this with: convert(varchar(10), cast(The_ugly_field as ...
0
votes
2answers
32 views

Installation and shell to move physical and logical SQL Server in azure IaaS VM

Firts of all excuse my english is not my primary language. We are creating an azure template to deploy an IaaS machine with disks C and D with windows server, and the idea is also deploy an ...
0
votes
1answer
231 views

UPDATE STATEMENT GETTING STUCK

I am facing a performance issue with an update statement. It takes too long to update, but when I perform a select on that updating table it completes very fast. UPDATE mo SET mo.RNCNEID = ts....
0
votes
1answer
24 views

Was SSRS installed in SharePoint Integrated Mode?

I've inherited an old QA database server with SQL Server 2008R2 (yes, yes, I know it's beyond EOL; there's nothing I can do about it!) and SSRS installed. It's the back end of a SP server on a ...
5
votes
1answer
1k views

SQL Server - Files timestamps unchanged so what is 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. ...
2
votes
0answers
108 views

SQL Server: Read Only replica of production server

I have a production database which is being used by my primary application. Another department has created a new application for which I need to provide subset of my data from my database. The new ...

1
2 3 4 5
75