Showing posts with label least. Show all posts
Showing posts with label least. Show all posts

Thursday, 22 March 2012

Connect to internal SharePoint database from web site.

Hello,
There's information on my Internal SharePoint DataBase that I want to access. How can I do this? Could you help me or at least point me in the right direction.

The information I am requesting is just text.

Thank you,
Mark

Hi Mark,

I don't think so that kind of info is available. The table structure and relationships are quite messy. It's not recommended to access those tables directly, not to say it's prohibited.

I have done a lot of Sharepoint customizations, and what I did was accessing the Sharepoint internal object with it's object model. You can download the WSS SDK (both 2.0 and 3.0), and install it. The help file in the SDK has alot of sample code that we can use.

Happy coding :)

|||

Hi Mark,

I don't think so that kind of info is available. The table structure and relationships are quite messy. It's not recommended to access those tables directly, not to say it's prohibited.

I have done a lot of Sharepoint customizations, and what I did was access the Sharepoint internal object with it's object model. You can download the WSS SDK (both 2.0 and 3.0) are available. There are alot of sample code that we can use.

Happy coding :)

|||

Hi Mark,

I don't think so that kind of info is available. The table structure and relationships are quite messy. It's not recommended to access those tables directly, not to say it's prohibited.

I have done a lot of Sharepoint customizations, and what I did was accessing the Sharepoint internal object with it's object model. You can download the WSS SDK (both 2.0 and 3.0), and install it. The help file in the SDK has alot of sample code that we can use.

Happy coding :)

|||

I am starting to see this now. Thank you for your response.

Wednesday, 7 March 2012

Confusing Cross-Database Permissions Issue

We're trying to follow the principle of least privilege here in setting up a user account for our website to use to access SQL Server 2005, but we're having a nightmarish time getting it to work.

The issue seems to be trying to get a limited access user account the ability to cross databases.

Here's the situation:

We have a User [WebUser] that we want to grant access to the database. This account has a login [WebUser] that has username=WebUser and password=ALongPassword.

This user only calls stored procedures in the database [WebData].

However, some of the stored procedures in [WebData] call stored procedures in the database [dbutil].

One of the stored procedures in [dbutil] inserts records into a table in a third database [dbutil_temp].[DebugLog].

This all works out great from my development account using Windows Authentication.

But as you might guess, if I do something like "EXECUTE AS [WebUser]" and run the same procedure on [WebData] things fall apart quickly. I've looked online regarding cross-database ownership chaining, but quite frankly, the whole users/logins/roles/schemas security model is confusing, and I'm getting nowhere fast on my own.

We really only want [WebUser] to have CONNECT and EXECUTE permissions on the primary [WebData] database, but it seems like we've got to do a lot more than that to get this to work.

I'd appreciate any help...

Yes, you have to do a bit more work, but it isn't a whole lot more work. The most appropriate solution for this is to use signatures for the cross database access. There are detailed demos for creating signatures as well as specifically signatures for cross database queries in the following blogs, which I VERY highly recommend reading.

http://blogs.msdn.com/lcris/

http://blogs.msdn.com/raulga/

I would also suggest listenting to the security presentations at http://cmcgc.com/media/WMP/261115

|||Thanks Mike, I'll take a look at those resources.

Saturday, 25 February 2012

Confused About Permission

I read a few articles on best SQL practices and they kept coming back to using a Least Privileged Account. So I did so and gave that account read only permissions. The articles also said to do updates use Stored Procedures - so I created stored procedures for updating/deleting data.

So here's my problem - I connect to the database using the Least Privileged Account, I use the Stored Procedures, but .NET keeps saying I lack permissions. If I GRANT the Least Privileged Account UPDATE/DELETE permission on the table, the Stored Procedures run perfectly. But isn't that EXACTLY what I'm trying to avoid?

My greatest concern is someone hacks my website and using the Least Privileged Account, they delete all my data using that account. So I don't want to give the Least Privileged Account the Update/Delete privileges.

Thanks a MILLION in advance!

Do you grant EXECUTE permission on the stored procedures to the account?

Once that is done you do not need UPDATE/DELETE on the tables for the account.

|||I granted execute permissions to the stored procedures, but it still fails when I check OFF the Update permission on the table (and still works when I check ON the Update permission). Any other ideas?|||

I figured out my problem (thanks to TATWORTH). I was creating the SP's while logging in as the least privileged account, so therefore the SP was [LeastPrivilegedAccount].[StoredProcedureName] - this required the Least privileged user to have the permissions. Now I created the SP's as [dbo].[StoredProcedureName] and granted the Least privileged user EXECUTE permissions.

It works perfectly! Thanks a MILLION!!1Big Smile

Sunday, 12 February 2012

Configuring a failsafe or backup server

