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

Sql Server service not starting

$
0
0

I am working on Sql Server 2012, installed on windows 7(32 bit)OS.

I am somehow not able to login SSMS and getting 18645 error.I checked the service in configuration manager and status
is showing as Running.Still I tried to restart after setting the admin password again.I am not able to login and service showing as Running.What could be the problem?

Prior to this problem I had scanned the system for windows worm(virus) through escan.Is it due to registry entry problem or
sql exe is still  infected ????

can anybody help solve this problem?


srm_2010


Index Rebuild

$
0
0

While rebuilding indexes log file is growing vary rapidly and we can't put DB in simple recovery mode because we have configured DB mirroring. Is there any way to minimize log file growth while index rebuild?

We have created index rebuild job with the help of SSIS package and we are executing index job once in a month during off business hours. The DB size is around 240 GB.

production db hung

$
0
0

My produciton DB hung 

after issuing command 

ALTER DATABASE [Datas] SET NEW_BROKER WITH ROLLBACK IMMEDIATE;

This command completed faster . but there was huge wait  on other service brokers  other db's ..

We do have many databases on the instance and we do have service brokers enabled for those .

only restart has fixed this issue . 

could anyone help me to identify this .

We did issue the command to close the open conversation  endpoints .. 

Is there anyway to close all the endpoints , because of this tempdb started to grow and performance issue on DB's



k.muthus

Help with Data Corruption

$
0
0
Hi all,

I am attempting to assist a customer who has had some database corruption and doesn't have a good backup history.

As far as I can tell from the following CHECKDB result, there is no easy repair to be had because the corruption is in index 1 (= actual table data).

I just wanted to confirm that there were no easy options to resolve this type of corruption. At the moment I've advised that it doesn't look good and he needs to start considering reconstituting the data from alternate sources and the last known good backup.

Thanks in advance

S


Msg 8966, Level 16, State 2, Line 1
Unable to read and latch page (1:17812823) with latch type SH. 1(error not found) failed. 
Msg 8966, Level 16, State 2, Line 1
Unable to read and latch page (1:18309934) with latch type SH. 1(error not found) failed. 
Msg 8966, Level 16, State 2, Line 1
Unable to read and latch page (1:18449461) with latch type SH. 1(error not found) failed. 
Msg 8966, Level 16, State 2, Line 1
Unable to read and latch page (1:20123965) with latch type SH. 1(error not found) failed. 
Msg 8966, Level 16, State 2, Line 1
Unable to read and latch page (1:20123967) with latch type SH. 1(error not found) failed. 
Msg 8966, Level 16, State 2, Line 1
Unable to read and latch page (1:20134589) with latch type SH. 1(error not found) failed. 
CHECKDB found 0 allocation errors and 6 consistency errors not associated with any single object.
Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:15879728) is missing a reference from previous page (1:20123965). Possible chain linkage problem.
Msg 2533, Level 16, State 1, Line 1
Table error: page (1:17812823) allocated to object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:17812823) was not seen in the scan although its parent (1:19146206) and previous (1:17715204) refer to it. Check any previous errors.
Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:17893052) is missing a reference from previous page (1:17812823). Possible chain linkage problem.
Msg 2533, Level 16, State 1, Line 1
Table error: page (1:18309934) allocated to object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:18309934) was not seen in the scan although its parent (1:16289065) and previous (1:18242352) refer to it. Check any previous errors.
Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:18424818) is missing a reference from previous page (1:18309934). Possible chain linkage problem.
Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:18840165) is missing a reference from previous page (1:20123967). Possible chain linkage problem.
Msg 2533, Level 16, State 1, Line 1
Table error: page (1:20123965) allocated to object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:20123965) was not seen in the scan although its parent (1:20151970) and previous (1:20151971) refer to it. Check any previous errors.
Msg 2533, Level 16, State 1, Line 1
Table error: page (1:20123967) allocated to object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:20123967) was not seen in the scan although its parent (1:18838767) and previous (1:19975745) refer to it. Check any previous errors.
Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:20130895) is missing a reference from previous page (1:20134589). Possible chain linkage problem.
Msg 2533, Level 16, State 1, Line 1
Table error: page (1:20134589) allocated to object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 1, partition ID 404068565188608, alloc unit ID 404068565188608 (type In-row data). Page (1:20134589) was not seen in the scan although its parent (1:14532975) and previous (1:20053803) refer to it. Check any previous errors.
Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 3, partition ID 967018518609920, alloc unit ID 967018518609920 (type In-row data). Page (1:17144901) is missing a reference from previous page (1:19842295). Possible chain linkage problem.
Msg 2533, Level 16, State 1, Line 1
Table error: page (1:18449461) allocated to object ID 1870629707, index ID 3, partition ID 967018518609920, alloc unit ID 967018518609920 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 3, partition ID 967018518609920, alloc unit ID 967018518609920 (type In-row data). Page (1:18449461) was not seen in the scan although its parent (1:15416544) and previous (1:18204837) refer to it. Check any previous errors.
Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 3, partition ID 967018518609920, alloc unit ID 967018518609920 (type In-row data). Page (1:18674256) is missing a reference from previous page (1:18449461). Possible chain linkage problem.
Msg 8928, Level 16, State 1, Line 1
Object ID 1870629707, index ID 3, partition ID 967018518609920, alloc unit ID 967018518609920 (type In-row data): Page (1:19842295) could not be processed.  See other errors for details.
Msg 8939, Level 16, State 98, Line 1
Table error: Object ID 1870629707, index ID 3, partition ID 967018518609920, alloc unit ID 967018518609920 (type In-row data), page (1:19842295). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 79824905 and -1.
Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1870629707, index ID 3, partition ID 967018518609920, alloc unit ID 967018518609920 (type In-row data). Page (1:19842295) was not seen in the scan although its parent (1:16339708) and previous (1:19055177) refer to it. Check any previous errors.
CHECKDB found 0 allocation errors and 22 consistency errors in table 'Transactions' (object ID 1870629707).
CHECKDB found 0 allocation errors and 28 consistency errors in database 'Configuration'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (CardData).

