question

ceo07 avatar image
0 Votes"
ceo07 asked OuryBa-MSFT commented

create the same login as on the primary server, using the same name, password, and SID (database on the secondary server)

Hi

Can you help me with this case, I am wanting to create a user in my georedundant data base with the same sid

145094-supplied-parameter-sid-should-be-binary.png



I am following the documentation ( https://t.co/USQ6NgDcFB?amp=1) steps in the block: "Cross-Subscription Geo-Replication"
In step 7 it gives me the message that it does not allow me to advance with my script


my final goal is to create a new user with limited role in my primary and secondary database (https://dba.stackexchange.com/questions/294453/create-a-specific-role-in-a-replicated-azure-sql-database-which-is-in-read-mode)


azure-sql-database
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

In what enriionment are you running the above? Please post the output of "SELECT @@version"?

I think the command above is intended for Azure SQL Database, and I could the CREATE LOGIN command in the link you posted in my Azure SQL DB, when when running in on-prem database, I got the same error as you.

0 Votes 0 ·

this is the version

145521-image.png


0 Votes 0 ·
image.png (11.1 KiB)
OuryBa-MSFT avatar image
1 Vote"
OuryBa-MSFT answered OuryBa-MSFT commented

Hi @ceo07 Thank you for posting you Question on Microsoft Q&A.

If you are running this on SQL Server, this error is expected. It works for Azure SQL Database. I just tested that. It does not work for SQL Server. This article you mentioned above is for Azure SQL Database where sid values can be longer.

Hope that helps

Please feel free to reach out if you have further queries or need further assistance.

Regards,
Oury

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please don't forget to mark as accepted answer if the above reply is helpful. This will be helpful for other community members facing the same issue

Regards,
Oury

0 Votes 0 ·

Hi @ceo07 I wanted to check if you have additional queries regarding the above issue or need additional clarification.

Please don't forget to mark as accepted answer if the reply was helpful.

Regards,
Oury

0 Votes 0 ·
TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

I note that you ran the "SELECT @@version" query in a different query tool than in your original post. I place my bets that you were connected to SQL Server on-prem or an SQL Server VM, but incorrectly thought you were SQL Azure.

If not, I think we need to see a screenshot with both the failing command and "SELECT @@version". (Set output to text mode, so that we can see both result and error message.)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.