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

Server hangs

$
0
0

i had installed IIS 7.5  & SQL Server 2008 Std on Windows server 2008 R2 Std. over IBM Quad Core server with 12 GB RAM

the application is accessed from 18 locations over intranet wan and over 100 simultaneous connections are there. 

the application runs smoothly and is very fast responding initially. but over time, the memory used by the server increases and ultimately IIS hangs

while checking the perfmon, the memory used by IIS and SQL shows only around 300 - 900 MB.

At first we restart the server, but now after restarting the SQL Server releases the memory from 11.8 GB to 5 GB.

 I had checked several forums of both IIS and SQL Server and did all the suggestions in IIS and SQL server. but the problem persists

The server hangs once per day. after releasing the memory, the server works very well.

while checking , we found that memory increases when there are lot of client connection

Stack Dump every time reboot server; 100% CPU consistant; SQL Server 2008 SP1

$
0
0

Dump files show various SQL stmts at time of Stack Dump.  Different one each time boot server.  Sometimes get  error messages about failed to open, but not consistent.  EXCEPTION_ACCESS_VIOLATION seems consistent but nothing specific.  CPU stays at 100% most of time, unknown cause.  Trace shows no locks on objects....

5 snapshots from 5 different days of log file at "Stack Dump" error are below.

 