Unable to uninstall SQL server 2005 express

$
0
0

Trying to uninstall SQL server 2005 by right click uninstall on 'SQL Server 2005' then selecting SQL Express Database Engine and Workstation components. The uninstallation wizard ends with error.


Below is the summary file with error details.

MSI (s) (FC:44) [23:00:48:546]: Warning: The package code in the cached package 'C:\Windows\Installer\204f935f.msi' does not match the registered package code.  Cached package will be ignored.
MSI (s) (FC:44) [23:00:48:561]: User policy value 'SearchOrder' is 'nmu'
MSI (s) (FC:44) [23:00:48:561]: User policy value 'DisableMedia' is 0

DeadLock troubleshooting

$
0
0

Hi Everyone,

Can anyone Please check the attached log and help me how to troubleshoot deadlock

Thanks all


DBA

Accessing SSISDB of another Server through Linked Server

$
0
0

I have 2 servers, Application Server and Database Server.

My Application Server is hosting the SSISDB database and packages.

From my database server, I want to access the SSISDB of application server through Linked Server.

My windows ID has sys_admin access to both the servers. While I am configuring the linked server with option [Be made without using security context] and adding my Windows ID (checking impersonate) to login mappings. I am getting the error "Login Failed for user 'NT AUTHORITY\ANONYMOUS LOGON'".

Note: With above procedure, I am able to create linked server in application to access the DB server, but not able to create the Linked server in DB server to access the SSISDB of application server.

My application server is having 2 instances of SQL server, 1 is running with NT Service\MSSQLSERVER and another with a service account. I am not able to access any of them trough linked server.


SQL Server and Aroura Linked Server

$
0
0

