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

Limiting no of core with Sql Server 2012

$
0
0

Hi All,

we are planning to use Sql Server 2012 EE on a hardware with 64 logical processors but want to limit Sql Server to use only 16 logical processors. Please assist for a solution which should also comply with MS licensing.

Best Regards

khalil


database IO Frozen for snapshot

$
0
0

Hi All,

How To resolve this issue.

After happening this SSMS Is not responding for connections. it's hanging.

once we restart the server it is working.

Please suggest the solution.

2014-08-24 00:11:02.78 spid65 Database master: IO is frozen for snapshot

2014-08-24 00:11:02.84 spid66 Database model: IO is frozen for snapshot

2014-08-24 00:11:02.89 spid67 Database model: IO is frozen for snapshot

Thanks in advance...

long rollback transactions

$
0
0

Hi , I have a transactions rolling back for the last 3 hours and don't know how much time is left to complete ? is there a way to kill this SPID ...

SQL 2008 x64 Ent. on win server 2008 R2

Page Life Expectancy reset to 2,756,000

$
0
0

Hi,

does anyone experience a strange behaviour with the [page life expectancy] counter value?

On some of my SQL server, the page life expectancy started from 2,756,000 (2 million) even after server restart. so it's now reporting a wrong performance. this is only happen to a few of my sql server after I applied MS14-044 security updates. however, it doesn't happen to all SQL server.

does anyone knows how to fix this to make it reset to 0?

Cheers,

Daniel

Job getting failed when am using ntlg Test\SatishG

$
0
0

Hi all,

Am facing an issue :

The job failed.  Unable to determine if the owner (Test\SatishG) of job Backup_Subpaln1  has server access 
  (reason: Could not obtain information about Windows NT group/user 'Test\SatishG', error code 0x6e. [SQLSTATE 42000] (Error 15404)).

_________

Here, Test is my Server Name and SatishG is user.

When am creating a job with windows login  ( Test\SatishG  ) , Sql Server engine automatically makes that particular user as a job owner in sql server agent ( in my case windows login is Test\SatishG ).

When am trying to execute a job ( Backup_Subpaln1 )  it gives me a error as below 

The job failed.  Unable to determine if the owner (Test\SatishG) of jobBackup_Subpaln1  has server access 
  (reason: Could not obtain information about Windows NT group/user 'Test\SatishG', error code 0x6e. [SQLSTATE 42000] (Error 15404)).

So, i have made Owner for a job Backup_Subpaln1  as SA , then it started Executing.

But my doubt is, Even ntlg Test\SatishG is a SysAdmin,But why it shows an error.

And when i started browsing , few blogs talk about Active Directory and am unable to understand it. ( According to my sense when we add  USER(SatishG) inDOMAIN(Test)  then only it allows user to connect through windows login , but why blogs say about Active Directory , Do we have to give any other permissions to user (SatishG) ).

Thanks in Advance..




Unable to perform a Application Aware backup after SQL 2012 SP2 and CU1

$
0
0

I'm running Server 2012, with SQL Standard 2012.

These are running on VMWare and I'm using a snapshot backup application called Veeam to backup my VM's. Veeam is Application Aware.

On the 28th August I Performed the SQL 2012 SP2 Update (Successfully) and Cumulative Update 1 (Successfully). Server has been rebooted, but now the Application aware backup is not running with a SQL VSS Writer Error 0x800423f4

Any suggestion?

Thanks


Unable to execute the Backup Job

$
0
0

Hi all,

Here,

TEST_GSR is a Instance Name (in 2012  Evaluation Edition) ,

System_DBs backup is a job name ( Created a job using maintenance plans Wizard for taking all system Databases Backup)