2012-08-23 15:37:24.62 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database. [CLIENT: 10.101.1.10]
2012-08-23 15:37:24.67 Logon       Error: 18456, Severity: 14, State: 38.
2012-08-23 15:37:24.67 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database. [CLIENT: 10.101.1.10]
2012-08-23 15:37:25.51 spid53      Using 'xpstar.dll' version '2007.100.1600' to execute extended stored procedure 'xp_regread'. This is an informational message only; no user action is required.
2012-08-23 15:37:25.75 spid17s     Recovery is writing a checkpoint in database 'PLCData' (22). This is an informational message only. No user action is required.
2012-08-23 15:37:25.93 spid17s     CHECKDB for database 'PLCData' finished without errors on 2012-08-23 01:41:17.800 (local time). This is an informational message only; no user action is required.
2012-08-23 15:37:26.18 spid7s      Recovery is complete. This is an informational message only. No user action is required.
2012-08-23 15:37:27.52 spid52      Using 'dbghelp.dll' version '4.0.5'
2012-08-23 15:37:27.55 spid52      ***Stack Dump being sent to D:\Program Files (x86)\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\LOG\SQLDump0001.txt
2012-08-23 15:37:27.55 spid52      SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2012-08-23 15:37:27.55 spid52      * *******************************************************************************
2012-08-23 15:37:27.55 spid52      *
2012-08-23 15:37:27.55 spid52      * BEGIN STACK DUMP:
2012-08-23 15:37:27.55 spid52      *   08/23/12 15:37:27 spid 52
2012-08-23 15:37:27.55 spid52      *
2012-08-23 15:37:27.55 spid52      *
2012-08-23 15:37:27.55 spid52      *   Exception Address = 1006A18E Module(aahOleDB+0006A18E)
2012-08-23 15:37:27.55 spid52      *   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
2012-08-23 15:37:27.55 spid52      *   Access Violation occurred reading address 000000B4
2012-08-23 15:37:27.55 spid52      * Input Buffer 510 bytes -
2012-08-23 15:37:27.55 spid52      *             SELECT aaT=DateTime, aaN=TagName, aaDV=Value, aaSV=CONVERT(nv
2012-08-23 15:37:27.55 spid52      *  archar(512),vValue), aaQ=OPCQuality, aaIQ=Quality, aaQD=QualityDetail, a
2012-08-23 15:37:27.55 spid52      *  aS=0   FROM History     WHERE TagName IN ('L1-Sheet Temp-AVG-Sealdown  A
2012-08-23 15:37:27.55 spid52      *  pplicator') AND DateTime>='20120823 18:37:23.588' AND DateTime<='2012082
2012-08-23 15:37:27.55 spid52      *  3 20:37:23.588' AND wwRetrievalMode='BestFit' AND wwVersion='Latest' AND
2012-08-23 15:37:27.55 spid52      *   wwResolution=28191 AND wwTimeZone='UTC' UNION SELECT aaT=Dateadd(mi, 30
2012-08-23 15:37:27.55 spid52      *  0, DateTime), aaN=TagName, aaDV=Value, aaSV=CONVERT(nvarchar(512),Value)
2012-08-23 15:37:27.55 spid52      *  , aaQ=CASE Quality WHEN 1 THEN 0 WHEN 16 THEN 64 WHEN 133 THEN 192 WHEN
2012-08-23 15:37:27.55 spid52      *  0 THEN 192 ELSE 64 END, aaIQ=Quality, aaQD=QualityDetail, aaS=1 FROM Man
2012-08-23 15:37:27.55 spid52      *  ualAnalogHistory WHERE TagName IN ('L1-Sheet Temp-AVG-Sealdown  Applicat
2012-08-23 15:37:27.55 spid52      *  or') AND DateTime>='20120823 13:37:23.588' AND DateTime<='20120823 15:37
2012-08-23 15:37:27.55 spid52      *  :23.588' ORDER BY aaT
2012-08-23 15:37:27.55 spid52      * 
2012-08-23 15

*******************************************************************************************************

2012-09-27 08:01:34.07 spid66      Setting database option COMPATIBILITY_LEVEL to 100 for database ReportServer.
2012-09-27 08:01:34.10 spid66      Setting database option COMPATIBILITY_LEVEL to 100 for database ReportServerTempDB.
2012-09-27 08:01:50.88 spid76      Open of fault log D:\Program Files (x86)\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\log\exception.log failed.
2012-09-27 08:01:50.95 spid76      Using 'dbghelp.dll' version '4.0.5'
2012-09-27 08:01:51.08 spid76      ***Stack Dump being sent to D:\Program Files (x86)\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\LOG\SQLDump0059.txt
2012-09-27 08:01:51.08 spid76      SqlDumpExceptionHandler: Process 76 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2012-09-27 08:01:51.08 spid76      * *******************************************************************************
2012-09-27 08:01:51.08 spid76      *
2012-09-27 08:01:51.08 spid76      * BEGIN STACK DUMP:
2012-09-27 08:01:51.08 spid76      *   09/27/12 08:01:51 spid 76
2012-09-27 08:01:51.08 spid76      *
2012-09-27 08:01:51.08 spid76      *
2012-09-27 08:01:51.08 spid76      *   Exception Address = 1006A18E Module(aahOleDB+0006A18E)
2012-09-27 08:01:51.08 spid76      *   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
2012-09-27 08:01:51.08 spid76      *   Access Violation occurred reading address 000000B4
2012-09-27 08:01:51.08 spid76      * Input Buffer 510 bytes -
2012-09-27 08:01:51.08 spid76      *             SELECT aaT=DateTime, aaN=TagName, aaDV=Value, aaSV=CONVERT(nv
2012-09-27 08:01:51.08 spid76      *  archar(512),vValue), aaQ=OPCQuality, aaIQ=Quality, aaQD=QualityDetail, a
2012-09-27 08:01:51.08 spid76      *  aS=0   FROM History     WHERE TagName IN ('L1-LineSpeed') AND DateTime>=
2012-09-27 08:01:51.08 spid76      *  '20120927 00:49:47.966' AND DateTime<='20120927 12:49:47.966' AND wwRetr
2012-09-27 08:01:51.08 spid76      *  ievalMode='BestFit' AND wwVersion='Latest' AND wwResolution=165138 AND w
2012-09-27 08:01:51.08 spid76      *  wTimeZone='UTC'
2012-09-27 08:01:51.08 spid76      * 
2012-09-27 08:01:51.08 spid76      *
2012-09-27 08:01:51.08 spid76      *  MODULE                          BASE      END       SIZE
2012-09-27 08:01:51.08 spid76      * sqlservr                       00AB0000  0341FFFF  02970000
2012-09-27 08:01:51.08 spid76      * ntdll                          76F40000  7709FFFF  00160000
2012-09-27 08:01:51.08 spid76      * kernel32                       76880000  7698FFFF  00110000
2012-09-27 08:01:51.08 spid76      * MSVCR80                        73020000  730BAFFF  0009b000
2012-09-27 08:01:51.08 spid76      * msvcrt                         75050000  750F9FFF  000aa000
2012-09-27 08:01:51.08 spid76      * MSVCP80                        72DF0000  72E76FFF  00087000
2012-09-27 08:01:51.08 spid76      * ADVAPI32                       769C0000  76A85FFF  000c6000
2012-09-27 08:01:51.08 spid76      * RPCRT4                         75940000  75A2FFFF  000f0000
2012-09-27 08:01:51.09 spid76      * Secur32                        74F00000  74F5FFFF  00060000
2012-09-27 08:01:51.09 spid76      * sqlos                          72F50000  72F55FFF  00006000

*******************************************************************************************************

2012-11-08 13:00:04.75 spid23s     CHECKDB for database 'PLCData' finished without errors on 2012-11-08 01:40:30.580 (local time). This is an informational message only; no user action is required.
2012-11-08 13:00:04.78 spid6s      Recovery is complete. This is an informational message only. No user action is required.
2012-11-08 13:00:06.59 spid54      Attempting to load library 'xpsqlbot.dll' into memory. This is an informational message only. No user action is required.
2012-11-08 13:00:06.62 spid54      Using 'xpsqlbot.dll' version '2007.100.1600' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
2012-11-08 13:00:07.11 spid54      Attempting to load library 'xpstar.dll' into memory. This is an informational message only. No user action is required.
2012-11-08 13:00:07.18 spid54      Using 'xpstar.dll' version '2007.100.1600' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.
2012-11-08 13:00:07.49 spid54      Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
2012-11-08 13:00:07.72 spid54      Using 'xplog70.dll' version '2007.100.1600' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
2012-11-08 13:00:09.12 spid60      Using 'dbghelp.dll' version '4.0.5'
2012-11-08 13:00:09.49 spid60      ***Stack Dump being sent to D:\Program Files (x86)\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\LOG\SQLDump0139.txt
2012-11-08 13:00:09.49 spid60      SqlDumpExceptionHandler: Process 60 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2012-11-08 13:00:09.49 spid60      * *******************************************************************************
2012-11-08 13:00:09.49 spid60      *
2012-11-08 13:00:09.49 spid60      * BEGIN STACK DUMP:
2012-11-08 13:00:09.49 spid60      *   11/08/12 13:00:09 spid 60
2012-11-08 13:00:09.49 spid60      *
2012-11-08 13:00:09.49 spid60      *
2012-11-08 13:00:09.49 spid60      *   Exception Address = 1006A18E Module(aahOleDB+0006A18E)
2012-11-08 13:00:09.49 spid60      *   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
2012-11-08 13:00:09.49 spid60      *   Access Violation occurred reading address 000000B4
2012-11-08 13:00:09.49 spid60      * Input Buffer 416 bytes -
2012-11-08 13:00:09.49 spid60      *  select datetime,value from insql.runtime.dbo.analoghistory where tagname
2012-11-08 13:00:09.49 spid60      *  ='L3-LineSpeed' and datetime >= '11/08/2012 12:33:22' and datetime <= '1
2012-11-08 13:00:09.49 spid60      *  1/08/2012 13:00:08' and wwresolution=60000 and value is not null
2012-11-08 13:00:09.49 spid60      * 
2012-11-08 13:00:09.49 spid60      *
2012-11-08 13:00:09.49 spid60      *  MODULE                          BASE      END       SIZE
2012-11-08 13:00:09.49 spid60      * sqlservr                       00410000  02D7FFFF  02970000
2012-11-08 13:00:09.49 spid60      * ntdll                          76FD0000  7712FFFF  00160000
2012-11-08 13:00:09.49 spid60      * kernel32                       750C0000  751CFFFF  00110000
2012-11-08 13:00:09.49 spid60      * MSVCR80                        73170000  7320AFFF  0009b000
2012-11-08 13:00:09.49 spid60      * msvcrt                         76710000  767B9FFF  000aa000
2012-11-08 13:00:09.49 spid60      * MSVCP80                        72F40000  72FC6FFF  00087000
2012-11-08 13:00:09.49 spid60      * ADVAPI32                       76610000  766D5FFF  000c6000
2012-11-08 13:00:09.49 spid60      * RPCRT4                         751D0000  752BFFFF  000f0000
2012-11-08 13:00:09.49 spid60      * Secur32                        74F90000  74FEFFFF  00060000
2012-11-08 13:00:09.49 spid60      * sqlos                          73090000  73095FFF  00006000
2012-11-08 13:00:09.49 spid60      * pdh                            72500000  7253DFFF  0003e000
2012-11-08 13:00:09.49 spid60      * SHLWAPI                        753F0000  75448FFF  00059000
2012-11-08 13:00:09.49 spid60      * GDI32                          752C0000  7534FFFF  00090000
2012-11-08 13:00:09.49 spid60      * USER32                         76B40000  76C0FFFF  000d0000
2012-11-08 13:00:09.49 spid60      * USERENV                        74EE0000  74EFDFFF  0001e000
2012-11-08 13:00:09.49 spid60      * WINMM                          724C0000  724F1FFF  00032000
2012-11-08 13:00:09.49 spid60      * ole32                          76820000  76964FFF  00145000
2012-11-08 13:00:09.49 spid60      * OLEAUT32                       76350000  763DCFFF  0008d000
2012-11-08 13:00:09.49 spid60      * OLEACC                         72480000  724BDFFF  0003e000
2012-11-08 13:00:09.49 spid60      * opends60                       73070000  73076FFF  00007000
2012-11-08 13:00:09.49 spid60      * NETAPI32                       74970000  749E5FFF  00076000

*************************************************************************************

2012-12-02 03:06:40.81 spid52      Setting database option COMPATIBILITY_LEVEL to 100 for database ReportServer.
2012-12-02 03:06:40.86 spid52      Setting database option COMPATIBILITY_LEVEL to 100 for database ReportServerTempDB.
2012-12-02 03:06:51.38 spid65      Using 'dbghelp.dll' version '4.0.5'
2012-12-02 03:06:51.68 spid65      ***Stack Dump being sent to D:\Program Files (x86)\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\LOG\SQLDump0155.txt
2012-12-02 03:06:51.68 spid65      SqlDumpExceptionHandler: Process 65 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2012-12-02 03:06:51.68 spid65      * *******************************************************************************
2012-12-02 03:06:51.68 spid65      *
2012-12-02 03:06:51.68 spid65      * BEGIN STACK DUMP:
2012-12-02 03:06:51.68 spid65      *   12/02/12 03:06:51 spid 65
2012-12-02 03:06:51.68 spid65      *
2012-12-02 03:06:51.68 spid65      *
2012-12-02 03:06:51.68 spid65      *   Exception Address = 1006A18E Module(aahOleDB+0006A18E)
2012-12-02 03:06:51.68 spid65      *   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
2012-12-02 03:06:51.68 spid65      *   Access Violation occurred reading address 000000B4
2012-12-02 03:06:51.68 spid65      * Input Buffer 510 bytes -
2012-12-02 03:06:51.68 spid65      *             SELECT aaT=DateTime, aaN=TagName, aaDV=Value, aaSV=CONVERT(nv
2012-12-02 03:06:51.68 spid65      *  archar(512),vValue), aaQ=OPCQuality, aaIQ=Quality, aaQD=QualityDetail, a
2012-12-02 03:06:51.68 spid65      *  aS=0   FROM History     WHERE TagName IN ('Tank-003-Radar-Level','Tank-0
2012-12-02 03:06:51.68 spid65      *  04-Radar-Level','L1-LineSpeed') AND DateTime>='20121202 05:06:51.242' AN
2012-12-02 03:06:51.68 spid65      *  D DateTime<='20121202 09:06:51.242' AND wwRetrievalMode='BestFit' AND ww
2012-12-02 03:06:51.68 spid65      *  Version='Latest' AND wwResolution=63100 AND wwTimeZone='UTC'
2012-12-02 03:06:51.68 spid65      * 
2012-12-02 03:06:51.68 spid65      *
2012-12-02 03:06:51.68 spid65      *  MODULE                          BASE      END       SIZE
2012-12-02 03:06:51.68 spid65      * sqlservr                       00D30000  0369FFFF  02970000
2012-12-02 03:06:51.68 spid65      * ntdll                          770C0000  7721FFFF  00160000
2012-12-02 03:06:51.68 spid65      * kernel32                       75160000  7526FFFF  00110000
2012-12-02 03:06:51.68 spid65      * MSVCR80                        731A0000  7323AFFF  0009b000
2012-12-02 03:06:51.68 spid65      * msvcrt                         75500000  755A9FFF  000aa000
2012-12-02 03:06:51.68 spid65      * MSVCP80                        72F70000  72FF6FFF  00087000
2012-12-02 03:06:51.68 spid65      * ADVAPI32                       756F0000  757B5FFF  000c6000
2012-12-02 03:06:51.68 spid65      * RPCRT4                         75DB0000  75E9FFFF  000f0000
2012-12-02 03:06:51.68 spid65      * Secur32                        75080000  750DFFFF  00060000
2012-12-02 03:06:51.68 spid65      * sqlos                          730D0000  730D5FFF  00006000

***********************************************

2012-12-04 10:02:01.54 spid60      Setting database option COMPATIBILITY_LEVEL to 100 for database ReportServer.
2012-12-04 10:02:01.57 spid60      Setting database option COMPATIBILITY_LEVEL to 100 for database ReportServerTempDB.
2012-12-04 10:02:04.87 spid65      Using 'dbghelp.dll' version '4.0.5'
2012-12-04 10:02:05.23 spid65      ***Stack Dump being sent to D:\Program Files (x86)\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\LOG\SQLDump0238.txt
2012-12-04 10:02:05.23 spid65      SqlDumpExceptionHandler: Process 65 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2012-12-04 10:02:05.23 spid65      * *******************************************************************************
2012-12-04 10:02:05.23 spid65      *
2012-12-04 10:02:05.23 spid65      * BEGIN STACK DUMP:
2012-12-04 10:02:05.23 spid65      *   12/04/12 10:02:05 spid 65
2012-12-04 10:02:05.23 spid65      *
2012-12-04 10:02:05.23 spid65      *
2012-12-04 10:02:05.23 spid65      *   Exception Address = 1006A18E Module(aahOleDB+0006A18E)
2012-12-04 10:02:05.23 spid65      *   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
2012-12-04 10:02:05.23 spid65      *   Access Violation occurred reading address 000000B4
2012-12-04 10:02:05.23 spid65      * Input Buffer 412 bytes -
2012-12-04 10:02:05.23 spid65      *             select top 15 Value, TagName, DateTime from analoghistory  wh
2012-12-04 10:02:05.23 spid65      *  ere tagname = 'CVM-001-InletQuench-Temperature'  and datetime > '2012-12
2012-12-04 10:02:05.23 spid65      *  -04 09:15:00.000'  and wwresolution = 60000  order by datetime
2012-12-04 10:02:05.23 spid65      * 
2012-12-04 10:02:05.23 spid65      *
2012-12-04 10:02:05.23 spid65      *  MODULE                          BASE      END       SIZE
2012-12-04 10:02:05.23 spid65      * sqlservr                       00860000  031CFFFF  02970000
2012-12-04 10:02:05.23 spid65      * ntdll                          77030000  7718FFFF  00160000
2012-12-04 10:02:05.23 spid65      * kernel32                       75470000  7557FFFF  00110000
2012-12-04 10:02:05.23 spid65      * MSVCR80                        731D0000  7326AFFF  0009b000
2012-12-04 10:02:05.23 spid65      * msvcrt                         76140000  761E9FFF  000aa000
2012-12-04 10:02:05.23 spid65      * MSVCP80                        72FA0000  73026FFF  00087000
2012-12-04 10:02:05.23 spid65      * ADVAPI32                    

Job History Retention

$
0
0

Hello All,

I have 34 jobs on my sql server production environment. Some of them run almost once every 10 mins. The issue is I am only able to hold only one entry in the jobhistory for any job (whether the schedule is a day, month, minute). How can I increase this to hold a history of upto one week.

The current history settings in the agent are

Maximum job history log size(in rows): 1000

Maximum job history rows per job: 100

Thanks for you help.

Capacity issue

$
0
0

Hope I am on the correct forum for this:

I am working for a small IT company and we have two virtual servers (Windows Server 2008) with SQL databases on them. I am a bit of a novice when it comes to server capacity so I would like to know how many databases each can take before it gets overloaded.

The first server has:
  • 4 GB RAM
  • AMD OPTERON 2.10 GHZ processor
  • SQL Server 2008
  • 100 databases (some are not used). The DB's in total size are 9 GB. They have been in existence for about a year.
  • 70 sites on IIS.
  • 10 GB free of 100 GB hard drive (this is rather worrying but I think this is because there is no recycle bin present; I will have to resolve this).

The second server has:
  • 8 GB RAM
  • AMD OPTERON 2.20 GHZ processor.
  • SQL SERVER 2008 R2
  • 70 databases (some are not used).The DB's in total size are 7 GB); one is one GB, 4 others are 0.5 GB each.
  • 40 sites on IIS
  • 25 GB free of 100 GB

I'm probably giving a bit too much information there but just a rough idea from someone who knows about these issues would be appreciated. Thanks.

Nightly Backup failing on only 2 databases - But backup when run manually

$
0
0

Hello,

On our nightly maintence backup of our SharePoint 2010 server, two databases fail with the following errors. Indicates that the error is disk space but that is not the issue. All other databases backup except for these two?

1.

Executing the query "BACKUP DATABASE [SharedServices1_UserProfile_fc126..." failed with the following error: "A nonrecoverable I/O error occurred on file "E:\\MSSQL10.MSSQLSERVER\\MSSQL\\Backup\\SharedServices1_UserProfile_fc12628a901646e1a26dfc4732ab09a7\\SharedServices1_UserProfile_fc12628a901646e1a26dfc4732ab09a7_backup_2012_12_04_210024_2481077.bak:" 112(There is not enough space on the disk.).

BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

2.

Executing the query "BACKUP DATABASE [WSS_UsageApplication] TO  DISK = ..." failed with the following error: "A nonrecoverable I/O error occurred on file "E:\\MSSQL10.MSSQLSERVER\\MSSQL\\Backup\\WSS_UsageApplication\\WSS_UsageApplication_backup_2012_12_04_210024_2070905.bak:" 112(There is not enough space on the disk.).

BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Thank you,


Andrea Kelley

Version of sql server

$
0
0
I have an issue identifying the version of software that was installed on my production server. When I run 
select @@version


I get the following output:
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)   Jun 17 2011 00:54:03   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) 

But what I really want to know is was this a direct sqlserver 2008 r2 sp1 install or a sql server 2008 r2 install first and then an upgrade to SP1

DB Maintenance Plan - Optimization

$
0
0

The following is the DB Maintenance Plan and the configurations provided the production environment:

Reorganize data and index page (selected)
Change free space per page percentage to: 10% 
Remove unused space from database files
Shrink database when it grows beyong: 50 mb
Amount of free space to remain after shrink : 10% of the data space.
Schedule : Occurs every 1 week on Sunday 01 am

The above confguration done for few databases in the production env. The datafile and log files spread across Drive D and E.

When the job runs, it consumes a lot of space - which leads the Drive D and E - Space outage occurs.

The Drive D has 7 gb and E has 6 gd free space. The DB size is 24 gb.

Why this much of space 7 + 6 = 13 gb of space during the optimization job is running.

During this scenario all the other web application halt and lead to a critical state.

It error shows that "the xxxdb log is full and need to take the trn backup".

Then i have scheduled the log backup before this job starts.

Even then also the problem exists.

Techies, need your suggestion to resolve this issue. Please help. Thanks


MRVSFLY

Index Size - SQL Srvr 2000

$
0
0

Hi Techies,

How to check SIZE of the Index for a particuklar database in SQL Server 2000. Need a SQL Query.


MRVSFLY


SQL Server not using enough memory

$
0
0

Hi,

I have a machine running SQL Server 2008 R2 on Windows Server 2008 Enterprise R2 (64 bit).  The server has 30GB RAM, with SQL Server max memory set at 24GB and min memory at 0.  Whatever demands are placed on the server, total server memory does not rise further than 9GB, even though CPU and page life expectancy both appear to be suffering as a result. 

SQL Server is the only major process running on the server.  Neither task manager nor process explorer reveal any other major processes, but task manager shows 29.8 GB physical memory usage.

Is there anything further at the OS or SQL Server configuration level that I should do to prompt it to use more memory?

Any help greatly appreciated,

Ed.


EDIT:  Setting min server memory above 9GB has no effect.

Resource Governer

$
0
0

SQL Server 2008 R2 - Windows 2008 R2.

I am little bit confused by resource governer. Is this tool used to limit the resources or increase the resources ?. I am trying to give an instance on the server at least 20% CPU and 100% max if it needs it so that other processes form other instances do not cause time out errors on this particular instance. Is this the best tool to use or should I go with CPU Affinity Masks ?

We also want to assign 20% CPU to a Analysis Services. Is this possible (Other than Windows Task Manager and Windows System Resource governer) ?

Thank you.

SQL Disk Dependency problem on SQL 2008 cluster including errors

$
0
0

Hi All,

I have a SQL 2008 cluster running with 2 nodes, and what I have recently noticed is that a snapshot creation code has been failing. I checked the cluster dependency property on the SQL instance

and I noticed that the dependency wasn’t set on the backup drive, I took SQL offline, set the dependency and then brought it back online and yet the create snapshot code doesn’t work.

Please note that the drive is a mount point.

Any ideas please

CREATE DATABASE [DBNAME] ON (NAME = [DBNAME], FILENAME = 'X:\BackupMount\Snapshot\DBNAME_Snapshot.ss') AS SNAPSHOT OF [DBNAME]; Msg 5184, Level 16, State 2, Line 1 Cannot use file 'X:\BackupMount\Snapshot\DBNAME_Snapshot.ss' for clustered server. Only

on formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource of the Sql Server does not have a dependency on it.

Error


Msg 5184,Level 16,State 2, Line 1

Cannot

usefile'X:\BackupMount\Snapshot\DBNAME_Snapshot.ss'forclusteredserver. Only formatted files on which the clusterresourceof theserver has a dependency can be used. Either the diskresource containing thefileisnot presentin the clustergroupor the clusterresourceof theSqlServer doesnot have a dependencyon it.

Lock Release in SQL Server

$
0
0

Hi All,

In one transaction(Thread) i am performing one update and multiple deletes on a table,

From other transaction(Thread) i am firing select query on the above table before committing above transaction.

The lock on the above rows or table releasing and returning 0 rows.

Can you please tell me why and when this thing will happen?

Thanks,

Brahma.


SSPI Question

$
0
0
I have a laptop computer when I'm at work everything works fine.  If I connect offsite through VPN with the same computer I get a Cannot Generate SSPI Context Error when trying to connect with SQL Server Management Studio.   Any idea how I can fix this?

Linked server(Oracle) problem "Access to the remote server is denied because the current security context is not trusted."

$
0
0

Hi, I have a stored procedure on my sql server that uses a linked server to select data from an oracle database and inserts to a temp table on sql server.

When I create a job to exec the sp I get this error....

Access to the remote server is denied because the current security context is not trusted. [SQLSTATE 42000] (Error 15274).

When the stored procedure is executed in management studio there is no problem.

TIA

sql2008r2

oracle 10g

SPID 75: transaction rollback in progress. Estimated rollback completion: 0%. Estimated time remaining: 0 seconds.

$
0
0

Hi Experts, I am facing an issue after killing a spid which was actually hanged in a job, job was calling a stored procedure to read the sql server log and to send it via email.

here is the stored procedure code

ALTER procedure [Error_log_Reader]
(@noofhours smallint)
As
Begin
set nocount on
Declare @errorlog table
(logdate datetime, Processinfo varchar(15), errormessage varchar(max))
declare @starttime datetime
declare @endtime datetime
set @starttime = (select  DATEADD(hh, -@noofhours, GETDATE()))
set @endtime = (select  GETDATE())
insert into @errorlog
EXEC master.dbo.xp_readerrorlog 0, 1, 'Not',null , @starttime, @endtime 
insert into @errorlog
EXEC master.dbo.xp_readerrorlog 0, 1, 'Error',null , @starttime, @endtime 
insert into @errorlog
EXEC master.dbo.xp_readerrorlog 0, 1, 'Failed',null , @starttime, @endtime 
--- checking whethere any error is there in the log
declare @errorcount smallint
set @errorcount  = 0
set @errorcount = (select COUNT(*) From @errorlog)
---- if there are errors, sending the email to dba
if @errorcount > 0 
begin
--- then it will send me the email----
end
End

It was working fine but today i got a CPU usage alert and i found that this job got hanged, i located the spid and killed but now it is in

waiting mode "lastwaittype" is msql_xp and the "waittime" is increasing in the sysprocesses view. Re-execution of kill process shows

transaction rollback in progress, estimated rollback completion 0%.

The instance is SQL SERVER 2005 SP1.

Please review the above code and if there is any bug in the code please identify. if there is any solution for getting rid of msql_xp wait without serive bouncing please share. Thanks







Clustered Index Update or Insert Expensive Query Plan Operator

$
0
0

Hi Everyone,

I'm in the process of analyzing a sql 2008 database for performance reasons. I have discovered a significant number of DML query plans that seem to show a high operator cost for 'Clustered Index Update' as well for plans that have a 'Clustered Index Insert' operator. By high I mean the operator cost shows one for example of having an estimated cost of 0.030003 (912%). Is this something that I should be concerned about? I'm going to soon (hopefully this week) run 'SET STATISTICS PROFILE ON' to see if that helps explain what might be going on. This particular table's row count is approx 50K. The table has one clustered index on a uniqueidentifier (Random) and one unique non clustered index on a FK column which points to a table that has a row count of approx 260K. There is also a FK to another table with 24 million rows. Most other tables have a similar physical design (PK clustered on random uniqueidentifer surrogate column. FK to this other table with 24 million rows). The system is a OLTP system and is more read intensive than write intensive. About 5 users with write capability in the system at a time. About 10-15 users with read ability active at the same time. Some reports are written against this database.

The update statement does not attempt to update the clustered key column. It's possible it could update the non clustered key column though that typically never changes.

I could try to post the show query plan XML if needed if I can get it to fit into this thread.

Thank You.

Morgan

Blocking Alert WMI Property Details

$
0
0

I have a created a blocking alert.  It works, but I'm very fuzzy about the WMI properties.  I use the (WMI(property)) token to get the property values, but I am unsure of what I'm getting.  I would appreciate any advice on any of these questions.  Sorry about being so verbose. 

1) Are the WMI tokens textual representations of the values?  For example, the SPID value is listed as Sint32 in the documentation.  Is it actually an INT that I can use in T-SQL?  Or is it a string representation of the INT that must be quoted and converted to the type listed? 

