Quantcast
Viewing all 6624 articles
Browse latest View live

VB6.0 ADO2.6 and SQL 2014

Does VB6.0 ADO2.6 OLEDB  work with SQL 2014? Can we upgrade our SQL 2012 to SQL 2014 without front code conversion? The majority legacy code is still in VB6.0 ADO2.6 OLEDB to connect to SQL Server. Converting these code will take years.

Thanks,

Lijun


Lock Escalation

Hi all,

I know that the DB Engine does lock escalation to save memory.

Is it possible to know somehow, when the DB Engine has made lock escalation? How much memory has been saved for each lock escalation?

CPU issues in the past.

Hi experts... Now cpu is stable at around 50% for the last 30 minutes or so... but I had for almost 3 hours cpu at 97%, how can I tell what was causing this in the past?

Please check the screenshot... thanks in advance experts!

Image may be NSFW.
Clik here to view.

Why does INSERT hang on S mode (shared) locks?

I thought INSERTs used "X"  mode (exclusive) locks. Does it also acquire "S mode (shared) locks?

Here's why I ask. I'm capturing extended events for lock_acquisition > 1 second and see lots of waits in the range of about 5 seconds (5000000 µS), always for the same INSERT on the same table, and the mode is always "S". 


Chuck

Perf issue

Hi All,

Could you please help me providing any suggestions to fine tune below issue.
What should be the proper troubleshooting approach and any recommendations which you might suggest?

We see the  top 2 waits as CXPACKET and PAGEIOLATCH_SH Waitypes
CXPACKET 80%
PAGEIOLATCH_SH  10%

On a side note, I also see some disk latency issues as well.

Environment: 

SQL Server Version :
Microsoft SQL Server 2012 (SP1) - 11.0.3393.0 (X64)
       Oct 25 2013 19:04:40
       Copyright (c) Microsoft Corporation
       Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

- Total physical cpu count =2
- Total logic cpu count = 24
- max degree of parallelism = 8
- cost threshold for parallelism = 5

Please find attached screenshots with numbers. I also see spids a getting self blocked with CXPACKET waittype. What does it mean? Any advise to get rid of CXPACKET waits? How do we go about troubleshooting such issues?

Image may be NSFW.
Clik here to view.


Thanks,

Sam

Transaction log growth based on update or delete count.

Ok, Can someone please explain this in a detail so every sql developer/dba will never have to guess :)

Lets say I am updating  10% of a table's data in a transaction. It is a situation which needs a data fix. I am trying to find how much transaction log will be generated? If the log size is 1 GB how much it will grow ? To be more precise, I am changing the value to '' (empty space) if it is null. (I know this is bad, the app development always wants data fix, instead of writing good code). 

Begin tran

update MyTable set MyColumn = '' where Mycolumn is null --Lets says this updates 10% of the data in the table.

Commit tran

case 1: Update a table with 1 million rows

case2 : Update a table with 10 million rows

case 3: Update a table with 100 million rows


Ranga

Overlapping Dates Problem

Environment - SQL Server 2008

I have a problem of Overlapping Dates. I have below records



ID	 EffectiveDate	TerminationDate

1146	  4/22/2015	9/12/2015
1146	  10/25/2015 	9/30/2016
1146	  11/4/2015	9/30/2017


I want results like below:


ID	 EffectiveDate	TerminationDate

1146	  4/22/2015	9/12/2015
1146	  10/25/2015	9/30/2017





Temp configuration

Hi All,

Seeking for your guidance on Tempdb

We have tried to optimize Tempdb is out env. Below are the ones we have taken care.

•    enabled instant file initialization
•    pre-sized the data files. All of them has same size each 90GB
•    created multiple data files of same size and same auto growth settings
•    auto growth specified in fixed sizes i.e. 500MB
•    enabled trace flag -T1118
•    Still we see I/O taking more 15 ms in SQL server Errorlog
•    No of physical cpus= 2
•    no of logical cpu count = 24

