Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

Friday, March 23, 2012

Pckg variable not getting set

I have created a simple package to zip a file. I am determining the file to be zipped dynamically at runtime using the Script task. I have a package variable defined as ReadWrite in the script task; I am attempting to store the dynamically determined file name to this package variable.

The code I am using to assign the value to the variable is:

Dim LatestBackupName As String

Dim ZipName As String

Dts.Variables("FileName").Value = ZipName & " " & LatestBackupName

I have set a breakpoint in the code to step into each statement. I am able to see that the "FileName" variable is being assigned the appropriate value. However, once the Script task completes, the value assigned to FileName is not stored in the variable. It is as if it gets the value during the script task and then loses it upon completion.

Am I going about setting the variable value wrong?

Any guidance is appreciated.

Nevermind. An answer to an unrelated post helped me figure this out. The variable was getting set - it just does not show it the way DTS would have. I set DelayValidation to TRUE to resolve the error I was receiving that I thought indicated the variable was not set.

Monday, March 12, 2012

password synchronization - newbie question

We are using SQL Server authentication in a new W2k system that is replacing
a legacy UNIX system. I have a script that successfully recreates the user
accounts, but of course I have to default the password. Our security folks w
ill never agree to such a s
cheme, especially since I have read on this newsgroup that there is no way t
o force the users to change their passwords the first time they log on. Is t
here any way to port the users' UNIX passwords to SQL Server 2000? I can cap
ture the encrypted UNIX pas
swords, and was hoping there was a way to use them to populate the "password
" field of the master.sysxlogins table. Is the encryption used for UNIX in
any way compatible or "translate-able" to the encryption used by SQL Server?
This would probably be much easier if we were using Windows authentication,
but for our particular implementation, we have some other compelling reasons
not to.No the encryption algorithm is not going to be the same as any Unix based
system.
I would think that if you're writing a custom application you could force
the users to execute sp_password
at the same interval as the Unix system. But, if the users are simply
using Query Analyser and the other SQL tools,
there's no way to force this.
Yukon, the next release may address password policy enforcement that would
resolve issues like this.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Thank you, Kevin. I'll talk to our developers about adding a call to sp_pass
word.