Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / September 2006

Tip: Looking for answers? Try searching our database.

Setting Database Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PGene2 - 22 Sep 2006 05:57 GMT
I run several DTS Packages that load databases residing on two seperate
instances of SQL Server 2000 on the same server.  For security reasons, I
need to be able to set the Databases on one instance to Read/Write access,
set the database access on the other instance to Read only, run the packages
on the first instance, and then reset the access to Read Only.  The ideal
solution would be writing the logic in T-SQL in a stored procedure that is
already part of the Package or add a new stored procedure to the package.  I
have not been able to find any reference to setting the Database access in
code.  I would appreciate and welcome any advise on how to accomplish this
programming task.  Thank you.

Signature

grp

Arnie Rowland - 22 Sep 2006 07:59 GMT
ALTER DATABASE MyDatabase
  SET READ_ONLY

ALTER DATABASE MyDatabase
  SET READ_WRITE

Signature

Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

>I run several DTS Packages that load databases residing on two seperate
> instances of SQL Server 2000 on the same server.  For security reasons, I
[quoted text clipped - 8 lines]
> code.  I would appreciate and welcome any advise on how to accomplish this
> programming task.  Thank you.
PGene2 - 25 Sep 2006 17:46 GMT
Thanks for the help.  This is what needed.  
Signature

grp

> ALTER DATABASE MyDatabase
>    SET READ_ONLY
[quoted text clipped - 14 lines]
> > code.  I would appreciate and welcome any advise on how to accomplish this
> > programming task.  Thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.