Not sure what is wrong. Can anybody share your thoughts on this?

From SQL Errorlog:
spid7s       SQL Server has encountered 3146 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [T:\SQL\TEMP\tempdb_1.mdf] in database [tempdb] (2).  The OS file handle is 0x0000000000001350.  The offset of the latest long I/O is: 0x0000033
spid7s       SQL Server has encountered 3147 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [T:\SQL\TEMP\tempdb_2.mdf] in database [tempdb] (2).  The OS file handle is 0x00000000000014A4.  The offset of the latest long I/O is: 0x0000033


Thanks in advance.


Database has deadlock on the same object for SQLSERVER 2014

Here is deadlock report file, from which I can see two transactions are locked deadly on the same object(maybe a partition, because the field: eqptyp and sent_dte are not index in the table). And I am very confusing that why the two transactions can hold simultaneously the 'X' lock to the same object??

<deadlock>
 <victim-list>
  <victimProcess id="process1e9295468" />
 </victim-list>
 <process-list>
  <process id="process1e9295468" taskpriority="0" logused="6768" waitresource="KEY: 8:72057631049121792 (a72254d22209)" waittime="2490" ownerId="45679760" transactionname="implicit_transaction" lasttranstarted="2015-10-28T15:05:01.347" XDES="0x157ec2d10" lockMode="U" schedulerid="2" kpid="47336" status="suspended" spid="61" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2015-10-28T15:05:01.900" lastbatchcompleted="2015-10-28T15:05:01.900" lastattention="1900-01-01T00:00:00.900" clientapp="wm-000000" hostname="WMDCI2" hostpid="123" loginname="sa" isolationlevel="read committed (2)" xactid="45679760" currentdb="8" lockTimeout="4294967295" clientoption1="671088672" clientoption2="119866">
   <executionStack>
    <frame procname="adhoc" line="1" stmtstart="268" stmtend="826" sqlhandle="0x0200000007af0e1231782794ede2a724c3909da648bc55380000000000000000000000000000000000000000">
unknown    </frame>
   </executionStack>
   <inputbuf>
         update tbl_name
                set eqptyp = coalesce( @P0 ,  @P1 )
              where devcod =  @P2
                and usr_id =  @P3
                and (eqptyp !=  @P4  or eqptyp is null)
                and sent_dte is null
                and wh_id  = coalesce( @P5 ,  @P6 )    </inputbuf>
  </process>
  <process id="process1cf4df848" taskpriority="0" logused="12880" waitresource="KEY: 8:72057631049121792 (299c52e1132f)" waittime="2490" ownerId="45674997" transactionname="implicit_transaction" lasttranstarted="2015-10-28T15:04:54.723" XDES="0x2421df750" lockMode="U" schedulerid="7" kpid="40800" status="suspended" spid="64" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2015-10-28T15:04:55.480" lastbatchcompleted="2015-10-28T15:04:55.480" lastattention="1900-01-01T00:00:00.480" clientapp="wm-000003" hostname="WMDCI2" hostpid="123" loginname="sa" isolationlevel="read committed (2)" xactid="45674997" currentdb="8" lockTimeout="4294967295" clientoption1="671088672" clientoption2="119866">
   <executionStack>
    <frame procname="adhoc" line="1" stmtstart="268" stmtend="826" sqlhandle="0x0200000007af0e1231782794ede2a724c3909da648bc55380000000000000000000000000000000000000000">
