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

Exec of SendMailUsingDBMail to failed - 0, status set to 210 (SQL 2016)

$
0
0

Hi Guys,

Hoping someone can help here. I'm not too familiar with the ins and outs of SQL so any help appreciated.

We have some bespoke software which builts a HTML form that is going to be send in an email and is then passed on to DBMail. This HTML contains email address, subject etc.

When the script is running I'm seeing a lot of lines which state "Exec of SendEmailDBMail to <email> failed. - 0, stated set to 210".

I cant find what status 210 means. Is there a way I can view this email in SQL logs to determine the cause?

thanks in advance.


DatabaseIntegrityCehck fails intermittently.

$
0
0

Have been running the Ola Hallengren scripts on our new 2016 Enterprise server for about 6 weeks or so now.  The database Integrity script only works intermittently on some instances.  Others are fine.  I cannot find a cause for these failures.



The failure on the 9<sup>th</sup> failure above for example, seems to be fine for some databases, but then just stops:


I did run the checkdb manually against the database shown, and got the following initial message, but it appeared to complete ok:

DBCC CHECKDB will not check SQL Server catalog or Service Broker consistency because a database snapshot could not be created or because WITH TABLOCK was specified.

Completed though with no issues:

This seems to relate to disk space, but my disk space have no issues:

So I’m a bit stumped.

Any clues, most appreciated.

Regards

Ian

SQL Server Locks up with FAIL_PAGE_ALLOCATION 1025

$
0
0

Hey,

We have this issue where our SQL Server will run fine for a day then I loose all ability to connect to it. Generally this error occurs once SQL has used up all 20gb of memory available to it.

Environment: Vmware

OS: Windows Server 2016

SQL: SQL Server 2017 Standard CU12

Ram: 24gb total (20gb as max memory in SQL)

SQL applications get "Exception during Sub_Name: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)"

Remote Desktop Fails with "An internal Error has Occurred"

I even can't log in using the VSphere console.

The only thing I can do to get it to respond is a hard reboot through VSphere.

When I look in the logs I see FAIL_PAGE_ALLOCATION 1025. Microsoft support says that this is resolved in CU10 but we have 12 installed.

Things we've tried: Reduce Max Server Memory, Increase TempDB Size, Increase Page File Size.

Any help would be greatly appreciated.


Who will be announced as the next SQL Server Database Engine Guru? Read more about January 2019 competition!!

$
0
0


What is TechNet Guru Competition?

Each month the TechNet Wiki council organizes a contest of the best articles posted that month. This is your chance to be announced as MICROSOFT TECHNOLOGY GURU OF THE MONTH!

One winner in each category will be selected each month for glory and adoration by the MSDN/TechNet Ninjas and community as a whole. Winners will be announced in dedicated blog post that will be published in Microsoft Wiki Ninjas blog, a tweet from the Wiki Ninjas Twitter account, links will be published at Microsoft TNWiki group on Facebook, and other acknowledgement from the community will follow.

Some of our biggest community voices and many MVPs have passed through these halls on their way to fame and fortune.

If you have already made a contribution in the forums or gallery or you published a nice blog, then you can simply convert it into a shared wiki article, reference the original post, and register the article for the TechNet Guru Competition. The articles must be written in January 2019 and must be in English. However, the original blog or forum content can be from beforeJanuary 2019.

Come and see who is making waves in all your favorite technologies. Maybe it will be you!


Who can join the Competition?

Anyone who has basic knowledge and the desire to share the knowledge is welcome. Articles can appeal to beginners or discusse advanced topics. All you have to do is to add your article to TechNet Wiki from your own specialty category.