2) Should I be using N'$(ESCAPE_SQUOTE(WMI(property)))' for all WMI properties I use? 

http://msdn.microsoft.com/en-US/library/ms180522(v=sql.90).aspx lists the inherited and event properties.  It appears to me that the inherited properties can relate to the event, but some are for the process handling the event.  For example, the DatabaseId is that in which the blocking exists.  However, the SPID value is always 8 which appears to be the process handling the event.  

3) Is there any documentation with detail other than a type for these properties?  Which should be ignored in general? 

I noticed that the inherited values for LoginSid and SessionLoginName are blank.  I don't know if I am getting them incorrectly or if they don't have any values in this case. 

4) Quoting a Uint8[] array?  Does this convert?

I can get an object name for the ObjectId for the DatabaseId sometimes.  However, I have cases where the ObjectId is 1050 and the IndexId is 256.  

5) How does one use the ObjectId when the IndexId is non-zero? 

I use an alert with a WMI query.  The where clause on the duration prevents multiple alerts from the same blocked process.  The duration is limited to twice the blocking threshold.  However, once in a while, the alert is not detected within this duration.  I'm thinking I can set the query to allow durations several times the threshold value and then check for duplicates. 

6) Can the TransactionId value be used to detect prior alerts from the same blocked process?  (I have a separate process that handles blocking status and recovery notices.)

