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

An error 1069 - )The service did not start due to logon failure) occurred while performing this service operation ...

$
0
0

Hi All,

 

We seem to be being plagued by the error below by our SQL Server agent. This happens almost everytime we restart the server that has been running for a day or two.

 

Our SQL Server Agent uses a none expiring domain credential. I understand that this problem only happens when the profile being used by the SQL Servr Agent has changed (password change). What puzzles me is that the login is A ok and no changes has been made to it's password.

 

We always resolve this problem by changing the login used in the SQL Server Agent to local and after that, returning it back to it's original domain login. Unfortunately, we cant always do this everytime something goes wrong.

 

Can anyone please help us shed a light on this? We're using SQL2k with SP3a. Thanks!

 

Error:

An error 1069 - )The service did not start due to logon failure) occurred while performing this service operation on the SQLServerAgent service.

 

 

Regards,

Joseph


Error in import\export packages when the package sceduled through sql agent

$
0
0

Hi All,

We have got DB cloud server(public IP) in to which data must be pushed on daily basis from our internal DB server.

 when we are using import\export wizard or SSDT for this task it is working fine, but for the same when we are creating SSIS package in import wizard and scheduling through agent it is throwing below error.

''  Code: 0xC0016016     Source: Package      Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2015-05-02 12:29:34.53     Code: 0xC0016016     Source: Package      Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2015-05-02 12:29:34.58     Code: 0xC0202009     Source: Package Connection manager "xxx.xx.xx.xx.packgestest.import"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E4D  Description: "Login failed for user 'import'.".  End Error  Error: 2015-05-02 12:29:34.58     Code: 0xC020801C     Source: Data Flow Task OLE DB Destination [2]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "xxx.xx.xx.xx.packgestest.import" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error: 2015-05-02 12:29:34.58     Code: 0xC0047017     Source: Data Flow Task SSIS.Pipeline     Description: OLE DB Destination failed validation and returned error code 0xC020801C.  End Error  Error: 2015-05-02 12:29:34.58     Code: 0xC004700C     Source: Data Flow Task SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2015-05-02 12:29:34.58     Code: 0xC0024107     Source: Data Flow Task      Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  12:29:34 PM  Finished: 12:29:34 PM  Elapsed:  0.546 seconds.  The package execution failed.  The step failed.''

-->login is working fine in both the server.

-->we have selected do not save sensitive data in package protection level

-->cloud DB server agent is running with NTSERVICE, and i have given full rights for NTSERVICE account to the folder where package resides

-->internal server agent is running with our windows account

-->Package automation is throwing same error in both ways (i.e, if package created in our internal server and scheduled their OR in cloud DB server)

-->both the server are on windows 2012r2,64 bit with SQL server 2012 enterprise edition

Could some one please help me in this, so that I can automate the process.

With Regards,

Ram




Suspend Change Data Capture

$
0
0

Hi,

Is there a way to suspend / resume Change Data Capture for a table? 

While doing certain operations, I need to prevent change tracking of data (the changes should never be recorded), but I cannot disable CDC because that will remove all CDC information. Is is possible to just temporarily disable cdc and then enable it again, without losing history?

-Thanks!


Way to check last db index reorg date and time

$
0
0
Hi ~ Are there anyway I can check my last database reorg date and time using Tsql ?

MEMORY LIMIT value while restoring database

$
0
0

Hi Experts,

While restoring a large database (700G+) for testing purpose I was trying to improve the restore time than the earlier restore time of the same database. I was using a dedicated test machine with 32GB RAM, 4TB NAS using SQL SERVER 2012 Dev. edition. From some articles I came to know to tune two parameters i.e.,

1). buffercount
2). maxtransfersize

I enabled some trace parameters given in http://blogs.msdn.com/b/psssql/archive/2008/02/06/how-it-works-how-does-sql-server-backup-and-restore-select-transfer-sizes.aspx blog and enabled the stated flags.