How can you win?

  1. Please copy/Write over your Microsoft technical solutions and revelations to TechNetWiki.
  2. Add a link to your new article on THIS WIKI COMPETITION PAGE (so we know you've contributed)
  3. (Optional but recommended) Add a link to your article at the TechNetWiki group on Facebook. The group is very active and people love to help, you can get feedback and even direct improvements in the article before the contest starts.

Do you have any question or want more information?

Feel free to ask any questions below, or Join us at the official MicrosoftTechNet Wiki groups on facebook. Read More about TechNet Guru Awards.

If you win, people will sing your praises online and your name will be raised as Guru of the Month.


PS: Above top banner came from Vimal Kalathil.


A call to 'Create Process' failed with error code '1455' (Error 15121)

$
0
0
Dear All,


I‌ had one of the sql jobs with the following error message‌ An error occurred during the execution of xp_cmdshell. A call to 'Create Process' failed with error code '1455' (Error 15121) but now its working without anything changing and I would like to know what the issue was please?



T‌hank you in advance!

Transaction log usage for Rebuild/Reorganize

$
0
0
When you are rebuilding or reorganizing indexes there is a possibility that the transaction log is getting full.

"Msg 9002, Level 17, State 2, Line 3
The transaction log for database 'Test' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases"

I am thinking of doing some checks before doing a rebuild or a reorganize if there is the space needed available (in the transaction log and if autogrow is enabled also considering the free disk space).

The question is how much space that is needed for different operations and recovery models.

For a rebuild in full recovery model it is the size of the index.

For a rebuild in bulk-logged or simple recovery model it's very little transaction log space that is needed, but can it be calculated?

For a reorganize it's even more difficult. Can the transaction log usage for a reorganize be calculated?

I have found some information in this whitepaper.

Ola Hallengren

Easy way to import into SQL Server, by using a DMP from Oracle

$
0
0

What is the best way to import from Oracle DMP into SQL Server 2012?

Thanks

set based load of temporal data

$
0
0

Hi we run 2016 enterprise. Is there a set based way to load temporal data that contains multiple entries for the same pk?

If a loop is required to do this, which is better a cursor, while loop or something else?


Use SSMS connect to linux mssql

$
0
0

I am not able to connect remotely to a mssql server installed on Linux :

Port is 1433.

And netstat  and show 1433 listen on 0.0.0.0:1433

I can telnet locally the port 1433 but can't remotely .

iptables is off. and I can telnet remotely the ssh port 22.

anything else missed?

Session break in SQL Database Engine 2017 (CU 13) on Windows Server 2019 Essential

$
0
0

New Windows Server  2019 (Essential) with MsSQL 2017 (CU13).
Break session sql application with used only PC on Win x86 (x64 is OK).

Are there any known errors?

SQL 2016 columnstore index returns wrong result set

$
0
0

I will show you a select statement that fails -- does not return expected result.
Next I will make a minor change to the select phrase (keep the samefrom and where phrases) and that statement will return expected result.
Then I will drop and recreate the column store index and execute the first statement again, it will now return correct result.

I have a table called CACH.Employee.
This table has a column store index as well as two unique indices:

following select statement should return one row, but it returns nothing. Furthermore, execution plan shows an index seek using a unique index as well as a index scan (key lookup) using columnstore index.

Next I change the selection list from * to COUNT(*):
Surprisingly, now SQL can actually find this record.
Note the only difference is I changed from SELECT * to SELECT COUNT(*):

finally I drop the columstore index, then create the column store index again:

DROP INDEX cci_Employee ON CACH.Employee;
GO
CREATE CLUSTERED COLUMNSTORE INDEX cci_Employee
  ON CACH.Employee
  WITH (DROP_EXISTING = OFF, COMPRESSION_DELAY = 0);
GO

finally I run the first select statement that failed, now the statement works:

and now the execution plan is different. I would have expected SQL to use the unique index (index seek) to find this record, but for some reason it decided to do an index scan using the column store index.

  1. Is this a bug?
  2. If I cannot trust columnstore indices, then I will have to drop all columnstore indices that I use and create old style indices. Any opinions?
  3. Why didn't SQL use the unique index to do an index lookup instead of index seek?

connections to sql server and data tranfer to sql server

$
0
0
I would need to find out, how many requests are being made to our sql server on daily basis and the amount of data is being transferred through sql server. can any one help me o this?

Could not start Debugger - SSMS

$
0
0

Hi

I'm trying to just get the remote debugger working with SQL authentication. I have tried everthing and can't figure out why I keep getting the "The debugger cannot connect to the remote computer".

I'm using SQL Server Express 2014. I doubt if debugging option is not supported for the version I'm using. Please clarify'

Thanks,

Akshara 

Sql Services Idle after some time

$
0
0

Hi 

I have a server with sql express 2008 installed on it. 

2 Client machines A and B on the same LAN.

I have a frontend application installed on both Clients A and B which access dB on server to fetch requested data.

Issue is, if I leave all three sysems idle for 30 mins, the first transaction on dB takes longer than usual time to fetch data.

Whereas if application is already being used on say Client A and B has been idle for 30 mins even then Client B's first transaction on Server returns data immediately.

I feel my server goes on idle mode in case of no request from any client for thirty mins.

Please help

How do I see the full SQLl/Query text of a spid?

$
0
0

How do I see the full SQLl/Query text of a spid?

I use different ways to get the query, the problem is it truncates the end, so I cannot see the entire query/sql text. Is there another way to a query/sql text that is being run?


Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
Praveen Dsa | MCITP - Database Administrator 2008 | My Blog | My Page


Initial size which change automatically?

$
0
0

Hi guys, 

I've got one of the instance in the LUM running out of space. Checking the DB I spotted a big one SDB with 150GB which 132GB available. I decided to shrink the DB (it's taking age and the prediction ending time is getting further and further). 