DECLARE @AlertId int;

INSERT INTO alert.BlockingEvents (
 [LoginSid], -- Uint8[]
 [PostTime], -- DateTime
 [SQLInstance], -- String
 [IsSystem], -- Sint32
 [DatabaseId], -- Sint32
 [ComputerName], -- String
 [SessionLoginName], -- String
 [SPID], -- Sint32
 [TransactionID], -- Sint64
 [EventSequence], -- Sint32
 [IndexID] , -- Sint32
 [ObjectID], -- Sint32
 [TextData], -- String
 [Endtime], -- DateTime
 [Duration], -- Sint64
 [Mode] -- Sint32
)
VALUES (
 N'$(ESCAPE_NONE(WMI(LoginSid)))',
 N'$(ESCAPE_NONE(WMI(PostTime)))',
 N'$(ESCAPE_NONE(WMI(SQLInstance)))',
 N'$(ESCAPE_NONE(WMI(IsSystem)))',
 N'$(ESCAPE_NONE(WMI(DatabaseId)))',
 N'$(ESCAPE_NONE(WMI(ComputerName)))',
 N'$(ESCAPE_NONE(WMI(SessionLoginName)))',
 N'$(ESCAPE_NONE(WMI(SPID)))',
 N'$(ESCAPE_NONE(WMI(TransactionID)))',
 N'$(ESCAPE_NONE(WMI(EventSequence)))',
 N'$(ESCAPE_NONE(WMI(IndexId)))',
 N'$(ESCAPE_NONE(WMI(ObjectId)))',
 N'$(ESCAPE_SQUOTE(WMI(TextData)))',
 N'$(ESCAPE_NONE(WMI(EndTime)))',
 N'$(ESCAPE_NONE(WMI(Duration)))',
 N'$(ESCAPE_NONE(WMI(Mode)))'
)