After executing the restore job I reviewed the output of the sql server error log and found about the MEMORY LIMIT: 1538M, Please help that how sql server engine calculate the MEMORY LIMIT.

here is the full log information regarding 

------------------------------------------------------

Encode Buffer Count:14
Media Buffer Size:1024KB
Media Buffer Count:14
Filesystem i/o alignment:512
TXF device count:0
filestream device count:0
Fulltext data device count:0
Tabular data device count:1
Total Buffer Space:28MB
Min MaxTransferSize:64K
MaxTransferSize:1024 KB
Sets of Buffers:2
BufferCount:14
Memory limit:1534MB

----------------------------------------------------------------

Please advise what could be the optimal values of Buffercount and Maxtransfersize for a MEMORY LIMIT of 1538M.


Best Regards

Khalil



SQL TimeOut 逾時過期

$
0
0

Hi~ I often experience Timeout from application team.

I am wondering the timeout setting should be set on program side or on mssql side ?

sp_configure

remote login timeout (s)

remote query timeout (s)

As a DBA, how we can help to trace down the timeout from program ? server side trace? profiler ?

User And DB role can't able to drop ???

$
0
0

I have created two users and assign a database role. I tested object privileges behavior, when testing done I revoked the permissions and trying to drop user and db role but its giving following errors:

For User:

=======================