I have configured our Aurora instance to be a linked server to an existing MSSQL instance using OLEDB connector. I am able to query the Aurora instance. However, we are running into an issue with some commands (mostly DELETE so far) that seem to get stuck. Analyzing in MSSQL we see OLEDB waits (going on 3 days now). On Aurora end using the Client Connections view we see the same connections that seems to be stuck on the Aurora end. We had two (the longest running ones) that were in a Sleep command with a "delayed send ok done" State. We are new to MySQL, but doing some searching I'm unable to find reference to that State so am guessing it's a custom Aurora State. Based on some other reading it sounds like the Aurora end might not be sending back a complete status to the MSSQL end.

So my question/s are is there some way to figure what is causing that State on our queries? Secondly, is using Aurora as linked server an ok practice?

EVENTDATA() data

$
0
0

Hello Forum

I'm writing a series of Database Triggers to capture when database objects are created, altered or deleted.  Currently my Triggers are capturing the Login Name and Object Name.

Is it possible to capture the Object type (Function, Table etc), the database name and the instance name (e.g. SERVERNAME or SERVERNAME\INSTANCENAME)


Please click "Mark As Answer" if my post helped. Tony C.

What's the best way to count rows in a memory table?

$
0
0

For regular tables you can get a quick row count from sys.partitions or by using sp_spaceused. These don't work for memory tables. Is it back to good old "select count(*)"?

The various DMVs give page (!?) allocations but I don't see row counts.

Thanks,

Josh

AUTO_CLOSE reverts each time SQL Express is restarted

$
0
0
I am trying to set AUTO_CLOSE OFF on SQL Express databases. However, it seems to revert to ON each time SQL Express is restarted.  Is there a way to make it "take" permanently for a database. Or even better, for all databases?  Thanks.

FULL DATABASE BACKUP ERROR

$
0
0

CANNOT BACK UP MY 2012 DATABASE. KEEP GETTING ERRORS HELP!!!

Index Reorganise estimation using Fragmentation value

$
0
0

Hi,

Please check the below result and tell me do we need to consider avg_fragmentation_in_percent value and page_ count values in order to rebuild the Indexes?

How to choose the page_count number, can we consider less amount of page_count also to rebuild or else we can simply ignore it?

Thanks


DBA

How non clustered index works in sql server.

$
0
0

I need detailed information about non clustered index in sql server. Could some one please explain how non clustered index works in sql server?

Thanks in advance.

How to perform Table partition in Sql Server 2014 Standard Edition

$
0
0

Hi all,

previously we had used sql server 2012 Developer edition where we can create table partition and that's working fine.

currently we are using sql server 2014 edition where we can not create table partition as we previously created in sql 2012 developer edition or enterprise edition.

we have standard licence only. so that we can't use developer or any other version.

any one can help me how can we create table partition in this version.


Info from @@Version different Status bar version on SQL Server 2005

$
0
0

Hello friends

I was checking the different version of my databases, but i have noted something curious.  In my engines 2005 i see difference between the result that give me @@Version vs the Status bar 

Why happens this?

Please give me a hand with this.

I don't have idea

Thanks in advance


Getting Error 33222 when enabling audit.

$
0
0

Hello all,

I'm having a bit of difficulty enabling an audit on the database engine.  I'm getting error 33222 when trying to enable it.

Audit "TestAudit" failed to start.  For more information, see the SQL Server error log.  You can also query sys.dm_os_ring_buffers where ring_buffer_type = "RING_BUFFER_XE_LOG". (Microsoft SQL Server. Error: 33222)