SET @AlertId = SCOPE_IDENTITY();

EXECUTE alert.prBlockingMail
 @AlertId=@AlertId,
 @emailTo='dbas@xxx.yyy',
 @verbose=1

Thanks


Randy in Marin

SQL Server Memory Problem

$
0
0

Hi,

I had come across an issue recently where the SQL server 2008 instance stopped accepting any connections and became unresponsive. I had to restart the SQL server to bring it back.

The bellow error is logged in SQL log. 

Error:

--------------------------------------------------------------------------------------------------------------------------------------

AppDomain 2 (database.dbo[runtime].1) created.

Unsafe assembly 'tldbwin32clientmanagedinterface, version=0.0.0.0, culture=neutral, publickeytoken=null, processorarchitecture=msil' loaded into appdomain 2 (database.dbo[runtime].1).

Failed Virtual Allocate Bytes: FAIL_VIRTUAL_RESERVE 1048576

-------------------------------------------------------------------------------------------------------------------------------------

What does this error mean and how this can be addressed? 

Any help on this appreciated. 

Thanks,

Vipin

sql database backup in microsoft sql server 2005 by yearly

$
0
0
How to database data backup yearly? I must backup data by yearly.

Are there standard solutions for Change tracking and filtering large tables.

$
0
0

Dear colleagues,

