Showing posts with label customer. Show all posts
Showing posts with label customer. Show all posts

Sunday, February 19, 2012

Attaching, Restoreing, Backup DB in MSDE , How?

Hi all;

I created a DB in MS SQL Server 2000.. (has Tables, SPs, Views..etc.) and I want to attached to a customer that has ONLY MSDE?

How?

Also, how can my customer make Backup & Restore from his MSDE? (BTW: can I do that in code (VB.NET/ASP.NET)??

Thanks in advanced!UP :(

Plz, help me!!

Thursday, February 16, 2012

Attaching MDF and LDF Files Error

i am facing a problem for SQL 2000 Database .. We have SQL 2000 Database on
customer site installed on C Partition ...MDF file is 300 MB but LDF file
became 12 GB which took all of the C Partition Space.. Our Tech Supp Person
have moved these Physical Files From C to D partition and Deleted the files
and database from C partition and he created new database and tried to Attach
from D partion but that gives an error(Error 9003: The
LSN(12560:120211:1) Passed to log scan in database 'DatabaseName' is invalid)
another problem is that latest backup is not available only old backup
available.
we restored old backup and tried to attach those files (300 MB and 12 GB)
but didnt work.. another error comes that CAN NOT ATTACH FILES FROM
DIFFERENT DATABASES.
please can any one help in this case ...my email is raza_noor@.hotmail.comHi
Was the file detached correctly?
Try renaming the log file and using sp_attach_single_file_db to create a new
log, and then detaching/move/attaching the log or in SQL 2005 you can use
CREATE DATABASE with the ATTACH_REBUILD_LOG option instead of
sp_attach_single_file_db.
John
"razanoor" <razanoor@.discussions.microsoft.com> wrote in message
news:4D14A1C6-EE37-463B-A4E3-9B4F79BBA684@.microsoft.com...
> i am facing a problem for SQL 2000 Database .. We have SQL 2000 Database
> on
> customer site installed on C Partition ...MDF file is 300 MB but LDF file
> became 12 GB which took all of the C Partition Space.. Our Tech Supp
> Person
> have moved these Physical Files From C to D partition and Deleted the
> files
> and database from C partition and he created new database and tried to
> Attach
> from D partion but that gives an error(Error 9003: The
> LSN(12560:120211:1) Passed to log scan in database 'DatabaseName' is
> invalid)
> another problem is that latest backup is not available only old backup
> available.
> we restored old backup and tried to attach those files (300 MB and 12 GB)
> but didnt work.. another error comes that CAN NOT ATTACH FILES FROM
> DIFFERENT DATABASES.
> please can any one help in this case ...my email is raza_noor@.hotmail.com|||Hi
Does he try top attach with single file option (for more details please see
BOL) i.e without specifying .LDF file?
Don't you have proper BACKUP?
"razanoor" <razanoor@.discussions.microsoft.com> wrote in message
news:4D14A1C6-EE37-463B-A4E3-9B4F79BBA684@.microsoft.com...
> i am facing a problem for SQL 2000 Database .. We have SQL 2000 Database
> on
> customer site installed on C Partition ...MDF file is 300 MB but LDF file
> became 12 GB which took all of the C Partition Space.. Our Tech Supp
> Person
> have moved these Physical Files From C to D partition and Deleted the
> files
> and database from C partition and he created new database and tried to
> Attach
> from D partion but that gives an error(Error 9003: The
> LSN(12560:120211:1) Passed to log scan in database 'DatabaseName' is
> invalid)
> another problem is that latest backup is not available only old backup
> available.
> we restored old backup and tried to attach those files (300 MB and 12 GB)
> but didnt work.. another error comes that CAN NOT ATTACH FILES FROM
> DIFFERENT DATABASES.
> please can any one help in this case ...my email is raza_noor@.hotmail.com|||If the Tech Supp Person did no detach database file before move it, he is
not qualified to manage a server/computer with production SQL Server.
"razanoor" <razanoor@.discussions.microsoft.com> wrote in message
news:4D14A1C6-EE37-463B-A4E3-9B4F79BBA684@.microsoft.com...
> i am facing a problem for SQL 2000 Database .. We have SQL 2000 Database
> on
> customer site installed on C Partition ...MDF file is 300 MB but LDF file
> became 12 GB which took all of the C Partition Space.. Our Tech Supp
> Person
> have moved these Physical Files From C to D partition and Deleted the
> files
> and database from C partition and he created new database and tried to
> Attach
> from D partion but that gives an error(Error 9003: The
> LSN(12560:120211:1) Passed to log scan in database 'DatabaseName' is
> invalid)
> another problem is that latest backup is not available only old backup
> available.
> we restored old backup and tried to attach those files (300 MB and 12 GB)
> but didnt work.. another error comes that CAN NOT ATTACH FILES FROM
> DIFFERENT DATABASES.
> please can any one help in this case ...my email is raza_noor@.hotmail.com

Attaching DB & Security

Hi,
I want to prevent others from attaching my database, is it possible? Imagine
that the administrator at customer's office stops SQL Server Service and
copies our DB. How can I protect it?
Any help is appreciated.
LeilaLeila
Remove them from sysadmin server role . If they aren't remove them from
dbcreator server role
"Leila" <Leilas@.hotpop.com> wrote in message
news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I want to prevent others from attaching my database, is it possible?
> Imagine
> that the administrator at customer's office stops SQL Server Service and
> copies our DB. How can I protect it?
> Any help is appreciated.
> Leila
>
>|||I do not think you can prevent them from doing that if they have full
control to their OWN computer ( and the SQL Server on that computer ).
"Leila" <Leilas@.hotpop.com> wrote in message
news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I want to prevent others from attaching my database, is it possible?
> Imagine
> that the administrator at customer's office stops SQL Server Service and
> copies our DB. How can I protect it?
> Any help is appreciated.
> Leila
>
>|||That won't work because admin of windows can stop sql server and copy mdf
and ldf files(even if he doesn't have any login in sql server)
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
> Leila
> Remove them from sysadmin server role . If they aren't remove them from
> dbcreator server role
>
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Hi,
>> I want to prevent others from attaching my database, is it possible?
>> Imagine
>> that the administrator at customer's office stops SQL Server Service and
>> copies our DB. How can I protect it?
>> Any help is appreciated.
>> Leila
>>
>|||"Leila" <Leilas@.hotpop.com> wrote in message
news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
> That won't work because admin of windows can stop sql server and copy mdf
> and ldf files(even if he doesn't have any login in sql server)
Quite honestly, at this point if you can't trust them, you've got other
issues.
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> Leila
>> Remove them from sysadmin server role . If they aren't remove them from
>> dbcreator server role
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Hi,
>> I want to prevent others from attaching my database, is it possible?
>> Imagine
>> that the administrator at customer's office stops SQL Server Service and
>> copies our DB. How can I protect it?
>> Any help is appreciated.
>> Leila
>>
>>
>|||Correct...you really can't. What are you trying to protect
though? If it's an intellectual property type of thing and
these are your customers, licensing/legal agreements is
probably what you'd want to focus on.
-Sue
On Mon, 6 Nov 2006 21:49:26 +0330, "Leila"
<Leilas@.hotpop.com> wrote:
>That won't work because admin of windows can stop sql server and copy mdf
>and ldf files(even if he doesn't have any login in sql server)
>
>"Uri Dimant" <urid@.iscar.co.il> wrote in message
>news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> Leila
>> Remove them from sysadmin server role . If they aren't remove them from
>> dbcreator server role
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Hi,
>> I want to prevent others from attaching my database, is it possible?
>> Imagine
>> that the administrator at customer's office stops SQL Server Service and
>> copies our DB. How can I protect it?
>> Any help is appreciated.
>> Leila
>>
>>
>|||I don't agree! When a person becomes admin, only his skills are proved to
the boss, not other things. Why should we trust him when there are sensitive
data? Why is it advised to remove built-in administrators account from sql
server logins? Why you can set a password for backup set? These prove that
you cannot trust to all admins!
"Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
>> That won't work because admin of windows can stop sql server and copy mdf
>> and ldf files(even if he doesn't have any login in sql server)
> Quite honestly, at this point if you can't trust them, you've got other
> issues.
>
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> Leila
>> Remove them from sysadmin server role . If they aren't remove them from
>> dbcreator server role
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Hi,
>> I want to prevent others from attaching my database, is it possible?
>> Imagine
>> that the administrator at customer's office stops SQL Server Service
>> and
>> copies our DB. How can I protect it?
>> Any help is appreciated.
>> Leila
>>
>>
>>
>|||Leila
How many admins do you have at your shop? There are server fixed roles that
you add those people , not all of them should be members of sysadmin server
role
http://vyaskn.tripod.com/sql_server_security_best_practices.htm --security
best practices
"Leila" <Leilas@.hotpop.com> wrote in message
news:%23iljU%23kAHHA.1196@.TK2MSFTNGP03.phx.gbl...
>I don't agree! When a person becomes admin, only his skills are proved to
>the boss, not other things. Why should we trust him when there are
>sensitive data? Why is it advised to remove built-in administrators account
>from sql server logins? Why you can set a password for backup set? These
>prove that you cannot trust to all admins!
>
> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
> message
> news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
>> That won't work because admin of windows can stop sql server and copy
>> mdf
>> and ldf files(even if he doesn't have any login in sql server)
>> Quite honestly, at this point if you can't trust them, you've got other
>> issues.
>>
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> Leila
>> Remove them from sysadmin server role . If they aren't remove them from
>> dbcreator server role
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Hi,
>> I want to prevent others from attaching my database, is it possible?
>> Imagine
>> that the administrator at customer's office stops SQL Server Service
>> and
>> copies our DB. How can I protect it?
>> Any help is appreciated.
>> Leila
>>
>>
>>
>>
>
>|||They are not member of sysadmin! The security threat is outside of sql
server, the windows admins!
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OpSWIKlAHHA.4496@.TK2MSFTNGP02.phx.gbl...
> Leila
> How many admins do you have at your shop? There are server fixed roles
> that you add those people , not all of them should be members of sysadmin
> server role
> ttp://vyaskn.tripod.com/sql_server_security_best_practices.htm --security
> best practices
>
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:%23iljU%23kAHHA.1196@.TK2MSFTNGP03.phx.gbl...
>>I don't agree! When a person becomes admin, only his skills are proved to
>>the boss, not other things. Why should we trust him when there are
>>sensitive data? Why is it advised to remove built-in administrators
>>account from sql server logins? Why you can set a password for backup set?
>>These prove that you cannot trust to all admins!
>>
>> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
>> message
>> news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
>> That won't work because admin of windows can stop sql server and copy
>> mdf
>> and ldf files(even if he doesn't have any login in sql server)
>> Quite honestly, at this point if you can't trust them, you've got other
>> issues.
>>
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> Leila
>> Remove them from sysadmin server role . If they aren't remove them
>> from
>> dbcreator server role
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Hi,
>> I want to prevent others from attaching my database, is it possible?
>> Imagine
>> that the administrator at customer's office stops SQL Server Service
>> and
>> copies our DB. How can I protect it?
>> Any help is appreciated.
>> Leila
>>
>>
>>
>>
>>
>>
>|||The machine admins can always get access to your data, especially if they
also have physical access to the machine. They can debug the process, they
can dump the memory, they can install key loggers, they can patch the
server, and so on. The only way to really protect your data against them is
to not give it to them in clear. Encrypt it before you pass it to the server
and decrypt it after you get it back. However, this is probably not
something that you can afford to do. So, you'll have to rely instead on
auditing, so if an admin does something bad, you can at least collect some
proof of what they did and use it to get legal compensation for the damages
caused by the data theft. You can also use other measures, to make getting
at the data harder, but you have to keep in mind that all these measures
would only slow down an attacker; you cannot build an impenetrable barrier
against the guy that can do whatever he wants with the physical machine. You
could use, for example, encryption, so a machine admin would have to find a
way to get at the keys to decrypt the data, and this would slow him down,
but it wouldn't necessarily stop him. So, the right question to ask is not
how you can stop machine administrators from getting the data, but how can
you deter them from doing so.
Some suggestions for deterring access:
- Have an auditing policy in place - verify audit trails and investigate
suspicious activity.
- Encrypt your sensitive data
- If possible, have administrators work without physical access to the
machine and have a different person perform the physical maintenance of the
machine
Thanks
--
Laurentiu Cristofor [MSFT]
Software Development Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Leila" <Leilas@.hotpop.com> wrote in message
news:eTwSvulAHHA.4024@.TK2MSFTNGP04.phx.gbl...
> They are not member of sysadmin! The security threat is outside of sql
> server, the windows admins!
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OpSWIKlAHHA.4496@.TK2MSFTNGP02.phx.gbl...
>> Leila
>> How many admins do you have at your shop? There are server fixed roles
>> that you add those people , not all of them should be members of sysadmin
>> server role
>>
>> tp://vyaskn.tripod.com/sql_server_security_best_practices.htm --security
>> best practices
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:%23iljU%23kAHHA.1196@.TK2MSFTNGP03.phx.gbl...
>>I don't agree! When a person becomes admin, only his skills are proved to
>>the boss, not other things. Why should we trust him when there are
>>sensitive data? Why is it advised to remove built-in administrators
>>account from sql server logins? Why you can set a password for backup
>>set? These prove that you cannot trust to all admins!
>>
>> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
>> message
>> news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
>> That won't work because admin of windows can stop sql server and copy
>> mdf
>> and ldf files(even if he doesn't have any login in sql server)
>> Quite honestly, at this point if you can't trust them, you've got other
>> issues.
>>
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> Leila
>> Remove them from sysadmin server role . If they aren't remove them
>> from
>> dbcreator server role
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>>> Hi,
>>> I want to prevent others from attaching my database, is it possible?
>>> Imagine
>>> that the administrator at customer's office stops SQL Server Service
>>> and
>>> copies our DB. How can I protect it?
>>> Any help is appreciated.
>>> Leila
>>>
>>>
>>>
>>
>>
>>
>>
>>
>|||"Leila" <Leilas@.hotpop.com> wrote in message
news:%23iljU%23kAHHA.1196@.TK2MSFTNGP03.phx.gbl...
>I don't agree! When a person becomes admin, only his skills are proved to
>the boss, not other things. Why should we trust him when there are
>sensitive data?
Because you gave him the job. Quite honestly if the only criteria you set
is skill then I would argue that's a mistake.
> Why is it advised to remove built-in administrators account from sql
> server logins? Why you can set a password for backup set? These prove that
> you cannot trust to all admins!
>
> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
> message
> news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
>> That won't work because admin of windows can stop sql server and copy
>> mdf
>> and ldf files(even if he doesn't have any login in sql server)
>> Quite honestly, at this point if you can't trust them, you've got other
>> issues.
>>
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> Leila
>> Remove them from sysadmin server role . If they aren't remove them from
>> dbcreator server role
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Hi,
>> I want to prevent others from attaching my database, is it possible?
>> Imagine
>> that the administrator at customer's office stops SQL Server Service
>> and
>> copies our DB. How can I protect it?
>> Any help is appreciated.
>> Leila
>>
>>
>>
>>
>
>|||Why is a person becoming a network administrator in a system that has
'sensitive' data without a criminal background check?
Why is it that the network admins are not trusted?
ANYONE that has physical access to the SQL Server and/or backups CAN
eventually 'hack' the databases -UNLESS very stringent and expensive*
security is put into place.
*expensive -Most often requires a SQL Server Security specialist to come in
and help. May require changes to current applications and programming
procedures.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Leila" <Leilas@.hotpop.com> wrote in message
news:%23iljU%23kAHHA.1196@.TK2MSFTNGP03.phx.gbl...
>I don't agree! When a person becomes admin, only his skills are proved to
>the boss, not other things. Why should we trust him when there are
>sensitive data? Why is it advised to remove built-in administrators account
>from sql server logins? Why you can set a password for backup set? These
>prove that you cannot trust to all admins!
>
> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
> message
> news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
>> That won't work because admin of windows can stop sql server and copy
>> mdf
>> and ldf files(even if he doesn't have any login in sql server)
>> Quite honestly, at this point if you can't trust them, you've got other
>> issues.
>>
>>
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> Leila
>> Remove them from sysadmin server role . If they aren't remove them from
>> dbcreator server role
>>
>> "Leila" <Leilas@.hotpop.com> wrote in message
>> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Hi,
>> I want to prevent others from attaching my database, is it possible?
>> Imagine
>> that the administrator at customer's office stops SQL Server Service
>> and
>> copies our DB. How can I protect it?
>> Any help is appreciated.
>> Leila
>>
>>
>>
>>
>
>|||I am not aware of any password protection backup native in SQL Server yet.
May be, it would be something to submit to sqlwish@.microsoft.com?
Although, if the concern is about protecting the contents of the database,
you may consider encryption, which it will require some extra steps (create
symmetric/asymmetric keys, etc.)
You can read about it at
http://www.microsoft.com/technet/itshowcase/content/sqldatsec.mspx "Improving
Data Security by Using SQL Server 2005, a Technical White Paper"
"Leila" wrote:
> I don't agree! When a person becomes admin, only his skills are proved to
> the boss, not other things. Why should we trust him when there are sensitive
> data? Why is it advised to remove built-in administrators account from sql
> server logins? Why you can set a password for backup set? These prove that
> you cannot trust to all admins!
>
> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
> news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
> >
> > "Leila" <Leilas@.hotpop.com> wrote in message
> > news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
> >> That won't work because admin of windows can stop sql server and copy mdf
> >> and ldf files(even if he doesn't have any login in sql server)
> >
> > Quite honestly, at this point if you can't trust them, you've got other
> > issues.
> >
> >
> >>
> >>
> >> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> >> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
> >> Leila
> >>
> >> Remove them from sysadmin server role . If they aren't remove them from
> >> dbcreator server role
> >>
> >>
> >>
> >> "Leila" <Leilas@.hotpop.com> wrote in message
> >> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
> >> Hi,
> >> I want to prevent others from attaching my database, is it possible?
> >> Imagine
> >> that the administrator at customer's office stops SQL Server Service
> >> and
> >> copies our DB. How can I protect it?
> >> Any help is appreciated.
> >> Leila
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>
>

Attaching DB & Security

Hi,
I want to prevent others from attaching my database, is it possible? Imagine
that the administrator at customer's office stops SQL Server Service and
copies our DB. How can I protect it?
Any help is appreciated.
LeilaLeila
Remove them from sysadmin server role . If they aren't remove them from
dbcreator server role
"Leila" <Leilas@.hotpop.com> wrote in message
news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I want to prevent others from attaching my database, is it possible?
> Imagine
> that the administrator at customer's office stops SQL Server Service and
> copies our DB. How can I protect it?
> Any help is appreciated.
> Leila
>
>|||I do not think you can prevent them from doing that if they have full
control to their OWN computer ( and the SQL Server on that computer ).
"Leila" <Leilas@.hotpop.com> wrote in message
news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I want to prevent others from attaching my database, is it possible?
> Imagine
> that the administrator at customer's office stops SQL Server Service and
> copies our DB. How can I protect it?
> Any help is appreciated.
> Leila
>
>|||That won't work because admin of windows can stop sql server and copy mdf
and ldf files(even if he doesn't have any login in sql server)
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
> Leila
> Remove them from sysadmin server role . If they aren't remove them from
> dbcreator server role
>
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:OB355eaAHHA.4592@.TK2MSFTNGP03.phx.gbl...
>|||"Leila" <Leilas@.hotpop.com> wrote in message
news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
> That won't work because admin of windows can stop sql server and copy mdf
> and ldf files(even if he doesn't have any login in sql server)
Quite honestly, at this point if you can't trust them, you've got other
issues.

>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>|||Correct...you really can't. What are you trying to protect
though? If it's an intellectual property type of thing and
these are your customers, licensing/legal agreements is
probably what you'd want to focus on.
-Sue
On Mon, 6 Nov 2006 21:49:26 +0330, "Leila"
<Leilas@.hotpop.com> wrote:

>That won't work because admin of windows can stop sql server and copy mdf
>and ldf files(even if he doesn't have any login in sql server)
>
>"Uri Dimant" <urid@.iscar.co.il> wrote in message
>news:OcVtQjaAHHA.3560@.TK2MSFTNGP03.phx.gbl...
>|||I don't agree! When a person becomes admin, only his skills are proved to
the boss, not other things. Why should we trust him when there are sensitive
data? Why is it advised to remove built-in administrators account from sql
server logins? Why you can set a password for backup set? These prove that
you cannot trust to all admins!
"Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:OC9nkAdAHHA.1556@.TK2MSFTNGP03.phx.gbl...
> Quite honestly, at this point if you can't trust them, you've got other
> issues.
>
>|||Leila
How many admins do you have at your shop? There are server fixed roles that
you add those people , not all of them should be members of sysadmin server
role
http://vyaskn.tripod.com/sql_server...t_practices.htm --sec
urity
best practices
"Leila" <Leilas@.hotpop.com> wrote in message
news:%23iljU%23kAHHA.1196@.TK2MSFTNGP03.phx.gbl...
>I don't agree! When a person becomes admin, only his skills are proved to
>the boss, not other things. Why should we trust him when there are
>sensitive data? Why is it advised to remove built-in administrators account
>from sql server logins? Why you can set a password for backup set? These
>prove that you cannot trust to all admins!
>
> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
> message
> news:ONHpg0gAHHA.996@.TK2MSFTNGP02.phx.gbl...
>
>|||They are not member of sysadmin! The security threat is outside of sql
server, the windows admins!
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OpSWIKlAHHA.4496@.TK2MSFTNGP02.phx.gbl...
> Leila
> How many admins do you have at your shop? There are server fixed roles
> that you add those people , not all of them should be members of sysadmin
> server role
> ttp://vyaskn.tripod.com/sql_server_security_best_practices.htm --se
curity
> best practices
>
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:%23iljU%23kAHHA.1196@.TK2MSFTNGP03.phx.gbl...
>|||The machine admins can always get access to your data, especially if they
also have physical access to the machine. They can debug the process, they
can dump the memory, they can install key loggers, they can patch the
server, and so on. The only way to really protect your data against them is
to not give it to them in clear. Encrypt it before you pass it to the server
and decrypt it after you get it back. However, this is probably not
something that you can afford to do. So, you'll have to rely instead on
auditing, so if an admin does something bad, you can at least collect some
proof of what they did and use it to get legal compensation for the damages
caused by the data theft. You can also use other measures, to make getting
at the data harder, but you have to keep in mind that all these measures
would only slow down an attacker; you cannot build an impenetrable barrier
against the guy that can do whatever he wants with the physical machine. You
could use, for example, encryption, so a machine admin would have to find a
way to get at the keys to decrypt the data, and this would slow him down,
but it wouldn't necessarily stop him. So, the right question to ask is not
how you can stop machine administrators from getting the data, but how can
you deter them from doing so.
Some suggestions for deterring access:
- Have an auditing policy in place - verify audit trails and investigate
suspicious activity.
- Encrypt your sensitive data
- If possible, have administrators work without physical access to the
machine and have a different person perform the physical maintenance of the
machine
Thanks
Laurentiu Cristofor [MSFT]
Software Development Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Leila" <Leilas@.hotpop.com> wrote in message
news:eTwSvulAHHA.4024@.TK2MSFTNGP04.phx.gbl...
> They are not member of sysadmin! The security threat is outside of sql
> server, the windows admins!
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OpSWIKlAHHA.4496@.TK2MSFTNGP02.phx.gbl...
>

Monday, February 13, 2012

Attaching data at differnet levels in a heirchy

I don't think this is too complex, but I can't figure out what what the correct solution is.

I have 6 tables: Customer, Project, Rate, Hours, EquipmentType, Equipment

All projects belong to a customer, so customers have a PK CustomerId and Project has a PK {CustomerId, ProjectId} where CustomerId is a FK to Customer.

A rate can be defined as being at a project level or a Customer level. A project must specify if it is using the customer level rates or its own rates.

So what I wanted to do at first was creat the key in Rate as {CustomerId, ProjectId NULLABLE, EquipmentTypeId}. The idea being that a NULL ProjectId would mean that the Rate was Customer level since it didn't point to a project.

But of course that won't work. In addition to SQL Server not allowing a PK with a NULLABLE it would also mess up my relationship between Rate and Hours.

I wanted to specify in Hours the Rate, Project (and Customer), and Equipment and Equipment type.

I didn't want to create 2 rate tables, one for Customer level rates and one for Project level rates, but is that what I should have done?

I hope this is a clear explanation.

Does anyone have a better idea how to create what I want.It is hard to give you advice without seeing any data.
But I don't think Project table should have CustormerID at all.
Usually people create Customer table with CustormerID PK and
Project table with ProjectID PK and in between for multi-to-multi relationships you should have CustomerProgect table with CustomerID, ProjectID PK and CustomerID FK and ProjectID FK.
The same is with a Rate. Just create Rate table with column RateType where you can store C or P meaning Customer or Project type rate.
And in between just create Customer_Rate table with CustormerID, RateID PK and corresponding foreign keys.

Hope it helps.