Quantcast
Channel: Forum SQL Server Database Engine
Viewing all 15889 articles
Browse latest View live

Windows cannot start SQL services on local system. Error 5 Access is denied.

$
0
0

Please refer to this link which i have been asking for solution in the morning session:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5d36b932-54b8-47bd-86c7-d5be51fca979/windows-cannot-start-sql-services-on-local-system-error-5-access-is-denied?forum=sqldatabaseengine

Atleast I want to know What are all the possible ways to handle login failed issues? and Error 5 Access is denied issue. Windows Failed to start sql services.

Another frequent msg in eventvwr: SQL Server has encountered 142 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations. If this message is because of restoring dbs why we are getting message as 142 occurances.

As we are getting frequent login failed issue from different users, we are thinking that someone is actually trying to hack the server.

I wanted to know is there any option to block those ip address in sql server (but not in firewall)

Waiting for the reply..

Thanks in advance,



Unable to find enable statement

$
0
0

Hello, 

I am working on SQL Server 2016 SP1 CU5, recently some triggers were enabled on the database. I cant seem to find when were they enabled. I also have searched in the Schema Change History but cant seem to find that enable statement.

Please can you advise where else could I search or any other useful pointers. 

Thanks!  

Sql Server Rows per data file for a given table

$
0
0

Hi,

Good day.

we have a clustered table with over a million rows.

There are 4 data files for this table , all in the same file group. 

Now my question, : is there any way of roughly knowing the row counts for this table but split per data file?

I want to know how many rows of  this table are on each data file.

thanks in advance. 

SQL Server has encountered 142 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to 'DBCC FREEPROCCACHE' or 'DBCC FREESYSTEMCACHE' operations.

$
0
0

We are getting continuous msgs in eventvwr from past two weeks. I have used extended events to trace who used DBCC commands in SQL Server and found some objects are continuously clearing cache from flush.

Also tried commands from below link but no use, still we are getting same info msgs in eventvwr.

https://www.mssqltips.com/sqlservertip/4714/different-ways-to-flush-or-clear-sql-server-cache/

Please check the attached screenshot of extended event trace.

Thanks,


sunnybabu

How to avoid AOAG secondary databases.

$
0
0

Hello All,

I need to run an index maintenance script on few servers. But, I would like to avoid AOAG databases insecondary servers and need to run on other dbs which are not part of Always on.

Can someone suggest how to accomplish this and if there's a way to avoid them in the script. Please let me know if need any more details.

Thanks in advance.

Operating system error 170 : resource in use error on SQL Server 2012 Cluster on VM ware 6.5

$
0
0

Hi All,

we need your help in analyzing one of our ongoing issue.From last few days ,we could see below events are triggering on all  SQL server cluster server and DB's are  going to suspect mode and causing service disruption. Please advise,what can cause this issue ? 

FYi...our VM ware version is 6.5 and there is recent tools upgrade activity on all cluster servers.

Here is the complete SQL logs :

2018-06-23 00:24:00.720 spid1s       Error: 17053, Severity: 16, State: 1.
2018-06-23 00:24:00.720 spid1s       SQLServerLogMgr::LogWriter: Operating system error 170(The requested resource is in use.) encountered.
2018-06-23 00:24:00.730 spid1s       Write error during log flush.
2018-06-23 00:24:00.750 spid53       Error: 9001, Severity: 21, State: 4.
2018-06-23 00:24:00.750 spid53       The log for database 'msdb' is not available. Check the event log for related error messages. Resolve any errors and restart the database.
2018-06-23 00:24:00.800 spid53       Database msdb was shutdown due to error 9001 in routine 'XdesRMFull::CommitInternal'. Restart for non-snapshot databases will be attempted after all connections to the database are aborted.
2018-06-23 00:24:00.880 spid25s      Error: 17053, Severity: 16, State: 1.
2018-06-23 00:24:00.880 spid25s      fcb::close-flush: Operating system error (null) encountered.
2018-06-23 00:24:00.880 spid25s      Error: 17053, Severity: 16, State: 1.
2018-06-23 00:24:00.880 spid25s      fcb::close-flush: Operating system error (null) encountered.
2018-06-23 00:24:01.020 spid25s      Starting up database 'msdb'.
2018-06-23 00:24:01.290 spid25s      9 transactions rolled forward in database 'msdb' (4:0). This is an informational message only. No user action is required.
2018-06-23 00:24:01.300 spid25s      SQLServerLogMgr::FixupLogTail (failure): alignBuf 0x0000000019CAD000, writeSize 0x9e00, filePos 0x766200 
2018-06-23 00:24:01.300 spid25s      blankSize 0x3c0000, blkOffset 0x341, fileSeqNo 7642, totBytesWritten 0x0
2018-06-23 00:24:01.300 spid25s      fcb status 0x100042, handle 0x0000000000001888, size 1048 pages 
2018-06-23 00:24:01.300 spid25s      Error: 17053, Severity: 16, State: 1.