00:48:05,spid60,Unknown,Audit: Server Audit: 65538<c/> Initialized and Assigned State: TARGET_CREATION_FAILED
00:48:05,spid60,Unknown,SQL Server Audit failed to access the security log. Make sure that the SQL service account has the required permissions to access the security log.
00:48:05,spid60,Unknown,Error: 33208<c/> Severity: 17<c/> State: 1.
00:48:05,spid60,Unknown,SQL Server Audit could not write to the security log.
00:48:05,spid60,Unknown,Error: 33204<c/> Severity: 17<c/> State: 1.
00:48:05,spid60,Unknown,Audit: Server Audit: 65538<c/> State changed from: START_FAILED to: TARGET_CREATION_FAILED
00:48:05,spid60,Unknown,Audit: Server Audit: 65538<c/> Initialized and Assigned State: START_FAILED
00:48:05,spid60,Unknown,Audit: Server Audit: 65538 Session has been closed
00:48:05,spid60,Unknown,Audit: Server Audit: 65538<c/> State changed from: TARGET_CREATION_FAILED to: SHUTTING_DOWN
00:45:14,spid60,Unknown,Audit: Server Audit: 65538<c/> Initialized and Assigned State: TARGET_CREATION_FAILED
00:45:14,spid60,Unknown,SQL Server Audit failed to access the security log. Make sure that the SQL service account has the required permissions to access the security log.
00:45:14,spid60,Unknown,Error: 33208<c/> Severity: 17<c/> State: 1.
00:45:14,spid60,Unknown,SQL Server Audit could not write to the security log.
00:45:14,spid60,Unknown,Error: 33204<c/> Severity: 17<c/> State: 1.
00:45:14,spid60,Unknown,Audit: Server Audit: 65538<c/> State changed from: START_FAILED to: TARGET_CREATION_FAILED
00:45:14,spid60,Unknown,Audit: Server Audit: 65538<c/> Initialized and Assigned State: START_FAILED
00:45:00,spid60,Unknown,Audit: Server Audit: 65537 Session has been closed
00:45:00,spid60,Unknown,Audit: Server Audit: 65537<c/> State changed from: TARGET_CREATION_FAILED to: SHUTTING_DOWN


This server is not joined to a domain and belongs to the standard WORKGROUP.

Using secpol.msc, I've granted the local user that I'm trying to generate the log with the permission to "generate security audit" and enabled "success, failure" for all the audits under the audit policy.

Under the SSMS, I've also granted permission for user to be a "sysadmin" and granted permission under the "securables" to alter any database, alter any server audit, connect SQL, and control server.

I also provided permissions under the registry folder, HKLM/System/CurrentControlSet/Services/Eventlog/Security.

Are there any additional permissions I need to grant?  Any help would be greatly appreciated and thank you for your time and consideration.

which index choose/create?

$
0
0

Hi experts,

I am creating the below table that will have more than a million records, so I want to be cautions about performance...

CountryIdDateInserted
br22-Jul
br32-Jul
us23-Jul
eu43-Jul
eu23-Jul

The problem is that if I want to create a clustered index it should be composite, date, id and country... is that a good thing? or should I create a new column identity and make that my clustered index...?

Quick investigation performance.

$
0
0

Hi experts,

I have the below issue with an SSRS, it used to take 10 seconds to run last month… now it takes 10 minutes!

Yes, this month there were a lot changes in indexes, and some more load on another dbs… But 10 minutes is way too much! (no changes were introduced at server level, like memory,cxpacket,etc)

 

Below is what I have to investigate:

-SSRS loads for 10 minutes.

-Once I execute it, in activity monitor I see like 40 processes… Half of them waiting on CXPACKET, the other half on PAGEIOLATCH_SH.

-I saw that “wait time (ms) = 670,876” for one of them with CXPACKET as wait type.

- Head Blocker is empty… most of them were blocking themselves…

I do not expect to have a final answer here but, to be led to the correct causes at least! thanks in advance!

SQL backup fails, where are SQL AGENT logs stored?

$
0
0

Hi guys.

- We have 2008 R2 SQL Enterprise in our environment.

- We have configured BACKUP under SQL SERVER AGENT, running backup as a JOB.

- Backup is ran on daily basis.

Randomly backup does not succeded and we would like to find a root of the problem.

In EVENT VIEWER / APPLICATION we see events:

EVENTID: 3014

BACKUP failed to complete the command BACKUP LOG Database001. Check the backup application log for detailed messages.

We would like to find out where are logs of SQL AGENT stored on server, to see what is causing failing backup.

Please help


bostjanc

Viewing all 12963 articles
Browse latest View live


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