Showing posts with label password. Show all posts
Showing posts with label password. Show all posts

Wednesday, March 21, 2012

is it possible to connect to SQL Express without network?

I have notebook, client server application and sql express sp2 on this notebook.

Also, I know domain user login/password,

but I don't know any local user name/password

and I don't know any sql server user name/password.

Domain user is not a local administrator on this notebook.

When notebook connected to the office LAN I am working good with my app-> my sql express as a domain/user.

I'd like to work at home too. I can logon to the system (XP SP2) using domain account when notebook has no network connection. (probably OS caches something)

Is it possible to work with sql express using domain login when no network connection?

PS. old version of this software used MSDE 2000 and it was possible(!).

Thank you.

Yes. SQL Server will still work the same as when you are connected to the office LAN.

Since you log on with your domain credentials (they are cachd on the laptop), the same credentials are used to gain entry to SQL Server.

|||

Arnie Rowland wrote:

Yes. SQL Server will still work the same as when you are connected to the office LAN.

Since you log on with your domain credentials (they are cachd on the laptop), the same credentials are used to gain entry to SQL Server.

Ok, thank you.

I did experiment on 2 workstations.

On one machine ist working good, but on the second machine (no netowrk connection) when I tried to connect to the sql server I have a problem:

SSMS is ocnnecting ok

Application gives me message: cannot generate SSPI context.

What can it be? ...

Thank you

|||

Check these souces:

Error -Cannot generate SSPI context
http://support.microsoft.com/Default.aspx?id=811889
http://support.microsoft.com/kb/827422/en-us
http://support.microsoft.com/kb/843248/en-us
http://support.microsoft.com/kb/269541/en-us
http://support.microsoft.com/kb/267588/en-us
http://support.microsoft.com/kb/814401/en-us
http://support.microsoft.com/kb/818173/en-us

sql

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?