Executed as user: NT Service\SQLAgent$TEST_GSR. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  2:55:45 PM  Error: 2014-09-01 14:55:46.13     Code: 0xC0000033     Source: System_DBs Backup      Description: Integration Services evaluation period has expired.  End Error  Error: 2014-09-01 14:55:46.14     Code: 0xC0000033    Source: System_DBs Backup      Description: Integration Services evaluation period has expired.  End Error  Could not execute package because of error 0xC0000033.  Started:  2:55:45 PM  Finished: 2:55:46 PM  Elapsed: 0.499 seconds.  The command line parameters are invalid.  The step failed.

Note : This  error occurs when i scheduled User Databases also (Using maintenance plan Wizard )

          But, When am trying to take a manually using command and GUI ( Using tasks --> Backup )it works.

Thanks in advance..


ASYNC_DISKPOOL_LOCK

$
0
0

Hi All. I am doing a DB backup , and it holds are 90% for a very long time, so I cancel the restory query,however there is still a processes

has the following waittype

ASYNC_DISKPOOL_LOCK.

I try kill that proceses, which doesn't work, I tried to change database to single_user, offline.. all doesn't work..

we can I do now :?


Secondary XML Index not being used in query plans

$
0
0

I have a question regarding XML indexes.

We have a table OVERLAY_ITEM_SEARCH_XXX with almost 5 million rows. The table has 2 columns – an identity column (bigint) and a SEARCH_VALUES column (XML). The XML column has a primary XML index and secondary XML PATH index.

The SEARCH_VALUES XML column contains a number of fields under the ATTRIBUTES node, e.g. SECTION_REF, but these are variable, as they are derived from user configuration.

The elements c121 and o870 represent client_id = 121 and overlay_id = 870. There are several clients and overlays within the database.

So a typical SEARCH_VALUES XML value for a particular row may look like this:

<c101>

       <o777>

              <SECTION_REF>1/2/567</SECTION_REF>

              <NAME>FRED</NAME>

<POSTCODE>W1 21A</POSTCODE>

       </o777>

</c101>

Performing the following 2 queries, for which no rows are found

1. A TOP 1 query

selectTOP 1 * from overlay.OVERLAY_ITEM_SEARCH_XXX s

where s.SEARCH_VALUES.exist('c121/o870/ATTRIBUTES/SECTION_REF/text() [contains(.,"J1")]') = 1

2. A SELECT * query

select*from overlay.OVERLAY_ITEM_SEARCH_XXX s

where s.SEARCH_VALUES.exist('c121/o870/ATTRIBUTES/SECTION_REF/text() [contains(.,"J1")]') = 1

The  ‘SELECT *’ query utilises the secondary XML index and runs in 9s, whereas the ‘TOP 1’ query doesn’t use the secondary XML index an takes 100s.

Why does the TOP n query not utilise the secondary XML index? N.B. This is from the actual query plan.

It seems that any query we try other than "select *" fails to use the index, e.g. IF EXISTS(SELECT *...)

Does anyone have any similar feedback from using XML indexes on large tables?

Note that the search for the searchable value (e.g. in the example above ‘J1’), needs to be a ‘contains’ type search.

This is using SQL Server 2012 SP2

Any help/comments would be appreciated.


Peculiar Behavior with trace flag 1204 and 1222 (deadlock traces)

$
0
0

I have noticed that any error using openquery whilst these trace flags are on will cause the sql server service to shut down.

If the trace flags are not running then we simply receive an error and the service will not shut down, any idea how we can prevent openquery errors from shutting the service down whilst we are monitoring for deadlocks using trace flags?

The log shows the following text "The MSSQLSERVER service terminated unexpectedly."

An example of code which will cause the above problem SELECT * FROM OPENQUERY(NONEXISTANTSERVER,'select * from dual')

Transaction log used 200GB unable to shrink

$
0
0

Hi All,

Currently I am facing diskspace(0 KB available) issue in one of my application server..

When I checked SQL server SMS_UDB (is our DB name) containing 70GB but SMS_UDB_LOG (Transaction log) Containing more than 200GB. When I checked the diskspace report 200GB space used (showing Green). I am unable to shrink the file. I am running 2008 SQL with simple recovery model. I taken bak to other server.   It's urgent Kindly help me to reduce the transaction log