Regards,

Naren

Correct syntax to register SQL Server Instance with Service Account using setspn

$
0
0

Hello,

What is the correct syntax to register the SQL Instance Server with a domain account?

account: AD\svc_ConfigMgr_SQL

Servername: VRPSCCMSQL01

FQDN: VRPSCCMSQL01.ad

Port:1433

Instance Name: ConfigMgr

the questions are:

- Should we use lower case a or upper case A?

- Should we use A or S switch?

- What is the syntax between the port and the instance name?

VRPSCCMSQL01:1433|ConfigMgr

VRPSCCMSQL01:1433/ConfigMgr

VRPSCCMSQL01:1433:ConfigMgr

one example:(is it correct or not)

ssetspn -a MSSQLSvc/VRPSCCMSQL01:1433|ConfigMgr /AD\svc_ConfigMgr_SQL

setspn -a MSSQLSvc/VRPSCCMSQL01.ad:1433|ConfigMgr AD\svc_ConfigMgr_SQL

Thanks,
Dom


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

BackupIoRequest::ReportIoError: read failure on backup device Operating system error 59(An unexpected network error occurred.)

$
0
0

I have been recently getting the below error messages on the sql error logs and this is happening on to some particular servers.

The back ups are being compressed. 

Error Message 

'BackupIoRequest::ReportIoError: read failure on backup device  Operating system error 59(An unexpected network error occurred'

The back ups are often valid and sometimes are more than the last nights back up. The back ups are done on a network share. I tried Ola Hallengreen script and also the default maintenance wizard but getting the same error.  Any help will be highly appreciated. 

Thanks in advance 


Object Tracking in Jobs

$
0
0
Is it possible to track all the objects that a job/query touches while it is executing? For example a job queries a table and then runs a stored procedure that gathers some data from another table and puts all this in the result set. I would like to see that it touched ServerA.DatabaseA.TableA and ServerB.DatabaseB.TableB.

tuf file location

$
0
0

Hi Experts,

Want to find out tuf file location on standalone server with no LS configured.

Please help.

regards,


Manish

can turn versioning on but not off

$
0
0
Hi we run 2016 enterprise. What restriction prevents me from turning versioning off in our dev environ on two tables involved in a temporal relationship?  I can turn it on with no problem. 

SQL Server data lost

$
0
0
I'm facing a very complex situation with my web application software databases hosting on a virtual machine server. My database version "SQL Server 2014 Standard Edition" and recovery mode is FULL. Application and database is running fine but suddenly in sometime some data is missing. This is the 4 times I got complaint from application users. The application behavior is there are few steps/forms need to submit one by one to complete the process and at the final step user got an e-mail if user complete full process. Now the main problem is user complete the full process and got the e-mail but sometime or one day later user complaint his data is lost. In database tables I can't found any data that user already submitted but analysis of SQL Server LDF file using a tool I found data. Help me to solve this issue. Thanks.

ping port got failed

$
0
0

while ping 1433 from app server am getting below msg, not getting any drops,

 if anyone face this type of issue? but there is no issue on DB server. ( if any one on networking can understand )

psping  DBserverIP:sqlport

psping 10.240.0.8:1433

Msg:

You were not connected because a duplicate name exists on the network. If joining a domain, go to System in Control Panel to change the computer name and try again. If joining a workgroup, choose another workgroup name.


fetch SQLjob history metrics

$
0
0


capture SQL jobs running historical status,  ( need additional information starttime &  enddate )

Query:

use msdb

go

