- Lynn A Haynes
- PowerBuilder
- Thursday, 23 January 2020 05:56 PM UTC
We recently migrated our database server OS from Windows 2008 R2 to Windows 2012 R2. Note that we're still running SQL Server 2008 R2, but the 64-bit SQL Server 2008 R2 was installed, whereas we were running 32-bit SQL Server 2008 R2 in the old environment. Also, database connection uses IntegratedSecurity=SSPI.
Our PB application queries the sys.database_principals view...
SELECT sys.database_principals.principal_id AS uid, sys.database_principals.name
FROM sys.database_principals
WHERE ( sys.database_principals.type IN ('S','U') ) AND ( sys.database_principals.sid IS NOT NULL ) AND ( sys.database_principals.sid <> 0) AND ( sys.database_principals.name not in (select username from securityGroupUsers) )
ORDER BY sys.database_principals.name ASC
The query returns no rows, even though running it using SSMS with Windows authentication returns the appropriate rows. No error is raised either.
Any ideas on why the query would return no rows from the app?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.