However, looking at the setting I spotted that the initial size 152,326 mb and I remember that I set the IS with something like 20GB. 

The question is: can the Initial Size change automatically? 

Thanks

Network path not found

$
0
0

Server Error in '/' Application.

The network path was not found

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ComponentModel.Win32Exception: The network path was not found

Source Error: 
Line 20:     {
Line 21:        Line 22:         conn.Open();Line 23:        
Line 24:        SqlCommand cmd = new SqlCommand(query, conn);

Source File: c:\inetpub\vhosts\viccolabs.com\httpdocs\App_Code\dbconnection.cs    Line: 22 

Stack Trace: 
[Win32Exception (0x80004005): The network path was not found]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5341907
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +546
   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) +5354695
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +145
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +892
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +311
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) +646
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +278
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +732
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +85
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1057
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146
   System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +94
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +110
   System.Data.SqlClient.SqlConnection.Open() +96
   dbconnection.GetData(String query) in c:\inetpub\vhosts\viccolabs.com\httpdocs\App_Code\dbconnection.cs:22
   Home.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\viccolabs.com\httpdocs\productref.aspx.cs:100
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772

Error: .NET Framework execution was aborted by escalation policy because of out of memory

$
0
0

Hi,

For the past few days we have been getting this error consistently between 3.00 & 3.20 AM
 
2012-03-26 03:14:14.11 spid58      Error: 6532, Severity: 16, State: 48.
2012-03-26 03:14:14.11 spid58      .NET Framework execution was aborted by escalation policy because of out of memory.

We have a 2 node cluster running Windows server 2008 64 bit and SQL Server 2005 64 bit Build 9.0.5000. The total memory on the server is 64 GB and the SQL server is capped at 58 GB. Absolutely nothing changed on this server and this is the memory distribution of SQLCLR on the server.

type     VM Reserved VM Committed AWE Allocated SM Reserved SM Committed MultiPage Allocator SinlgePage Allocator
MEMORYCLERK_SQLCLR 12639104 657960  0  0  0  82328   3336

It is worth mentioning that our backup jobs kick start at 3.00 AM but it has been this way for ever and we never faced this issue earlier.

DBCC MEMORYSTATUS info looks good to me (I will be glad to share it if needed). Can someone please provide more information on this error?

Fullbackup

$
0
0

Support I have a full backup database takes about 2 hours. and during the 2 hours there are transaction.

So does the completed full database backup include the last transaction during the 2 hours  ?

Can't attach database to SQL Management Studio - The log scan number passed to log scan in database in not valid - TESTDBUPGRADE

$
0
0

Hi,

I am trying to run TESTDBUPGRADE before an SCCM Site Server Upgrade and I can't attach the current database on a test VM.

Can someone please help?

Thanks



Viewing all 15872 articles
Browse latest View live


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