'

thanks

See the full details

$
0
0

Hi,

what is the way to see the full details of the column that has been declared as "text" column?


Many Thanks & Best Regards, Hua Min

Unable to insert records into a Database table.

$
0
0

I have a query that inserts a half million records into a db table. It finishes successfully, but when I try to check the data if it has been inserted using a SELECT statement, there is no data inserted !!

After being frustrated for a while, I tried to import the data using excel import. The excel import wizard ran successfully with a half million records imported as per status. But again when I ran the select statement there was nothing imported into the table. I have double checked the DB name and the table name. There is no mismatch. I have more then 9 years experience as a developer but never seen anything like this ! This is urgent, please help.

S

Cleanup Options

$
0
0

Can someone please clearly explain to me the differences between:

1. Right-click on the SQL Server Agent and under the History option modify the settings for:

          (a) Job Log History (b) Agent History

2. History Cleanup Task

          (a) SQL Server Agent job history (b) Maintenance Plan history

Do I, or should I, enable both, and if so, what are the generic and/or recommended options usually one configures for each?

Thanks,

Reuvy

SQL Server database save error

$
0
0

I am encountering an issue every few days or so whereby, for some reason, my metadata database LDF log file is growing to a very large size (> 5GB in size). This could be due to specific settings for my database, however I don’t believe I’m doing anything unusual so it’s probably worth recording.

When the LDF grows to a large size, I start to see the following I/O error messages in the windows event viewer for the SQL database service:

2014-08-28 16:18:25: SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [C:\SCM\Databases\PPGallium_Metadata_New4_log.ldf] in database [PPGallium_Metadata_New4] (7).  The OS file handle is 0x0000000000000A64.  The offset of the latest long I/O is: 0x000000fe4f3200

This is followed by further follow-on errors in saving data to the database (from Gallium database service log for same time):

-28 16:19:05.960] DEBUG (   90) PP.Workflow.Service.Database.MetadataProvider - Saving 13 items(s) on model with ID 'd022f598-4f25-4f87-a8fd-e8dc2825c916'...

[2014-08-28 16:19:06.341] DEBUG (   88) PP.Workflow.Service.Database.ScheduleProvider - Saving 1 items(s) on model with ID 'f16fac97-3cdd-471a-bf8c-7a839a386f7f'...

[2014-08-28 16:19:06.347] DEBUG (   88) PP.Workflow.Service.Database.ScheduleProvider - Committing...

[2014-08-28 16:19:06.354] DEBUG (   88) PP.Framework.Model.Sync.Database.SqlDataContext - Committing...

[2014-08-28 16:19:06.357] DEBUG (   88) PP.Framework.Model.Sync.Database.SqlDataContext - Committed.

[2014-08-28 16:19:06.360] DEBUG (   88) PP.Workflow.Service.Database.ScheduleProvider - Item(s) saved.

[2014-08-28 16:19:06.672] DEBUG (   89) PP.Workflow.Service.Database.MetadataProvider - Saving 5 items(s) on model with ID 'd022f598-4f25-4f87-a8fd-e8dc2825c916'...

[2014-08-28 16:19:06.722] DEBUG (   92) PP.Workflow.Service.Database.MetadataProvider - Saving 5 items(s) on model with ID 'd022f598-4f25-4f87-a8fd-e8dc2825c916'...

[2014-08-28 16:19:06.860] DEBUG (   54) PP.Workflow.Service.Database.ScheduleProvider - Purging...

[2014-08-28 16:19:06.865] DEBUG (   54) PP.Framework.Model.Sync.Database.SqlDataContext - SQL output received ('There are no more objects to purge').

[2014-08-28 16:19:06.867] DEBUG (   54) PP.Workflow.Service.Database.ScheduleProvider - Purging complete. 0 item(s) purged. 25 item ID(s) remain cached.

