Showing posts with label possiable. Show all posts
Showing posts with label possiable. Show all posts

Monday, March 12, 2012

Is it possiable to store password encrypted to an external config file?

I got a problem when developing SSIS packages.

For security reason, the sensitive information must be encrypted, and they should be configurable dynamically (by an ASP.NET application).

so I tried several ways to achieve this,

1. use SSIS Package Configurations to generate an XML config file
It's a convenient way to generate config file. but the passwords are not encrypted (or I don't know how).

2. use Variables and Property Expressions
I can set variables by reading from an external custom xml config file which was content encrypted (read and decrypt the custom config file in a script task). but in a FTP Connection Manager entity, the Password property can not be set via Property Expressions.

Is any way to store password encrypted to an external file?
OK, It was resolved, I try to set Variables from a custom XML config file. Most of Properties of Connection Managers can be set via Property Expressions but password. So I set the password in a Script Task programatically. It will like this:

Public Sub Main()
'a custom class to read my custom config file
Dim c As Config = Config.GetConfig()

Dts.Variables("FtpServerIP").Value = c.Settings("FtpServerIP")
Dts.Variables("FtpServerPort").Value = Convert.ToInt16(c.Settings("FtpServerPort"))
Dts.Variables("FtpServerLogin").Value = c.Settings("FtpServerLogin")
Dts.Variables("FtpServerPassword").Value = MyDecryptMethod( c.Settings("FtpServerPassword") )

Dts.Connections("FTP Server").Properties("ServerPassword").SetValue(Dts.Connections("FTP Server"), Dts.Variables("FtpServerPassword").Value)

Dts.TaskResult = Dts.Results.Success
End Sub

Now I can store and encrypt my password or other sensitive information in a custom XML config file, and change it dynamically. It looks quiet complex, but it's the only way I know.

Any good suggestion?

Is it possiable to restore a DB ...

Hi,

I've written a M.plan in my client place which is scheduled to occur
weekly once.But 4 days gone from the last backup taken , there is a
problem in the server which does not start loading windows .The only
way is entering via SAFE-MODE.In the safe mode the E.Manage does not
connected(is it due to safe-mode).

They told they going to format the system . Since the E.M is not
connected, I just copied only my DB(.mdf) and the log file(.ldf).After
that i come accross that all the system databases should be backed up
along with the User DB then only possible for Restoration.

My request is

Is it not possiable to restore my copied DB(.MDF) (not backed up)
After reinstallation of Sql server.

With Heartfull thanks
Raghu"Raghuraman" <raghuraman_ace@.rediffmail.com> wrote in message
news:66c7bef8.0311260443.3adb69db@.posting.google.c om...
> Hi,
>
> I've written a M.plan in my client place which is scheduled to occur
> weekly once.But 4 days gone from the last backup taken , there is a
> problem in the server which does not start loading windows .The only
> way is entering via SAFE-MODE.In the safe mode the E.Manage does not
> connected(is it due to safe-mode).
>
> They told they going to format the system . Since the E.M is not
> connected, I just copied only my DB(.mdf) and the log file(.ldf).After
> that i come accross that all the system databases should be backed up
> along with the User DB then only possible for Restoration.
> My request is
> Is it not possiable to restore my copied DB(.MDF) (not backed up)
> After reinstallation of Sql server.
> With Heartfull thanks
> Raghu

I saw something already written in this newgroup today that may help.

Subject: attach db file copied previously

Comand: sp_attach_single_file_db|||"Raghuraman" <raghuraman_ace@.rediffmail.com> wrote in message
news:66c7bef8.0311260443.3adb69db@.posting.google.c om...
> Hi,
>
> I've written a M.plan in my client place which is scheduled to occur
> weekly once.But 4 days gone from the last backup taken , there is a
> problem in the server which does not start loading windows .The only
> way is entering via SAFE-MODE.In the safe mode the E.Manage does not
> connected(is it due to safe-mode).
>
> They told they going to format the system . Since the E.M is not
> connected, I just copied only my DB(.mdf) and the log file(.ldf).After
> that i come accross that all the system databases should be backed up
> along with the User DB then only possible for Restoration.

If possible you want to backup all the system DBs, especially the MSDB or
you risk losing jobs, etc.

So, if you can grab copies of the MDF and LDF of that to, that will help.

> My request is
> Is it not possiable to restore my copied DB(.MDF) (not backed up)

If you have the MDF and LDF then sp_attach_db is your best bet. If you have
only the .MDF, you MAY be able to use sp_attach_single_file_db, but
generally that will NOT work unless you used sp_detach_db in the first
place.

However, if you have just the MDF and can't attach it, contact Microsoft
Server Support. They may be able to help you, but your DB is likely to be
in an inconsistent state.

Note: If you're doing full backups only weekly, I highly recommend
differential or transactional backups on a daily basis (or even more often.)

> After reinstallation of Sql server.
> With Heartfull thanks
> Raghu

Is it possiable conversion

Hi

i heared that Oracle can convert from number to word thru query i
remember thru (jsp format) .Is it possiable in sqlserver

ThanksHi

Although I have not done this myslf, you may want to look at either:
Creating an RTF document
Creating a txt document and a word macro to format and save it
Using a COM object (called from sp_AO* procedures)
Using XML and a word template that picks it up.
Sucking data from SQL Server into word

John

"Raghuraman" <raghuraman_ace@.rediffmail.com> wrote in message
news:66c7bef8.0311140440.4738e50d@.posting.google.c om...
> Hi
> i heared that Oracle can convert from number to word thru query i
> remember thru (jsp format) .Is it possiable in sqlserver
>
>
> Thanks

Is it posiable to close the screen

Hai

Is it possiable to close the current connection screen in the query
analyser , not to close the query analyser.

With Thanks
RaghuControl+F4 or click the window close button.

--
David Portas
SQL Server MVP
--

"Raghuraman" <raghuraman_ace@.rediffmail.com> wrote in message
news:66c7bef8.0402150118.44139866@.posting.google.c om...
> Hai
> Is it possiable to close the current connection screen in the query
> analyser , not to close the query analyser.
> With Thanks
> Raghu|||
Dear Portas

Thanks for your suggestions. Actually i meant that query thru code .

Eg

The shutdown command(sql server7.0) removes the network connection from
sqlserver.Like wise is there any command to close the current screen of
the query analyser.

With thanks
Raghu

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||No. Transact SQL isn't an application development language - it doesn't
control the client GUI at all.

Use another language to execute your SQL or, if you want to run some batched
process without a GUI, run the OSQL utility from the OS command line.

--
David Portas
SQL Server MVP
--