Showing posts with label security. Show all posts
Showing posts with label security. Show all posts

Sunday, March 25, 2012

Delete a user. Please help

Hi,
I hve been tring to delete a Login User form SQL 2000 and cant do it
I go to Security, Logins, find the user, right click and delete.
I then get a option that says "Removing this login will remove all
associated database users (if any)".
I say yes to that and then...
Error 15174: Login 'XXXXXXX' is aliased or mapped to a user in one or
more databases- Drop the user or alisas before dropping the login.
Database name :DB1, DB2, DB, etc.
How can I get past this!
Thanks.
George.
Do what the error message say: Remove the users or aliases from the database as listed in the error
message.
If these are users, use sp_dropuser for if it is a SQL Server Login or sp_revokedbaccess if it is a
Windows Login.
If these are aliases (which i think it is, as EM doesn't remove them for you), use sp_dropalias.
The stored procedures I mentioned above are documented in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George D. Lake" <NoSpam@.bla.com> wrote in message news:eJuY4$JJFHA.3340@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I hve been tring to delete a Login User form SQL 2000 and cant do it
> I go to Security, Logins, find the user, right click and delete.
> I then get a option that says "Removing this login will remove all associated database users
> (if any)".
> I say yes to that and then...
> Error 15174: Login 'XXXXXXX' is aliased or mapped to a user in one or more databases- Drop the
> user or alisas before dropping the login.
> Database name :DB1, DB2, DB, etc.
>
> How can I get past this!
>
> Thanks.
> George.
>

Delete a user. Please help

Hi,
I hve been tring to delete a Login User form SQL 2000 and cant do it
I go to Security, Logins, find the user, right click and delete.
I then get a option that says "Removing this login will remove all
associated database users (if any)".
I say yes to that and then...
Error 15174: Login 'XXXXXXX' is aliased or mapped to a user in one or
more databases- Drop the user or alisas before dropping the login.
Database name :DB1, DB2, DB·, etc.
How can I get past this!
Thanks.
George.Do what the error message say: Remove the users or aliases from the database as listed in the error
message.
If these are users, use sp_dropuser for if it is a SQL Server Login or sp_revokedbaccess if it is a
Windows Login.
If these are aliases (which i think it is, as EM doesn't remove them for you), use sp_dropalias.
The stored procedures I mentioned above are documented in Books Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George D. Lake" <NoSpam@.bla.com> wrote in message news:eJuY4$JJFHA.3340@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I hve been tring to delete a Login User form SQL 2000 and cant do it
> I go to Security, Logins, find the user, right click and delete.
> I then get a option that says "Removing this login will remove all associated database users
> (if any)".
> I say yes to that and then...
> Error 15174: Login 'XXXXXXX' is aliased or mapped to a user in one or more databases- Drop the
> user or alisas before dropping the login.
> Database name :DB1, DB2, DB·, etc.
>
> How can I get past this!
>
> Thanks.
> George.
>sql

Delete a user. Please help

Hi,
I hve been tring to delete a Login User form SQL 2000 and cant do it
I go to Security, Logins, find the user, right click and delete.
I then get a option that says "Removing this login will remove all
associated database users (if any)".
I say yes to that and then...
Error 15174: Login 'XXXXXXX' is aliased or mapped to a user in one or
more databases- Drop the user or alisas before dropping the login.
Database name :DB1, DB2, DB, etc.
How can I get past this!
Thanks.
George.Do what the error message say: Remove the users or aliases from the database
as listed in the error
message.
If these are users, use sp_dropuser for if it is a SQL Server Login or sp_re
vokedbaccess if it is a
Windows Login.
If these are aliases (which i think it is, as EM doesn't remove them for you
), use sp_dropalias.
The stored procedures I mentioned above are documented in Books Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George D. Lake" <NoSpam@.bla.com> wrote in message news:eJuY4$JJFHA.3340@.TK2MSFTNGP14.phx.gb
l...
> Hi,
> I hve been tring to delete a Login User form SQL 2000 and cant do it
> I go to Security, Logins, find the user, right click and delete.
> I then get a option that says "Removing this login will remove all asso
ciated database users
> (if any)".
> I say yes to that and then...
> Error 15174: Login 'XXXXXXX' is aliased or mapped to a user in one or m
ore databases- Drop the
> user or alisas before dropping the login.
> Database name :DB1, DB2, DB, etc.
>
> How can I get past this!
>
> Thanks.
> George.
>

delete a security group via the database

We have recently moved buildings at work and have gone from 2 domains to 1
domain. Now when i try and edit the security permission in the properties of
a report i get:
The user or group name 'carfax\domain users' is not recognized.
(rsUnknownUserName) Get Online Help
iis there any way to delete these at a database level or get round this at
all as i need to enable some of our users the functionality to subscribe to
reports and unless i can delete this it will be impossible to do.
Would i need to completely uninstall reporting services fix this problem?I am looking at scripting the deleting of this security group, would this be
the best way to go and could anyone give me any pointers?
Any help would be greatly appreciated
"Shaun Longhurst" wrote:
> We have recently moved buildings at work and have gone from 2 domains to 1
> domain. Now when i try and edit the security permission in the properties of
> a report i get:
> The user or group name 'carfax\domain users' is not recognized.
> (rsUnknownUserName) Get Online Help
> iis there any way to delete these at a database level or get round this at
> all as i need to enable some of our users the functionality to subscribe to
> reports and unless i can delete this it will be impossible to do.
> Would i need to completely uninstall reporting services fix this problem?
>|||I have also looked through the users and policy user role tables and cannot
find the invalid user anywhere.
Still pulling my hair out trying to sort this issue.
"Shaun Longhurst" wrote:
> I am looking at scripting the deleting of this security group, would this be
> the best way to go and could anyone give me any pointers?
>
> Any help would be greatly appreciated
>
> "Shaun Longhurst" wrote:
> > We have recently moved buildings at work and have gone from 2 domains to 1
> > domain. Now when i try and edit the security permission in the properties of
> > a report i get:
> >
> > The user or group name 'carfax\domain users' is not recognized.
> > (rsUnknownUserName) Get Online Help
> >
> > iis there any way to delete these at a database level or get round this at
> > all as i need to enable some of our users the functionality to subscribe to
> > reports and unless i can delete this it will be impossible to do.
> >
> > Would i need to completely uninstall reporting services fix this problem?
> >
> >

Sunday, February 19, 2012

Default value for a feild

I would like have the default value for a feild to be the result of a call to

System.Web.Security.

Membership.GeneratePassword(12,4)

How do I implement this?

In a trigger? Do you have sample code?

Thank you very much

Hi,

I think I know what you are asking, and my guess is thatyou may be trying to combine two parts of a solution into one. The default value for a column is a value set for every row in a table, until it is changed by entering another value. So that default value is stored in the database for each row, just as every other column value in the BD. The only difference is that a deafult value is inserted into place in that column row intersection when ever a new row is being entered. The rest of the column values for that row are entered at the time of the creation of that new row. when all the column values have been entered and there are no valiadtion problems, that new row is added to the DB as a transaction (so the complete row is entered - or not entered, as unit).

What your question seems to suggest, is that some value be dynamically selected or calculated, and that value entered into a row of data as a new row is being filled out for entry. That wouldn't be a default value in a DB, but could be a default value in the application that you use to access the DB to enter new data rows in the DB. Do you see the distinction? Onethe DB default value is there whenever and however a new row is added to the DB. The application default value is placed in position to be entered as a column value in a new row for the DB,by the application;as this is an ASP.Net forum, probably by an ASP.Net web app.

If what you want is that a column value in the database (that has just been entered via some application that is used to enter new rows into the DB), be changed (in the DB), whenever a new row of data is entered - and have that value drawn from a call or other source dynamically; then a trigger would be one way to do it. A trigger always works as the result of some specific action (such as the entry of a new row of data). Another way to do it would be to do the call as part of the application - rather than by the DBMS. You can write the app any way you want. You can have it show the value to the user doing the entry, or hide it, or even change whatever they enter to the dynamic value after they enter data, but before the DB is updated with the new row.

The most important thing is that you have clear in your mind what data you want stored in the DB, and which parts of the data entry process you want done in an application outside the DB, and what you want the database management system to take care of. Because data integrity is so important to most databases, there may be DB schema restrictions for data entry/removal/updates. Be very careful about selecting methodes that would circumvent those safegards. BRN..

|||

Please help with the following scenario:

A gridview has its datasource bound to an object datasource made of a list of blank data entities such as date, name, amount, etc... The user goes in the grid and enter data in each cell which is a texbox. Now, right after the first row is filled, how can data of that row be put in the next row and display as default data as the cursor moves into it? (All data entered will be submitted by a click of a button at the bottom of the page.) Thanks.