I am testing some methods for quality control of data edited within a version (traditional, not branch) that is not the Default version. I am exploring using the versioned views through arcpy.ArcSDESQLExecute (currently via ArcGIS Pro 2.9.5). To change the version, I am calling an "execute" on the object created with ArcSDESQLExecute
EXEC dbo.set_current_version "versionname"
That seems to work fine if I am the owner of the version and can just supply the version name. However if I need to switch to a version owned by someone else and the owner format is domain\username (SQL Server Active Directory authentication), then I am trying to pass domain\username.versionname of some sort, usually returning "version not found". If the owner of the version is not of the domain\username format, I seem to be able to make this work.
I am quite new to SQL Server so I might be failing to understand something there, or I'm not handling the backslash well for Python, or this might just be a really bad idea! Thank you if anyone has a hint, otherwise I'll keep plugging away at this.