Let me explain our application first. We build and sell an ERP system. ERP systems are known for their large databases, containing thousands of tables with tables easily exceeding a million rows. Some of our customers need parts of our functionality in environments where wireless connection with the database is not feasible (e.g. inspections of a newly build ship hull or other boxes of Faraday, near machines that generate EMPs, etc.). For those cases we provide small parts of our functionality on a mobile device that is kept ‘in sync’ using Change Tracking.

Because mobile devices have more restrictions on the amount of available memory and because synchronizing your mobile device should not last more than a couple of minutes, a function that uses a frequently mutated table that contains over 10,000,000 rows in the database should not result in an implementation where you have an exact copy of this table on the mobile device. We only copy the columns and rows needed for the functionality on the mobile device. Below you see a (simplified) example of the incremental update statement for Change Tracking.

SELECT dbo.T_ProductionHeader.ProdHeaderDossierCode
,      dbo.T_ProductionHeader.ProdStatusCode
,      dbo.T_ProductionHeader.ProdHeaderCompletedInd
,      dbo.T_ProductionHeader.Description
,      dbo.T_ProductionHeader.PartCode
,      dbo.T_ProductionHeader.Quantity
,      dbo.T_ProductionHeader.StartDate
,      dbo.T_ProductionHeader.EndDate
FROM   dbo.T_ProductionHeader
INNER  JOIN CHANGETABLE(CHANGES dbo.T_ProductionHeader, @sync_last_received_anchor) AS CT
       ON CT.ProdHeaderDossierCode = dbo.T_ProductionHeader.ProdHeaderDossierCode
