I was using the [blue]USER[/blue] function in a SQL string variable and it was working great.
Well, that was up until this morning... on one server.
As of this morning, when I run the exact same SQL, the USER function is now returning [guest] instead of my username.
Here's how I use the USER function:
Where I work, the username or connection is also used as the schema in our Sandbox databases (in general). So, my thought was to use the USER function to make it dynamic, not requiring any change, for whenever a different person has to run the same SQL.
Can anyone, first, tell me WHY it's suddenly returning "guest"? The connection shows the same settings as normal - shows what I would expect, but the USER function keeps returning guest...
I've asked a couple others with the same access on the same SQL Server, and theirs return correctly.
I've tried closing and reopening the SQL Server instance on my end (client) and I've tried even rebooting Windows... still no go.
Does anybody have a clue as to what could have changed for me to be pulling "guest" I realize there is a "guest" account, but that's supposed to be more of a system account, not the human users, right??
Thanks for any info.
Well, that was up until this morning... on one server.
As of this morning, when I run the exact same SQL, the USER function is now returning [guest] instead of my username.
Here's how I use the USER function:
Where I work, the username or connection is also used as the schema in our Sandbox databases (in general). So, my thought was to use the USER function to make it dynamic, not requiring any change, for whenever a different person has to run the same SQL.
Can anyone, first, tell me WHY it's suddenly returning "guest"? The connection shows the same settings as normal - shows what I would expect, but the USER function keeps returning guest...
I've asked a couple others with the same access on the same SQL Server, and theirs return correctly.
I've tried closing and reopening the SQL Server instance on my end (client) and I've tried even rebooting Windows... still no go.
Does anybody have a clue as to what could have changed for me to be pulling "guest" I realize there is a "guest" account, but that's supposed to be more of a system account, not the human users, right??
Thanks for any info.