Quantcast
Channel: SQL Server Database Engine forum
Viewing all 12554 articles
Browse latest View live

How to confirm i need more physical ram on the Sql server box per below findings?

$
0
0

Hello experts,

I have analysed and believe that server seems to be under memory pressure, but would need you're suggestions to confirm the same and some tips that i might be missing:

SQL Server Details: SQL Server 2005 (SP3) 32 bit ( We tried to patch to SP4, but the team ran into some issues, working on it)

Min server memory:0 and Max server memory settings : 10240 MB

Yes, we have AWE enabled, and Lock pages in memory assigned to service account running SQL server.

This is the reporting server used for reporting purposes with transnational replication turned on.

Max database size : 350 GB , total being 450 GB on single instance hosted.

WINDOWS SERVER DETAILS: Windows 2003, Enterprise, Sp2, 32 bit.

Total Physical Memory:     12,286 MB
Available Physical Memory: 423 MB
Page File: Max Size:       37,063 MB
Page File: Available:      25,610 MB
Page File: In Use:         11,453 MB

System Manufacturer:       HP
System Model:              ProLiant DL580 G4
System Type:               X86-based PC
Processor(s):              12 Processor(s) Installed.

As per the monitoring for a week using IDM, we see SQL and OS usage of memory above 98 % throughout the week.

I will try to share the result of DBCC memory status as unable to attach the link:

Please suggest, if there is a way i can fix the memory usage or will have to go with option of requesting more RAM?

Thanks!


best practices to store Landset Data in SQL Server?

$
0
0

hi All,

what is the best practices to store Landset Data in SQL Server? volume of data should grow up to 100 TB

Regards,

Manish

Cannot Open Backup Device Error

$
0
0

Hi DBAs,

I am trying to take backup on network folder but I am getting below error:

Msg 3201, Level 16, State 1, Line 9
Cannot open backup device '\\xyz.xy.z.xy\abcde\xy\xyzarchive_2015_7_14_11_14_58.Diff'. Operating system error 1326(Logon failure: unknown user name or bad password.).
Msg 3013, Level 16, State 1, Line 9
BACKUP DATABASE is terminating abnormally.

NOTE:- The folder abcde is protected by password , When I try to open the \\xyz.xy.z.xy, I provide password to connect.

I am using the below script :

