Connectivity to TFS fails - NTLM Negotiation not completed
Hello,
I'm having a strange issue trying to connect my Visual Studio 2013 Pro to TFS. The connectivity works fine on all of the other machines I've tried, so it appears to be a client side issue with VS.
We have a locally hosted instance of TFS which I can connect to with no problem if I use the IE web version, but if I try to connect with VS it tells me that: "TFS1003: Either you have not entered the necessary credentials or your user account does
not have permission to connect to the Team Foundation Server." and "TF30063: You are not authorized to access". It does this without even prompting me for login details, as I would expect.
I have tried all of the usual suggestions of clearing cache in IE, reinstalling VS etc with no progress.
Upon further investigation with Fiddler, it seems that Visual Studio is not even attempting to complete the NTLM negotiation. It receives the initial 401 response but then does not attempt to send any authentication details.
The issue I am seeing is very similar to the NuGet problem described here: http://blog.rthand.com/post/2011/08/26/Fixing-combination-of-NuGet-and-Team-Foundation-in-workgroup-configuration-401-Unauthorized.aspx - but the solution listed there of adding
TFS to the intranet sites list does not fix it.
If I use the Web Browser view within TFS I am able to replicate the same behavior: I receive a 401 error without attempting to send credentials. However, opening the site in IE on the same machine works fine.
How can I force Visual Studio to complete NTLM auth?
Thanks!
Hi Jamie,
For your scenario, you can try to clean the Cache for TFS manually(delete the content of the folder only, not the cache folder itself):
Clean the Cache folder on client computer. The folder path is: C:\Users\username(Team Explorer user name)\AppData\Local\Microsoft\Team Foundation\5.0\Cache. (os: Windows Server 2008 R2)
Clean the Cache folder on Server machine. The folder path is: C:\ProgramData\Microsoft\Team Foundation\Web Access\Cache_v11.0. (os: Windows Server 2008 R2)
After cleaned, on Server machine, click Start and select Run… to open the dialog box, then input iisreset.exe and click OK, wait it run completely.
Also sign out all the applications which authenticated with MS account. Delete the credential used to connect to TFS in credential manager and try again. Check whether you use windows authentication if it not works for you. Another option is repair your
Visual Studio to make sure it was intalled correctly. If the problem still exist, elaborate more details about your scenario.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
Similar Messages
-
Hi I am having iphone 4S. Today while connecting to my laptop for regular update, my phone started rebooting and message showed error in rebooting. Now even though i connected to laptop which has internet connection, i phone OS booting still not completed
I have factory reset my phone twice.. I have disabled iCloud settings.. I looked up possible downgrading options.. which isn't possible. I feel as if my iPhone 4 was offered the update so I was forced to get another phone
-
OS Update/Connection to PC fails/ says device not installed properly???
I connected my Playbook to my computer after the most recent OS update to back it up. Windows 7 ticked along and then said it could not install the device properly. Now with the Playbook connected I cannot get the Blackberry Desktop Software to work because the Playbook is not installed correctly.
I went to the Device section in the control panel when the Playbook was connected and it indicates a RIM Network Device but doesn't let me delete to have it reset or whatever and when I troubleshoot it it says the device is working properly. But obviously it isn't. The RIM Network Device disappears when I disconnect the Playbook so I can't delete the device that way either.
In addtion, in the past when I connected the Playbook, I got a drive designation for it. This time I don't.
Any help would be very much appreciated.
Thanks.As with most any electronics and software, reboots fix many things as it was made by humans and we do make mistakes.
Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
BESAdmin's, please make a signature with your BES environment info.
SIM Free BlackBerry Unlocking FAQ
Follow me on Twitter @knottyrope
Want to thank me? Buy my KnottyRope App here
BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V -
Please kindly help me.
I have to update my iphone but cannot, the screen showing only connection picture. How I can do it.iPhone 3G can only Restore to iOS 4.2.1 Open iTunes on your computer. Connect iPhone to computer with a good USB Cable. Hold both home and power buttons for about 20 seconds until iTunes recognizes the iPhone in Recovery Mode. Click the Restore button of iTunes.
-
Cannot receive email?
Start with this and see if it works. Close the mail app and then reboot your iPad.
Tap the home button.
Double tap the home button
Tap and hold down on the mail icon in the recents tray
Tap the minus sign in the upper left corner of the mail icon
Tap the home button or anywhere above the task bar.
Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up. -
Error while deploying : DCM command did not complete successfully (-8)
Hi Friends:
I am getting error while deploying the application on Oracle Portal AS. Following are the version details:
Portal 10.1.4 ; Portal AS 10.1.2.0.2 ; JDK 1.5.x ; Jdeveloper 10.1.3.3.0
I am able to deploy same on my Standalone OC4J Server.
Portal Server connection is Successful. Application i am trying to deploy is simple JSF application.
The deployment log is as follow:
---- Deployment started. ---- Aug 21, 2008 10:10:26 AM
Target platform is Oracle Application Server 10g 10.1.2 (Windows) (PortalASConnection1).
Wrote WAR file to C:\Jdeveloper\jdev\mywork\MyApplication\ViewController\deploy\myApp1.war
Wrote EAR file to C:\Jdeveloper\jdev\mywork\MyApplication\ViewController\deploy\myApp1.ear
Invoking DCM servlet client...
C:\Jdeveloper\jdk\jre\bin\javaw.exe -Djava.protocol.handler.pkgs=HTTPClient -jar C:\Jdeveloper\jdev\lib\oc4j_remote_deploy.jar http://01HW180457:18102/Oc4jDcmServletAPI/ ias_admin **** redeploy D:\OraHome_3 C:\Jdeveloper\jdev\mywork\MyApplication\ViewController\deploy\myApp1.ear myApp1
Initializing log
Servlet interface for OC4J DCM commands
Command timeout defined at 600 seconds
Executing DCM command...
Executing command redeploy D:\OraHome_3 C:\Jdeveloper\jdev\mywork\MyApplication\ViewController\deploy\myApp1.ear myApp1 UNDEFINED
Command = REDEPLOY
Reading application's ear file
Ear file was successfully read
Opening connection to Oc4jDcmServlet
Setting userName to ias_admin
Sending command to DCM servlet
HTTP response code = 200, HTTP response msg = OK
Command was successfully sent to Oc4jDcmServlet
Receiving session id from servlet to check command status
Session id = ac11c08f46b696f8630ce3484fda975697914ab9c18a
Please, wait for command to finish...
Checking command status...
Setting userName to ias_admin
Setting Cookie to JSESSIONID=ac11c08f46b696f8630ce3484fda975697914ab9c18a
Checking command status
HTTP response code = 200, HTTP response msg = OK
Command has finished
Receiving command exit value
Receiving command output
**** No output was received from command
Closing connection to Oc4jDcmServlet
#### DCM command did not complete successfully (-8)
#### HTTP return code was -8
Exit status of DCM servlet client: -8
Elapsed time for deployment: 14 seconds
#### Deployment incomplete. #### Aug 21, 2008 10:10:39 AM
I will appriciate to hear from you.
Have A Nice Time!
Regards,
KevinRefer Note:373056.1 on MetaLink.
Thanks
Shail -
DCM command did not complete successfully (-8)
Hello,
I am new to deploying web applications to OracleAS. They deploy fine to the local OC4J instance but when deploying to the application server I am getting an error. Any assistance would be greatly appreciated.
I have been trying to track down what this error means: DCM command did not complete successfully (-8)
I've posted my deployment log below. Thank you in advance for your time.
Regards,
- Justin
---- Deployment started. ---- Dec 18, 2006 9:19:11 AM
Target platform is Oracle Application Server 10g 10.1.2 (Unix) (AORA01D).
The WAR file is already up to date: /home/jtissera/work/WISER/Reports/code/ViewController/deploy/wiserReports.war
Wrote EAR file to /home/jtissera/work/WISER/Reports/code/ViewController/deploy/wiserReports.ear
Invoking DCM servlet client...
/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/bin/java -Djava.protocol.handler.pkgs=HTTPClient -jar /home/jtissera/dev/jdevstudiobase10131.zip_FILES/jdev/lib/oc4j_remote_deploy.jar http://aora01d.guhsd.net:1156/Oc4jDcmServletAPI/ ias_admin **** redeploy /home/oracle/OraHome_3 /home/jtissera/work/WISER/Reports/code/ViewController/deploy/wiserReports.ear wiserReports GUHSD
Initializing log
Servlet interface for OC4J DCM commands
Command timeout defined at 600 seconds
Executing DCM command...
Executing command redeploy /home/oracle/OraHome_3 /home/jtissera/work/WISER/Reports/code/ViewController/deploy/wiserReports.ear wiserReports GUHSD
Command = REDEPLOY
Reading application's ear file
Ear file was successfully read
Opening connection to Oc4jDcmServlet
Setting userName to ias_admin
Sending command to DCM servlet
HTTP response code = 200, HTTP response msg = OK
Command was successfully sent to Oc4jDcmServlet
Receiving session id from servlet to check command status
Session id = c0a802364840a5256682f8c47229750d637e5635491
Please, wait for command to finish...
Checking command status...
Setting userName to ias_admin
Setting Cookie to JSESSIONID=c0a802364840a5256682f8c47229750d637e5635491
Checking command status
HTTP response code = 200, HTTP response msg = OK
Command has finished
Receiving command exit value
Receiving command output
**** No output was received from command
Closing connection to Oc4jDcmServlet
#### DCM command did not complete successfully (-8)
#### HTTP return code was -8
Exit status of DCM servlet client: 248
Elapsed time for deployment: 22 seconds
#### Deployment incomplete. #### Dec 18, 2006 9:19:32 AMHere is one possible solution for that -8 code
I had everything up and runnig running. Deploy was working fine.
Then for some reason, I opened one of the deployed file on the server using the text editor. That file remained open, as I then started deploying the app from my Jdev to the server. I started getting this -8 error code.
Not knowing what went wrong, I noticed the file on the server open in the text editor. So closed that open server file --- closed that editor and deployed app again from Jdev. AND It worked !!!
Hope this helps.
pp -
DCM command did not complete successfully (-6)
dear Engineers/Developers/Supports,
i face the situation on deployment in complete.Seem like i dint find solution with my problem.Below was the error that i get .
---- Deployment started. ---- Jul 9, 2008 4:55:20 PM
Target platform is Oracle Application Server 10g 10.1.2 (Windows) (irms_portal).
Wrote WAR file to D:\Program Files\Oracle JDeveloper\jdev\mywork\myTestAlex\JSR168\deploy\webapp1.war
Wrote EAR file to D:\Program Files\Oracle JDeveloper\jdev\mywork\myTestAlex\JSR168\deploy\webapp1.ear
Invoking DCM servlet client...
D:\Program Files\Oracle JDeveloper\j2sdk1.4.2_16\bin\javaw.exe -Djava.protocol.handler.pkgs=HTTPClient -jar D:\Program Files\Oracle JDeveloper\jdev\lib\oc4j_remote_deploy.jar http://irms-vm:18102/Oc4jDcmServletAPI/ ias_admin **** redeploy C:\Ora_Portal D:\Program Files\Oracle JDeveloper\jdev\mywork\myTestAlex\JSR168\deploy\webapp1.ear webapp1 WSRP_Portal
Initializing log
Servlet interface for OC4J DCM commands
Command timeout defined at 600 seconds
Executing DCM command...
Executing command redeploy C:\Ora_Portal D:\Program Files\Oracle JDeveloper\jdev\mywork\myTestAlex\JSR168\deploy\webapp1.ear webapp1 WSRP_Portal
Command = INVALID_COMMAND
#### Invalid command: redeploy C:\Ora_Portal D:\Program Files\Oracle JDeveloper\jdev\mywork\myTestAlex\JSR168\deploy\webapp1.ear webapp1 WSRP_Portal
Opening connection to Oc4jDcmServlet
Setting userName to ias_admin
Sending command to DCM servlet
#### Could not send command to Oc4jDcmServlet
Closing connection to Oc4jDcmServlet
#### DCM command did not complete successfully (-6)
#### HTTP return code was -6
Exit status of DCM servlet client: -6
Elapsed time for deployment: 1 second
#### Deployment incomplete. #### Jul 9, 2008 4:55:21 PM
seem like my colleague was able to deploy successful..i would like to used OC4J instance name as the destination of my deployment. due to wsrp container that we installed in this instances.
your help was highly appreciated.
regards,
eizdie
fyi: im using JDeveloper10g 10.1.3.3
Message was edited by:
eizdieIncredible!!! what a buggy software!
The project folder must not contain empty spaces!!!!!!
for example my project folder was:
c:\java projekti\test
now I have reneamed to
c:\java_projekti\test .... and all work fine.....
WTF.... I lost 2 days.... :((( -
I am unable to backup my iphone 5 iOS 6.0.1 (connected directly to laptop USB) with my itunes 11 for Win 7 64bits. The process starts and fails to complete giving the error: itunes could not complete backup of iphone because iphone disconnected.
I have restarted the PC, the iphone, changed the lightining cable and nothign resolves it: backup never completes.Hi, I disabled the antivirus and the firewall. Same result
I even deleted the backup folder inside C:\Users\...\Apple Computer\MobileSync\Backup to eliminate any corruption in the old backup files.
Nothing changed: Session either times out or i get the same error message: itunes could not back up iphone because iphone disconnected. It always happens during step 3 out of 4 which is "transfering purchased apps from iphone to PC" and comes after step 2 which is backup.
My iphone 5 is not jailbroken, and is a factory unlocked phone.
Any other suggestion?
Pls help -
Polycom CX600 The connection was closed before TLS negotiation completed
Hello guys,
I'm trying to login with cx600 at a remote location on a SBA SBA but the log is showing the following message
The connection was closed before TLS negotiation completed .
Did the remote peer accept our certificate ?
scenario :
Offline CA : OfflineIssueCA
Subordinate CA : DomainIssueCA
AD DOMAIN : domain.local
SIP DOMAIN : domainA.com
SIP DOMAIN : domainB.com
Pool: pool01.domain.local
SBA : mysba.domain.local
SBA Certificate :
SN : mysba.domain.local
SAN : sip.domainA.com
SAN : sip.domainB.com
DNS :
sip.domainA.com => ip of mysba.domain.local
_sipinternaltls._tcp.domainA.com => sip.domainA.com
DHCP :
option offer 120 mysba.domain.local
option offer 43 https://pool01.domain.local:443/CertProv/CertProvisioningService.svc
Checking the log LPE I see the following error most often :
ERROR :: :: OUTGOING_TRANSACTION OnRequestConnectionConnectComplete - connection failed error 80ee0065
And the SBA log SIPStack :
The connection was closed before TLS negotiation completed .
Did the remote peer accept our certificate ?
I believe that the phone is not downloading the chain of private certificate :
? = © K € ª Æ DUCD_LOG_INFO : 28/05/2014 | 04:50:30 Aries : 05/28/2014 | 04:50:30.885
C4000A : 5C02336 :: INFO :: CCertInstaller LdapGetValsfromMesg : AddRootCerttoStore ( DER .
) succeeded hr = 0x0
ROMK € Yi DUCD_LOG_ERROR : ? 28/05/2014 | 04:50:30 Aries : 28/05/2014
| 04:50:30.886 C4000A : 5C02336 CLogOnManager :: ERROR :: HandleCertEvent : CertInstaller gave callback with Error
code = 5
Æ D | K € kHžDUCD_LOG_INFO : ? 28/05/2014 | 04:50:30 Aries :
05/28/2014 | 04:50:30.907 C4000A : 5C02336 :: INFO :: CCertInstaller AddSingleCerttoStore : Adding Single Certificate Successful
= © K € OžDUCD_LOG_INFO : 05/28/2014 | 04:50:30 Aries : 05/28/2014 |
04:50:30.908 C4000A : 5C02336 :: INFO :: CCertInstaller LdapGetValsfromMesg : AddRootCerttoStore ( . RSP) succeeded
hr = 0x0
ROMK € mSžDUCD_LOG_ERROR : 05/28/2014 | 04:50:30 Aries :
28/05/2014 | 04:50:30.908 C4000A : 5C02336 CLogOnManager :: ERROR :: HandleCertEvent : CertInstaller gave callback with Error code = 5
: O | K € øËžDUCD_LOG_INFO : 28/05/2014 | 04:50:30 Aries : 28/05/2014
| 04:50:30.928 C4000A : 5C02336 :: INFO :: CCertInstaller AddSingleCerttoStore : Adding Single Certificate Successful
= © K € ¥ ÒžDUCD_LOG_INFO : 28/05/2014 | 04:50:30 Aries : 28/05/2014
| 04:50:30.929 C4000A : 5C02336 :: INFO :: CCertInstaller LdapGetValsfromMesg : AddRootCerttoStore ( . RSP) succeeded
hr = 0x0
ROMK € ñÖžDUCD_LOG_ERROR : 05/28/2014 | 04:50:30 Aries :
05/28/2014 | 04:50:30.930 C4000A : 5C02336 CLogOnManager :: ERROR :: HandleCertEvent : CertInstaller gave callback with Error code = 5
: O | K € OŸDUCD_LOG_INFO : 28/05/2014 | 04:50:30 Aries : 05/28/2014
| 04:50:30.950 C4000A : 5C02336 :: INFO :: CCertInstaller AddSingleCerttoStore : Adding Single Certificate Successful
= © K € UŸDUCD_LOG_INFO : 05/28/2014 | 04:50:30 Aries : 28/05/2014
| 04:50:30.951 C4000A : 5C02336 :: INFO :: CCertInstaller LdapGetValsfromMesg : AddRootCerttoStore ( . RSP) succeeded hr
= 0x0
rom € ¸ ¶ K tŸDUCD_LOG_INFO : 28/05/2014 | 04:50:30
Aries : 28/05/2014 | 04:50:30.956 C4000A : 5520002 :: INFO :: CLogOnManager OnCertStatusEvent : Received notification from CertInstaller with state
= 0x5
G_ck € ™ zŸDUCD_LOG_INFO : 28/05/2014 | 04:50:30
Aries : 05/28/2014 | 04:50:30.957 C4000A : 5520002 :: INFO :: CCertStateImplementor HandleCertEvents : Received Status event from CertInstaller event from
cert installer
4th K € | ŸDUCD_LOG_INFO : 28/05/2014 | 04:50:30 Aries : 05/28/2014
| 04:50:30.957 C4000A : 5520002 :: INFO :: CLogOnScreen OnCertInstallerStateChange : OnCertInstallerStateChange status = 5
Robson Hasselhoff - Follow me @Robk9eLog in below to connect sip.domainA.com:
�é�K€®ËÃ.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.693 5510002:5520002 INFO :: SockMgr: Create New Connection:DestName:(sip.domainA.com)DestPort:(5061)Transport:(2)httpTunnel:(0)TLS RemotePrincipalName:(sip.domainA.com)
� (0¯�K€ãÃ.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.696 5510002:5520002 INFO :: CSIPCompressor::Initialize - Compression setting 1, threshold 128000, timeout 5000
�)Ì�K€™óÃ.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.699 5510002:5520002 INFO :: CSIPAsyncSocket::Connect 00CCD6A0 connecting(async) window 7003B800 socket:00000F8D DestAddr:10.145.53.115:5061
�¬�K€ºaÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.717 5510002:56A000A ERROR :: SECURE_SOCKET: negotiation failed: 80090327, principal name: [sip.domainA.com]
�Ù�K€!fÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.718 5510002:5520002 ERROR :: CSIPTransportLayerSecurity::OnTlsNegotiationComplete (ccd720) failed with 0x80ee0065. Raising OnConnect with the same error
�p.e—�K€¶hÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.718 5510002:5520002 ERROR :: CSIPClientConnection::OnConnect (80ee0065) this: 00CCD540
�0Ï�K€£jÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.719 5510002:5520002 INFO :: SIP_MSG_PROCESSOR::OnRequestConnectionConnectComplete - Enter this: 00CCC1E0, callid=(null), ErrorCode: 0x80ee0065
�i�K€ýkÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.719 5510002:5520002 ERROR :: Releasing connection and notifying transactions
�t t©�K€RmÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.719 5510002:5520002 ERROR :: SIP_MSG_PROCESSOR::NotifyRequestConnectionConnectComplete - Error: 80ee0065
�ca ¹�K€pˆÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.724 5510002:5520002 ERROR :: OUTGOING_TRANSACTION::OnRequestConnectionConnectComplete - connection failed error 80ee0065
�07:~�K€Ö‰Ä.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.724 5510002:5520002 INFO :: REGISTER_CONTEXT:State (4) => (5)
�CC—�K€X‹Ä.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.724 5510002:5520002 INFO :: REGISTER_CONTEXT(ccc1e0) SetAndNotify Recv(6) at State (5)
�c~�K€¿ŽÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.724 5510002:5520002 INFO :: REGISTER_CONTEXT:State (5) => (6)
�nez�K€ Ä.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.725 5510002:5520002 INFO :: SIP_REGISTER:State (1) => (0)
�72–�K€ª”Ä.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.726 5510002:5520002 INFO :: Function: CUccServiceOperationManager::DisableServManager
� Ž�K€º–Ä.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.726 5510002:5520002 INFO :: Function: CUccServerEndpoint::UpdateEndpointState
� 0“�K€ãšÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.726 5510002:5520002 ERROR :: HRESULT API failed: 80ee0061 = hr. DisableServManager
�O«�K€nœÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.727 5510002:5520002 INFO :: CUccDnsResolverManager::Stop MR-INFO - [00CC7C10] DNS resolver manager stopped
�5y�K€µŸÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.728 5510002:5520002 INFO :: ~Out trxn corr-id (00CCD000)
�= hç�K€Ä¥Ä.UCD_LOG_ERROR: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.728 5510002:5520002 ERROR :: WriteLogonSessionAssertionTrace: NModel::CEasyUccContext::Get[133] - ASSERTION FAILURE: IUccContext::get_Property() failed!. hr=0x80ee0058
�tç�K€˜§Ä.UCD_LOG_ERROR: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.729 5510002:5520002 ERROR :: WriteLogonSessionAssertionTrace: NModel::CEasyUccContext::Get[133] - ASSERTION FAILURE: IUccContext::get_Property() failed!. hr=0x80ee0058
�5ç�K€T©Ä.UCD_LOG_ERROR: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.729 5510002:5520002 ERROR :: WriteLogonSessionAssertionTrace: NModel::CEasyUccContext::Get[133] - ASSERTION FAILURE: IUccContext::get_Property() failed!. hr=0x80ee0058
�Rç�K€«Ä.UCD_LOG_ERROR: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.729 5510002:5520002 ERROR :: WriteLogonSessionAssertionTrace: NModel::CEasyUccContext::Get[101] - ASSERTION FAILURE: IUccContext::get_Property() failed!. hr=0x80ee0058
�5¶�K€m¯Ä.UCD_LOG_ERROR: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.730 5510002:5520002 ERROR :: NModel::CBaseLogonSession::OnEnable: Logon failed with UCCP status/diag code 0x80ee0065/0
� :K€m·Ä.UCD_LOG_INFO: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.731 5510002:5520002 INFO :: NModel::CManagedCredential::SetResult: Logon success state 0 reported by user id=0 (adjusted=0) on CManagedCredential[SPECIFIC this=00AD1E40, domain=intranet.local,
userName=robson.carvalho]
�et¶�K€ÙºÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.732 5510002:5520002 ERROR :: CServerConfigModel::LoadValue: UCCP object is not received yet. groupIndex=0, hr=80ee0061
�esÈ�K€%½Ä.UCD_LOG_INFO: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.732 5510002:5520002 INFO :: NModel::CLogonServerStatistic::SetResult: CLogonServerStatistic::SetResult sip.domainA.com:5061/3 0x80ee0065
�¼�K€AÀÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.733 5510002:5520002 INFO :: NModel::CLogonServerStatistic::ClearDedicatedServer: CLogonServerStatistic::ClearDedicatedServer
�©�K€ÅÉÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.734 5510002:5520002 INFO :: NModel::CBaseLogonSession::DeactivateRecoveryMode: Recovery mode switched off
�) f|�K€¦ÌÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Uccapi: 05/28/2014|07:28:56.735 5510002:5520002 INFO :: Function: CUccEndpoint::Disable
�©�K€&ÑÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.736 5510002:5520002 INFO :: NModel::CBaseLogonSession::DeactivateRecoveryMode: Recovery mode switched off
�07:ª�K€ËÙÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.737 5510002:5520002 INFO :: CCallManager::OnEvent: CCallManager::OnEvent - Received logon-session event 0.
�=0ñ�K€PÜÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.737 5510002:5520002 INFO :: NModel::CComponentLifecycleManager::NotifyComponentStateChanged: CLM received state change event of component 'LogonSession', reporting state STOPPED
�jecÎ�K€dÞÄ.UCD_LOG_ERROR: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.738 5510002:5520002 ERROR :: NModel::CComponentDetails::SetStatusInfo: Component LogonSession reports error code 0x80ee0065 (no auto-recovery)
�:S2K€æñÄ.UCD_LOG_INFO: 05/28/2014|07:28:56 Aries: 05/28/2014|07:28:56.739 5510002:5520002 INFO :: NModel::CBaseLogonSession::OnEnable:
Received server response:
status/diag code=0x80ee0065/0
clientVersionCheckResult=0
upgradeUrl=
authWebServiceBaseUrl=
currentAuthMode=0
supportedAuthModes=0
isTlsDskSupported=0
Reporting credential success 80ee0065
Reporting server success 80ee0065
updatedServerName=sip.domainA.com:5061
updatedTransportMode=3
isClientVersionCheckError=0
isServerVersionCheckError=0
isConnectionError=1
isRootCertError=0
isAuthError=0
isTlsDskError=0
isKerberosError=1
isUserCredError=0
isProxyCredError=0
isErrorWithCache=0
isNtlmMismatch=0
isServerCertInvalid=1
shouldResetAllowedAuthModes=0
current allowedAuthModes=12
new allowedAuthModes=0
No further alternate server available or SVF/CVF error!
autoRetryByErrorCode=1
withRescheduleHint=0
withAutoRetrials=0
Login failed with permanent error or no auto-retrials
Recovery mode switched off
newState=LOGGED_OUT
Robson Hasselhoff - Follow me @Robk9e -
I'm running Leopard and whatever the latest iTunes is. Any help appreciated.
I've got an Apple ID problem, too. All of the sudden in the midnight between August 31st and September 1st, the new apps I picked up on the App Store hung forever 'Waiting..' in my iPhone and never turned 'Loading'. When a substantial amont of time had passed, they reported, they 'could not connect to the App Store' and .. disappeared! Well what they told was not perfectly true because I could however connect to the store as I could browse and pick the apps, but the apps just didn't load. I tried to log into my account in iTunes on my Windows 7 laptop, too, and there got exactly the message in the topic title.
It appeared later my Apple ID did not completely fail because when I switched from my home WiFi to the phone 3G, everything worked just as nothing happened. Logically, this intimated my WiFi had flaws. Or, some place between my WiFi router and Apple servers did, to be precise. My router was not to blame because I did no changes to it whatsoever.
All right, it is Saturday today and my ISP is running in unmanned mode meaning no hotline, but I call them on Monday unless the problem disappears by itself. I just wonder what I say, because from non-i-world point of view everything works well, and I know for sure guys in the ISP support don't own any i-stuff, (because they are all android fanatics) . I'm not telling them my Apple ID to let them reproduce the problem on their home equipment, which means I come almost totally proofless. -
When I try to open the home page in my Itunes I get the message "we could not complete your itunes store request. The network connection is not be established. There was an error in the itunes store. Please try again later." It had been working just fine, in fact I had just purchased a song & edited my itunes account. Could changing the name on my account have cause the error message or is something else going on? This is a brand new computer.
I've got an Apple ID problem, too. All of the sudden in the midnight between August 31st and September 1st, the new apps I picked up on the App Store hung forever 'Waiting..' in my iPhone and never turned 'Loading'. When a substantial amont of time had passed, they reported, they 'could not connect to the App Store' and .. disappeared! Well what they told was not perfectly true because I could however connect to the store as I could browse and pick the apps, but the apps just didn't load. I tried to log into my account in iTunes on my Windows 7 laptop, too, and there got exactly the message in the topic title.
It appeared later my Apple ID did not completely fail because when I switched from my home WiFi to the phone 3G, everything worked just as nothing happened. Logically, this intimated my WiFi had flaws. Or, some place between my WiFi router and Apple servers did, to be precise. My router was not to blame because I did no changes to it whatsoever.
All right, it is Saturday today and my ISP is running in unmanned mode meaning no hotline, but I call them on Monday unless the problem disappears by itself. I just wonder what I say, because from non-i-world point of view everything works well, and I know for sure guys in the ISP support don't own any i-stuff, (because they are all android fanatics) . I'm not telling them my Apple ID to let them reproduce the problem on their home equipment, which means I come almost totally proofless. -
Flash Player: Connection failed. Unable to complete installation. Mac OSX
I'm working on a mac running 10.10.1 Yosemite in Safari. My current Flash version is 15.0.0.
On most videos and pictures it now says 'Your Flash Player is out of date".
I've clicked on this icon, which opens saying do you want to download the newest version, and clicked yes.
I've downloaded Adobe Flash Player Update several times.
The downloading always works, the problem is with the installation:
It failed the first time, and all following times it 'picks up' at about 30% then goes up all the way to 97% (sometimes 99%) and then says: Connection failed. Unable to complete installation.
I've tried all the links in the forums saying download directly from here: http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_osx.dmg - but safari can't find the link.
I wanted to deinstall Flash Player and found this link on the adobe website(Uninstall Flash Player | Mac OS): http://fpdownload.macromedia.com/get/flashplayer/current/support/uninstall_flash_player_os x.dmg -> but it says "Safari can't find the server fpdownload.macromedia.com" so I can't even uninstall it!
I have no idea what else to try???
I also tried to open all those links in Firefox and Chrome and they weren't found there either.
Has anyone ideas what I can do? All the links that I found in the forum which solved the problem for others are 'not found' when I click on them.
Thanks for any tipps!!!How to perform a "clean install" of Flash Player in Mac OS X
I wrote those instructions. They're how I installed Flash Player on my new Mini. -
I copied a workbook that has a working scheduled refresh
modified the data model, added some new reports
added a new source (PQ from azure market place)
uploaded workbook to new powerbi location.
get the following error when i try to turn on scheduled refresh - this is even if i just select one data source that is still identical to the original (working) workbook
Test connections settings validation failed: one or more connections did not pass the test
Technical Details ▼
Correlation ID: ddcab6b8-ff2c-4881-9d8e-eeabbd23dff2
Date and Time: 12/12/2014 06:13:06 AM (UTC)
what's the problem?
Jakub @ Adelaide, Australia BlogStill a problem and not just for me but other users going by the threads on here...
https://social.technet.microsoft.com/Forums/en-US/eb8682f4-9b40-456a-a7f1-45627a0f4ff0/cannot-schedule-refresh?forum=powerbiforoffice365#eb8682f4-9b40-456a-a7f1-45627a0f4ff0
Applies to all worksheets that utilise a PQ connection registered in the gateway. (my gateway is on an azure VM)
Existing worksheets receive this warning. New workbooks that utilise these connections also receive this warning
Adding a new PQ to the gateway and a new workbook that uses the new connection also receives this warning.
Every PQ connection I have receives this warning. My PQ connections are all to web resources. Most are to the workflowmax.com API, and one is to the Azure Marketplace to retrieve data for a date dimension.
Note: this does not prevent me from scheduling or triggering a refresh, and the refresh itself completes successfully. It's just a weird warning that caused confusion as it sounds like the actual refresh will fail as well seeing as the connection test failed.
Jakub @ Adelaide, Australia Blog -
I have AlwaysOn SQL 2012 Enterprise set-up using Windows Failover Clustering Services (not FCI), and have 1 Primary node (P), 1 Synchronous Commit Auto Failover (SC), and 1 Asynchronous Commit Manual Failover (AC) node. It is set up to prefer secondary,
with the highest priority given to AC node.
I am using Ola Hollengren's scripts for Database Maintenance jobs, including a native BACKUP LOG job for the transaction logs of all user databases on a 1 minute schedule. His scripts already consider AlwaysOn, and although the job is set-up on all
3 nodes, only ever runs on AC node.
The job has been running successfully since initial set-up almost 1 year ago, but suddenly yesterday morning started to fail with the following error, only on 1 of the 13 databases in my availability group:
Date and time: 2014-06-08 09:36:11
Command: BACKUP LOG [my_db] TO DISK = N'E:\MSSQL\\Transaction Dumps\my_db\MySQLCL$MySQLAG_my_db_20140608_093610_U_LOG.trn' WITH CHECKSUM, COMPRESSION
Msg 35250, Level 16, State 11, Server AC, Line 1
The connection to the primary replica is not active. The command cannot be processed.
Msg 3013, Level 16, State 1, Server AC, Line 1
BACKUP LOG is terminating abnormally.
Outcome: Failed
Duration: 00:01:00
The other 12 databases continued to backup successfully.
Checking the Availability Group dashboard, windows event logs, and SQL Server error logs, including Failover Cluster events showed no issues.
However, monitoring software (Idera SQLdm) showed blocked sessions on P node. When I ran sp_who2, it showed that a background process was being blocked by another background process with an HADR BACKUP LOCK.
Since both processes were background processes, I was unable to kill either process. I temporarily disabled the transaction log backup job, but the blocked process was still active.
I ran DBCC CHECKDB (my_db) WITH all_errormsgs, no_infomsgs, data_purity on both P and AC nodes, with no errors. However, on AC node, it also showed 1 transaction rolled forward and 0 transactions rolled back. This also had the effect of releasing
the blocked background process, but another background process was now blocking with the same HADR BACKUP LOCK.
I tried to restart SQL Server Agent on AC node, which did not immediately seem to work. However, after a few minutes, I noticed that the block had disappeared. I re-enabled the transaction log backup job on AC and it started working normally
again. The error has not occurred again, but I am at a loss as to what happened, and how to prevent it from happening again.
Any help would be greatly appreciated.
DianeAnd here is part 2 of the stored procedure:
--// Execute backup commands //--
WHILE EXISTS (SELECT * FROM @tmpDatabases WHERE Selected = 1 AND Completed = 0)
BEGIN
SELECT TOP 1 @CurrentDBID = ID,
@CurrentDatabaseName = DatabaseName,
@CurrentDatabaseNameFS = DatabaseNameFS,
@CurrentDatabaseType = DatabaseType
FROM @tmpDatabases
WHERE Selected = 1
AND Completed = 0
ORDER BY ID ASC
SET @CurrentDatabaseID = DB_ID(@CurrentDatabaseName)
IF DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') = 'ONLINE'
BEGIN
IF EXISTS (SELECT * FROM sys.database_recovery_status WHERE database_id = @CurrentDatabaseID AND database_guid IS NOT NULL)
BEGIN
SET @CurrentIsDatabaseAccessible = 1
END
ELSE
BEGIN
SET @CurrentIsDatabaseAccessible = 0
END
END
ELSE
BEGIN
SET @CurrentIsDatabaseAccessible = 0
END
SELECT @CurrentDifferentialBaseLSN = differential_base_lsn
FROM sys.master_files
WHERE database_id = @CurrentDatabaseID
AND [type] = 0
AND [file_id] = 1
-- Workaround for a bug in SQL Server 2005
IF @Version >= 9 AND @Version < 10
AND EXISTS(SELECT * FROM sys.master_files WHERE database_id = @CurrentDatabaseID AND [type] = 0 AND [file_id] = 1 AND differential_base_lsn IS NOT NULL AND differential_base_guid IS NOT NULL AND differential_base_time IS NULL)
BEGIN
SET @CurrentDifferentialBaseLSN = NULL
END
SELECT @CurrentDifferentialBaseIsSnapshot = is_snapshot
FROM msdb.dbo.backupset
WHERE database_name = @CurrentDatabaseName
AND [type] = 'D'
AND checkpoint_lsn = @CurrentDifferentialBaseLSN
IF DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') = 'ONLINE'
BEGIN
SELECT @CurrentLogLSN = last_log_backup_lsn
FROM sys.database_recovery_status
WHERE database_id = @CurrentDatabaseID
END
SET @CurrentBackupType = @BackupType
IF @ChangeBackupType = 'Y'
BEGIN
IF @CurrentBackupType = 'LOG' AND DATABASEPROPERTYEX(@CurrentDatabaseName,'Recovery') <> 'SIMPLE' AND @CurrentLogLSN IS NULL AND @CurrentDatabaseName <> 'master'
BEGIN
SET @CurrentBackupType = 'DIFF'
END
IF @CurrentBackupType = 'DIFF' AND @CurrentDifferentialBaseLSN IS NULL AND @CurrentDatabaseName <> 'master'
BEGIN
SET @CurrentBackupType = 'FULL'
END
END
IF @CurrentBackupType = 'LOG'
BEGIN
SELECT @CurrentLatestBackup = MAX(backup_finish_date)
FROM msdb.dbo.backupset
WHERE [type] IN('D','I')
AND is_damaged = 0
AND database_name = @CurrentDatabaseName
END
IF @Version >= 11 AND @Cluster IS NOT NULL
BEGIN
SELECT @CurrentAvailabilityGroup = availability_groups.name,
@CurrentAvailabilityGroupRole = dm_hadr_availability_replica_states.role_desc
FROM sys.databases databases
INNER JOIN sys.availability_databases_cluster availability_databases_cluster ON databases.group_database_id = availability_databases_cluster.group_database_id
INNER JOIN sys.availability_groups availability_groups ON availability_databases_cluster.group_id = availability_groups.group_id
INNER JOIN sys.dm_hadr_availability_replica_states dm_hadr_availability_replica_states ON availability_groups.group_id = dm_hadr_availability_replica_states.group_id AND databases.replica_id = dm_hadr_availability_replica_states.replica_id
WHERE databases.name = @CurrentDatabaseName
END
IF @Version >= 11 AND @Cluster IS NOT NULL AND @CurrentAvailabilityGroup IS NOT NULL
BEGIN
SELECT @CurrentIsPreferredBackupReplica = sys.fn_hadr_backup_is_preferred_replica(@CurrentDatabaseName)
END
SELECT @CurrentDatabaseMirroringRole = UPPER(mirroring_role_desc)
FROM sys.database_mirroring
WHERE database_id = @CurrentDatabaseID
IF EXISTS (SELECT * FROM msdb.dbo.log_shipping_primary_databases WHERE primary_database = @CurrentDatabaseName)
BEGIN
SET @CurrentLogShippingRole = 'PRIMARY'
END
ELSE
IF EXISTS (SELECT * FROM msdb.dbo.log_shipping_secondary_databases WHERE secondary_database = @CurrentDatabaseName)
BEGIN
SET @CurrentLogShippingRole = 'SECONDARY'
END
-- Set database message
SET @DatabaseMessage = 'Date and time: ' + CONVERT(nvarchar,GETDATE(),120) + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Database: ' + QUOTENAME(@CurrentDatabaseName) + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Status: ' + CAST(DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') AS nvarchar) + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Standby: ' + CASE WHEN DATABASEPROPERTYEX(@CurrentDatabaseName,'IsInStandBy') = 1 THEN 'Yes' ELSE 'No' END + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Updateability: ' + CAST(DATABASEPROPERTYEX(@CurrentDatabaseName,'Updateability') AS nvarchar) + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'User access: ' + CAST(DATABASEPROPERTYEX(@CurrentDatabaseName,'UserAccess') AS nvarchar) + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Is accessible: ' + CASE WHEN @CurrentIsDatabaseAccessible = 1 THEN 'Yes' ELSE 'No' END + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Recovery model: ' + CAST(DATABASEPROPERTYEX(@CurrentDatabaseName,'Recovery') AS nvarchar) + CHAR(13) + CHAR(10)
IF @CurrentAvailabilityGroup IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Availability group: ' + @CurrentAvailabilityGroup + CHAR(13) + CHAR(10)
IF @CurrentAvailabilityGroup IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Availability group role: ' + @CurrentAvailabilityGroupRole + CHAR(13) + CHAR(10)
IF @CurrentAvailabilityGroup IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Is preferred backup replica: ' + CASE WHEN @CurrentIsPreferredBackupReplica = 1 THEN 'Yes' WHEN @CurrentIsPreferredBackupReplica = 0 THEN 'No' ELSE 'N/A' END + CHAR(13) + CHAR(10)
IF @CurrentDatabaseMirroringRole IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Database mirroring role: ' + @CurrentDatabaseMirroringRole + CHAR(13) + CHAR(10)
IF @CurrentLogShippingRole IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Log shipping role: ' + @CurrentLogShippingRole + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Differential base LSN: ' + ISNULL(CAST(@CurrentDifferentialBaseLSN AS nvarchar),'N/A') + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Differential base is snapshot: ' + CASE WHEN @CurrentDifferentialBaseIsSnapshot = 1 THEN 'Yes' WHEN @CurrentDifferentialBaseIsSnapshot = 0 THEN 'No' ELSE 'N/A' END + CHAR(13) + CHAR(10)
SET @DatabaseMessage = @DatabaseMessage + 'Last log backup LSN: ' + ISNULL(CAST(@CurrentLogLSN AS nvarchar),'N/A') + CHAR(13) + CHAR(10)
SET @DatabaseMessage = REPLACE(@DatabaseMessage,'%','%%') + ' '
RAISERROR(@DatabaseMessage,10,1) WITH NOWAIT
IF DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') = 'ONLINE'
AND NOT (DATABASEPROPERTYEX(@CurrentDatabaseName,'UserAccess') = 'SINGLE_USER' AND @CurrentIsDatabaseAccessible = 0)
AND DATABASEPROPERTYEX(@CurrentDatabaseName,'IsInStandBy') = 0
AND NOT (@CurrentBackupType = 'LOG' AND (DATABASEPROPERTYEX(@CurrentDatabaseName,'Recovery') = 'SIMPLE' OR @CurrentLogLSN IS NULL))
AND NOT (@CurrentBackupType = 'DIFF' AND @CurrentDifferentialBaseLSN IS NULL)
AND NOT (@CurrentBackupType IN('DIFF','LOG') AND @CurrentDatabaseName = 'master')
AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'FULL' AND @CopyOnly = 'N' AND (@CurrentAvailabilityGroupRole <> 'PRIMARY' OR @CurrentAvailabilityGroupRole IS NULL))
AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'FULL' AND @CopyOnly = 'Y' AND (@CurrentIsPreferredBackupReplica <> 1 OR @CurrentIsPreferredBackupReplica IS NULL))
AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'DIFF' AND (@CurrentAvailabilityGroupRole <> 'PRIMARY' OR @CurrentAvailabilityGroupRole IS NULL))
AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'LOG' AND @CopyOnly = 'N' AND (@CurrentIsPreferredBackupReplica <> 1 OR @CurrentIsPreferredBackupReplica IS NULL))
AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'LOG' AND @CopyOnly = 'Y' AND (@CurrentAvailabilityGroupRole <> 'PRIMARY' OR @CurrentAvailabilityGroupRole IS NULL))
AND NOT ((@CurrentLogShippingRole = 'PRIMARY' AND @CurrentLogShippingRole IS NOT NULL) AND @CurrentBackupType = 'LOG')
BEGIN
-- Set variables
SET @CurrentDate = GETDATE()
IF @CleanupTime IS NULL OR (@CurrentBackupType = 'LOG' AND @CurrentLatestBackup IS NULL) OR @CurrentBackupType <> @BackupType
BEGIN
SET @CurrentCleanupDate = NULL
END
ELSE
IF @CurrentBackupType = 'LOG'
BEGIN
SET @CurrentCleanupDate = (SELECT MIN([Date]) FROM(SELECT DATEADD(hh,-(@CleanupTime),@CurrentDate) AS [Date] UNION SELECT @CurrentLatestBackup AS [Date]) Dates)
END
ELSE
BEGIN
SET @CurrentCleanupDate = DATEADD(hh,-(@CleanupTime),@CurrentDate)
END
SELECT @CurrentFileExtension = CASE
WHEN @BackupSoftware IS NULL AND @CurrentBackupType = 'FULL' THEN 'bak'
WHEN @BackupSoftware IS NULL AND @CurrentBackupType = 'DIFF' THEN 'bak'
WHEN @BackupSoftware IS NULL AND @CurrentBackupType = 'LOG' THEN 'trn'
WHEN @BackupSoftware = 'LITESPEED' AND @CurrentBackupType = 'FULL' THEN 'bak'
WHEN @BackupSoftware = 'LITESPEED' AND @CurrentBackupType = 'DIFF' THEN 'bak'
WHEN @BackupSoftware = 'LITESPEED' AND @CurrentBackupType = 'LOG' THEN 'trn'
WHEN @BackupSoftware = 'SQLBACKUP' AND @CurrentBackupType = 'FULL' THEN 'sqb'
WHEN @BackupSoftware = 'SQLBACKUP' AND @CurrentBackupType = 'DIFF' THEN 'sqb'
WHEN @BackupSoftware = 'SQLBACKUP' AND @CurrentBackupType = 'LOG' THEN 'sqb'
WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'FULL' AND @Encrypt = 'N' THEN 'hbc'
WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'DIFF' AND @Encrypt = 'N' THEN 'hbc'
WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'LOG' AND @Encrypt = 'N' THEN 'hbc'
WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'FULL' AND @Encrypt = 'Y' THEN 'hbe'
WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'DIFF' AND @Encrypt = 'Y' THEN 'hbe'
WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'LOG' AND @Encrypt = 'Y' THEN 'hbe'
WHEN @BackupSoftware = 'SQLSAFE' AND @CurrentBackupType = 'FULL' THEN 'safe'
WHEN @BackupSoftware = 'SQLSAFE' AND @CurrentBackupType = 'DIFF' THEN 'safe'
WHEN @BackupSoftware = 'SQLSAFE' AND @CurrentBackupType = 'LOG' THEN 'safe'
END
INSERT INTO @CurrentDirectories (ID, DirectoryPath, CreateCompleted, CleanupCompleted)
SELECT ROW_NUMBER() OVER (ORDER BY ID), DirectoryPath + CASE WHEN RIGHT(DirectoryPath,1) = '\' THEN '' ELSE '\' END + CASE WHEN @CurrentBackupType = 'LOG' THEN '\Transaction Dumps\' + @CurrentDatabaseNameFS ELSE '' END, 0, 0
FROM @Directories
ORDER BY ID ASC
SET @CurrentFileNumber = 0
SET @CurrentMirrorFilePath = NULL
WHILE @CurrentFileNumber < @NumberOfFiles
BEGIN
SET @CurrentFileNumber = @CurrentFileNumber + 1
SELECT @CurrentDirectoryPath = DirectoryPath
FROM @CurrentDirectories
WHERE @CurrentFileNumber >= (ID - 1) * (SELECT @NumberOfFiles / COUNT(*) FROM @CurrentDirectories) + 1
AND @CurrentFileNumber <= ID * (SELECT @NumberOfFiles / COUNT(*) FROM @CurrentDirectories)
SET @CurrentFilePath = @CurrentDirectoryPath + '\' + CASE WHEN @CurrentAvailabilityGroup IS NOT NULL THEN @Cluster + '$' + @CurrentAvailabilityGroup ELSE REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') END + '_' + @CurrentDatabaseNameFS + '_' + REPLACE(REPLACE(REPLACE((CONVERT(nvarchar,@CurrentDate,120)),'-',''),' ','_'),':','') + CASE WHEN @NumberOfFiles > 1 AND @NumberOfFiles <= 9 THEN '_' + CAST(@CurrentFileNumber AS nvarchar) WHEN @NumberOfFiles >= 10 THEN '_' + RIGHT('0' + CAST(@CurrentFileNumber AS nvarchar),2) ELSE '' END + '_' + @CurrentDatabaseType + '_' + UPPER(@CurrentBackupType) + CASE WHEN @ReadWriteFileGroups = 'Y' THEN '_PARTIAL' ELSE '' END + CASE WHEN @CopyOnly = 'Y' THEN '_COPY_ONLY' ELSE '' END + '.' + @CurrentFileExtension
IF LEN(@CurrentFilePath) > 257
BEGIN
SET @CurrentFilePath = @CurrentDirectoryPath + '\' + CASE WHEN @CurrentAvailabilityGroup IS NOT NULL THEN @Cluster + '$' + @CurrentAvailabilityGroup ELSE REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') END + '_' + LEFT(@CurrentDatabaseNameFS,CASE WHEN (LEN(@CurrentDatabaseNameFS) + 257 - LEN(@CurrentFilePath) - 3) < 20 THEN 20 ELSE (LEN(@CurrentDatabaseNameFS) + 257 - LEN(@CurrentFilePath) - 3) END) + '...' + '_' + REPLACE(REPLACE(REPLACE((CONVERT(nvarchar,@CurrentDate,120)),'-',''),' ','_'),':','') + CASE WHEN @NumberOfFiles > 1 AND @NumberOfFiles <= 9 THEN '_' + CAST(@CurrentFileNumber AS nvarchar) WHEN @NumberOfFiles >= 10 THEN '_' + RIGHT('0' + CAST(@CurrentFileNumber AS nvarchar),2) ELSE '' END + '_' + @CurrentDatabaseType + '_' + UPPER(@CurrentBackupType) + CASE WHEN @ReadWriteFileGroups = 'Y' THEN '_PARTIAL' ELSE '' END + CASE WHEN @CopyOnly = 'Y' THEN '_COPY_ONLY' ELSE '' END + '.' + @CurrentFileExtension
END
IF @CurrentFileNumber = 1 AND LEN(@MirrorDirectory) > 0
BEGIN
SET @CurrentMirrorFilePath = @MirrorDirectory + CASE WHEN RIGHT(@MirrorDirectory,1) = '\' THEN '' ELSE '\' END + CASE WHEN @CurrentBackupType = 'LOG' THEN '\Transaction Dumps\' + @CurrentDatabaseNameFS ELSE '' END + '\' + CASE WHEN @CurrentAvailabilityGroup IS NOT NULL THEN @Cluster + '$' + @CurrentAvailabilityGroup ELSE REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') END + '_' + @CurrentDatabaseNameFS + '_' + REPLACE(REPLACE(REPLACE((CONVERT(nvarchar,@CurrentDate,120)),'-',''),' ','_'),':','') + CASE WHEN @NumberOfFiles > 1 AND @NumberOfFiles <= 9 THEN '_' + CAST(@CurrentFileNumber AS nvarchar) WHEN @NumberOfFiles >= 10 THEN '_' + RIGHT('0' + CAST(@CurrentFileNumber AS nvarchar),2) ELSE '' END + '_' + @CurrentDatabaseType + '_' + UPPER(@CurrentBackupType) + CASE WHEN @ReadWriteFileGroups = 'Y' THEN '_PARTIAL' ELSE '' END + CASE WHEN @CopyOnly = 'Y' THEN '_COPY_ONLY' ELSE '' END + '.' + @CurrentFileExtension
IF LEN(@CurrentFilePath) > 257
BEGIN
SET @CurrentMirrorFilePath = @MirrorDirectory + CASE WHEN RIGHT(@MirrorDirectory,1) = '\' THEN '' ELSE '\' END + CASE WHEN @CurrentBackupType = 'LOG' THEN '\Transaction Dumps\' + @CurrentDatabaseNameFS ELSE '' END + '\' + CASE WHEN @CurrentAvailabilityGroup IS NOT NULL THEN @Cluster + '$' + @CurrentAvailabilityGroup ELSE REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') END + '_' + LEFT(@CurrentDatabaseNameFS,CASE WHEN (LEN(@CurrentDatabaseNameFS) + 257 - LEN(@CurrentFilePath) - 3) < 20 THEN 20 ELSE (LEN(@CurrentDatabaseNameFS) + 257 - LEN(@CurrentFilePath) - 3) END) + '...' + '_' + REPLACE(REPLACE(REPLACE((CONVERT(nvarchar,@CurrentDate,120)),'-',''),' ','_'),':','') + CASE WHEN @NumberOfFiles > 1 AND @NumberOfFiles <= 9 THEN '_' + CAST(@CurrentFileNumber AS nvarchar) WHEN @NumberOfFiles >= 10 THEN '_' + RIGHT('0' + CAST(@CurrentFileNumber AS nvarchar),2) ELSE '' END + '_' + @CurrentDatabaseType + '_' + UPPER(@CurrentBackupType) + CASE WHEN @ReadWriteFileGroups = 'Y' THEN '_PARTIAL' ELSE '' END + CASE WHEN @CopyOnly = 'Y' THEN '_COPY_ONLY' ELSE '' END + '.' + @CurrentFileExtension
END
END
INSERT INTO @CurrentFiles (CurrentFilePath)
SELECT @CurrentFilePath
SET @CurrentDirectoryPath = NULL
SET @CurrentFilePath = NULL
END
-- Create directory
WHILE EXISTS (SELECT * FROM @CurrentDirectories WHERE CreateCompleted = 0)
BEGIN
SELECT TOP 1 @CurrentDirectoryID = ID,
@CurrentDirectoryPath = DirectoryPath
FROM @CurrentDirectories
WHERE CreateCompleted = 0
ORDER BY ID ASC
SET @CurrentCommandType01 = 'xp_create_subdir'
SET @CurrentCommand01 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_create_subdir N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + ''' IF @ReturnCode <> 0 RAISERROR(''Error creating directory.'', 16, 1)'
EXECUTE @CurrentCommandOutput01 = [dbo].[CommandExecute] @Command = @CurrentCommand01, @CommandType = @CurrentCommandType01, @Mode = 1, @DatabaseName = @CurrentDatabaseName, @LogToTable = @LogToTable, @Execute = @Execute
SET @Error = @@ERROR
IF @Error <> 0 SET @CurrentCommandOutput01 = @Error
IF @CurrentCommandOutput01 <> 0 SET @ReturnCode = @CurrentCommandOutput01
UPDATE @CurrentDirectories
SET CreateCompleted = 1,
CreateOutput = @CurrentCommandOutput01
WHERE ID = @CurrentDirectoryID
SET @CurrentDirectoryID = NULL
SET @CurrentDirectoryPath = NULL
SET @CurrentCommand01 = NULL
SET @CurrentCommandOutput01 = NULL
SET @CurrentCommandType01 = NULL
END
-- Perform a backup
IF NOT EXISTS (SELECT * FROM @CurrentDirectories WHERE CreateOutput <> 0 OR CreateOutput IS NULL)
BEGIN
IF @BackupSoftware IS NULL
BEGIN
SELECT @CurrentCommandType02 = CASE
WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'BACKUP_DATABASE'
WHEN @CurrentBackupType = 'LOG' THEN 'BACKUP_LOG'
END
SELECT @CurrentCommand02 = CASE
WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'BACKUP DATABASE ' + QUOTENAME(@CurrentDatabaseName)
WHEN @CurrentBackupType = 'LOG' THEN 'BACKUP LOG ' + QUOTENAME(@CurrentDatabaseName)
END
IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ' READ_WRITE_FILEGROUPS'
SET @CurrentCommand02 = @CurrentCommand02 + ' TO'
SELECT @CurrentCommand02 = @CurrentCommand02 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand02 = @CurrentCommand02 + ' WITH '
IF @CheckSum = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + 'CHECKSUM'
IF @CheckSum = 'N' SET @CurrentCommand02 = @CurrentCommand02 + 'NO_CHECKSUM'
IF @Compress = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COMPRESSION'
IF @Compress = 'N' AND @Version >= 10 SET @CurrentCommand02 = @CurrentCommand02 + ', NO_COMPRESSION'
IF @CurrentBackupType = 'DIFF' SET @CurrentCommand02 = @CurrentCommand02 + ', DIFFERENTIAL'
IF @CopyOnly = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COPY_ONLY'
IF @BlockSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BLOCKSIZE = ' + CAST(@BlockSize AS nvarchar)
IF @BufferCount IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BUFFERCOUNT = ' + CAST(@BufferCount AS nvarchar)
IF @MaxTransferSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', MAXTRANSFERSIZE = ' + CAST(@MaxTransferSize AS nvarchar)
IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', DESCRIPTION = N''' + REPLACE(@Description,'''','''''') + ''''
END
IF @BackupSoftware = 'LITESPEED'
BEGIN
SELECT @CurrentCommandType02 = CASE
WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'xp_backup_database'
WHEN @CurrentBackupType = 'LOG' THEN 'xp_backup_log'
END
SELECT @CurrentCommand02 = CASE
WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_backup_database @database = N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''''
WHEN @CurrentBackupType = 'LOG' THEN 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_backup_log @database = N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''''
END
SELECT @CurrentCommand02 = @CurrentCommand02 + ', @filename = N''' + REPLACE(CurrentFilePath,'''','''''') + ''''
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand02 = @CurrentCommand02 + ', @with = '''
IF @CheckSum = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + 'CHECKSUM'
IF @CheckSum = 'N' SET @CurrentCommand02 = @CurrentCommand02 + 'NO_CHECKSUM'
IF @CurrentBackupType = 'DIFF' SET @CurrentCommand02 = @CurrentCommand02 + ', DIFFERENTIAL'
IF @CopyOnly = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COPY_ONLY'
IF @BlockSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BLOCKSIZE = ' + CAST(@BlockSize AS nvarchar)
SET @CurrentCommand02 = @CurrentCommand02 + ''''
IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', @read_write_filegroups = 1'
IF @CompressionLevel IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @compressionlevel = ' + CAST(@CompressionLevel AS nvarchar)
IF @BufferCount IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @buffercount = ' + CAST(@BufferCount AS nvarchar)
IF @MaxTransferSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @maxtransfersize = ' + CAST(@MaxTransferSize AS nvarchar)
IF @Threads IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @threads = ' + CAST(@Threads AS nvarchar)
IF @Throttle IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @throttle = ' + CAST(@Throttle AS nvarchar)
IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @desc = N''' + REPLACE(@Description,'''','''''') + ''''
IF @EncryptionType IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @cryptlevel = ' + CASE
WHEN @EncryptionType = 'RC2-40' THEN '0'
WHEN @EncryptionType = 'RC2-56' THEN '1'
WHEN @EncryptionType = 'RC2-112' THEN '2'
WHEN @EncryptionType = 'RC2-128' THEN '3'
WHEN @EncryptionType = '3DES-168' THEN '4'
WHEN @EncryptionType = 'RC4-128' THEN '5'
WHEN @EncryptionType = 'AES-128' THEN '6'
WHEN @EncryptionType = 'AES-192' THEN '7'
WHEN @EncryptionType = 'AES-256' THEN '8'
END
IF @EncryptionKey IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @encryptionkey = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
SET @CurrentCommand02 = @CurrentCommand02 + ' IF @ReturnCode <> 0 RAISERROR(''Error performing LiteSpeed backup.'', 16, 1)'
END
IF @BackupSoftware = 'SQLBACKUP'
BEGIN
SET @CurrentCommandType02 = 'sqlbackup'
SELECT @CurrentCommand02 = CASE
WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'BACKUP DATABASE ' + QUOTENAME(@CurrentDatabaseName)
WHEN @CurrentBackupType = 'LOG' THEN 'BACKUP LOG ' + QUOTENAME(@CurrentDatabaseName)
END
IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ' READ_WRITE_FILEGROUPS'
SET @CurrentCommand02 = @CurrentCommand02 + ' TO'
SELECT @CurrentCommand02 = @CurrentCommand02 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand02 = @CurrentCommand02 + ' WITH '
IF @CheckSum = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + 'CHECKSUM'
IF @CheckSum = 'N' SET @CurrentCommand02 = @CurrentCommand02 + 'NO_CHECKSUM'
IF @CurrentBackupType = 'DIFF' SET @CurrentCommand02 = @CurrentCommand02 + ', DIFFERENTIAL'
IF @CopyOnly = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COPY_ONLY'
IF @CompressionLevel IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', COMPRESSION = ' + CAST(@CompressionLevel AS nvarchar)
IF @Threads IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', THREADCOUNT = ' + CAST(@Threads AS nvarchar)
IF @MaxTransferSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', MAXTRANSFERSIZE = ' + CAST(@MaxTransferSize AS nvarchar)
IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', DESCRIPTION = N''' + REPLACE(@Description,'''','''''') + ''''
IF @EncryptionType IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', KEYSIZE = ' + CASE
WHEN @EncryptionType = 'AES-128' THEN '128'
WHEN @EncryptionType = 'AES-256' THEN '256'
END
IF @EncryptionKey IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', PASSWORD = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
SET @CurrentCommand02 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.sqlbackup N''-SQL "' + REPLACE(@CurrentCommand02,'''','''''') + '"''' + ' IF @ReturnCode <> 0 RAISERROR(''Error performing SQLBackup backup.'', 16, 1)'
END
IF @BackupSoftware = 'HYPERBAC'
BEGIN
SET @CurrentCommandType02 = 'BACKUP_DATABASE'
SELECT @CurrentCommand02 = CASE
WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'BACKUP DATABASE ' + QUOTENAME(@CurrentDatabaseName)
WHEN @CurrentBackupType = 'LOG' THEN 'BACKUP LOG ' + QUOTENAME(@CurrentDatabaseName)
END
IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ' READ_WRITE_FILEGROUPS'
SET @CurrentCommand02 = @CurrentCommand02 + ' TO'
SELECT @CurrentCommand02 = @CurrentCommand02 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand02 = @CurrentCommand02 + ' WITH '
IF @CheckSum = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + 'CHECKSUM'
IF @CheckSum = 'N' SET @CurrentCommand02 = @CurrentCommand02 + 'NO_CHECKSUM'
IF @CurrentBackupType = 'DIFF' SET @CurrentCommand02 = @CurrentCommand02 + ', DIFFERENTIAL'
IF @CopyOnly = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COPY_ONLY'
IF @BlockSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BLOCKSIZE = ' + CAST(@BlockSize AS nvarchar)
IF @BufferCount IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BUFFERCOUNT = ' + CAST(@BufferCount AS nvarchar)
IF @MaxTransferSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', MAXTRANSFERSIZE = ' + CAST(@MaxTransferSize AS nvarchar)
IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', DESCRIPTION = N''' + REPLACE(@Description,'''','''''') + ''''
END
IF @BackupSoftware = 'SQLSAFE'
BEGIN
SET @CurrentCommandType02 = 'xp_ss_backup'
SET @CurrentCommand02 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_ss_backup @database = N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''''
SELECT @CurrentCommand02 = @CurrentCommand02 + ', ' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) = 1 THEN '@filename' ELSE '@backupfile' END + ' = N''' + REPLACE(CurrentFilePath,'''','''''') + ''''
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
IF @CurrentMirrorFilePath IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @mirrorfile = N''' + @CurrentMirrorFilePath + ''''
SET @CurrentCommand02 = @CurrentCommand02 + ', @backuptype = ' + CASE WHEN @CurrentBackupType = 'FULL' THEN '''Full''' WHEN @CurrentBackupType = 'DIFF' THEN '''Differential''' WHEN @CurrentBackupType = 'LOG' THEN '''Log''' END
IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', @readwritefilegroups = 1'
SET @CurrentCommand02 = @CurrentCommand02 + ', @checksum = ' + CASE WHEN @CheckSum = 'Y' THEN '1' WHEN @CheckSum = 'N' THEN '0' END
SET @CurrentCommand02 = @CurrentCommand02 + ', @copyonly = ' + CASE WHEN @CopyOnly = 'Y' THEN '1' WHEN @CopyOnly = 'N' THEN '0' END
IF @CompressionLevel IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @compressionlevel = ' + CASE WHEN @CompressionLevel = 5 THEN N'ispeed' WHEN @CompressionLevel = 6 THEN N'isize' ELSE CAST(@CompressionLevel AS nvarchar) END
IF @RetryWrites IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @retrywrites = N''' + @RetryWrites + ''''
IF @Threads IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @threads = ' + CAST(@Threads AS nvarchar)
IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @desc = N''' + REPLACE(@Description,'''','''''') + ''''
IF @EncryptionType IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @encryptiontype = N''' + CASE
WHEN @EncryptionType = 'AES-128' THEN 'AES128'
WHEN @EncryptionType = 'AES-256' THEN 'AES256'
END + ''''
IF @EncryptionKey IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @encryptedbackuppassword = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
SET @CurrentCommand02 = @CurrentCommand02 + ' IF @ReturnCode <> 0 RAISERROR(''Error performing SQLsafe backup.'', 16, 1)'
END
EXECUTE @CurrentCommandOutput02 = [dbo].[CommandExecute] @Command = @CurrentCommand02, @CommandType = @CurrentCommandType02, @Mode = 1, @DatabaseName = @CurrentDatabaseName, @LogToTable = @LogToTable, @Execute = @Execute
SET @Error = @@ERROR
IF @Error <> 0 SET @CurrentCommandOutput02 = @Error
IF @CurrentCommandOutput02 <> 0 SET @ReturnCode = @CurrentCommandOutput02
END
-- Verify the backup
IF @CurrentCommandOutput02 = 0 AND @Verify = 'Y'
BEGIN
IF @BackupSoftware IS NULL
BEGIN
SET @CurrentCommandType03 = 'RESTORE_VERIFYONLY'
SET @CurrentCommand03 = 'RESTORE VERIFYONLY FROM'
SELECT @CurrentCommand03 = @CurrentCommand03 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand03 = @CurrentCommand03 + ' WITH '
IF @CheckSum = 'Y' SET @CurrentCommand03 = @CurrentCommand03 + 'CHECKSUM'
IF @CheckSum = 'N' SET @CurrentCommand03 = @CurrentCommand03 + 'NO_CHECKSUM'
END
IF @BackupSoftware = 'LITESPEED'
BEGIN
SET @CurrentCommandType03 = 'xp_restore_verifyonly'
SET @CurrentCommand03 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_restore_verifyonly'
SELECT @CurrentCommand03 = @CurrentCommand03 + ' @filename = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand03 = @CurrentCommand03 + ', @with = '''
IF @CheckSum = 'Y' SET @CurrentCommand03 = @CurrentCommand03 + 'CHECKSUM'
IF @CheckSum = 'N' SET @CurrentCommand03 = @CurrentCommand03 + 'NO_CHECKSUM'
SET @CurrentCommand03 = @CurrentCommand03 + ''''
IF @EncryptionKey IS NOT NULL SET @CurrentCommand03 = @CurrentCommand03 + ', @encryptionkey = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
SET @CurrentCommand03 = @CurrentCommand03 + ' IF @ReturnCode <> 0 RAISERROR(''Error verifying LiteSpeed backup.'', 16, 1)'
END
IF @BackupSoftware = 'SQLBACKUP'
BEGIN
SET @CurrentCommandType03 = 'sqlbackup'
SET @CurrentCommand03 = 'RESTORE VERIFYONLY FROM'
SELECT @CurrentCommand03 = @CurrentCommand03 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand03 = @CurrentCommand03 + ' WITH '
IF @CheckSum = 'Y' SET @CurrentCommand03 = @CurrentCommand03 + 'CHECKSUM'
IF @CheckSum = 'N' SET @CurrentCommand03 = @CurrentCommand03 + 'NO_CHECKSUM'
IF @EncryptionKey IS NOT NULL SET @CurrentCommand03 = @CurrentCommand03 + ', PASSWORD = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
SET @CurrentCommand03 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.sqlbackup N''-SQL "' + REPLACE(@CurrentCommand03,'''','''''') + '"''' + ' IF @ReturnCode <> 0 RAISERROR(''Error verifying SQLBackup backup.'', 16, 1)'
END
IF @BackupSoftware = 'HYPERBAC'
BEGIN
SET @CurrentCommandType03 = 'RESTORE_VERIFYONLY'
SET @CurrentCommand03 = 'RESTORE VERIFYONLY FROM'
SELECT @CurrentCommand03 = @CurrentCommand03 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand03 = @CurrentCommand03 + ' WITH '
IF @CheckSum = 'Y' SET @CurrentCommand03 = @CurrentCommand03 + 'CHECKSUM'
IF @CheckSum = 'N' SET @CurrentCommand03 = @CurrentCommand03 + 'NO_CHECKSUM'
END
IF @BackupSoftware = 'SQLSAFE'
BEGIN
SET @CurrentCommandType03 = 'xp_ss_verify'
SET @CurrentCommand03 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_ss_verify @database = N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''''
SELECT @CurrentCommand03 = @CurrentCommand03 + ', ' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) = 1 THEN '@filename' ELSE '@backupfile' END + ' = N''' + REPLACE(CurrentFilePath,'''','''''') + ''''
FROM @CurrentFiles
ORDER BY CurrentFilePath ASC
SET @CurrentCommand03 = @CurrentCommand03 + ' IF @ReturnCode <> 0 RAISERROR(''Error verifying SQLsafe backup.'', 16, 1)'
END
EXECUTE @CurrentCommandOutput03 = [dbo].[CommandExecute] @Command = @CurrentCommand03, @CommandType = @CurrentCommandType03, @Mode = 1, @DatabaseName = @CurrentDatabaseName, @LogToTable = @LogToTable, @Execute = @Execute
SET @Error = @@ERROR
IF @Error <> 0 SET @CurrentCommandOutput03 = @Error
IF @CurrentCommandOutput03 <> 0 SET @ReturnCode = @CurrentCommandOutput03
END
-- Delete old backup files
IF (@CurrentCommandOutput02 = 0 AND @Verify = 'N' AND @CurrentCleanupDate IS NOT NULL)
OR (@CurrentCommandOutput02 = 0 AND @Verify = 'Y' AND @CurrentCommandOutput03 = 0 AND @CurrentCleanupDate IS NOT NULL)
BEGIN
WHILE EXISTS (SELECT * FROM @CurrentDirectories WHERE CleanupCompleted = 0)
BEGIN
SELECT TOP 1 @CurrentDirectoryID = ID,
@CurrentDirectoryPath = DirectoryPath
FROM @CurrentDirectories
WHERE CleanupCompleted = 0
ORDER BY ID ASC
IF @BackupSoftware IS NULL
BEGIN
SET @CurrentCommandType04 = 'xp_delete_file'
SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_delete_file 0, N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + ''', ''' + @CurrentFileExtension + ''', ''' + CONVERT(nvarchar(19),@CurrentCleanupDate,126) + ''' IF @ReturnCode <> 0 RAISERROR(''Error deleting files.'', 16, 1)'
END
IF @BackupSoftware = 'LITESPEED'
BEGIN
SET @CurrentCommandType04 = 'xp_slssqlmaint'
SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_slssqlmaint N''-MAINTDEL -DELFOLDER "' + REPLACE(@CurrentDirectoryPath,'''','''''') + '" -DELEXTENSION "' + @CurrentFileExtension + '" -DELUNIT "' + CAST(DATEDIFF(mi,@CurrentCleanupDate,GETDATE()) + 1 AS nvarchar) + '" -DELUNITTYPE "minutes" -DELUSEAGE'' IF @ReturnCode <> 0 RAISERROR(''Error deleting LiteSpeed backup files.'', 16, 1)'
END
IF @BackupSoftware = 'SQLBACKUP'
BEGIN
SET @CurrentCommandType04 = 'sqbutility'
SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.sqbutility 1032, N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''', N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + ''', ''' + CASE WHEN @CurrentBackupType = 'FULL' THEN 'D' WHEN @CurrentBackupType = 'DIFF' THEN 'I' WHEN @CurrentBackupType = 'LOG' THEN 'L' END + ''', ''' + CAST(DATEDIFF(hh,@CurrentCleanupDate,GETDATE()) + 1 AS nvarchar) + 'h'', ' + ISNULL('''' + REPLACE(@EncryptionKey,'''','''''') + '''','NULL') + ' IF @ReturnCode <> 0 RAISERROR(''Error deleting SQLBackup backup files.'', 16, 1)'
END
IF @BackupSoftware = 'HYPERBAC'
BEGIN
SET @CurrentCommandType04 = 'xp_delete_file'
SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_delete_file 0, N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + ''', ''' + @CurrentFileExtension + ''', ''' + CONVERT(nvarchar(19),@CurrentCleanupDate,126) + ''' IF @ReturnCode <> 0 RAISERROR(''Error deleting files.'', 16, 1)'
END
IF @BackupSoftware = 'SQLSAFE'
BEGIN
SET @CurrentCommandType04 = 'xp_ss_delete'
SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_ss_delete @filename = N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + '\*.' + @CurrentFileExtension + ''', @age = ''' + CAST(DATEDIFF(mi,@CurrentCleanupDate,GETDATE()) + 1 AS nvarchar) + 'Minutes'' IF @ReturnCode <> 0 RAISERROR(''Error deleting SQLsafe backup files.'', 16, 1)'
END
EXECUTE @CurrentCommandOutput04 = [dbo].[CommandExecute] @Command = @CurrentCommand04, @CommandType = @CurrentCommandType04, @Mode = 1, @DatabaseName = @CurrentDatabaseName, @LogToTable = @LogToTable, @Execute = @Execute
SET @Error = @@ERROR
IF @Error <> 0 SET @CurrentCommandOutput04 = @Error
IF @CurrentCommandOutput04 <> 0 SET @ReturnCode = @CurrentCommandOutput04
UPDATE @CurrentDirectories
SET CleanupCompleted = 1,
CleanupOutput = @CurrentCommandOutput04
WHERE ID = @CurrentDirectoryID
SET @CurrentDirectoryID = NULL
SET @CurrentDirectoryPath = NULL
SET @CurrentCommand04 = NULL
SET @CurrentCommandOutput04 = NULL
SET @CurrentCommandType04 = NULL
END
END
END
-- Update that the database is completed
UPDATE @tmpDatabases
SET Completed = 1
WHERE Selected = 1
AND Completed = 0
AND ID = @CurrentDBID
-- Clear variables
SET @CurrentDBID = NULL
SET @CurrentDatabaseID = NULL
SET @CurrentDatabaseName = NULL
SET @CurrentBackupType = NULL
SET @CurrentFileExtension = NULL
SET @CurrentFileNumber = NULL
SET @CurrentDifferentialBaseLSN = NULL
SET @CurrentDifferentialBaseIsSnapshot = NULL
SET @CurrentLogLSN = NULL
SET @CurrentLatestBackup = NULL
SET @CurrentDatabaseNameFS = NULL
SET @CurrentDatabaseType = NULL
SET @CurrentDate = NULL
SET @CurrentCleanupDate = NULL
SET @CurrentIsDatabaseAccessible = NULL
SET @CurrentAvailabilityGroup = NULL
SET @CurrentAvailabilityGroupRole = NULL
SET @CurrentIsPreferredBackupReplica = NULL
SET @CurrentDatabaseMirroringRole = NULL
SET @CurrentLogShippingRole = NULL
SET @CurrentCommand02 = NULL
SET @CurrentCommand03 = NULL
SET @CurrentCommandOutput02 = NULL
SET @CurrentCommandOutput03 = NULL
SET @CurrentCommandType02 = NULL
SET @CurrentCommandType03 = NULL
DELETE FROM @CurrentDirectories
DELETE FROM @CurrentFiles
END
--// Log completing information //--
Logging:
SET @EndMessage = 'Date and time: ' + CONVERT(nvarchar,GETDATE(),120)
SET @EndMessage = REPLACE(@EndMessage,'%','%%')
RAISERROR(@EndMessage,10,1) WITH NOWAIT
IF @ReturnCode <> 0
BEGIN
RETURN @ReturnCode
END
END
GO
ALTER AUTHORIZATION ON [dbo].[DatabaseBackup] TO SCHEMA OWNER
GO
Diane
Maybe you are looking for
-
Hi gurus, I done one report to get the Purchase order details. At the time of creating purchase order the users enters a One text field in the Purchase order header text of ME21N transaction. I need to fetch that field into Report. Upto this its fine
-
Passing a variable into workflow
I know u can pass variables from a form into a workflow using processInputs.....but let's say I have a update workflow and there's some attribute that has changed on the user that requires the update workflow to trigger the disable workflow.....let's
-
Writing business apps, not flashy
I work with a development community that shuns Flash because it's perceived as a tool for creating "flashy" apps, and not recognized at all for real solid businss apps involving payroll, order processing, inventory management, etc. I haven't worked w
-
Previous version RH to RH8?
I've got a previous version of RH which I want to update to RH8. I get 2 errors: Error in reading RH FRameSTyle Mappings .apj and Open project cancelled or app was unable to load data base for .cpd file. I've deleted .cpd file. Any suggestions for ho
-
Target/Node unavailable for Service Manager/Authtenticaion
Hi, when ever we cloned from Production to TEST...Service Manager/Authentication Manager has Target/Node unavailable....showing this... what might be the problem..is it normal..can we ignore it...