Re: Settig SQL Agent pwd thru code

From: Jasper Smith (jasper_smith9_at_hotmail.com)
Date: 05/15/03


Date: Thu, 15 May 2003 17:56:47 +0100


This is for MSDE2000 on NT based platforms only
http://sqldev.net/download/sqlagent/sp_sqlagent_set_connection.sql

-- 
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Michael M" <mike@kressa.com> wrote in message
news:0d3a01c31a82$c3986140$a001280a@phx.gbl...
> I'm trying to develop a turnkey installation process that
> will distribute and setup MSDE automatically for an
> application that uses it as a backend.
>
> The database is "locked" from end user access so I've
> removed the BUILTIN\Administrators Login and other such
> things to give easy access to the db through Windows Auth.
>
> However, installing MSDE seems to setup SQl Agent
> Connection parms to Windows Auth by default.  I need to
> programmatically set that to SQL Auth and set the userid
> and pwd.
>
> For the life of me I can't figure out a way to do it.
> Using the following code doesn't work.  I assume because
> of encrpytion algorithms that I have no access to.
>   Declare  @pa VarBinary(256)
>   Select   @pa = password from master..sysxlogins Where
> name='sa'
>   Execute  msdb.dbo.sp_set_sqlagent_properties
>   @regular_connections = 1,
>   @host_login_name = 'sa',
>   @host_login_password = @pa
>
> Anyone have any suggestions?  Thanks in advance
>
> Mike M.


Relevant Pages

  • Re: Login failed for user NT AUTHORITYNETWORK SERVICE
    ... It's already set to use "SQL Server and Windows" authentication. ... There are ways to use Windows Auth with ASP.NET, ... Sahil Malik [MVP] ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Installing SQL Server 2005 on Vista Home Premium - IIS error need help
    ... Vista Home does not support it (I thought it just didn't support domain ... Why XP Pro and not Vista Pro or wait until 8/6 and install Win7 in the VM? ... But for SQL Server, if you need very basic database functionality, you can ... Since Reporting Services 2005 + IIS requires windows auth, ...
    (microsoft.public.sqlserver.setup)
  • Re: Index for username/password
    ... Windows Auth is not practical. ... SQL 2005 has a whole slew of encryption stuff with asymmetric keys, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Help: Login failed for User ???
    ... The SQL Server will need to be a member server of the domain as will the ... without any login errors, but as soon as I Login into windows(again on my dev ... When a network user tries to connect, ... how do I do this in Windows Auth mode? ...
    (microsoft.public.dotnet.framework.adonet)
  • connecting to local sql server
    ... i have a local sql server running, i can connect to it through query ... analyzer, typing; as the SQL Server name, using windows auth. ...
    (microsoft.public.sqlserver.setup)

Quantcast