unknown    </frame>
   </executionStack>
   <inputbuf>
        update tbl_name
                set eqptyp = coalesce( @P0 ,  @P1 )
              where devcod =  @P2
                and usr_id =  @P3
                and (eqptyp !=  @P4  or eqptyp is null)
                and sent_dte is null
                and wh_id  = coalesce( @P5 ,  @P6 )    </inputbuf>
  </process>
 </process-list>
 <resource-list>
  <keylock hobtid="72057631049121792" dbid="8" objectname="wm.dbo.tbl_name" indexname="tbl_name_pk" id="lock1d0a2e900" mode="X" associatedObjectId="72057631049121792">
   <owner-list>
    <owner id="process1cf4df848" mode="X" />
   </owner-list>
   <waiter-list>
    <waiter id="process1e9295468" mode="U" requestType="wait" />
   </waiter-list>
  </keylock>
  <keylock hobtid="72057631049121792" dbid="8" objectname="wm.dbo.tbl_name" indexname="tbl_name_pk" id="lock24ab4ec00" mode="X" associatedObjectId="72057631049121792">
   <owner-list>
    <owner id="process1e9295468" mode="X" />
   </owner-list>
   <waiter-list>
    <waiter id="process1cf4df848" mode="U" requestType="wait" />
   </waiter-list>
  </keylock>
 </resource-list>
</deadlock>




Virtual Accounts are no longer working following server crash

We are having issues following a server crash.  Cause of the crash is unknown, all that is listed in the event viewer is bug check.

All of our virtual access for the SQL Server Services  we get the service did not start due to a logon failure.  I have cleared out the password and tried again, and still same error.  I can switch the service run under system, and everything starts up.  When I switch back to using NT Service\MSSQLServer I get the same error.

When I look at the local security policy, the service account has the proper permissions.

SQL Server 2012 SP2 with CU6 (5613)

Any Ideas?

DJ


Incrementally compress a table online?

Anybody knows of a stragegy to compress a table gradually online with minimal available space.

I am stuck with very little log, data, tempdb space available and requirements to keep the table available and high available (full recovery mode with always on in synchronous commit).

What would be a potent strategy to avoid exploding the logs or putting the table offline.

Right now, I am thinking

  1. rebuilding the table into multiple partitions online with sort in tempdb.
  2. Then rebuilding the table partitions individually with compression again online with sort in tempdb.

But I think the initial rebuild(s) necessary to split the data on multiple filegroups will kill my hopes to have little log or tempdb space generated.

Is there a way to rebuild the table online gradually while partitioning it or will I end up having one big operation which can't be split no matter what I do until I am finally partitioned?

Alternative solutions are welcomed.

tail log backup error on IsHeaderWritable

hi all,

steps to reproduce:
a. Restore with recovery to my box(Windows 8.1) or windows server(Windows 2012 R2 Std)
restore database [TestDB]
 
b. Backup normal log
backup log [TestDB]
to disk = 'd:\Backups\TestDB.trn'
 
c. Backup tail log
backup log [TestDB]
to disk = 'd:\Backups\TestDB_tail.trn' with norecovery
 
Then I got following error:
 