[2014-08-28 16:19:06.962] DEBUG (   88) PP.Workflow.Service.Database.MetadataProvider - Saving 6 items(s) on model with ID 'd022f598-4f25-4f87-a8fd-e8dc2825c916'...

[2014-08-28 16:19:13.553] ERROR (   60) PP.Workflow.Service.Database.DatabaseService - Failed to save ('Failed to commit transaction ('Failed to merge 'Object' data from staging table due to an SQL error ('Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.')')').

[2014-08-28 16:19:13.586] DEBUG (   22) PP.Workflow.Service.Database.MetadataProvider - Committing...

[2014-08-28 16:19:13.603] ERROR (   17) PP.Workflow.Service.Database.DatabaseService - Failed to save ('Failed to commit transaction ('Failed to merge 'Object' data from staging table due to an SQL error ('Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.')')').

[2014-08-28 16:19:13.617] ERROR (   20) PP.Workflow.Service.Database.DatabaseService - Failed to save ('Failed to commit transaction ('Failed to merge 'Object' data from staging table due to an SQL error ('Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.')')').

[2014-08-28 16:19:13.621] DEBUG (   89) PP.Workflow.Service.Database.MetadataProvider - Committing...

[2014-08-28 16:19:13.623] DEBUG (   32) PP.Workflow.Service.Database.MetadataProvider - Committing...

When I then restart the database service, I get the following unhandled exception:

2014-08-28 16:21:15.874] DEBUG (    6) PP.Workflow.Service.Database.ScheduleProvider - Purging complete. 0 item(s) purged. 25 item ID(s) remain cached.

[2014-08-28 16:21:16.625] FATAL (Database Cache Pre-fetch) PP.Workflow.Service.Database.DatabaseWindowsService - Unhandled exception on worker thread ('Failed to get child BLOB properties for object '233fd1db-67c2-4745-91ce-8ff5c5bdf044' due to an SQL error ('Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.')').

PP.Framework.Model.Sync.Core.SyncModelProviderException: Failed to get child BLOB properties for object '233fd1db-67c2-4745-91ce-8ff5c5bdf044' due to an SQL error ('Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.') ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out

   --- End of inner exception stack trace ---

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

   at System.Data.SqlClient.SqlDataReader.get_MetaData()

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

   at System.Data.SqlClient.SqlCommand.ExecuteReader()

   at PP.Framework.Model.Sync.Database.SqlDataContext.GetListBlobProperties(Guid itemId, Nullable`1 updateId) in c:\SCM\Workflow Applications MS0\Sync Framework\PP.Framework.Model.Sync.Database\SqlDataContext.cs:line 1147

   --- End of inner exception stack trace ---

   at PP.Framework.Model.Sync.Database.SqlDataContext.GetListBlobProperties(Guid itemId, Nullable`1 updateId) in c:\SCM\Workflow Applications MS0\Sync Framework\PP.Framework.Model.Sync.Database\SqlDataContext.cs:line 1164

   at PP.Framework.Model.Sync.Database.DatabaseProvider`1.ReadModelItem(Type type, Guid id, ISyncModelItem parent, IDatabaseDataContext dataContext, Dictionary`2 itemInfosById, Nullable`1 updateId) in c:\SCM\Workflow Applications MS0\Sync Framework\PP.Framework.Model.Sync.Database\DatabaseProvider.cs:line 421

   at PP.Framework.Model.Sync.Database.DatabaseProvider`1.<>c__DisplayClass2.<StartPrefetching>b__0() in c:\SCM\Workflow Applications MS0\Sync Framework\PP.Framework.Model.Sync.Database\DatabaseProvider.cs:line 189

   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

   at System.Threading.ThreadHelper.ThreadStart()

[2014-08-28 16:21:16.631] FATAL (Database Cache Pre-fetch) PP.Workflow.Service.Database.DatabaseWindowsService - Inner Exception (level 1) ('Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.').

