Showing posts with label company. Show all posts
Showing posts with label company. Show all posts

Wednesday, March 28, 2012

How do I add 1000+ New Users to ASPNET_DB?

Ok some company has handed me this .xls file containing a 1000+ users -- their emails (which are to be their user names), and their passwords. Both are in plain text format. I want to add these users to the ASPNET_DB, with the condition that the passwords and userids are encrypted, as they are in the table.

How should I do this?

Thanks very much.

The encryption should be in a client side form. You don't want to encrypt a datatype on the DB end and attempt to decrpt it for display.

Create the Table as normal with both the username and password fields as varchar's. Use the import/export wizard to dump it in.

Encrypt the text box control on your form when entering.

<input id="Password1" type="password" />

It'll match against your varchar.

Adamus

|||No, I do want to encrypt the password and user name actually.|||

Why is this a TSQL question? Do you want to perform the encryption on the client? Who will need to decrypt the username/password? What accesses the table? There are many questions and depending on that you can pick a method. Below are some ideas:

1. If you need to encrypt / decrypt the username & password combination on the client then it is best to use some algorithm that you can use on the client. So write a program that will encrypt the Excel data and produce a file. You can then load the file into the database

2. You could also use SQLCLR and use one of the Crypto API classes to do the encryption / decryption. You can then use it on the server-side easily.

And it seems like you should post this in the security newsgroup also. Deciding what level of encryption to use and the purpose of encryption depends on your requirements. The security guys will be able to help on the choice of the encryption algorithm or technology.

Friday, March 23, 2012

how could i hide my finacial data to sa when i store them in sql server 2k?

what we store in db is informatin about company finacial status.
we don't want anyone in charge of the server can read the those data.
what can i do without 3rd party software like activecrypt?
thank you.You can't prevent a member of the sysadmin role in SQL Server (like sa) from
viewing data so you would need to encrypt it either before storing it in SQL
or use a third party product
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"xuyan" <microsoft.net@.sina.com> wrote in message
news:eRfUysosFHA.3404@.TK2MSFTNGP09.phx.gbl...
> what we store in db is informatin about company finacial status.
> we don't want anyone in charge of the server can read the those data.
> what can i do without 3rd party software like activecrypt?
> thank you.
>|||Hi
Where does the info reside? One or many tables?
You can adde the user to db_denydatareader role and make sure that he/she is
not a member of sysadmin server role.
"xuyan" <microsoft.net@.sina.com> wrote in message
news:eRfUysosFHA.3404@.TK2MSFTNGP09.phx.gbl...
> what we store in db is informatin about company finacial status.
> we don't want anyone in charge of the server can read the those data.
> what can i do without 3rd party software like activecrypt?
> thank you.
>

Monday, March 12, 2012

How can we handle terabyte of data?

Hi All
I have some questions to ask, in case some company have terabyte of data in the production server which online 24X7.
1)How can they backup database? Do they use backup database complete into disk? or Tape? How can they verify the backup? How frequent that needs?
2)How can they handle disaster recovery? Is Log shipping and Clustering is good enough?
3)In case need to change some stored procedures or trigger. Do they upload to test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria that should be consider?
4)In case they have already tested in DEV box and want to implement in the online production, How can they minimize the problem if it does occur?
I am sorry to ask a lots of questions. If you can answers item by item or suggest the good resources, this will be the great for me.
Thanks you in advances,
James Jarupan
I'm hoping you can partition your data in the case below.
We did and utilized parititioned views heavily. Breaking apart tables/dbs
when they grew beyond 250 GB so instead of 1 TB DB there were 4 250 GB DBs.
So if 1 DB went down it could be restored in smaller timeframe than 1DB of
TB size. Besides you can backup much faster.
Later we got SAN solutions and size of DB ceased to be so much of an issue
for backup purposes.
Optimizing procs for production is always difficult in such cases, before
releasing the proc to live production box the DBA again performed the actual
execution plan and the estimated execution plan for optimization. You would
still need to follow the Dev- Test- Production box test methodology to
capture most issues.
"James Jarupan" <James@.vincosoft.com> wrote in message
news:5F71E190-F3ED-40E9-8DBF-EC1091D196F2@.microsoft.com...
> Hi All
> I have some questions to ask, in case some company have terabyte of data
in the production server which online 24X7.
> 1)How can they backup database? Do they use backup database complete into
disk? or Tape? How can they verify the backup? How frequent that needs?
> 2)How can they handle disaster recovery? Is Log shipping and Clustering is
good enough?
> 3)In case need to change some stored procedures or trigger. Do they upload
to test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria
that should be consider?
> 4)In case they have already tested in DEV box and want to implement in the
online production, How can they minimize the problem if it does occur?
> I am sorry to ask a lots of questions. If you can answers item by item
or suggest the good resources, this will be the great for me.
> Thanks you in advances,
> James Jarupan
>
|||Thanks you so much.

How can we handle terabyte of data?

