Unanswered: Acessing SQL through a DOS login script
Does anybody know if it is possible to pass an NT Environment variable to an SQL Server and then return the results back to the DOS?
Example: when a user logs in, their username is stored in the environment variable %USERNAME%. I would like to send this to SQL and then look up their department and then depending on what department they are in, different drives are mapped.
I think this would be done with stored procedures, but I am quite new to these.