Registered member login:
Register Now
Altirigos » Deployment Solution » Scripting/Tools/Docs » Custom Data Sources and SQL Stored Procedures

» Current Poll
Do you leave the Aclient enabled?
YES - 82.81%
106 Votes
NO - 17.19%
22 Votes
Total Votes: 128
You may not vote on this poll.
» Stats
Members: 9,488
Threads: 11,748
Posts: 55,278
Top Poster: Nick (4,981)
Welcome our newest member, johno
» Online Users: 41
0 members and 41 guests
No Members online
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 123
Reply
Old 04-29-2009, 06:49 AM   #1 (permalink)
 
Status: Super Altiris Admin
Join Date: 01-19-2008
Location: UK
Posts: 158


Custom Data Sources and SQL Stored Procedures

hi all,

I am trying to setup some stored procedures so that we can use customer tokens in our scripts.

I have created this stored procedure:

CREATE PROCEDURE sp_Password
@usname varchar(20)
AS
SELECT Password
FROM Credentials
WHERE Username = @usname

But if l then execute the following queury

EXECUTE sp_Password 'Nicholas' l get the following error

Msg 201, Level 16, State 4, Procedure sp_password, Line 0

Procedure of function 'sp_password' expects parameter '@new', which was not supplied.

I am an SQL newbie so not sure where to go from here.
g00ner is offline   Reply With Quote
Old 04-29-2009, 09:21 AM   #2 (permalink)
 
TRYDL's Avatar
 
Status: Super Altiris Admin
Join Date: 03-08-2006
Location: Baltimore, MD
Age: 29
Posts: 576


You need to change the name of the sproc to something other than sp_Password. sp_Password is an internal stored proceedure for sql account password changing.

sp_password (Transact-SQL)

SQL will reference system functions / sprocs before going to user defined ones. That is why it is prompting you for a variable that is not defined in your script.

You can either MODIFY the sproc or delete/re-create it.

HTH
__________________
3rd Floor Garage Door Operator
TRYDL is offline   Reply With Quote
Old 04-30-2009, 04:38 AM   #3 (permalink)
 
Status: Super Altiris Admin
Join Date: 01-19-2008
Location: UK
Posts: 158


Thanks for that. All working know and can parse custom tokens to my script.

My next task is to now either encrypt the column in the d/b or encrypt the whole database. The d/b as you can probably tell will be a list of usernames and passwords. Just been looking at some examples and am getting completly lost in sql code.
g00ner is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 11:26 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos