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

I can not send Email from SQL Server !!!!

$
0
0

Hi every body,

I have big problem at least for me, i want to send an Email using SQL Server 2008,

this message appear: "  Mail queued. "

but this error message appear is the Database Mail Log:

The SMTP server requires a secure connection or the client was not authenticated. 


I make all steps right like this link:

http://www.idevelopment.info/data/SQLServer/DBA_tips/Database_Administration/DBA_20.shtml

Please do not tell me that: "You must do some thing wrong"  no

I am sure that every thing and all steps is right,

I reinstalled new version of windows and SQL Server 2008 but the problem is still,

i tried with SQL Server 2005 but also the same problem:

The SMTP server requires a secure connection or the client was not authenticated. 

The Firewall is turning off and i am also close my Antivirus but also no way,

I am also try with microsoft:

Troubleshooting Database Mail: Mail queued, not delivered

Please i need an advise from an Expert, it is big problem for me.




Avg. Disk Queue Length

$
0
0

Hi,

I just saw a presentation on monitoring SQL server and the person giving it had a spreadsheet showing all his stats recorded with PerfMon. One thing I noticed was that he had taken the Avg. Disk Queue Length of the Data and log Drives(fair enough). I noticed however that he had a column listing the total Avg. Disk Queue Length of the Data and Log drives. I was wondering is this total something that needs to be considered when monitoring? I would always have looked at the Avg. Disk Queue Length for each drive separately.

Cheers

Paul

TempDB issue after applying Indexes

$
0
0

I added several indexes to a SQL Server 2012 database to help with performance a couple of days ago. Today our partition with TempDB on it ran out of space. TempDB went from less than 10 GB to 38 GB. after running :

SELECT SUM(unallocated_extent_page_count) AS [free pages], 
(SUM(unallocated_extent_page_count)*1.0/128) AS [free space in MB]
FROM sys.dm_db_file_space_usage;

it looks like I have about 22GB of free space in tempDB. I understand that TempDB was used to do all of the sorting that was done by SQL Server but now it is causing space issues. If TempDB has that much free space why is it complaining about running out of space on the server? What can I do to prevent this problem from happening again?



SQL Server 2008 Standard Edition or Enterprise Edition on a Dev server?

$
0
0

We have a development server which currently has SQL Server 2008 Standard Edition installed. One of the drawbacks for us is that we cannot install some third party software like the Oracle Driver by Attunity for SQL Server, which we need for BI.

Is it better to install SQL Server 2008 R2 Enterprise edition instead on this server?

Do Dev servers need enterprise edition?

Msg 3456, Level 16, State 1 Could not redo log record

$
0
0

I am getting below error:

restore log Manish from disk = 'W:\translogs\Manish_20121012021501.trn'

with replace, norecovery

 

Error –

 

Processed 0 pages for database 'Manish', file 'ManishDATA1' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA2' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA3' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA4' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA5' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA6' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA7' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA8' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA9' on file 1.

Processed 0 pages for database 'Manish', file 'ManishDATA10' on file 1.

Processed 636 pages for database 'Manish', file 'ManishLOG1' on file 1.

Processed 95840 pages for database 'Manish', file 'ManishLOG2' on file 1.

Msg 3456, Level 16, State 1, Line 1

Could not redo log record (13711624:118626:157), for transaction ID (2:-271513189), on page (3:57660275), database 'Manish' (database ID 5). Page: LSN = (13711624:118626:151), type = 2. Log: OpCode = 2, context 3, PrevPageLSN: (13711624:118626:154). Restore from a backup of the database, or repair the database.

Msg 3013, Level 16, State 1, Line 1

RESTORE LOG is terminating abnormally.

what could be the cause and possibilities of correcting these errors?


Manish


how to track down primary key violation problem

$
0
0

We have a specific file from our application that cause PK violation on our SQL 2008 server. I would like to track down what those fields are and I know which DB and table those field resides.  The application itself only show the error with PK violation and it didn't show what those fields are. I tried using SQL profiler but was unable to location the transaction and the relevant errors. Can anyone suggest what troubleshooting technique I can use for this particular problem?

Thanks

Minimally logged and point in time recovery .

$
0
0

In Minimally logged operation, If i change recovery model to bulk logged, and start bulk operation, after bulk operation if i insert 1 record to the same page on which bulk logged operation occurred, and now i take tlog backup, if i am right we can't rollback to prev state of insert of 1 record. so called PITR not possible in minimally logged.

======================= blogs

http://blogs.msdn.com/b/sqlserverstorageengine/archive/2008/02/05/bulk-logging-optimizations-minimal-logging.aspx

The only drawback of minimal logging is that it does not support point-in-time recovery. This is because during the transaction log backup, the state of the pages involved in the bulk import may have changed between the time bulk import was done and the transaction log back is initiated.  One can argue that we could possibly do point-in-time recovery to just before the bulk import had started but it is not supported. If this is of concern, you can do transaction log backup before/after bulk operations

from above does it mean when we opted for bulk logged recovery model, we can't use stopat in restore log even if we don't use bulk import operation?

means if i insert 1 record in page 1 and 2nd record in page 2, still it is not possible to use stopat in BL recovery model. Please clarify experts.

1 more question when we do bulk import , why sch-M locks needed when there's index on table (either clustered or Non-clustered index0?


Manish


Backup/Restore Issue

$
0
0

Hi,

Can backup taken on:

Version - Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (Intel X86)   Sep 22 2011 00:28:06   Copyright (c) 1988-2008 Microsoft Corporation  Express Edition with Advanced Services on Windows NT 5.2 <X86> (Build 3790: Service Pack 2) (VM)

restore on:

Microsoft SQL Server 2008 (SP3) - 10.0.5512.0 (X64)   Aug 22 2012 19:25:47   Copyright (c) 1988-2008 Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) (VM)

Cannot restore. Need your help?

Thanks


Unable to start default LocalDB instance on Windows 8 x86

$
0
0

Cannot start the default LocalDB instance, in our application or by typing in 'sqllocaldb s "v11.0"' on the command line. This issue only occurs on Windows 8 x86.  Works fine on Windows 7 x86/64 and on Windows 8 x64.  Have gotten the same results on a physical Windows 8 x86 box, as well as on a Windows 8 x86 VM we created to retest the issue.  ASP.NET 4.5 has been enabled in Windows Features.  Here's what the Instance's error log has to say:

2012-11-01 16:22:17.90 Server      Microsoft SQL Server 2012 - 11.0.2318.0 (Intel X86)
    Apr 19 2012 11:55:51
    Copyright (c) Microsoft Corporation
    Express Edition on Windows NT 6.2 <X86> (Build 9200: ) (Hypervisor)

2012-11-01 16:22:17.90 Server      (c) Microsoft Corporation.
2012-11-01 16:22:17.90 Server      All rights reserved.
2012-11-01 16:22:17.90 Server      Server process ID is 2932.
2012-11-01 16:22:17.91 Server      System Manufacturer: 'Microsoft Corporation', System Model: 'Virtual Machine'.
2012-11-01 16:22:17.91 Server      Authentication mode is MIXED.
2012-11-01 16:22:17.91 Server      Logging SQL Server messages in file 'C:\Users\Testing\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0\error.log'.
2012-11-01 16:22:17.91 Server      The service account is 'TestWin8x86\Testing'. This is an informational message; no user action is required.
2012-11-01 16:22:17.91 Server      Command Line Startup Parameters:
     -c
     -S "MSSQL11E.LOCALDB"
     -s "LOCALDB#C930B37E"
     -d "C:\Users\Testing\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0\master.mdf"
     -l "C:\Users\Testing\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0\mastlog.ldf"
     -e "C:\Users\Testing\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0\error.log"
2012-11-01 16:22:18.14 Server      SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2012-11-01 16:22:18.14 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2012-11-01 16:22:18.14 Server      Detected 2047 MB of RAM. This is an informational message; no user action is required.
2012-11-01 16:22:18.14 Server      Using conventional memory in the memory manager.
2012-11-01 16:22:18.21 Server      Node configuration: node 0: CPU mask: 0x00000003:0 Active CPU mask: 0x00000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2012-11-01 16:22:18.22 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2012-11-01 16:22:18.23 Server      Software Usage Metrics is disabled.
2012-11-01 16:22:18.23 spid8s      Starting up database 'master'.
2012-11-01 16:22:18.26 spid8s      1 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2012-11-01 16:22:18.28 spid8s      0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2012-11-01 16:22:18.36 Server      CLR version v4.0.30319 loaded.
2012-11-01 16:22:18.44 Server      Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework\v4.0.30319\.
2012-11-01 16:22:18.44 spid8s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2012-11-01 16:22:18.44 spid8s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
2012-11-01 16:22:18.49 spid8s      SQL Trace ID 1 was started by login "sa".
2012-11-01 16:22:18.50 spid8s      Server name is 'TESTWIN8X86\LOCALDB#C930B37E'. This is an informational message only. No user action is required.
2012-11-01 16:22:18.51 spid11s     Server local connection provider is ready to accept connection on [ \\.\pipe\LOCALDB#C930B37E\tsql\query ].
2012-11-01 16:22:18.52 spid11s     Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2012-11-01 16:22:18.52 spid8s      Failed to verify Authenticode signature on DLL 'C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn\\ftimport.dll'.
2012-11-01 16:22:18.53 spid9s      Starting up database 'mssqlsystemresource'.
2012-11-01 16:22:18.53 spid8s      Error: 17204, Severity: 16, State: 1.
2012-11-01 16:22:18.53 spid8s      FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf for file number 0.  OS error: 3(The system cannot find the path specified.).
2012-11-01 16:22:18.53 spid8s      Error: 5120, Severity: 16, State: 101.
2012-11-01 16:22:18.53 spid8s      Unable to open the physical file "e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
2012-11-01 16:22:18.53 spid9s      The resource database build version is 11.00.2318. This is an informational message only. No user action is required.
2012-11-01 16:22:18.58 spid9s      Starting up database 'model'.
2012-11-01 16:22:18.58 spid9s      Error: 17204, Severity: 16, State: 1.
2012-11-01 16:22:18.58 spid9s      FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\model.mdf for file number 1.  OS error: 3(The system cannot find the path specified.).
2012-11-01 16:22:18.58 spid9s      Error: 5120, Severity: 16, State: 101.
2012-11-01 16:22:18.58 spid9s      Unable to open the physical file "e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\model.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
2012-11-01 16:22:18.58 spid9s      Error: 17207, Severity: 16, State: 1.
2012-11-01 16:22:18.58 spid9s      FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.
2012-11-01 16:22:18.58 spid9s      File activation failure. The physical file name "e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\modellog.ldf" may be incorrect.
2012-11-01 16:22:18.58 spid9s      Error: 945, Severity: 14, State: 2.
2012-11-01 16:22:18.58 spid9s      Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
2012-11-01 16:22:18.58 spid9s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

CDC and sys.dm_db_task_space_usage.internal_object_alloc_page_count

$
0
0

Gurus -

I have CDC setup (2008 R2) and the job is set to run continuous. The job calls the cdc scan procedure with default parameters
maxtran = 500
maxscans = 10
continuous = 5
pollinginterval = 5

Attached are the properties of the sys.dm_db_file_space_usage
database_id file_id unallocated_extent_page_count version_store_reserved_page_count user_object_reserved_page_count internal_object_reserved_page_count mixed_extent_page_count
2 1 506280 0 592 4288 840
2 3 506192 0 576 4488 744
2 4 506400 0 616 4232 752
2 5 506472 0 512 4288 728

sys.dm_db_task_space_usage for session 54 (cdc job session)

session_id request_id exec_context_id database_id user_objects_alloc_page_count user_objects_dealloc_page_count internal_objects_alloc_page_count internal_objects_dealloc_page_count
54 0 0 2 92482 92481 434136 0

sys.dm_db_session_space_usage for session 54 (cdc job session)

session_id database_id user_objects_alloc_page_count user_objects_dealloc_page_count internal_objects_alloc_page_count internal_objects_dealloc_page_count
54 2 0 0 0 0

In "sys.dm_db_task_space_usage" the "internal_object_alloc_page_count" column increases gradually and the "internal_object_dealloc_page_count" doesnot change. 

This intern means that the session uses space in the tempdb that gradually increases. It used to be in MB's now have moved to GB's.
But this doesnot add up to the output from sys.dm_db_file_space_usage (429840 in dm_db_task_space_usage is much higher that the sum of the four rows for internal_object_reserved_page_count column in sys.dm_db_file_space_usage) -Yes I have 4 tempdb data files

Questions:-
1) Why is the dealloc not happening for the CDC job - (It deallocates for other processes that are continuously running like replication jobs in our system)
2) Why is the counts not making sense

Appreciate help understand!

Thanks

Can't access table named SysMessages in SQL Server 2012

$
0
0

I have a table in my database named SysMessages that I use for storing custom error messages. I have been using this for years in SQL Server 2005/2008 with no problem, but in 2012 whenever I refer to this table in a select statement the database engine returns master.sys.SysMessages instead of my table. Even if I fully qualify the table name like this: Select * From MyDB.dbo.SysMessages, it still returns master.sys.SysMessages.

This breaks my application because my SysMessages table has a different structure.

Obviously this was not a good choice of table name in the first place, but it's out there in hundreds of customer databases so simply renaming the table is not a simple solution. Strangely enough I can use this name in DDL, so I can create a new table named SysMessages and drop it, I just can't refer to it in a select statement.

Is there anything that can be done to query the custom SysMessages table without recreating it? 

SQL Server 2005 Error Log : LazyWriter: warning no free buffers found.

$
0
0


Problems and Steps that I have tried:

1. Client Computer unable to connect to DB Server.
2. Error log shows many rows of errors started with "LazyWriter: warning<c/> no free buffers found."
3. Successfully ping server.
4. Successfully remote (using mstsc) into server.
5. After log in server without doing any configuration, problem has been solved.
6. Happens few times in any weeks.

Copy database troubles on SQL Server 2008 R2

$
0
0

I have a SQL Server database called IntRaad. It is just a small database (44Mb) for a personal/small business application. On my development system (DEV), I work with it using SQL Server 2008 R2 Express. The data files are IntRaad.mdf and IntRaad_1.ldf. On my production system (PROD, in a different physical location, reachable only via Internet) I run SQL Server 2008 R2 (full version). I want to make a copy of IntRaad on DEV to IntRaad on PROD. I tried to make a backup on DEV, copy the backup file to PROD, and then do a restore on PROD; it failed saying that the backup file came from a different database than the one I am trying to restore (even though they have the same names). Then I tried this:  take IntRaad on PROD offline; replace the data and log files on PROD with the data and log files from DEV; take IntRaad on PROC online again with command ALTER DATABASE IntRaad SET ONLINE; this failed with a lengthy error message:

Msg 926, Level 14, State 1, Line 1

Database 'IntRaad' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.

Msg 5069, Level 16, State 1, Line 1

ALTER DATABASE statement failed.

Msg 9003, Level 20, State 15, Line 1

The log scan number (50954:1803:1) passed to log scan in database 'IntRaad' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

Msg 3414, Level 21, State 1, Line 1

An error occurred during recovery, preventing the database 'IntRaad' (database ID 8) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.

The SQL Server error log lists those same errors, and in addition says: During upgrade, database raised exception 926, severity 14, state 1, address 0000000000C08061. Use the exception number to determine the casue.

IntRaad works just fine on DEV – nothing suspect about it. I do not understand what Msg 9003 is trying to tell me.

I tried to use the Copy Database Wizard, but that does not seem to be available on the Express version on DEV. On PROD, I found the wizard, but I could not find a way of specifying as the source a SQL Server instance out there somewhere on the Internet.

How do I do this correctly, please?


r4

Restore failed

$
0
0

Hi,

I received backup file from vendor. When I run restore script,

restore database xxxx

from disk='path\backupfilename'

with