Processed 6 pages for database 'TestDB', file 'Odyssey_SD001_Log' on file 1.
Location:     container.cpp:6448
Expression:   IsHeaderWritable ()
SPID:         55
Process ID:   2808
Msg 3013, Level 16, State 1, Line 5
BACKUP LOG is terminating abnormally.
Msg 3624, Level 20, State 1, Line 5
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.
 
 
d. Run DBCC CHECKDB
There is no error, I am wondering if either the restore or the dbcc has a bug.
 
 
DBCC results for 'TestDB'.
Service Broker Msg 9675, State 1: Message Types analyzed: 14.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 6.
Service Broker Msg 9667, State 1: Services analyzed: 3.
Service Broker Msg 9668, State 1: Service Queues analyzed: 3.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
DBCC results for 'sys.sysrscols'.
There are 1121 rows in 13 pages for object "sys.sysrscols".
DBCC results for 'sys.sysrowsets'.
There are 153 rows in 2 pages for object "sys.sysrowsets".
DBCC results for 'sys.sysclones'.
There are 0 rows in 0 pages for object "sys.sysclones".
DBCC results for 'sys.sysallocunits'.
There are 178 rows in 2 pages for object "sys.sysallocunits".
DBCC results for 'sys.sysfiles1'.
There are 2 rows in 1 pages for object "sys.sysfiles1".
DBCC results for 'sys.sysseobjvalues'.
There are 0 rows in 0 pages for object "sys.sysseobjvalues".
DBCC results for 'sys.syspriorities'.
There are 0 rows in 0 pages for object "sys.syspriorities".
DBCC results for 'sys.sysdbfrag'.
There are 0 rows in 0 pages for object "sys.sysdbfrag".
DBCC results for 'sys.sysfgfrag'.
There are 0 rows in 1 pages for object "sys.sysfgfrag".
DBCC results for 'sys.sysdbfiles'.
There are 2 rows in 1 pages for object "sys.sysdbfiles".
DBCC results for 'sys.syspru'.
There are 0 rows in 0 pages for object "sys.syspru".
DBCC results for 'sys.sysbrickfiles'.
There are 0 rows in 0 pages for object "sys.sysbrickfiles".
DBCC results for 'sys.sysphfg'.
There are 1 rows in 1 pages for object "sys.sysphfg".
DBCC results for 'sys.sysprufiles'.
There are 2 rows in 1 pages for object "sys.sysprufiles".
DBCC results for 'sys.sysftinds'.
There are 0 rows in 0 pages for object "sys.sysftinds".
DBCC results for 'sys.sysowners'.
There are 19 rows in 1 pages for object "sys.sysowners".
DBCC results for 'sys.sysdbreg'.
There are 0 rows in 0 pages for object "sys.sysdbreg".
DBCC results for 'sys.sysprivs'.
There are 146 rows in 1 pages for object "sys.sysprivs".
DBCC results for 'sys.sysschobjs'.
There are 2285 rows in 33 pages for object "sys.sysschobjs".
DBCC results for 'sys.syscsrowgroups'.
There are 0 rows in 0 pages for object "sys.syscsrowgroups".
DBCC results for 'sys.sysexttables'.
There are 0 rows in 0 pages for object "sys.sysexttables".
DBCC results for 'sys.syscolpars'.
There are 920 rows in 14 pages for object "sys.syscolpars".
DBCC results for 'sys.sysxlgns'.
There are 0 rows in 0 pages for object "sys.sysxlgns".
DBCC results for 'sys.sysxsrvs'.
There are 0 rows in 0 pages for object "sys.sysxsrvs".
DBCC results for 'sys.sysnsobjs'.
There are 1 rows in 1 pages for object "sys.sysnsobjs".
DBCC results for 'sys.sysusermsgs'.
There are 0 rows in 0 pages for object "sys.sysusermsgs".
DBCC results for 'sys.syscerts'.
There are 0 rows in 0 pages for object "sys.syscerts".
DBCC results for 'sys.sysrmtlgns'.
There are 0 rows in 0 pages for object "sys.sysrmtlgns".
DBCC results for 'sys.syslnklgns'.
There are 0 rows in 0 pages for object "sys.syslnklgns".
DBCC results for 'sys.sysxprops'.
There are 0 rows in 1 pages for object "sys.sysxprops".
DBCC results for 'sys.sysscalartypes'.
There are 34 rows in 1 pages for object "sys.sysscalartypes".
DBCC results for 'sys.systypedsubobjs'.
There are 0 rows in 0 pages for object "sys.systypedsubobjs".
DBCC results for 'sys.sysidxstats'.
There are 258 rows in 6 pages for object "sys.sysidxstats".
DBCC results for 'sys.sysiscols'.
There are 450 rows in 2 pages for object "sys.sysiscols".
DBCC results for 'sys.sysendpts'.
There are 0 rows in 0 pages for object "sys.sysendpts".
DBCC results for 'sys.syswebmethods'.
There are 0 rows in 0 pages for object "sys.syswebmethods".
DBCC results for 'sys.sysbinobjs'.
There are 23 rows in 1 pages for object "sys.sysbinobjs".
DBCC results for 'sys.sysaudacts'.
There are 0 rows in 0 pages for object "sys.sysaudacts".
DBCC results for 'sys.sysobjvalues'.
There are 277 rows in 40 pages for object "sys.sysobjvalues".
DBCC results for 'sys.syscscolsegments'.
There are 0 rows in 0 pages for object "sys.syscscolsegments".
DBCC results for 'sys.syscsdictionaries'.
There are 0 rows in 0 pages for object "sys.syscsdictionaries".
DBCC results for 'sys.sysclsobjs'.
There are 16 rows in 1 pages for object "sys.sysclsobjs".
DBCC results for 'sys.sysrowsetrefs'.
There are 0 rows in 0 pages for object "sys.sysrowsetrefs".
DBCC results for 'sys.sysremsvcbinds'.
There are 0 rows in 0 pages for object "sys.sysremsvcbinds".
DBCC results for 'sys.sysxmitqueue'.
There are 0 rows in 0 pages for object "sys.sysxmitqueue".
DBCC results for 'sys.sysrts'.
There are 1 rows in 1 pages for object "sys.sysrts".
DBCC results for 'sys.sysconvgroup'.
There are 0 rows in 0 pages for object "sys.sysconvgroup".
DBCC results for 'sys.sysdesend'.
There are 0 rows in 0 pages for object "sys.sysdesend".
DBCC results for 'sys.sysdercv'.
There are 0 rows in 0 pages for object "sys.sysdercv".
DBCC results for 'sys.syssingleobjrefs'.
There are 174 rows in 1 pages for object "sys.syssingleobjrefs".
DBCC results for 'sys.sysmultiobjrefs'.
There are 124 rows in 1 pages for object "sys.sysmultiobjrefs".
DBCC results for 'sys.sysguidrefs'.
There are 0 rows in 0 pages for object "sys.sysguidrefs".
DBCC results for 'sys.sysfoqueues'.
There are 0 rows in 0 pages for object "sys.sysfoqueues".
DBCC results for 'sys.syschildinsts'.
There are 0 rows in 0 pages for object "sys.syschildinsts".
DBCC results for 'sys.syscompfragments'.
There are 0 rows in 0 pages for object "sys.syscompfragments".
DBCC results for 'sys.sysftsemanticsdb'.
There are 0 rows in 0 pages for object "sys.sysftsemanticsdb".
DBCC results for 'sys.sysftstops'.
There are 0 rows in 0 pages for object "sys.sysftstops".
DBCC results for 'sys.sysftproperties'.
There are 0 rows in 0 pages for object "sys.sysftproperties".
DBCC results for 'sys.sysxmitbody'.
There are 0 rows in 0 pages for object "sys.sysxmitbody".
DBCC results for 'sys.sysfos'.
There are 0 rows in 0 pages for object "sys.sysfos".
DBCC results for 'sys.sysqnames'.
There are 99 rows in 1 pages for object "sys.sysqnames".
DBCC results for 'sys.sysxmlcomponent'.
There are 100 rows in 1 pages for object "sys.sysxmlcomponent".
DBCC results for 'sys.sysxmlfacet'.
There are 112 rows in 1 pages for object "sys.sysxmlfacet".
DBCC results for 'sys.sysxmlplacement'.
There are 19 rows in 1 pages for object "sys.sysxmlplacement".
DBCC results for 'sys.sysobjkeycrypts'.
There are 0 rows in 0 pages for object "sys.sysobjkeycrypts".
DBCC results for 'sys.sysasymkeys'.
There are 0 rows in 0 pages for object "sys.sysasymkeys".
DBCC results for 'sys.syssqlguides'.
There are 0 rows in 0 pages for object "sys.syssqlguides".
DBCC results for 'sys.sysbinsubobjs'.
There are 3 rows in 1 pages for object "sys.sysbinsubobjs".
DBCC results for 'sys.syssoftobjrefs'.
There are 4 rows in 1 pages for object "sys.syssoftobjrefs".
DBCC results for 'sys.filestream_tombstone_133575514'.
There are 0 rows in 0 pages for object "sys.filestream_tombstone_133575514".
DBCC results for 'sys.syscommittab'.
There are 0 rows in 0 pages for object "sys.syscommittab".
DBCC results for 'sys.filetable_updates_261575970'.
There are 0 rows in 0 pages for object "sys.filetable_updates_261575970".
DBCC results for 'sys.plan_persist_query_text'.
There are 0 rows in 0 pages for object "sys.plan_persist_query_text".
DBCC results for 'sys.plan_persist_query'.
There are 0 rows in 0 pages for object "sys.plan_persist_query".
DBCC results for 'sys.plan_persist_plan'.
There are 0 rows in 0 pages for object "sys.plan_persist_plan".
DBCC results for 'sys.plan_persist_runtime_stats'.
There are 0 rows in 0 pages for object "sys.plan_persist_runtime_stats".
DBCC results for 'sys.plan_persist_runtime_stats_interval'.
There are 0 rows in 0 pages for object "sys.plan_persist_runtime_stats_interval".
DBCC results for 'sys.plan_persist_context_settings'.
There are 0 rows in 0 pages for object "sys.plan_persist_context_settings".
DBCC results for 'sys.sqlagent_jobs'.
There are 0 rows in 0 pages for object "sys.sqlagent_jobs".
DBCC results for 'sys.sqlagent_jobsteps'.
There are 0 rows in 0 pages for object "sys.sqlagent_jobsteps".
DBCC results for 'sys.sqlagent_job_history'.
There are 0 rows in 0 pages for object "sys.sqlagent_job_history".
DBCC results for 'sys.sqlagent_jobsteps_logs'.
There are 0 rows in 0 pages for object "sys.sqlagent_jobsteps_logs".
DBCC results for 'sys.queue_messages_1977058079'.
There are 0 rows in 0 pages for object "sys.queue_messages_1977058079".
DBCC results for 'sys.queue_messages_2009058193'.
There are 0 rows in 0 pages for object "sys.queue_messages_2009058193".
DBCC results for 'sys.queue_messages_2041058307'.
There are 0 rows in 0 pages for object "sys.queue_messages_2041058307".
DBCC results for 'StorageDocs'.
There are 132000 rows in 7122 pages for object "StorageDocs".
CHECKDB found 0 allocation errors and 0 consistency errors in database 'TestDB'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
 
 Microsoft support has identified that is_media_read_only of sys.master_file is set to 1 which is the root cause, we have to either copy data to new database or login as single user and DAC mode to hack the value as below:
select @@servername
GO
use master
GO
sp_configure 'allow updates', 1
GO
reconfigure with override
GO
update sys.sysbrickfiles set status=544 where dbid=?
 
We have hundreds of databases running on the sql box, there is no read only media, just wondering how could this happen, only 3 of us have access to the sql server none of us would hack the database to like this.

User Could Not Execute Stored Procedure sp_enable_sql_debug

Inconsistency between MasterDB sys.master_files and sys.database_files in the DB itself

Hi,

We have a strange situation in one of our SQL 2012 servers whereby a particular database keeps ending up in an inconsistent state.

The logical name (for either DATA or T-LOG files) recorded in MasterDB sys.master_files is different to what is recorded in sys.database_files in the DB itself (and displayed in the SSMS GUI under properties / Files). It's not massively different (in sys.master_files it has a _[VersionNumber] appended to it).

This causes our SCOM monitoring software to think the DB is running out of space and raises a critical alert. If you try to shrink one of the inconsistent files you get a message stating "Could not locate file <filename> for database <DBName> in sys.database_files"

Does anyone know what could be causing this to happen? I suspect it may be a user trying to rename one of the logical names and it gets updated in sys.master_files but not sys.database_files.

I'd be very grateful for any suggestions as to what might cause this and how to stop it happening.