I am not sure exactly which newsgroup to post this to so I will ask here
with the hopes that someone either can answer or at least point me to a
better newsgroup to pose the question.
We have a single SQL Server 2000 server machine. We are increasingly adding
more and more db's and applications and more and more users are depending on
this data being available. We have a sales force and dealers that access the
data remotely 24/7 from varios time zones. Now I am starting to think in
terms of data availability - making sure that if the server goes down or we
need to take the server offline for any period of time, we can move the db's
over either manually or automatically to another server. We do also have a
Win2K small business server that includes SQL server - and it is really
sitting idle so we could use that machine as the backup SQL server in a
pinch. Then we'd have to repoint all users to the new machine which would
allow them to be back up and running again in a decent time frame. Then when
we are back online with the actual SQL Server, the db would have to be
migrated back over...
There are a couple of options I am thinking...
1) to implement a complete failover system so that if one server goes down,
up comes the other one almost instantly? I doubt we really need to go to
this level but perhaps someone could elaborate on exactly what
hardware/software would be needed to implement such a scheme. I am thinking
Win2K3 R2 DFS or a Doubletake solution?
2) Manually backup and restore from one machine to the other and back again
when the other machine is back on line. This would mean that if the SQL
server went down in the afternoon, and we were unable to access the drives
for whatever reason, we would have to restore from the previous nights SQL
server backup (on disk). meaning a loss of almost a full days work
potentially..
What other options are there out there? What have other folks been doing?
Should we be backing up transaction logs every hour possibly? That way we
could restore from previous night and then play back all the transaction
logs to get current within an hour at least...
Thanks, Brad
Log shipping is another option for maintaining a warm
standby. You can write your own and don't necessarily need
to be using SQL Server 2000 Enterprise Edition. That edition
just gives you a GUI to setup and monitor the log shipping.
There are other options - depending on the business needs.
This article does a good job of going though the different
options and their advantages, disadvantages:
http://vyaskn.tripod.com/maintaining_standby_sql_server.htm
-Sue
On Mon, 28 May 2007 16:34:34 -0400, "Brad Pears"
<bradp@.truenorthloghomes.com> wrote:

>I am not sure exactly which newsgroup to post this to so I will ask here
>with the hopes that someone either can answer or at least point me to a
>better newsgroup to pose the question.
>We have a single SQL Server 2000 server machine. We are increasingly adding
>more and more db's and applications and more and more users are depending on
>this data being available. We have a sales force and dealers that access the
>data remotely 24/7 from varios time zones. Now I am starting to think in
>terms of data availability - making sure that if the server goes down or we
>need to take the server offline for any period of time, we can move the db's
>over either manually or automatically to another server. We do also have a
>Win2K small business server that includes SQL server - and it is really
>sitting idle so we could use that machine as the backup SQL server in a
>pinch. Then we'd have to repoint all users to the new machine which would
>allow them to be back up and running again in a decent time frame. Then when
>we are back online with the actual SQL Server, the db would have to be
>migrated back over...
>There are a couple of options I am thinking...
>1) to implement a complete failover system so that if one server goes down,
>up comes the other one almost instantly? I doubt we really need to go to
>this level but perhaps someone could elaborate on exactly what
>hardware/software would be needed to implement such a scheme. I am thinking
>Win2K3 R2 DFS or a Doubletake solution?
>2) Manually backup and restore from one machine to the other and back again
>when the other machine is back on line. This would mean that if the SQL
>server went down in the afternoon, and we were unable to access the drives
>for whatever reason, we would have to restore from the previous nights SQL
>server backup (on disk). meaning a loss of almost a full days work
>potentially..
>What other options are there out there? What have other folks been doing?
>Should we be backing up transaction logs every hour possibly? That way we
>could restore from previous night and then play back all the transaction
>logs to get current within an hour at least...
>Thanks, Brad
>
|||Thanks for that...
Brad
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:vbkm53lfq2197a3ah6tfasd2q2ie875n62@.4ax.com...
> Log shipping is another option for maintaining a warm
> standby. You can write your own and don't necessarily need
> to be using SQL Server 2000 Enterprise Edition. That edition
> just gives you a GUI to setup and monitor the log shipping.
> There are other options - depending on the business needs.
> This article does a good job of going though the different
> options and their advantages, disadvantages:
> http://vyaskn.tripod.com/maintaining_standby_sql_server.htm
> -Sue
> On Mon, 28 May 2007 16:34:34 -0400, "Brad Pears"
> <bradp@.truenorthloghomes.com> wrote:
>

Configuring a failsafe or backup server

