I've inherited a very old app that runs on SQL Server 2005. I'm trying to move this app to Azure.
One thing the stored procedures in this app do is create new database logins and new users. I know that many of the functions and system procedures it uses no longer exist in SQL Server, or in Azure.
Is there some equivalent of procedures like sp_addlogin, sp_droplogin, sp_grantdbaccess, sp_revokedbaccess etc. which can be executed from a user database (the procedures are there and must run there)?
I see lots of articles that talk about "connect to master", but how do I do that from within a stored procedure on my custom database?
For example, the "create login" command has to be run in master, but my procedures are in a user database. How do I do that?
Any help would be appreciated. If what I'm trying to do isn't possible, I'd appreciate knowing that, too.