Drop failed for Login 'irfan'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.5058.0+((SQL11_PCU_Main).140514-1820+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+Login&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Server principal 'irfan' has granted one or more permission(s). Revoke the permission(s) before dropping the server principal. (Microsoft SQL Server, Error: 15173)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.5058&EvtSrc=MSSQLServer&EvtID=15173&LinkId=20476

For Role:

======================
Drop failed for DatabaseRole 'myrole'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.5058.0+((SQL11_PCU_Main).140514-1820+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+DatabaseRole&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.5058&EvtSrc=MSSQLServer&EvtID=15138&LinkId=20476

Lock pages in Memory allocationg huge memory

$
0
0

Hi All,

One of production server Physical Memory is showing 99% . I checked in task manager SQLSERVER is using only 170 MB.

I checked remaining processes also but all are using less memory.

I checked with wintel team they are suggesting AWE is allocating huge memory.

SQL2012 Version.

SQLServer Maximum memory:16 GB

RAM:24 GB

I verified lock pages in memory , it is also using  16 GB.

Can anyone suggest to resolve this issue.


High Memory Consumption on Use and No Memory Release after Use

$
0
0

Hi,

I am using SQL Server 2008 R2 Enterprise on my server.. It has 32 GB of RAM and SQL RAM configuration is set as Min / Max (0/22GB).

Applications are configured to use this SQL Server from various Clients. Some jobs are running also through SQL Agent and Windows Task scheduler through Batch Files which are using SQL Server.

As soon as the use of SQL Server started through various applications / jobs, the memory consumption starts increasing but when all the applications / jobs are not running, the memory consumption still displays the same like 17-18GB.

Next day when the application / jobs start again, it start increasing from that 17-18GB onwards.. After sometime when the memory consumption reach / cross 22GB which is configured as Max, the applications / jobs start getting stuck.

Therefore, I restart all the SQL Server Services every morning.

If anyone has solved this problem, please let me know How to configure the Release of Memory when the SQL Server Services are not in use.


Appreciate your co-operation.

Thanks and Regards,

Rakesh Kumar

IT Head

Mysore Saree Udyog LLP


Question about Transaction's Atomicity property

$
0
0

Hi Guys,

According to Microsoft document about transaction, there is a feature called atomicity. 

https://technet.microsoft.com/en-us/library/ms190612(v=sql.105).aspx

Basically it means within a transaction, either all of its data modifications are performed, or none of them is performed.

Now I have the following T-SQL code

SET IMPLICIT_TRANSACTIONS OFF

CREATE TABLE class (c_id int primary key, c_name varchar(10))
INSERT INTO class VALUES (11, 'yuwen'),(12,'shuxue'),(13,'lishi')
CREATE TABLE student (s_id int primary key, s_name varchar(10), c_id int foreign key references class (c_id))

BEGIN TRANSACTION
	INSERT INTO student VALUES (1,'bill',11)
	INSERT INTO student VALUES (2,'bill',14)
COMMIT

SELECT * FROM student
Can anyone explain why when we are looking at the student table, we can see that the first INSERT statement performed successfully, while the second didn't. I read from book saying that "foreign key violations do not cause all the statements to roll back", however, this conflict against the very basic transaction requirement regarding atomicity. How should I think about this?

October dates losing hour on table insert

$
0
0

I have a datetime field used to store a date of birth. When inserting the date of birth into the table it works fine. But when the date of birth is in the month of October, it takes an hour off. For example, if the date is 04-OCT-1993, it inserts as 03-OCT-1993 23:00.

It only happens for dates in October. It's being inserted via a .Net table adapter. It just so happens that October is the month that daylight savings kicks in parts of Australia (an hour is added), but I think this must be a coincidence.

Has anyone experienced this? Any ideas on how to correct it?

Thanks

SCOPE_IDENTITY() blocking

$
0
0

First, some background....  Long-standing system, multiple applications and web apps communicating with SQL Server through a farm of load-balanced app servers.  The app servers are running a common "business object" that we refer to as the data-source factory (DSF, for short), it's purpose is to translate object calls into database queries (i.e., a client record from the database becomes a "Client" object with various attributes representing values from the database).  This system has been in existence for several years, and began life running against SQL Server 7, upgraded to 2000, 2005, and for the past year, 2008 R2.  At any given point in time, there will be 400-500 connections to the database, any number of which can be doing work.  Server is not taxed,  48 cores, 512GB RAM, no performance issues of any kind.

From the beginning, we've seen a rare issue (2-3 times a year) where we'll suddenly have a handful of SPIDs start blocking, each claiming to be running "SELECT SCOPE_IDENTITY()".  If ignored, more and more SPIDs will exhibit the same behaviour, to the point where we've seen 200 or more, all blocking, all waiting on SCOPE_IDENTITY().  Often, attempting to kill the offending SPIDs is unsuccessful, as they are immediately respawned, presumably by our DSF.  Multiple attempts to kill those SPIDs is sometimes effective, but on occasion we are forced to restart the DSF's.

Trace log analysis of these incidents has not revealed a common table or query, the issue seems to affect all inserts into all tables.  Of particular interest, "wait_type" and "wait_resource" for these offending SPIDs are both reported as NULL.

For the first time in over a year (since upgrading to 2008 R2), this "event" occurred again this morning.  I'm tired of not being able to explain it, but I don't know where else to look, I've poked into every dark corner of SQL Server that I know to poke, and I've found nothing.  I'm not convinced that this is a SQL Server problem, I think it's something within our DSF, but I don't know how to prove (or disprove) that theory.

Suggestions?  Web searches for "SCOPE_IDENTITY blocking" have come up empty, reaffirming my belief that this is not a SQL issue, but something unique to our app.

Below is a snippet from my blocking log for this morning's occurrence, showing the first two blockers.  Within 10 minutes, there were over 50 blocking SPIDs, all waiting on SCOPE_IDENTITY():

********** Start time: 28 Dec 2011 05:11:00:427 ********** [SQLSTATE 01000]
session_id                      blocker                                                                                              status                         wait_type                                                        wait_resource                                                wait_time   command                          cpu_time    logical_reads        memory_usage login_time                     last_request_begin_time        last_request_end_time          client_net_address                       net_transport                            database_id
------------------------------- ------- -------------------- -------------------- -------------------------------------------------- ------------------------------ ---------------------------------------------------------------- ------------------------------------------------------------ ----------- -------------------------------- ----------- -------------------- ------------ ------------------------------ ------------------------------ ------------------------------ ---------------------------------------- ---------------------------------------- -----------
320*                            0       a_web2               10.25.246.25                                                            sleeping                       (null)                                                           (null)                                                       (null)      (null)                           1724659     40185412             2            27 Dec 2011 18:42:57:260       28 Dec 2011 05:10:19:420       28 Dec 2011 05:10:19:420       10.25.246.25                             TCP                                      (null)
564*                            0       a_web2               10.25.246.25                                                            sleeping                       (null)                                                           (null)                                                       (null)      (null)                           2010        22632                2            28 Dec 2011 05:10:31:830       28 Dec 2011 05:10:58:360       28 Dec 2011 05:10:58:360       10.25.246.25                             TCP                                      (null)
169                             564     a_vts                10.25.246.24                                                            running                        LCK_M_U                                                          KEY: 6:395455534989312 (34ca69ce595f)                        664         UPDATE                           873         55748                2            28 Dec 2011 05:08:49:543       28 Dec 2011 05:10:59:810       28 Dec 2011 05:10:57:527       10.25.246.24                             TCP                                      6
514                             320     a_vts                10.25.246.20                                                            running                        LCK_M_U                                                          KEY: 6:72057594146652160 (86c97ce8fc81)                      41210       UPDATE                           16746       662206               2            28 Dec 2011 02:06:20:723       28 Dec 2011 05:10:19:230       28 Dec 2011 05:10:19:223       10.25.246.20                             TCP                                      6
session_id blocker resource_type        resource_subtype               resource_database_id resource_associated_entity_id request_mode                                                 database_name        object_name                                        resource_description
---------- ------- -------------------- ------------------------------ -------------------- ----------------------------- ------------------------------------------------------------ -------------------- -------------------------------------------------- ----------------------------------------------
514        320     KEY                                                 6                    72057594146652160             U                                                            Vue                  (null)                                             (86c97ce8fc81)
169        564     KEY                                                 6                    395455534989312               U                                                            Vue                  (null)                                             (34ca69ce595f)

---------------------------------------
***** session_id=320 *****

SELECT SCOPE_IDENTITY()

***** session_id=564 *****

SELECT SCOPE_IDENTITY()

Blocking Time = 0:41 [SQLSTATE 01000]


SQL 2008 r2 Upgrade Advisor, interpret results

$
0
0

We are updating an old production database server to a more current structure. Old is Server 2003 (x86) running SQL 2000 product version 8.00.760. The plan is to update the database to SQL 2008r2 then on to SQL 2012.

Downloaded and installed the SQL Server 2008r2 upgrade advisor on a workstation(Win7 pro 64) with SQL Server 2008r2 sp2 installed. Took a backup of the 2000 database and moved the .bak file to the workstation and restored the bak file, leaving it in the original compatibility mode, DBCC returned no errors.

Ran the Upgrade Advisor against the old server and receive a list of 19 method errors.. all PreUpgrade labeled. (I didn't install UA on the old server as it's still running production jobs and is Seriously under powered.)

Message"Method not found: 'System.Collections.Generic.IEnumerable`1<Microsoft.SqlServer.Management.SqlParser.Parser.Error> Microsoft.SqlServer.Management.SqlParser.SqlCodeDom.SqlCodeObject.get_Errors()'." the methods are:

DROPSYSOBJ
OLDSYSTEMTABLES
FTCATALOGNAMERESTRICTION
ORDERBYORDINALS
VIEWFORBROWSE
FTPROPS
DUMPLOAD
SPHELPTRIGGERNEWCOL
MERGE
FTCATPROPITEMCOUNT
SYSPERFINFO
INVALIDCHAR
NONANSIOUTER
XPAGENTPROXY
SPCONFIGURE
HOSTIDRETURN
DEPRECATEDSP
OLDDBCC
ORDERBYALIAS
DBCCCONCURRENCYVIOLATION
INFOSCHEMATA
TRACEFLAGS
BACKUPRESTORETRANSACTION
DBCOMPTLEVEL
BACKUPLOG
LARGECONSTTYPE
VIEWCHECKOPT
SYSLOCKINFO

FORXMLAUTO

Still haven't found a way to address these, not sure they have to be (??). Came across some posts that seemed to indicate these are generated by running Upgrade Advisor remotely against older targets.

Just for fun ran the upgrade advisor against the backup that was restored onto theWin7 box and received one error which is DEPRECIATEDSP method. I updated the compatability level to 100 ran Upgrade Advisor again with same results, the subsequent DBCC CheckDB would indicate no errors. From what I have been able to find in the forums, it looks like all is well for this part of it (maybe). Are these issues/errors really no longer of concern or are they just ignored(?) masked by the new version of SQL and still in play? ( I don't know if that makes sense it's the best way I can word it at this time)?   


no service SQL Server Management Studio

$
0
0
i had install sql express 2012 when i startup my SQL Server Management Studio i can not see any server name

[Solved] Can't restore - SQL Server 2012 thinks I am out of space

$
0
0

Our vCloud setup is a little odd, in that D: is a very small physical drive with virtual directory links to D:\SQL Data and D:\SQL Logs, each of which reside on much larger separate volumes (don't ask me why).

The result is that even though D:\SQL Data has beaucoups of empty space on it, D:\ only has a few hundred MB free.

All of which brings me to my problem.  I go to restore a database, foobar.bak, but I get an error because rather than looking at how much free space I have on D:\SQL Data, it's looking at how much free space I have on D:\ .

Is there a way I can configure it to look at the available space in the actual target folder D:\SQL Data, rather than the parent directory D:\?


PBS



RESPONSE REQUEST: SS DBE Gurus Please Connect with Internet of Thinkers (aka TNWiki)

$
0
0

May the Thoughts be with you!

Well, a small nod there to Star Wars day, and we turn our thoughts to more the serious matter of ingesting the more valuable brain telemetry from and to our very own Internet of Thinkers!

Connect to the real network, the world wide workers!

Cut through the chatter and produce some pertinent protocols!

All over the world, highly intellegent autominous entities are uploading neural nuggets of gold, words of wisdom and inspirational instructionals!

So step forward... beacons of brain power, and download your technical torrent of tips to the Head Hub - TechNet Wiki!

 

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

HOW TO WIN

1) Please copy over your Microsoft technical solutions and revelations toTechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favoured technology will help us learn the active members in each community.

Feel free to ask any questions below.

More about TechNet Guru Awards

Thanks in advance!
Pete Laker


#PEJL
Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over toTechNet Wiki, for future generations to benefit from! You'll never get archived again, and you could win weekly awards!

Have you got what it takes o become this month's TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!

how many secondary servers are configured in sql server log shipping

$
0
0

hi Team,

What are the prerequisites to configure the SQL server LOG SHIPPING and how many secondary servers are configured in sql server log shipping?

min memory per query SQL Server

JObs schedules Not run

$
0
0

HI,

       jobs schedule is execute after create  sql server usename,pwd and old Login sa is disable. then jobs schedules is NOt execute.

Regards,

Ram

DBA / Developer and the associated tasks

$
0
0

Hello

Has anyone been in a situation where their job title is "DBA/Developer"?If so what were the tasks associated for this "double" role?

Actually, I am in this situation - I got offered a job within my company as a DBA/Developer junior. The Developer role is quite clear- I know the scope of my work, but the problem is in the "DBA" role. I thought a minimum would to manage backup and restores...Of course it depends on the requirements of my organisation, but I'd just like to know what you all think

thank you in advance




Viewing all 15264 articles
Browse latest View live


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