DECLARE @filename VARCHAR(255)
SELECT @filename ='\\xyz.xy.z.xy\abcde\xy\xyzarchive_' + 
  LTRIM(STR(DATEPART(year, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(month, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(day, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(hour, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(minute, GETDATE()))) + '_' +
  LTRIM(STR(DATEPART(second, GETDATE()))) + '.Diff'
backup database xyzarchive 
to disk=@filename
with differential,stats=1

Could anyone suggest me how to troubleshoot / resolve this error permanently??

Thanks in Advance!

Regards,

Yashwant Vishwakarma | SQLOcean.com


Yashwant Vishwakarma | www.sqlocean.com


how to pass .csv file dynamically from a path

$
0
0

hi all,

I have a query to pass .csv file data into sql table using bulkinsert .

i used :

CREATE TABLE #CSVTest
(CouponCode VARCHAR(200))
/* Insertion From csv Source To Table */
BULK
INSERT #CSVTest
FROM 'C:\Apple.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
select * from #CSVTest

This worked very fine to me.

Now, the thing is i should pass the filename as parameter and so that what ever file i specified in execute command , query should take that file and push that file data from .csv file to sql table

please give me any solution.thanx in advance


lucky

SQL Server 2014 (12.0.2000.8) stack dumped Repeatedly

$
0
0

SQL Server had one stack dump at just before 11am yesterday and then multiple repated stack dumps every minute this morning from 01:30am just after the nightly back up and DBCC which had come back clean.

The initial short stack dump was :

2015-07-13 10:55:35.77 spid253     * Short Stack Dump
2015-07-13 10:55:35.80 spid253     000007FD336B7B8C Module(KERNELBASE+0000000000047B8C)
2015-07-13 10:55:35.80 spid253     000007FD22BC26EE Module(sqllang+0000000000EF26EE)
2015-07-13 10:55:35.80 spid253     000007FD22BC62B2 Module(sqllang+0000000000EF62B2)
2015-07-13 10:55:35.81 spid253     000007FD22C075E7 Module(sqllang+0000000000F375E7)
2015-07-13 10:55:35.82 spid253     000007FD20E791D5 Module(sqldk+00000000000591D5)
2015-07-13 10:55:35.82 spid253     000007FD26A1F096 Module(sqlmin+0000000002ADF096)
2015-07-13 10:55:35.82 spid253     000007FD241BA47C Module(sqlmin+000000000027A47C)
2015-07-13 10:55:35.82 spid253     000007FD23FE6F4C Module(sqlmin+00000000000A6F4C)
2015-07-13 10:55:35.82 spid253     000007FD24097717 Module(sqlmin+0000000000157717)
2015-07-13 10:55:35.82 spid253     000007FD240974ED Module(sqlmin+00000000001574ED)
2015-07-13 10:55:35.82 spid253     000007FD23FE7F2C Module(sqlmin+00000000000A7F2C)
2015-07-13 10:55:35.82 spid253     000007FD23FD5471 Module(sqlmin+0000000000095471)
2015-07-13 10:55:35.82 spid253     000007FD23FD5726 Module(sqlmin+0000000000095726)
2015-07-13 10:55:35.82 spid253     000007FD23FD55B6 Module(sqlmin+00000000000955B6)
2015-07-13 10:55:35.82 spid253     000007FD23FC4350 Module(sqlmin+0000000000084350)
2015-07-13 10:55:35.83 spid253     000007FD212F1437 Module(sqlTsEs+0000000000001437)
2015-07-13 10:55:35.83 spid253     000007FD240E0B33 Module(sqlmin+00000000001A0B33)
2015-07-13 10:55:35.83 spid253     000007FD23F7B242 Module(sqlmin+000000000003B242)
2015-07-13 10:55:35.83 spid253     000007FD23F71A40 Module(sqlmin+0000000000031A40)
2015-07-13 10:55:35.83 spid253     000007FD23F7B1D6 Module(sqlmin+000000000003B1D6)
2015-07-13 10:55:35.83 spid253     000007FD23F71A40 Module(sqlmin+0000000000031A40)
2015-07-13 10:55:35.83 spid253     000007FD23F713F8 Module(sqlmin+00000000000313F8)
2015-07-13 10:55:35.83 spid253     000007FD23F712F1 Module(sqlmin+00000000000312F1)
2015-07-13 10:55:35.83 spid253     000007FD23F6D555 Module(sqlmin+000000000002D555)
2015-07-13 10:55:35.83 spid253     000007FD2403E222 Module(sqlmin+00000000000FE222)
2015-07-13 10:55:35.83 spid253     000007FD24033FC2 Module(sqlmin+00000000000F3FC2)
2015-07-13 10:55:35.83 spid253     000007FD2403B1E8 Module(sqlmin+00000000000FB1E8)
2015-07-13 10:55:35.83 spid253     000007FD2403BC3F Module(sqlmin+00000000000FBC3F)
2015-07-13 10:55:35.83 spid253     000007FD20E249D0 Module(sqldk+00000000000049D0)
2015-07-13 10:55:35.83 spid253     000007FD20E247B4 Module(sqldk+00000000000047B4)
2015-07-13 10:55:35.83 spid253     000007FD20E245B6 Module(sqldk+00000000000045B6)
2015-07-13 10:55:35.83 spid253     000007FD20E436FF Module(sqldk+00000000000236FF)
2015-07-13 10:55:35.83 spid253     000007FD20E438F0 Module(sqldk+00000000000238F0)
2015-07-13 10:55:35.83 spid253     000007FD20E43246 Module(sqldk+0000000000023246)
2015-07-13 10:55:35.84 spid253     000007FD20E43558 Module(sqldk+0000000000023558)
2015-07-13 10:55:35.85 spid253     000007FD35CE1842 Module(KERNEL32+0000000000001842)
2015-07-13 10:55:35.85 spid253     000007FD363D02A9 Module(ntdll+00000000000302A9)
2015-07-13 10:55:35.86 spid253     Stack Signature for the dump is 0x000000019E1F4E8F
2015-07-13 10:55:39.61 spid253     External dump process return code 0x20000001.
External dump process returned no errors.

Then the repeated stack dumps were very similar starting with :

2015-07-14 01:32:05.69 spid20s     * Short Stack Dump
2015-07-14 01:32:05.73 spid20s     000007FD336B7B8C Module(KERNELBASE+0000000000047B8C)
2015-07-14 01:32:05.73 spid20s     000007FD22BC26EE Module(sqllang+0000000000EF26EE)
2015-07-14 01:32:05.73 spid20s     000007FD22BC62B2 Module(sqllang+0000000000EF62B2)
2015-07-14 01:32:05.74 spid20s     000007FD2219FBB2 Module(sqllang+00000000004CFBB2)
2015-07-14 01:32:05.74 spid20s     000007FD20E55594 Module(sqldk+0000000000035594)
2015-07-14 01:32:05.75 spid20s     000007FD20E4CA42 Module(sqldk+000000000002CA42)
2015-07-14 01:32:05.76 spid20s     000007FD20E4C8D9 Module(sqldk+000000000002C8D9)
2015-07-14 01:32:05.76 spid20s     000007FD27084D52 Module(sqlmin+0000000003144D52)
2015-07-14 01:32:05.77 spid20s     000007FD241F2C22 Module(sqlmin+00000000002B2C22)
2015-07-14 01:32:05.77 spid20s     000007FD24087575 Module(sqlmin+0000000000147575)
2015-07-14 01:32:05.77 spid20s     000007FD240D9BA7 Module(sqlmin+0000000000199BA7)
2015-07-14 01:32:05.78 spid20s     000007FD241906CB Module(sqlmin+00000000002506CB)
2015-07-14 01:32:05.78 spid20s     000007FD240B7FCB Module(sqlmin+0000000000177FCB)
2015-07-14 01:32:05.78 spid20s     000007FD21F82057 Module(sqllang+00000000002B2057)
2015-07-14 01:32:05.78 spid20s     000007FD21F8ADC7 Module(sqllang+00000000002BADC7)
2015-07-14 01:32:05.78 spid20s     000007FD21F8AB52 Module(sqllang+00000000002BAB52)
2015-07-14 01:32:05.78 spid20s     000007FD21F87964 Module(sqllang+00000000002B7964)
2015-07-14 01:32:05.78 spid20s     000007FD21F876C6 Module(sqllang+00000000002B76C6)
2015-07-14 01:32:05.78 spid20s     000007FD224D9BCD Module(sqllang+0000000000809BCD)
2015-07-14 01:32:05.79 spid20s     000007FD21CD5C5A Module(sqllang+0000000000005C5A)
2015-07-14 01:32:05.79 spid20s     000007FD23F585F3 Module(sqlmin+00000000000185F3)
2015-07-14 01:32:05.79 spid20s     000007FD23F582CA Module(sqlmin+00000000000182CA)
2015-07-14 01:32:05.79 spid20s     000007FD21CD4CDF Module(sqllang+0000000000004CDF)
2015-07-14 01:32:05.79 spid20s     000007FD23F57F75 Module(sqlmin+0000000000017F75)
2015-07-14 01:32:05.79 spid20s     000007FD20E249D0 Module(sqldk+00000000000049D0)
2015-07-14 01:32:05.79 spid20s     000007FD20E247B4 Module(sqldk+00000000000047B4)
2015-07-14 01:32:05.79 spid20s     000007FD20E245B6 Module(sqldk+00000000000045B6)
2015-07-14 01:32:05.79 spid20s     000007FD20E436FF Module(sqldk+00000000000236FF)
2015-07-14 01:32:05.79 spid20s     000007FD20E438F0 Module(sqldk+00000000000238F0)
2015-07-14 01:32:05.79 spid20s     000007FD20E43246 Module(sqldk+0000000000023246)
2015-07-14 01:32:05.81 spid20s     000007FD20E43558 Module(sqldk+0000000000023558)
2015-07-14 01:32:05.83 spid20s     000007FD35CE1842 Module(KERNEL32+0000000000001842)
2015-07-14 01:32:05.83 spid20s     000007FD363D02A9 Module(ntdll+00000000000302A9)
2015-07-14 01:32:05.83 spid20s     Stack Signature for the dump is 0x00000000E345C5B9
2015-07-14 01:32:09.72 spid20s     External dump process return code 0x20000001.
External dump process returned no errors.

The version information is as below from the top of the ERRORLOG, it is running on VMWARE and had been fine for months:

2015-07-01 00:49:56.69 Server      Microsoft SQL Server 2014 - 12.0.2000.8 (X64)
 Feb 20 2014 20:04:26
 Copyright (c) Microsoft Corporation
 Standard Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)

Restarting SQL Server seems to have cleared the issue and all databases return clean from DBCC.I know the first recommendation will be to go to SP1 but just in case there is any similar instance that has occurred elsewhere it would be good to know if that will fix it or if there is some other known issue.

Thanks

Peter Brown

Server Securables by Server

$
0
0

hi, 

In SQL2008R2 you can see all the server securables by right clicking on a server and selecting properties, then Permissions.  

Is there a way to get this list in T-SQL via a dmv or sp? 

Regards




Stored Procedures running slowly when encrypted on new server

$
0
0

Hello,

I have a strange situation when I try to execute the same Stored Procedure on servers with different processors. Both servers are running the SQL SERVER 2008 R2 version with all updates.

All updates bios, disk controller, firmware, were applied on the new server.

New Server: (considerable difference in processing time)
 Stored Procedure without encryption, runs at about 02:16hs
 Stored Procedure with encryption, runs at about 08:00hs
 
Server Processor:
Intel (R) Xeon (R) CPU @ 2.60GHz E5-2697 v3
 
Old Server: (There Are No difference in processing time)
 Stored Procedure without encryption, runs at about 01:00hs
 Stored Procedure with encryption, runs at about 01:00hs
 
Server Processor:
Intel (R) Xeon (R) CPU @ 2.7GHz E5-2697 V2

In terms of configuration, the server 2, have lower technology, lower bus, lower number of processors.

I believe that combination of Hardware/SO/Sql Server has a potential performance loss when running encrypted SP.

Anyone had this problem or may be indicating some related article?

who has changed my recovery model,

$
0
0

Hi

How can I get the information that who has changed my SQL database recovery model ?

Thanks in Advance,

Ashu


Regards, Ashish Tripathi


Database Encryption

$
0
0
I'm a newbie to SQL and I inherited a 2008 R2 Sql server with about 20 different databases on it.  I've noticed that more than half of the databases are encrypted and I was looking to encrypt the rest but for some reason I am unable to do so.  I'm assuming I already have a master key created but when I go to Options of the DB and change Encryption Enabled from False to True I get and error, "Cannot change database encryption state because no database encryption key is set."  Do you know how I could use my existing key to encrypt the databases or would I have to create a separate key for each db?

----E----

SQL 2005 - Can I find a record of stored procedure being called ?

$
0
0

I seem to be able to see where a procedure is being recompiled, but not the actual statement that was executing the procedure.

Note, with 2008 there is a DMV called dm_exec_procedure_stats , which is not present in 2005

USE YourDb; SELECT qt.[text] AS [SP Name], qs.last_execution_time, qs.execution_count AS [Execution Count] FROM sys.dm_exec_query_stats AS qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS qt WHERE qt.dbid = DB_ID() AND objectid = OBJECT_ID('YourProc')

The above shows results that include the CREATE PROCEDURE statements for the procedure in question, but this only indicates that the procedure was being recompiled, not necessarily that it was being executed?


Microsoft SQL Server Error 9001

$
0
0

I have SQL 2012 database on availability group environment

Due to lack of space on SQL log partition. I have added to new hard drive configures on RAID1

Moved the ldf files from active partition to newly created partition.

SMS change the path for log drive to new drive

Restart SQL server services

I cannot connect to databases anymore and I have also lost all setting of Availability group

Error message

 

Event logs for Application

Log Name:      Application
Source:        MSSQLSERVER
Date:          16/07/2015 8:32:22 a.m.
Event ID:      5123
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ***.Local
Description:
CREATE FILE encountered operating system error 3(The system cannot find the path specified.) while attempting to open or create the physical file 'D:\SQL Logs\templog.ldf'.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="MSSQLSERVER" />
    <EventID Qualifiers="49152">5123</EventID>
    <Level>2</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2015-07-15T20:32:22.000000000Z" />
    <EventRecordID>368973</EventRecordID>
    <Channel>Application</Channel>
    <Computer>****.Local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>3(The system cannot find the path specified.)</Data>
    <Data>D:\SQL Logs\templog.ldf</Data>
    <Binary>03140000100000000B0000004E005A00490054005300530051004C0030003400000000000000</Binary>
  </EventData>
</Event>

New location for D:\SQL Logs\templog.ldf is into L:\SQL Logs\templog.ldf


Muhammad Mehdi


Are there any special issues with inistalling MS15-058 ?

$
0
0
I see the MS15-058 security Bulletin was published yesterday. Do you think I should wait another few days to see if there is any issue with it?

SQL Server 2012 EE SP2 [how to autokill sessions that overuse tempdb?]

$
0
0

We have SQL Server 2012 EE SP2 server that is getting hit by reports that time-to-time use up to 300GB of tempdb.
It's happening because our clients can use 'bad' parameters for some reports.
Is there a way to autokill sessions that overuse tempdb (for example, if a session uses more than 15Gb in tempdb)?
Killing can happen immediately or after regular check (5 min for example).
Thank you.



Resource Governer

$
0
0

Hi All,

I want to implement RG in sql 2008 r2 enterprise edition.

Please advice me if I restricted to particular user for memory and particular query of that user need more memory then it would go for doing paging(read the data from disk) or not means disk io occurred or not .

As I know we cant revoke  disk IO for Sql 2008




SQL Server 2005 Backward compatibility component - vulnerability possibilities?

$
0
0
With the April 2016 date approaching for the end of security patches for SQL Server 2005, we did a scan across our network, looking for any SQL 2005 components installed on desktops and servers.  We have found several instances of the SQL Server 2005 Backward compatibility component.  What I am curious about is will there be any vulnerabilities we are opening ourselves up to if we keep this component past the time MS stops patching? 

Using 'dbghelp.dll' version '4.0.5'

$
0
0

Hi,

Does anybody know anything about this log entry?

2014-01-31 12:12:23.47 spid179     Using 'dbghelp.dll' version '4.0.5'

It appears in my ERRORLOG every 5 seconds or so.

Oh, I'm using SQL Server 2008 R2.

Cheers

Paul


Data returns quickly but binding with excel sheet slow

$
0
0

Hi,

  I have stored procedure and used few temp tables inside this sp. It returns data very fast but binding with excel sheet taking more time and some times page can't displayed messages pup-op if multiple session started/ multiple times clicked generate button.

Database server is SQL server 2012.Resource is looking sound.

This query is used for generating reports.

can you please advise what is the issues?

Regards,

Msg 1204, Level 19, State 4, The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time

$
0
0

I just started getting this error on my server. Msg 1204, Level 19, State 4, The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time

The server is running Windows 2012, 12GB, SQL 2014. 8GB is dedicated to SQL.

Any Suggestions?

Thanks



Ken Charles

creating Depricated Feature Usage alert throw error

$
0
0

I'm trying to create alert on depricated feature of ntext, text and image type. it is throwing an error

here is alert script generated by sql server

USE [msdb]
GO
EXEC msdb.dbo.sp_add_alert @name=N'depricated Feature Data types text ntext or image',
        @enabled=1,
        @delay_between_responses=900,
        @include_event_description_in=1,
        @notification_message=N'Data types text ntext or image. Some one just created object with depricated datatype. You are not allowed to use that. For More information contact Tejinder Singh',
        @performance_condition=N'Deprecated Features|Usage|Data types: text ntext or image|>|0',
        @job_id=N'00000000-0000-0000-0000-000000000000'
GO
EXEC msdb.dbo.sp_add_notification @alert_name=N'depricated Feature Data types text ntext or image', @operator_name=N'OtherAlert', @notification_method = 1
GO

here is error i'm receiving

Msg 14507, Level 16, State 1, Procedure sp_verify_performance_condition, Line 43
A performance condition must be formatted as: 'object_name|counter_name|instance_name|comparator(> or < or =)|numeric value'.
Msg 14262, Level 16, State 1, Procedure sp_verify_notification, Line 36
The specified @alert_name ('depricated Feature Data types text ntext or image') does not exist.

Compression forecasting.

$
0
0

Hi, quick question guys…

I was given a server, with 5 databases, 250GB each database… All sort of different information in-there…

Here is my question; it’s a sql 2014; I was asked to calculate/forecast how much space would we save with compression… they wanted to do page compression; as the server is used by  just 3,4 for users; and their main concern is to save space, not performance.

How can I accomplish this? I don’t want to go index by index calculating this… any thoughts?

Viewing all 12554 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>