Many Thanks,

Phil

Issue with linked server

HI All,

We are configure linked server between SQL server 2005 to SQL server 2008.

I execute select * from command for some table its working fine and some table its giving below error.

Kindly help me how to resolve this issue.

Image may be NSFW.
Clik here to view.
Question
Image may be NSFW.
Clik here to view.
You cannot vote on your own post
0

OLE DB provider "SQLNCLI" for linked server "servername" returned message "Invalid character value for cast specification".

OLE DB provider "SQLNCLI" for linked server "servername" returned message "Invalid character value for cast specification".

Msg 7330, Level 16, State 2, Line 1

Cannot fetch a row from OLE DB provider "SQLNCLI" for linked server "servername".


Configuring Gmail fails in my Sql12k

Hi all of you,

I run 2012k trial version 180 day and after set up Mail I get this message after viewing history and doing the usual test...


mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2015-12-09T19:08:02). Exception Message: Cannot send mails to mail server. (El servidor SMTP requiere una conexión segura o el cliente no se autenticó. La respuesta del servidor fue: 5.5.1 Authentication Required. Learn more at).

Thanks for any input or hint,

sys.dm_os_performance_counters shows wrong value

Hello I am using below script to see log file size but it shows wrong value (100GB), for same database dbcc sqlperf(logspace) shows log size as 5248.