System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()

   at System.Data.SqlClient.SqlDataReader.get_MetaData()

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

   at System.Data.SqlClient.SqlCommand.ExecuteReader()

   at PP.Framework.Model.Sync.Database.SqlDataContext.GetListBlobProperties(Guid itemId, Nullable`1 updateId) in c:\SCM\Workflow Applications MS0\Sync Framework\PP.Framework.Model.Sync.Database\SqlDataContext.cs:line 1147

ClientConnectionId:2ce295e4-ad9d-4fa5-82e8-06351e1bee00

[2014-08-28 16:21:16.633] FATAL (Database Cache Pre-fetch) PP.Workflow.Service.Database.DatabaseWindowsService - Inner Exception (level 2) ('The wait operation timed out').

System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out.

Has anyone experienced any issues like this?

Thanks

Ian


Master Database Rebuild failed

$
0
0

Hi All,

We have master Database corruption and there is no backup of it, so I have to rebuild the master database..And when i gave the command to rebuild 

1. No error was thrown in Command prompt

2. SQL server started to run again.

3. I am unable to login even though I gave my windows login in the /SQLSysAdminAccounts

When I see the log detail it shows failed 


Detailed results:
  Feature:                       Database Engine Services
  Status:                        Failed: see logs for details
  MSI status:                    Passed
  Configuration status:          Failed: see details below
  Configuration error code:      0xDC80C325
  Configuration error description: Access is denied
  Configuration log:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140901_082201\Detail.txt

And in Detail.Txt this is the error

2014-09-01 08:22:48 Slp: Error result: -595541211
2014-09-01 08:22:48 Slp: Result facility code: 1152
2014-09-01 08:22:48 Slp: Result error code: 49957
2014-09-01 08:22:48 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine 
2014-09-01 08:22:48 Slp: Sco: Attempting to open registry subkey 
2014-09-01 08:22:48 Slp: Sco: Attempting to open registry subkey Software\Microsoft\PCHealth\ErrorReporting\DW\Installed
2014-09-01 08:22:48 Slp: Sco: Attempting to get registry value DW0201
2014-09-01 08:22:48 Slp: Submitted 1 of 1 failures to the Watson data repository

Enabling trace flag is good or bad?

$
0
0

Hello Everyone,

Enabling trace flag is good or bad for SQL server performance ?

MSSQL$SQL2005 (2) 18204

$
0
0

I have SQL Server x64 2005. I see next error in Application Log:

Source: MSSQL$SQL2005

Category: (2)

ID: 18204

BackupDiskFile::CreateMedia: Backup device 'D:\Backup2005\databasename.bak' failed to create. Operating system error 3(The system cannot find to find the specified path.).

What's the problem?

Could not kill one spid - PREEMPTIVE_XE_SESSIONCOMMIT

$
0
0
Dear DBA's,

Today I had a problem in my SQL 2008 R2 (10.50.2796) instance.
There's na every day Job where I stop one server audit, import some audit files to a table and then start it again. Yesterday night there was a problem in the step 1, which has the following statement:
ALTER SERVER AUDIT myAuditName  WITH(STATE =OFF)

This process didn't finish and started blocking other processes, such as backup to this database, and locked users access to this system.
I tried to kill it today morning and got the message.
SPID 122: transaction rollback in progress. Estimated rollback completion: 0%. Estimated time remaining: 0 seconds.
Saw the wait type and it was PREEMPTIVE_XE_SESSIONCOMMIT

The solution was to restart the SQL Server in the SQL Server Configuration Manager.

Has anyone passed through this? Do you know the solution? Does some CU or Service Pack correct this?

Thanks in advance,
DBA Cabuloso
Lucas Benevides
    

Suggestion for Iridium I/O third party tool use in production environment. Is Good or bad to use?

$
0
0

Hello Everyone,

we are planing to use Iridium I/O third party tool in one of our critical production environment to improve the performance.

 but i want to know is it recommended  for such type of critical servers?.

if i use this tool find any performance improvement.

Viewing all 12554 articles
Browse latest View live


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