Sqlcmd command without username and password in SQL Server 2008?

How can I run the commands passed to sqlcmd as a user who is currently logged in automatically without entering a username and password?

I want to use only Windows authentication. This is a local server.

Thanks,

+8
login sql-server-2008 username sqlcmd
source share
1 answer

sqlcmd accepts the -E argument, which means "Use a reliable connection" ... IOW, your Windows credentials.

http://msdn.microsoft.com/en-us/library/ms162773.aspx

+14
source share

All Articles