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

error 1069: The service did not start due to logon problems

$
0
0

The local sql server that was working fine earlier does not start now. I have already created tables and accessed them using stored procedures.

I get an error 1069: The service did not start due to logon problems. I have only changed my domain password. I do not remember what authentication I chose for log on.

Any suggestions would be helpful.

Thanks


Database Log Shrink

$
0
0

Hi All,

We have scheduled SQL DB backups using Veritas Netbackup tool. The primary DB server backup strategy is given below.

1. Full Backup: Once in a week

2. Diff Backup: every day at midnight

3. T-Log Backup: Every one hour.

We have configured DB mirroring from primary DB server to secondary DB server. We are facing space issue on drive because log file size is around 150 GB (total capacity of log drive is 200 GB). We are planning to follow below steps to shrink log file and to reclaim disk space.

1.Break DB mirroring.

2. Shrink log file using below command.

USE PRODDB
GO
ALTER DATABASE PRODDB SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE('PRODDB_log', 1)
ALTER DATABASE PRODDB SET RECOVERY FULL WITH NO_WAIT
GO

3. Reconfigure DB mirroring from primary DB server to secondary DB server using below steps.

a. Take latest full backup & Log backup of primary DB server using SQL Agent and restore it on secondary DB server.

b. Configure DB mirroring using wizard or SQL scripts.

My Questions are,

1. By performing above steps, will it break Veritas Netbackup tool backup strategy?

2. If YES, can you please tell me the steps to shrink log file in DB mirroring environment.

Our PROD DB size is around 300 GB. 

"In transition" database state

$
0
0

Dear all,

When we have a database “in transition” state why this state is not recognized in sys.databases? it is just a question

In my case, db appears as “online” although in fact it’s false, a picture worth a thousand words:

Thanks for your time,

How to reduce the size of databases log file in SQL database 2008(R) ?

$
0
0
How to  reduce the size of databases  log file in SQL database 2008(R) ?

SQL Server 2012 Management Studio: "Number of Errors" report crashed

$
0
0

I have Data Collection on SQL server 2012 setup and all statistics data was stored in [MngDataWarehouse].

Recently when I tried to get report from SSMS Management: Number of Errors, the report crashed and got following error and I also found that the SQL Server Agent scheduled job have been running very long more than 3 hours sometime and there are deadlocks for cleaning the expired logs.

How could I fix this? Please help!

Thanks, Steven


SQL Server upgrade from SP2 to SP3 problems with master key service decrypting

$
0
0
Hi,

We have an SQL Server Cluster 2012 SP2, on Windows Server 2012 (2 nodes), and the service Database Engine run under a same local user account.
We have upgraded SQL Server to SP3, from this moment we have a problem with the linked servers configured, we receive the error: the current master key cannot be decrypted.
We tried with the command ALTER SERVICE MASTER KEY REGENERATE FORCE (without the option Force, we get the same error), reconfiguring the linked servers and everything was fine, but just on one node, if the cluster moves on the other node we get the same error.
We`ve tried to make the same reconfigurations, and it worked, but the same problem, just on this node, when we move on the other node we get the same error.
We don`t have backup for master key service, how we can repair/regenerate the master key service that will can be decrypted on both nodes?
For any other informations or questions i will be on your disposal,
Thanks

the current transaction cannot be committed and cannot support operations that write to the log file

$
0
0

“the current transaction cannot be committed and cannot support operations that write to the log file

Further investigation found the following error:

“Could not allocate space for object dbo.Table because the 'PRIMARY' filegroup is full.”

Facts:

  1.       Windows Server 2008 R2 64bit + SQL Server 2008 R2 64bit.
  2.       The database has one file group (PRIMARY) with one file connected.
  3.       The primary file defined as enabled auto growth and unrestricted file growth.
  4.       The database size is 1TB and it is highly fragmented 99%.
  5.       The following KB installed on server KB967351.
  6.       The physical disk size is 6TB(1TB occupied by the database) .

can any one help me and answer : 

  1.       what happened ?
  2.       What should be done?
  3.       How to avoid it in future?

thanks you all :-). 

Omer Aviad 

How to transfer a database from one collation to another collation in SQL Server


Buffer Node: Page Life Expectancy

$
0
0

Hi folks,

I'm trying to wrap my head around this particular performance counter, however, I can't - at least not based on what I'm pulling from PerfMon versus what's described in articles like this.

What I'm getting from PerfMon is a value that increase by 1 per second. So, where I ran a 12 hour trace, I ended up with a minimum value of 2,717,203 and a maximum of 2,760,404 making for a difference of 43,201 seconds, or basically 12 hours.