SELECT j.name JobName,h.step_name StepName, 
CONVERT(CHAR(10), CAST(STR(h.run_date,8, 0) AS dateTIME), 111) RunDate,-- h.job_id,
STUFF(STUFF(RIGHT('000000' + CAST ( h.run_time AS VARCHAR(6 ) ) ,6),5,0,':'),3,0,':') RunTime, 
h.run_duration StepDurHHMMSS,
case h.run_status when 0 then 'failed'
when 1 then 'Succeded' 
when 2 then 'Retry' 
when 3 then 'Cancelled' 
when 4 then 'In Progress' 
end as ExecutionStatus, 
h.retries_attempted,
h.message MessageGenerated 
FROM sysjobhistory h inner join sysjobs j
ON j.job_id = h.job_id
where  step_name !='(Job outcome)' and CONVERT(CHAR(10), CAST(STR(h.run_date,8, 0) AS dateTIME), 111) > getdate()-1 and j.enabled=1 
ORDER BY j.name, h.run_date desc
GO

need additional information starttime &  enddate , 


Show Suspect but not suspect

$
0
0

One of my database  (name XYZ) shows suspect status in EM but when i try to dig further by running below query i get only "OK" ( see query)

SELECT [name],status,  case status when (status & 32) then 'Loading'
           when (status & 32) then 'Loading'
           when (status & 64) then 'Pre Recovery'
           when (status & 128) then 'Recovering'
           when (status & 256) then 'Not recoverd'
           when (status & 512) then ' Offline'
           when (status & 1024) then ' Single user'
           when (status & 1024) then ' Read only'
           when (status & 32768) then ' Emergency Mode' else 'OK' end as status
FROM master.dbo.sysdatabases
WHERE [name] NOT IN ('distribution', 'tempdb', 'model','Pubs','Northwind')

also i run this

select * from sysdatabases where databaseproperty(name,N'IsSuspect') <> 1

and here also i get all the database including "XYZ"...i guess if "XYZ" is suspect the resultset should not be including "XYZ"

Why if the EM shows suspect status FOR "XYZ" DATABASE  it should come up when i check status column in sysdatabases table?

 

 


 

 


Archiving multiple partitions on a table at a time

$
0
0

I have Created a monthly partition on a table.I need to only remove or archive the oldest partition which is having data inside the partition.I don't want to create any new partition.

if there is any partition with 0 row count which are less than the above oldest partition i need to archive or remove all such partitions too.Please let me know what is the best approach to do this.Do we need to create any loop in order to achieve this.


 

Reg:Clarification on multiple stored procedures run at a time in one query window...

$
0
0

Hi Experts,

in one of my ssms query window ,

i am going to exegute.

exec SP_Name1 @paramA ,@paramB ,@paramC

GO exec SP_Name2 @paramA ,@paramB ,@paramC

GO

exec SP_Name3 @paramA ,@paramB ,@paramC

Here can i know, the above stored procedures will execute in serially (one after another )or parallely (three at a time)....

is there is any impact on the GO statement in this context?

my current Isolation Level is Read Committed.

Thanks in Advance.

Ramesh.



Disable windows netbios

$
0
0

what's the impact on sql server when disabling NetBIOS over TCP/IP on windows? is it for named pipe connection ?

SQL Server 2019 CTP 2.1 External Data Source setup issue

$
0
0

Hi All,


We are trying to configure Polybase External Data-source with SQL Server 2019 CTP2.1 to query MongoDB and having issues with the command.(Issue with MongoDB command)

CREATE EXTERNAL DATA SOURCE external_data_source_name
WITH (
LOCATION = mongodb://<server>[:<port>],
-- PUSHDOWN = ON | OFF,
 CREDENTIAL = credential_name
);


Error : Incorrect syntax 'mongodb'

We followed the steps mentioned in the below link,Polybase and releated configured where correclty set . We are able to configure External Data Source with Hadoop,Azure Storage.

https://docs.microsoft.com/en-us/sql/relational-databases/polybase/polybase-installation?view=sqlallproducts-allversions

Is there a issue with the feature or am i missing something

system_health xevent having wrong timestamp

$
0
0

when i read the xel file, timestamp vaule is  not true compare to original deadlock


 SELECT
            c.value('@timestamp', 'DATETIME2') AS DeadlockTimestamp,
            c.value('(@name)[1]', 'nvarchar(250)') AS DeadlockEvent,

how to fetch original  deadlock timestamp from  .xel file?

Viewing all 15889 articles
Browse latest View live


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