Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Thursday, March 22, 2012

Encryption and storing credit cards

We need to store credit cards for a limited amount of time because we charge for orders as they ship and occasionally the authorization expires before the item can ship.

I know I can use AES_256 to encrypt our credit cards but I am not sure if all I need to do is follow the directions in the "How-to" for encrypting data.

I created the master key, backed it up off the server the certificate and the symmetric key and I can encrypt and decrypt data.

Is this all I need to do or am I missing something?

Sounds like you have it under control. The 'How to' is nicely put together.

The next step is to test, test, test.

|||I have been testing and keep thinking in the back of my head "This is much too easy. I must be doing something wrong."

I got the encryption working on the second try.|||Microsoft got it right. It really shouldn't be difficult.

Friday, March 9, 2012

Encrypt By Key gives different results every call time

Every time I call Encrypt by key I get a different result, although I am encrypting the same clear text,using the same authenticator and using the same key.
I tried calling it twice inside one stored procedure and I got two different results.

Declare @.Temp varbinary(8000);
Declare @.Temp2 varbinary(8000);
set @.Temp = EncryptByKey(Key_GUID('MyKey'),@.cleartext,1,@.Authenticator);
set @.Temp2= EncryptByKey(Key_GUID('MyKey'),@.cleartext,1,@.Authenticator);
Select @.Temp,@.Temp2;

when executing this stored procedure, the value of @.Temp is differnent from the result of @.Temp2, and the same thing happens without using an authenticator.

Is there something going behind in the encryption mechanism of SQL server?

yes it's deliberate and important. You might have 2 rows with the same value, for example a salary. If these had the same resulting encrypted value it would make discovery of the non-encrypted value much easier. To address this SQL 2005's encryption methods use a salt with a random initialisation vector so you get a different encrypted value for the same input text.

thx,

Simon.

Wednesday, March 7, 2012

Enabling SQL performance monitoring objects

How do I enable the SQL performance monitoring objects to be used by
performance monitor? The objects were in the list at one time but now they
have vanished?
Best regards
Mark Baldwin
Software Developer
"Mark Baldwin" <swozz_@.hotmail.com> wrote in message
news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
> How do I enable the SQL performance monitoring objects to be used by
> performance monitor? The objects were in the list at one time but now they
> have vanished?
> --
> Best regards
> Mark Baldwin
> Software Developer
>
>
I have seen this before in prior versions and it was a matter of rerunning a
particular script from setup disk. I don't remember which one and which
version of SQL Server is applied to.
Here is a KB article however that may be of some use:
http://support.microsoft.com/kb/227662
HTH
Rick Sawtell
MCT, MCSD, MCDBA
|||Counters may disappear when you don't close performance monitor before
restarting SQL Server. See MSKB 812915
<http://support.microsoft.com/default...&Product=sql2k>.
This is scheduled to be fixed in SP4, which is currently in beta
http://support.microsoft.com/default...;en-us;888799.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark Baldwin" <swozz_@.hotmail.com> wrote in message
news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
> How do I enable the SQL performance monitoring objects to be used by
> performance monitor? The objects were in the list at one time but now they
> have vanished?
> --
> Best regards
> Mark Baldwin
> Software Developer
>
>
|||Mark
If you are able to do it, the following may fix your problem.
At the command prompt, type in the following:
unlodctr.exe MSSQLServer
Then type in the following:
lodctr.exe <SQL Server path>\binn\sqlctr.ini
Reboot the server
Hope this helps
John
"Dan Guzman" wrote:

> Counters may disappear when you don't close performance monitor before
> restarting SQL Server. See MSKB 812915
> <http://support.microsoft.com/default...&Product=sql2k>.
> This is scheduled to be fixed in SP4, which is currently in beta
> http://support.microsoft.com/default...;en-us;888799.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark Baldwin" <swozz_@.hotmail.com> wrote in message
> news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
>
>

Enabling SQL performance monitoring objects

How do I enable the SQL performance monitoring objects to be used by
performance monitor? The objects were in the list at one time but now they
have vanished?
Best regards
Mark Baldwin
Software Developer"Mark Baldwin" <swozz_@.hotmail.com> wrote in message
news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
> How do I enable the SQL performance monitoring objects to be used by
> performance monitor? The objects were in the list at one time but now they
> have vanished?
> --
> Best regards
> Mark Baldwin
> Software Developer
>
>
I have seen this before in prior versions and it was a matter of rerunning a
particular script from setup disk. I don't remember which one and which
version of SQL Server is applied to.
Here is a KB article however that may be of some use:
http://support.microsoft.com/kb/227662
HTH
Rick Sawtell
MCT, MCSD, MCDBA|||Counters may disappear when you don't close performance monitor before
restarting SQL Server. See MSKB 812915
<http://support.microsoft.com/defaul...b;en-us;888799.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark Baldwin" <swozz_@.hotmail.com> wrote in message
news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
> How do I enable the SQL performance monitoring objects to be used by
> performance monitor? The objects were in the list at one time but now they
> have vanished?
> --
> Best regards
> Mark Baldwin
> Software Developer
>
>|||Mark
If you are able to do it, the following may fix your problem.
At the command prompt, type in the following:
unlodctr.exe MSSQLServer
Then type in the following:
lodctr.exe <SQL Server path>\binn\sqlctr.ini
Reboot the server
Hope this helps
John
"Dan Guzman" wrote:

> Counters may disappear when you don't close performance monitor before
> restarting SQL Server. See MSKB 812915
> <http://support.microsoft.com/defaul...b;en-us;888799.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark Baldwin" <swozz_@.hotmail.com> wrote in message
> news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
>
>

Enabling SQL performance monitoring objects

How do I enable the SQL performance monitoring objects to be used by
performance monitor? The objects were in the list at one time but now they
have vanished?
--
Best regards
Mark Baldwin
Software Developer"Mark Baldwin" <swozz_@.hotmail.com> wrote in message
news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
> How do I enable the SQL performance monitoring objects to be used by
> performance monitor? The objects were in the list at one time but now they
> have vanished?
> --
> Best regards
> Mark Baldwin
> Software Developer
>
>
I have seen this before in prior versions and it was a matter of rerunning a
particular script from setup disk. I don't remember which one and which
version of SQL Server is applied to.
Here is a KB article however that may be of some use:
http://support.microsoft.com/kb/227662
HTH
Rick Sawtell
MCT, MCSD, MCDBA|||Counters may disappear when you don't close performance monitor before
restarting SQL Server. See MSKB 812915
<http://support.microsoft.com/default.aspx?scid=kb;en-us;812915&Product=sql2k>.
This is scheduled to be fixed in SP4, which is currently in beta
http://support.microsoft.com/default.aspx?scid=kb;en-us;888799.
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark Baldwin" <swozz_@.hotmail.com> wrote in message
news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
> How do I enable the SQL performance monitoring objects to be used by
> performance monitor? The objects were in the list at one time but now they
> have vanished?
> --
> Best regards
> Mark Baldwin
> Software Developer
>
>|||Mark
If you are able to do it, the following may fix your problem.
At the command prompt, type in the following:
unlodctr.exe MSSQLServer
Then type in the following:
lodctr.exe <SQL Server path>\binn\sqlctr.ini
Reboot the server
Hope this helps
John
"Dan Guzman" wrote:
> Counters may disappear when you don't close performance monitor before
> restarting SQL Server. See MSKB 812915
> <http://support.microsoft.com/default.aspx?scid=kb;en-us;812915&Product=sql2k>.
> This is scheduled to be fixed in SP4, which is currently in beta
> http://support.microsoft.com/default.aspx?scid=kb;en-us;888799.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark Baldwin" <swozz_@.hotmail.com> wrote in message
> news:XMSdnaHx_r0qLnLcRVn-hQ@.giganews.com...
> > How do I enable the SQL performance monitoring objects to be used by
> > performance monitor? The objects were in the list at one time but now they
> > have vanished?
> >
> > --
> > Best regards
> > Mark Baldwin
> > Software Developer
> >
> >
> >
>
>

Sunday, February 26, 2012

Enabling file growth

I am trying to keep my log file at unrestricted file growth, but every time
I save the settings it switches back to restricted growth with a default
file size. I tried to keep it restricted, and change the size llimit, but
it changed back to it'd default limit. Why is this changing automaically by
itself.
I want to keep file growth enabled at 5% with unrestricted growth, but it
keeps changing back to 5% and resticted file growth with a default size. I
don't understand why it changes!!!!ALTER DATABASE [database_name] MODIFY FILE ( NAME = 'file_name',
FILEGROWTH = 5%)
What do you get when you run the above statement with your
database_name and file_name changed?
On Jun 14, 9:35 am, "Matt Fritz" <mafr...@.state.pa.us> wrote:
> I am trying to keep my log file at unrestricted file growth, but every time
> I save the settings it switches back to restricted growth with a default
> file size. I tried to keep it restricted, and change the size llimit, but
> it changed back to it'd default limit. Why is this changing automaically by
> itself.
> I want to keep file growth enabled at 5% with unrestricted growth, but it
> keeps changing back to 5% and resticted file growth with a default size. I
> don't understand why it changes!!!!
On Jun 14, 9:35 am, "Matt Fritz" <mafr...@.state.pa.us> wrote:
> I am trying to keep my log file at unrestricted file growth, but every time
> I save the settings it switches back to restricted growth with a default
> file size. I tried to keep it restricted, and change the size llimit, but
> it changed back to it'd default limit. Why is this changing automaically by
> itself.
> I want to keep file growth enabled at 5% with unrestricted growth, but it
> keeps changing back to 5% and resticted file growth with a default size. I
> don't understand why it changes!!!!|||On 14 Jun, 14:35, "Matt Fritz" <mafr...@.state.pa.us> wrote:
> I am trying to keep my log file at unrestricted file growth, but every time
> I save the settings it switches back to restricted growth with a default
> file size. I tried to keep it restricted, and change the size llimit, but
> it changed back to it'd default limit. Why is this changing automaically by
> itself.
> I want to keep file growth enabled at 5% with unrestricted growth, but it
> keeps changing back to 5% and resticted file growth with a default size. I
> don't understand why it changes!!!!
Why do you want to grow the log at 5%? Log growth is something you
should try to avoid. My advice is to set it to a sufficient size so
that it won't grow.
If you need more help, please post the actual ALTER statements you
ran. Don't rely on the management tools to do it correctly for you.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--