I pilfered an extract from someone else's post where they were querying the same information in SQL Server and got vastly different results. First, here's the query:

SELECT
  *
FROM
(SELECT [instance_name] [node],[cntr_value] [PageLife_S] FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'Page life expectancy'
) ple
INNER JOIN
(
SELECT [instance_name] [node],[cntr_value] [DatabasePages] FROM sys.dm_os_performance_counters
WHERE [counter_name] = 'Database pages'
) dp ON ple.[node] = dp.[node]

And here's the matching results:

Using the figures above, is anyone able to explain to me how to interpret the "Buffer Node: Page Life Expectancy" counters?

Cheers,
Lain

Data file is restoring, log file is online?

$
0
0

Hi All,

This is my first time seeing this, data file is in restoring, and log file is in online, have you seen this? Do you know how it end up like this?

Stored procedure compile with update statistics causing heavy blocking

$
0
0

We have stored procedure with simple select statement, it is selecting data from table with following filtered index:

CREATE NONCLUSTERED INDEX
[IX_cdrs_phone_score_originating_ip_binary_sub_org_id_utcdate_i_filter_null] ON [agg].[cdrs_phone_score]

(

       [originating_ip_binary]
ASC, /*binary (16)*/       [sub_org_id]
ASC,  /*int*/       [utcdate]
ASC /*datetime*/

)

INCLUDE (     [reqtype],  /*smallint*/       [phone_num])  /*bigint*/

WHERE ([originating_ip_binary] IS
NOT NULL)

WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE =
OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

GO

There is 570 million rows in table.

Average execution time is 847ms and stored procedure is executing around 40times per seconds from different SPIDs. However, after we started our applications last time we were able to see heavy blocking with following lock types (this is just a first few rows):

"SPID","Wait Time","Type","Resource","Command","CPU","I/O","Status","Blocking SPID","Session SQL"

145,0,,,SELECT,"25,967","1,110" ,"running, blocking",,

" 73","4,846",LCK_M_X,"OBJECT: 6:615673241:0 [COMPILE]",EXECUTE,"31,094","1,722","suspended, blocked, blocking",145,

"  86","4,753",LCK_M_X,"OBJECT: 6:615673241:0 [COMPILE]",EXECUTE,"37,365","2,880","suspended, blocked",73,

"  169","4,714",LCK_M_X,"OBJECT: 6:615673241:0 [COMPILE]",EXECUTE,"20,051",664,"suspended, blocked",73,

"  139","4,632",LCK_M_X,"OBJECT: 6:615673241:0 [COMPILE]",EXECUTE,"29,768",965,"suspended, blocked",73,

This is first select (from auto update statistics) - SPID 145:

SELECT StatMan ([SC0],
                [SC1],
                [SC2],
                [SC3],
                [SB0000])
  FROM (SELECT TOP 100 PERCENT
               [SC0],
               [SC1],
               [SC2],
               [SC3],
               step_direction ([SC0]) over  (ORDER BY NULL) AS [SB0000]
FROM (SELECT [originating_ip_binary] AS [SC0], [sub_org_id] AS [SC1], [utcdate] AS [SC2], [cdrsid] AS [SC3]
FROM [agg].[cdrs_phone_score] TABLESAMPLE SYSTEM (4.439952e+000 PERCENT) WITH (READUNCOMMITTED)
WHERE ([originating_ip_binary] IS NOT NULL)) AS _MS_UPDSTATS_TBL_HELPER ORDER BY [SC0], [SC1], [SC2], [SC3], [SB0000] ) AS _MS_UPDSTATS_TBL
OPTION (MAXDOP 1) 

After we added WITH RECOMPILE in stored procedure body all blocking was gone. Anybody had similar issue? 


CHECKSUM

$
0
0

Hi experts,

I never seen this before, and I wanted to know if it really makes a difference?

In the merge I usually do:

merge

..

when matched and

target.column <> source.column

But I have some legacy code and I see this:

OR CHECKSUM (TARGET.ID, TARGET.column1) <> CHECKSUM (SOURCE.ID, SOURCE.column1)

OR CHECKSUM (TARGET.ID, TARGET.column2) <> CHECKSUM (SOURCE.iID, SOURCE.column2)

OR CHECKSUM (TARGET.ID, TARGET.column3) <> CHECKSUM (SOURCE.ID, SOURCE.column3)

Why did that person add that? it really makes a difference the CHECKSUM?

Very big TRACKLOG file (31GB). What to do?

$
0
0
I've got SQL Server 2000 (yeah, I know it's old).  In the "Data" folder where one could find those files which are the actual databases, there's also a very big file called TRACKLOG.  It is 31GB.  Is there any way to reduce it?

TIA

SQL2012 crashes out of sql agent step creation when i attempt to set the step type

$
0
0

When I try to set up a new SQL agent job on a SQL2012 server, at the point of defining the job step type = SSIS package, the sql agent setup crashes and I get error:the type initializer for ‘’ threw an exception. (SQLManagerUI) Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (DTEParseMgd)

Other posts suggest that the only workaround is to install SQL2014 or 2016, or return to SQL2008, neither of which are possible for us. We have to move away from SQL2008 for security reasons, and we cannot move to SQL2014 because we use access adp project fromt ends which need the SQLOLEDB data provider which is obsolete in SQL2014. Does anyone know if Microsoft have released a service patch for SQL2012 which fixes this issue for good?

backup not for all database

$
0
0

Hi expert,

I have scheduled Backup job that backup all databases on myinstance but not all DB has  been backup , only a few..how could this occurred ?

what should I do experts..??

thanks for all U'reply


sql Server 2008: duplicated rows in Activity monitor

$
0
0

There are identical notes (Session id, Login etc.) in a Processes tab of Activity Monitor. Usially it is two, sometimes three same rows.

Does anyone have a similar situation?

Is this a bug or it is just s/th wrong in my comp?

(SQL Server 2008 R2 CUP3)

One of the two instance of sql server 2014 is using only few megabytes of committed (allocated) memory only. What could be the reason for such behavior of the second instance of SQL Server?

$
0
0

Hello ,

issue description:

We have Virtual Win Server 2012 R2 with two SQL Server Instances 2014.

Is anybody face such a  situation that when there are two instance of SQL server 2014 for one of them allocated about 16 gb of memory, for another one allocated about 100 gb of memory, so first instance is using all his allocated memory 16 gb but second instance of Sql Server  is using only 1 gb of  100 gb his allocated memory. 

Description of environment:
------------------------------------------------------------------------
 Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor) 
Total RAM 128 GB

1. SQL Server
12.0.2000.8 RTM Enterprise Edition (64-bit)  Microsoft SQL Server 2014 - 12.0.2000.8 (X64) 
Maximum memory server aprox. 16 Gb 


2. SQL Server
12.0.4100.1 SP1 Enterprise Edition (64-bit)  Microsoft SQL Server 2014 - 12.0.4100.1 (X64) 
Maximum memory server aprox. 100 Gb 
------------------------------------------------------------------------

Loading of second instance is sufficiently large but he can't  take for using greater than 1 gb memory.


What could be the reason for such behavior of the second instance of SQL Server?

Guys, thanks in advance for your help!

Regards,

Vyacheslav.


does truncating a table release space?

$
0
0

sp_spaceused returns a value for "reserved kb" for a table, the total space used by the table.

I would have thought that merely truncating a table leaves that space intact, just moves it to "unused".

But a quick test shows this is not the case - sometimes (always?) after a truncate it returns zero space reserved.

Interestingly, just deleting all the rows (from a heap) reports the reserved space is still there, but zero unused.  At least until the ghost record cleanup runs, I guess.  No?  It reports zero ghost rows, but space reserved and nothing unused.  Odd.

So, can anybody summarize when a truncate table frees space to zero?

And maybe just how that even works?

Thanks,

Josh

ghost rows on an indexed heap

$
0
0

Just poking around the database we seem to have one table reporting a bunch of ghost rows.

The table is a heap, but it has a nonclustered index on it.

It reports 600k ghost rows and 300k regular rows.

The fix for this is to rebuild with a clustered index?

What is the explanation for how it happens without getting cleaned up?

Microsoft SQL Server 2014 (SP1-CU5) (KB3130926) - 12.0.4439.1 (X64)
 Feb 15 2016 12:12:43
 Copyright (c) Microsoft Corporation
 Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

Thanks,

Josh

AVG Admin SQL issue

$
0
0

Every time I try to set Admin up using SQL I receive the message shown in the attachment. We have to use SQL due to the number of users we have. There ae other applications on this server that use SQl and they have no issues. I have checked and rechecked the admin username and password for SQL and still get message. I have created a new SQL admin user and tried it but to no avail. AVG support is balking at it because they think it is SQL related. I am no SQL expert by any stretch. Any help would be greatly appreciated

Viewing all 15872 articles
Browse latest View live


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