Hi All
I have some questions to ask, in case some company have terabyte of data in
the production server which online 24X7.
1)How can they backup database? Do they use backup database complete into di
sk? or Tape? How can they verify the backup? How frequent that needs?
2)How can they handle disaster recovery? Is Log shipping and Clustering is g
ood enough?
3)In case need to change some stored procedures or trigger. Do they upload t
o test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria t
hat should be consider?
4)In case they have already tested in DEV box and want to implement in the o
nline production, How can they minimize the problem if it does occur?
I am sorry to ask a lots of questions. If you can answers item by item or su
ggest the good resources, this will be the great for me.
Thanks you in advances,
James JarupanI'm hoping you can partition your data in the case below.
We did and utilized parititioned views heavily. Breaking apart tables/dbs
when they grew beyond 250 GB so instead of 1 TB DB there were 4 250 GB DBs.
So if 1 DB went down it could be restored in smaller timeframe than 1DB of
TB size. Besides you can backup much faster.
Later we got SAN solutions and size of DB ceased to be so much of an issue
for backup purposes.
Optimizing procs for production is always difficult in such cases, before
releasing the proc to live production box the DBA again performed the actual
execution plan and the estimated execution plan for optimization. You would
still need to follow the Dev- Test- Production box test methodology to
capture most issues.
"James Jarupan" <James@.vincosoft.com> wrote in message
news:5F71E190-F3ED-40E9-8DBF-EC1091D196F2@.microsoft.com...
> Hi All
> I have some questions to ask, in case some company have terabyte of data
in the production server which online 24X7.
> 1)How can they backup database? Do they use backup database complete into
disk? or Tape? How can they verify the backup? How frequent that needs?
> 2)How can they handle disaster recovery? Is Log shipping and Clustering is
good enough?
> 3)In case need to change some stored procedures or trigger. Do they upload
to test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria
that should be consider?
> 4)In case they have already tested in DEV box and want to implement in the
online production, How can they minimize the problem if it does occur?
> I am sorry to ask a lots of questions. If you can answers item by item
or suggest the good resources, this will be the great for me.
> Thanks you in advances,
> James Jarupan
>|||Thanks you so much.

How can we handle terabyte of data?

Hi Al
I have some questions to ask, in case some company have terabyte of data in the production server which online 24X7
1)How can they backup database? Do they use backup database complete into disk? or Tape? How can they verify the backup? How frequent that needs
2)How can they handle disaster recovery? Is Log shipping and Clustering is good enough
3)In case need to change some stored procedures or trigger. Do they upload to test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria that should be consider?
4)In case they have already tested in DEV box and want to implement in the online production, How can they minimize the problem if it does occur
I am sorry to ask a lots of questions. If you can answers item by item or suggest the good resources, this will be the great for me
Thanks you in advances
James JarupaI'm hoping you can partition your data in the case below.
We did and utilized parititioned views heavily. Breaking apart tables/dbs
when they grew beyond 250 GB so instead of 1 TB DB there were 4 250 GB DBs.
So if 1 DB went down it could be restored in smaller timeframe than 1DB of
TB size. Besides you can backup much faster.
Later we got SAN solutions and size of DB ceased to be so much of an issue
for backup purposes.
Optimizing procs for production is always difficult in such cases, before
releasing the proc to live production box the DBA again performed the actual
execution plan and the estimated execution plan for optimization. You would
still need to follow the Dev- Test- Production box test methodology to
capture most issues.
"James Jarupan" <James@.vincosoft.com> wrote in message
news:5F71E190-F3ED-40E9-8DBF-EC1091D196F2@.microsoft.com...
> Hi All
> I have some questions to ask, in case some company have terabyte of data
in the production server which online 24X7.
> 1)How can they backup database? Do they use backup database complete into
disk? or Tape? How can they verify the backup? How frequent that needs?
> 2)How can they handle disaster recovery? Is Log shipping and Clustering is
good enough?
> 3)In case need to change some stored procedures or trigger. Do they upload
to test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria
that should be consider?
> 4)In case they have already tested in DEV box and want to implement in the
online production, How can they minimize the problem if it does occur?
> I am sorry to ask a lots of questions. If you can answers item by item
or suggest the good resources, this will be the great for me.
> Thanks you in advances,
> James Jarupan
>

Friday, March 9, 2012

How can User add order from only one company at a time

tblUser
--
UserID uniqueidentifier PK (newid)
UserName varchar(MAX)

tblCompany
-
CompanyID uniqueidentifier PK newid()
CompanyName varchar(MAX)

tblUserCart
--
CompanyID uniqueidentifier FK newid()
UserID uniqueidentifier PK
Product varchar(MAX)

Asume we got 3 tables like above. Relation ship is clear: tbluser ->tblUserCart--<tblCompany

What i want is , if user gives an order from a company , sql 2005 will decline the orders from other Companies. Naturally Orders are stored in the tblUserCart table. For example, if user Arnold gives an order of CuttingTool from Company named T3 , Arnold will not be able to give another order from other than T3. I hope im clear about situation.

Happy Coding...

Do you have an application that sits on top of the database so that the tables are populated via the application? If so, that's where I'd perform your logic, rather than trying to build some trigger-based/stored procedure solution in SQL Server.|||I agree.

I would use various SELECT functions within your application to validate weather Arnold could place another order.

So, adding an order for a particular user, query the UserCart table for that user. If an order exists for that user, then flag the app user or only show products from company T3

We could write this as a procedure, put lets put the client back into Client / Server |||So answer is , do it on application. Thanks for answers.