quarta-feira, julho 29, 2020

Azure Web App - Backup

If you running your Web App in Standard or Premium tier you can have the backup feature, I like that feature, but there is a limitation for the size of the backup, the limit is 10 GB, my recommendation is created the _backup.filter file and excluded some folder, for example, logs.

The image bellow the folder bin_backup, dumps and logs are not in the backup:



 

After that I was able to succeed the backup:

 

domingo, julho 26, 2020

GPO - Event ID 7016 Error


I had some problems with the application of GPOs on a Windows server 2016, I got this error on the Windows log (Event Log Group policy):



gpresult:

Registry failed due to the error listed below.
Unspecified error
Additional information may have been logged. Review the Policy Events tab in the console or the application event log for events between



I've enabled the logs for Group policy, to do that just changed\create a reg key(GPSvcDebugLevel)  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Diagnostics]
“GPSvcDebugLevel”=dword:00030002

I found these errors:

GPSVC(104.7638) 05:14:51:342 ProcessGPORegistryPolicy: Directory (D:\ProgramData\Microsoft\GroupPolicy\Users\S-1-5-21-3112070178-1138935389-355353746-1156) doesn't exist and hence creating it
GPSVC(104.7638) 05:14:51:343 CheckAndCreateSubFolders: failed to CreateDirectory for path D:\ProgramData\Microsoft\GroupPolicy\Users\S-1-5-21-3112070178-1138935389-355353746-1156 with error: 5.
GPSVC(104.7638) 05:14:51:343 SetSecureDirectory: failed to CheckAndCreateSubFolders for path D:\ProgramData\Microsoft\GroupPolicy\Users\S-1-5-21-3112070178-1138935389-355353746-1156 with error: 5.

For some reason the GPO was trying to create a folder in a non-existent path, I checked and the right path is D:\ProgramData\Microsoft\Group Policy\ with space between Group and Policy. The solution The solution I found was to create a GroupPolicy folder and copy the files.
Steps for Solution:

1. Create a folder GroupPolicy inside D:\ProgramData\Microsoft\
2. Copy the files  D:\ProgramData\Microsoft\Group Policy\ to D:\ProgramData\Microsoft\GroupPolicy\
3. Create a task scheduler to copy the files every hour using robocopy.

I don't know what the root cause of the issue is, but as the environment was a Standalone server with Domain Controller and RDS services on the same server.
There are no computers members within the domain.

sexta-feira, julho 10, 2020

SQL Server 2008 R2 to Azure SQL Database

The end of Extended Support for the SQL Server 2008 and Windows Server 2008 R2 ended on July 9, 2019.
I will write a few steps to migrate a simple database to Azure SQL Database.

https://support.microsoft.com/en-us/help/4456242/end-of-support-for-sql-server-2008-and-sql-server-2008-r2

First my goal is migrate the database mydatabase: 



1. Download and install data migrator assistent:
https://www.microsoft.com/en-us/download/details.aspx?id=53595

2. Run an Assessment to check any compatibility issues (Create a Project):




 3. Migrate the Data and Schema



Connect to localhost and select the database:



 Select the target ( An Azure SQL Server ) and database target (The database must be create before start the migration process ):


Your public IP must be allowed to access the server.
Next and Deploy:


Deploy Data and Start data migration:




4. Check the databases\table on Azure portal