sexta-feira, março 26, 2021

SQL Replication: The option "INLINE=ON" is not valid for this function - SQL Server 2019

Scenario, the database was created on a SQL Server 2012, and was migrated to SQL 2019, when I was setting up replication I received the following error:

Message
Replication-Replication Snapshot Subsystem: agent My_pub-3 failed. The replication agent had encountered an exception.
Source: Replication
Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentSqlException
Exception Message: The option "INLINE=ON" is not valid for this function. 

I am not a Database Administrator and the easy solution that I found was drop and recreate the function, after that the replication works fine.

On SQL Management Studio:


quinta-feira, fevereiro 11, 2021

Active Directory to Azure AD

 Environment:

- Local Active directory with Azure Ad Connect 

- An Azure AD 

In this lab\env I don't have Exchange in Hybrid mode.

The first step is create an OU and not sync, in my case the OU is UnsyncUser

 

- Move the user to UnsyncUser


- Sync the Ad Connect:

> Start-ADSyncSyncCycle -PolicyType Delta 

Connect to Azure:

>Connect-MsolService

 

Get deleted users:

>Get-MsolUser -ReturnDeletedUsers 

Restore a User:

>Restore-MsolUser -UserPrincipalName bill@maykonrds.site 

 

If you take a look now the users is a Cloud

Another way to do that is disable the Sync:

>Set-MsolDirSyncEnabled -EnableDirSync $false

It may take 72 hours for deactivation to be completed.

Check the status, need to be false.

>(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled

If you do that all users\groups will be in the Cloud.