Any idea what could be the reason. 

More info: Its SQL 2012 SP2, Windows 2012 R2.

SELECT db.[name] AS [Database Name]
     , db.recovery_model_desc AS [Recovery Model]
     , db.log_reuse_wait_desc
     , ls.cntr_value / 1024.0 AS [Log Size (MB)]
     , lu.cntr_value / 1024.0 AS [Log Used (MB)]
     , CAST(CAST(lu.cntr_value AS FLOAT) / CAST(ls.cntr_value AS FLOAT) AS DECIMAL(18, 2)) * 100 AS [Log Used %]
     , db.[compatibility_level] AS [DB Compatibility Level]
     , db.page_verify_option_desc AS [Page Verify Option]
FROM sys.databases AS db
     INNER JOIN sys.dm_os_performance_counters AS lu ON db.name = lu.instance_name
     INNER JOIN sys.dm_os_performance_counters AS ls ON db.name = ls.instance_name
WHERE lu.counter_name LIKE 'Log File(s) Used Size (KB)%'
  AND ls.counter_name LIKE 'Log File(s) Size (KB)%'
  AND db.name LIKE '%reporting%';

Image may be NSFW.
Clik here to view.


Access Database with a different account than the Windows login?

Hello,

I am logged with my user account Name1 to the server ... (No other account works)

I am trying to connect through SSMS to a database engine but it is still looking for my account Name1 even I am using

runas /netonly /user:domain\Name2 ssms.exe

Image may be NSFW.
Clik here to view.

Image may be NSFW.
Clik here to view.

How to use Name2 to access the database engine?

Thanks,

Dom


System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

SQL Server becomes unresponsive during backup

Hi all,

We recently upgraded one of our production servers from SQL 2012 to 2014. Now when the nightly full backup runs, the SQL instance allows connections, but everything is blocked until its completes; even queries on other databases that are not within the backup scope.

If we try to start a new Activity Monitor during the backup, it times out.

Image may be NSFW.
Clik here to view.

The command to freeze the server is:

backup database "<DB>" to VIRTUAL_DEVICE='<DEVICE>' with  stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 1

<DB> being the DB in scope of the backup
<DEVICE> being the backup location

While the backup is running, connection attempts are still accepted, but no queries will execute - either waiting until the backup completes or the query times out. This was not experienced while we were running SQL 2012.

Had anyone experienced this before or know of a work around?

Thanks,
Jay :)


If you shake a kettle, does it boil faster?

Locked extended event session file

Somehow, when I stop my extended sessions, the .xel to which I log the events stays locked and cannot be erased.

Anybody has this issue or knows how unlock those files or at least identify the process locking them?


Viewing all 6624 articles
Browse latest View live


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