I am not sure exactly which newsgroup to post this to so I will ask here
with the hopes that someone either can answer or at least point me to a
better newsgroup to pose the question.
We have a single SQL Server 2000 server machine. We are increasingly adding
more and more db's and applications and more and more users are depending on
this data being available. We have a sales force and dealers that access the
data remotely 24/7 from varios time zones. Now I am starting to think in
terms of data availability - making sure that if the server goes down or we
need to take the server offline for any period of time, we can move the db's
over either manually or automatically to another server. We do also have a
Win2K small business server that includes SQL server - and it is really
sitting idle so we could use that machine as the backup SQL server in a
pinch. Then we'd have to repoint all users to the new machine which would
allow them to be back up and running again in a decent time frame. Then when
we are back online with the actual SQL Server, the db would have to be
migrated back over...
There are a couple of options I am thinking...
1) to implement a complete failover system so that if one server goes down,
up comes the other one almost instantly? I doubt we really need to go to
this level but perhaps someone could elaborate on exactly what
hardware/software would be needed to implement such a scheme. I am thinking
Win2K3 R2 DFS or a Doubletake solution?
2) Manually backup and restore from one machine to the other and back again
when the other machine is back on line. This would mean that if the SQL
server went down in the afternoon, and we were unable to access the drives
for whatever reason, we would have to restore from the previous nights SQL
server backup (on disk). meaning a loss of almost a full days work
potentially..
What other options are there out there? What have other folks been doing?
Should we be backing up transaction logs every hour possibly? That way we
could restore from previous night and then play back all the transaction
logs to get current within an hour at least...
Thanks, BradLog shipping is another option for maintaining a warm
standby. You can write your own and don't necessarily need
to be using SQL Server 2000 Enterprise Edition. That edition
just gives you a GUI to setup and monitor the log shipping.
There are other options - depending on the business needs.
This article does a good job of going though the different
options and their advantages, disadvantages:
http://vyaskn.tripod.com/maintainin..._sql_server.htm
-Sue
On Mon, 28 May 2007 16:34:34 -0400, "Brad Pears"
<bradp@.truenorthloghomes.com> wrote:

>I am not sure exactly which newsgroup to post this to so I will ask here
>with the hopes that someone either can answer or at least point me to a
>better newsgroup to pose the question.
>We have a single SQL Server 2000 server machine. We are increasingly adding
>more and more db's and applications and more and more users are depending o
n
>this data being available. We have a sales force and dealers that access th
e
>data remotely 24/7 from varios time zones. Now I am starting to think in
>terms of data availability - making sure that if the server goes down or we
>need to take the server offline for any period of time, we can move the db'
s
>over either manually or automatically to another server. We do also have a
>Win2K small business server that includes SQL server - and it is really
>sitting idle so we could use that machine as the backup SQL server in a
>pinch. Then we'd have to repoint all users to the new machine which would
>allow them to be back up and running again in a decent time frame. Then whe
n
>we are back online with the actual SQL Server, the db would have to be
>migrated back over...
>There are a couple of options I am thinking...
>1) to implement a complete failover system so that if one server goes down,
>up comes the other one almost instantly? I doubt we really need to go to
>this level but perhaps someone could elaborate on exactly what
>hardware/software would be needed to implement such a scheme. I am thinking
>Win2K3 R2 DFS or a Doubletake solution?
>2) Manually backup and restore from one machine to the other and back again
>when the other machine is back on line. This would mean that if the SQL
>server went down in the afternoon, and we were unable to access the drives
>for whatever reason, we would have to restore from the previous nights SQL
>server backup (on disk). meaning a loss of almost a full days work
>potentially..
>What other options are there out there? What have other folks been doing?
>Should we be backing up transaction logs every hour possibly? That way we
>could restore from previous night and then play back all the transaction
>logs to get current within an hour at least...
>Thanks, Brad
>|||Thanks for that...
Brad
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:vbkm53lfq2197a3ah6tfasd2q2ie875n62@.
4ax.com...
> Log shipping is another option for maintaining a warm
> standby. You can write your own and don't necessarily need
> to be using SQL Server 2000 Enterprise Edition. That edition
> just gives you a GUI to setup and monitor the log shipping.
> There are other options - depending on the business needs.
> This article does a good job of going though the different
> options and their advantages, disadvantages:
> http://vyaskn.tripod.com/maintainin..._sql_server.htm
> -Sue
> On Mon, 28 May 2007 16:34:34 -0400, "Brad Pears"
> <bradp@.truenorthloghomes.com> wrote:
>
>

ConfigureUnDouble installation help

I am having trouble installing the ConfigureUnDouble tool. I followed all the directions, at least I though i did, and it keeps giving me this error message: "Falure initializing gacutil". I'm not sure if the gacutil.exe is failing or if the dll is not getting created properly. Can anyone help with this?

GACUTIL is a utility that comes as part of the .NET framework. If you open the Visual Studio 2005 Command Prompt and type GACUTIL /?, you should see a list of command line switches. If you don't, something is wrong with your .NET / Visual Studio install.