move 'datafile' to 'newpath\filenaem',

move 'logfile' to 'newpath\logfilename',

replace,recovery

database created but say in restoring mode. There is error:

Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Msg 5243, Level 22, State 6, Line 1
An inconsistency was detected during an internal operation. Please contact technical support.

How to resolve this issue?

Thanks

Diskpart Sql Server

$
0
0

I excuted DiskPart for sql server. below the screenshot. is Offset ok Please explain.


Manish


Meaning of Msg 3456, Level 16 Sql Server message

$
0
0

What's the meaning of the below error:

Could not redo log record (13711624:118626:157), for transaction ID (2:-271513189), on page (3:57660275), database 'Manish' (database ID 5). Page: LSN = (13711624:118626:151), type = 2. Log: OpCode = 2, context 3, PrevPageLSN: (13711624:118626:154). Restore from a backup of the database, or repair the database.

Msg 3013, Level 16, State 1, Line 1

I have some questions:

1) page (3:57660275) ==> Means fileid=3 and pageid=57660275 or page 3

2) Meaning of log record (13711624:118626:157)

3) Meaning of transaction ID (2:-271513189) ==> is this distributed transaction on fileid=2?

4) What is OpCode and context 3 meaning?


Manish


Linked server performance dropped after migration

$
0
0

We just finished a server migration for our server. Actually, it is a hardware migration with new powerful server.

From 

Win 2000 Adv Server + SQL 2000 to Win 2003 Ent + SQL 2000 

After that, we found the script though linked server to another instance is much slower than before. The linked server setup is the same us before. Can anyone have idea on this

How to detect corrupted index?

$
0
0

Hi,

We have a production Windows desktop app which runs against a SQL Server 2008 R2 database.  (It was originally developed using SQL Server 2005, but was switched to 2008 at least a year ago.  After all, this is November 2012.) This app has been in production several years at several different sites, with essentially no problems.  Lately, at one of the sites, there have been two instances of index corruption within a month.

I suspect some sort of underlying systemic problem, but that is not my question here.  We are working that aspect of it.

The problem manifests when rows in a gridview sort and are displayed out of order.  Rebuilding all the indexes solved the problem both times.  (It is very reproducible by restoring a database backup from before the fix.)

However, none of the diagnostic commands, such as "DBCC CHECKDB", "DBCC PAGE" or "DBCC SHOWCONTIG" give any error msg or indication of any problem that I can see. 

So my question is:  are there any ways to determine if an index is corrupted without actually opening the app and looking for the offending behavior?  Specifically, is there some syntax of DBCC or something similar that I am missing?  Am I misinterpreting the output of SHOWCONTIG?

Thanks.

--Dan


Dan Hurwitz

Corrupted Database Error 3456

$
0
0

After a simple reboot of the file server one of the data bases in the Sql Server 2k of the SBS 2000 appears in enterprise manager as supect. I decided to detach and again to attach the db. I have never been abble to attach the db, and I received teh following error:

Error 3456: could not redo log record(8433:539:79), for transaction ID:(0:0), on page(1:32352), database 'PRICAI2005' (9). Page: LSN=(8432:16085:7), type=11.log: UpCode=5, context 11, PrevPageLsN:(8433:378:3).

I think I have read all kind of information about this error, I tried all th sugestions in the multiples articles I saw, but untill now, the problem  remains the same. And no, I haven't any backup of this DB. Is there anyone who knows a solution for my problem. I will be deeply gratefull.

 

Thanks,

José Dinis 

suporte.aospc@sapo.pt

blocking from xp_sysmail_format_query waittype of preemptive_os_getprocaddress

$
0
0

Hi!

We have a hung process with wait type of preemptive_os_getprocaddress. The process's last statement was xp_sysmail_format_query. I tried killing the proc, but now it just in killed/rollback status. It's a production server so don't want to reboot until the evening or weekend. Has anone ran into this issue and is there a fix without rebooting the box? We are running SQL 2008 R2. Version is 10.50.1702.

Thanks in advance

Raj

Viewing all 15694 articles
Browse latest View live


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