WHERE  (CT.SYS_CHANGE_CONTEXT IS NULL OR CT.SYS_CHANGE_CONTEXT <> @sync_client_id_binary)
AND    CT.SYS_CHANGE_OPERATION = 'U'
AND    CT.SYS_CHANGE_VERSION  <= @sync_new_received_anchor
-- In filter
AND    dbo.T_ProductionHeader.ProdHeaderCompletedInd = 0
AND    dbo.T_ProductionHeader.ProdStatusCode BETWEEN N'20' AND N'65'

The problem is that filtering the rows results in the situation that an update on the table should be translated in an insert or delete for Change Tracking. Take the filter above. Now assume a record is inserted with ProdStatusCode = '00'. Change Tracking signals an insert, but the filter statement causes this record not to be synchronized. If the ProdStatusCode is updated from '00' to '30', Change Tracking signals an update. This update is synchronized, but since a record is not present on the mobile device, nothing happens

What I did is creating my own ‘Change Tracking’ tables having the same structure as the Change Tracking tables that Microsoft uses. I also added simple triggers on the filtered tables. Whenever an update causes a record to move from outside the filter to inside the filter, I record an insert for that record in my custom ‘Change Tracking’ table. When the record moves from inside the filter to outside the filter, I record a delete. When the record is deleted, I remove it from my custom CT table. Furthermore I wrote a scheduled job that retrieves the retention period from sys.change_tracking_databases and removes all recorded information from my custom CT tables that is older than this threshold. Next, I added a UNION clause using my custom CT tables to the standard incremental insert and incremental delete statements for the mobile device, adding the records that should be inserted or deleted because of an update.

My question is, is there a more standard way of solving this problem or do I have to do all this stuff myself. I cannot imagine that we are the first to encounter this problem, so maybe more elegant and better solutions are already available?

Viewing all 15264 articles
Browse latest View live


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