Friday, March 30, 2012
How to authorize a user only through an application
we use Windows Authentification with SQL Server 2005 but we want our users
to access to the database only with an application. We don't want our users
to access to the database with an other application.
What are the possibilities ? Does SQL Server recognize an application with a
signature or something like that ?
Thanks
Best regardsCheck in Books On Line about the use of an 'Application Role'.
An 'Application Role' is a special type of login that may work for your
situation.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Jojonews" <Jojonews@.discussions.microsoft.com> wrote in message
news:46345D65-7404-40EE-BECE-BED51AEC45B1@.microsoft.com...
> Hello,
> we use Windows Authentification with SQL Server 2005 but we want our users
> to access to the database only with an application. We don't want our
> users
> to access to the database with an other application.
> What are the possibilities ? Does SQL Server recognize an application with
> a
> signature or something like that ?
> Thanks
> Best regardssql
How to authenticate users using user login and password stored in SQL database?
Hi. I have a DetailsView with Bound Fields "Login" and "Password". This informations are stored in SQL database. How to solve such authorization? How to compare password stored in database against passowrd typed by user? Is this a good idea to use CustomValidator control to write some checking procedure?. Regards. Pawel.
When you click the login button. Perform a select query to your database that gets the password for the given loginname.
Then compare the two passwords.
Good luck!
Wednesday, March 28, 2012
How to assign values to a variable from a xls sheet?
I've got this query inside a Sql Task against a Excel connection and I'd like to insert that value into a user variable called "Proyecto". How do I such thing?
select Proyecto from [Carga$]
TIA,
I'm so sorry it's solved!!
I promise you that from now on I'll try not be so impatient..
How to assign user variable value to the Derived Column, in Data Flow Task
Hi:
In the derived column transformation editor, I have a Derived column name called FileGroupID. I would like to pass in a value for this column from a variable that I have set earlier in the scope. Can someone let me know, how to write the expression that does that and where do I specifiy that expression. I am thinking its the expression field in the derived column transformation editor. My main question is how to actually write the expression, what is the syntax to pull the variable value? Thanks.
MA2005
@.[User::YourVariableName]
Actually from the top left side you can expand the variables folder and drag-and-dorp it on the expression field; so you avoid the typing.
how to assign the view to a user?
i dont know how to assign the view to a user in the database using Enterprise manager.
pls help me, im really needing a answer.
thanks!
What do you mean by assign a view to a user, do you just want to grant him Select permissions on the view, or do you want the user to be the owner of the view ?
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||i want the user to be the owner of the view
pls, step by step.
thanks.|||
sp_changeobjectOwner 'dbo.MyTable', 'Scott' -- this will grant ownership of the object to a user named 'Scott'
Check out my SQL Server 2005 Video Tutorials: http://www.learnsqlserver.com/
|||But you should be aware that sp_changeobjectowner is for SQL 2000 only. It is still existing for SQL 2k5 but should not be used anymore in SQL2k5. Use the other options mentioned in the BOL (look in the entry sp_changeobjectowner)HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
How to assign roles to a user on reporting server through Web Service MEthod
I am using the Web service of SSRS to assign the roles for a user that exists on that reporting server machine.
I am using the followng code to do this.
Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetPolicies(@."/",p);
The same I have tried with SetSystemPolicy method also.
Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetSystemPolicies(p);
I have used the above codes in achieving the mapping between the SSRS role and the windows local user. Getting error on this.
Vikas
The code looks good to me. What kind of error did you get? There might be a couple of reasons for failing:
1. you do not have permission to perform this action
2. Role can be managed by user, "Content Manager" is a pre-defined role out of box. But it may have been deleted. You have to make sure the role exists. ListRoles soap APIs can get you the available roles.
3. There is already a policy associated with the same user.
...
|||There is only one issue i see...
p[0].Roles = R;
Before calling SetPolicies.
How to assign roles to a user on reporting server through Web Service MEthod
I am using the Web service of SSRS to assign the roles for a user that exists on that reporting server machine.
I am using the followng code to do this.
Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetPolicies(@."/",p);
The same I have tried with SetSystemPolicy method also.
Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetSystemPolicies(p);
I have used the above codes in achieving the mapping between the SSRS role and the windows local user. Getting error on this.
Vikas
The code looks good to me. What kind of error did you get? There might be a couple of reasons for failing:
1. you do not have permission to perform this action
2. Role can be managed by user, "Content Manager" is a pre-defined role out of box. But it may have been deleted. You have to make sure the role exists. ListRoles soap APIs can get you the available roles.
3. There is already a policy associated with the same user.
...
|||There is only one issue i see...
p[0].Roles = R;
Before calling SetPolicies.
Monday, March 26, 2012
How to alter the transaction logfile size in MSDE 2000?
I recently saw that the transaction log files of user dbs grow undefinitely in SQL Server 2000 - one of our customers had a 11 GB log file which totally slowed down the server.
Another customer of ours uses one of my applications logging all actions in a MSDE database file and I fear that the corresponding transaction log file will grow and block the system too - is there any way that I could shrink and set the max size of the transaction log file through SQL?
I already know the command "SHRINK FILE ('filename')" but I haven't found a SQL command to set the max size.
Thank you for any hints!
SaschaTo set the growth, UOM for increment, increment value, allocated size, and max sizeeeee, you need to use ALTER DATABASE. However, the claim that the size of the log file slows down the server or even "block" it is somewhat strange. I've never heard of the size of the log file having such detremental effect on the system. Anyone has other opinion?|||hi rdjabarov,
thank you for your comment. How should the ALTER DATABASE command look like? It's not a part of the standard SQL command, that's why I haven't found any documentation in standard SQL books.
The server slowed down because there were only 180 kb free space on the drive and windows needs some space for swapping, running other programs and other stuff.
I'll try to see if I can get some info on ALTER DATABASE with MS SQL Server.|||Now THAT (!!!) is a different story! In other words, your db is on the verge of becoming Suspect. BTW, your OS doesn't need any more room for swap file, unless you're bogging down the memory as well.
BOL (ALTER DATABASE syntax):
MODIFY FILE
Specifies the given file that should be modified, including the FILENAME, SIZE, FILEGROWTH, and MAXSIZE options.
Friday, March 23, 2012
How to allow use to exec xp_sendmail
The last part of the stored proc sends an email if certain conditions are met.
It appears that users do not have permission to execute xp_sendmail. I guess this is because it is executed on the master database. Is there a way I can give them permission to this stored proc?
The users are getting this message:
EXECUTE permission denied on bject 'xp_sendmail', 'database master', owner 'dbo'.(#229)You can grant a user to execute xp_sendmail by going to properties of xp_sendmail in master database and grant the user permission to execute.
How to allow normal user (not Administrator) deployment of SSAS Cube?
how to allow normal user (not Administrator) deployment of SSAS Cube? It says always that normal user cannot create new objects.
Andrey.
In order to create a database you need to be an Analysis Server admin.
In order to create cubes, dimensions, partitions you need to be database administrator.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
If you want your user to work with a BI project (that he will edit in Visual Studio and then deploy), these are the things to do:
- you need to create the database yourself (empty database) as server admin
- you need to give user admin rights for the database (using SQL Management Studio, create a Role)
- then user can deploy the BI project. Important: his project needs to contain the Role definition specifying him as admin (otherwise when he deploys the project, he will cut his access). To ensure you have the Role definition, you could initially create the BI project out of the live empty database (from VS, chose New Project, Import Analysis Services 9.0 Database wizard; then make sure that the newly create BI project specifies in its properties your database name).
Adrian Dumitrascu.
|||I created a Cube from my DataWarehouse.
Under Administrator account I can deploy the Cube and everything is fine.
Then I want to allow normal user (programmer) to develop and deploy it in Business Intelligence Development Studio. This user has no Administrator rights.
So, I receive something like "User _xxx_ has no rights to change _yyy_-objects or an object does not exist" (my translation from German).
Granting user all rights to the DataWarehouse, creating Role in SQL Management Studio for DataWarehouse does not help. What really helps: creating Administrator Role for user in SSAS project and deploying project to Analysis Service under Administrator! So, this role will be uploaded to the service. After this, service recognizes user as an Administrator!
If you try to deploy project for the first time under user, then the role will not be uploaded (no rights). If you try to create role in SQL Management Studio instead of in BI project, then user will update service, remove role from service (since there is no role in project) and after this will be non-recognizeable.
It is possible also to create role in SQL Management Studio and then identical role in BI project. And then user can deploy.
Thanks for help! It gave a clue :)
how to Allow Multiple access to data base over network
access the data base at a time on the newtork, If more than one user
try accessing the database, it will frezee until the first to grab the
data base logs out. Please how do I solve this problem. I have sql 2000
enterprise edition running on the server.
Regards
Agboola.1default wrote:
> Hello All, I have a running/ woking database, but only one user can
> access the data base at a time on the newtork, If more than one user
> try accessing the database, it will frezee until the first to grab the
> data base logs out. Please how do I solve this problem. I have sql 2000
> enterprise edition running on the server.
> Regards
> Agboola.
>
First, check the database properties to make sure it's not in
Single-User mode. However, that doesn't sound like your problem.
What exactly freezes up? It sounds like your first user is doing
something that is blocking other users. You can confirm that by
querying the sysprocesses table in the master database, or by issuing
the command 'sp_who2' in Query Analyzer.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Looks like you have the database in restricted or single user mode. But you
should receive messages like these, instead of freezing the session:
Database 'Northwind' is already open and can only have one user at a time.
Database 'Northwind' is in restricted mode. Only the database owner and
members of the dbcreator and sysadmin roles can access it.
Try this first: Using Enterprise Manager, right-click your database,
Properties, select the Options tab and make sure the Restrict access option
is not checked.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"1default" wrote:
> Hello All, I have a running/ woking database, but only one user can
> access the data base at a time on the newtork, If more than one user
> try accessing the database, it will frezee until the first to grab the
> data base logs out. Please how do I solve this problem. I have sql 2000
> enterprise edition running on the server.
> Regards
> Agboola.
>
how to Allow Multiple access to data base over network
access the data base at a time on the newtork, If more than one user
try accessing the database, it will frezee until the first to grab the
data base logs out. Please how do I solve this problem. I have sql 2000
enterprise edition running on the server.
Regards
Agboola.1default wrote:
> Hello All, I have a running/ woking database, but only one user can
> access the data base at a time on the newtork, If more than one user
> try accessing the database, it will frezee until the first to grab the
> data base logs out. Please how do I solve this problem. I have sql 2000
> enterprise edition running on the server.
> Regards
> Agboola.
>
First, check the database properties to make sure it's not in
Single-User mode. However, that doesn't sound like your problem.
What exactly freezes up? It sounds like your first user is doing
something that is blocking other users. You can confirm that by
querying the sysprocesses table in the master database, or by issuing
the command 'sp_who2' in Query Analyzer.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Looks like you have the database in restricted or single user mode. But you
should receive messages like these, instead of freezing the session:
Database 'Northwind' is already open and can only have one user at a time.
Database 'Northwind' is in restricted mode. Only the database owner and
members of the dbcreator and sysadmin roles can access it.
Try this first: Using Enterprise Manager, right-click your database,
Properties, select the Options tab and make sure the Restrict access option
is not checked.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"1default" wrote:
> Hello All, I have a running/ woking database, but only one user can
> access the data base at a time on the newtork, If more than one user
> try accessing the database, it will frezee until the first to grab the
> data base logs out. Please how do I solve this problem. I have sql 2000
> enterprise edition running on the server.
> Regards
> Agboola.
>
How to allow FULLTEXT SEARCH INDEXING to non-admin user?
Currently although with admin account, I can create FullText Catalogs but I have to provide the permissions to build & populate catalogs to some user, so that he can use FullText Search on his tables.
Please Help
Cheers
LuckyHelllooooo.....does anyone know abt it?sql
How to allow FULLTEXT SEARCH INDEXING to non-admin user (in MSSQL 2000)?
I've tried searching a lot on the net but am not able to find out how to allow a user (not admin/owner) to be able to create & populate the FullText Indexing Catalogs on the tables he creates (in MSSQL 2000) .
Currently although with admin account, I can create FullText Catalogs but I have to provide the permissions to build & populate catalogs to some user, so that he can use FullText Search on his tables.
Please Help.
I'm not very experienced in using SQL, so if you can give a bit of explaination also then it would be really helpfull :-)
Cheers :-)
Hey
So no one knows abt it?
Although the user has been given db_owner but in Sql Server Enterprise Manager it shows FullText Service with a red Flag (Stopped) & when i try to start it, then it shows the following error --
"An error 1722- (The RPC server is unavailable) occurred while performing this service operation on the MSSearch service."
But logging with admin a/c it shows green Flag (started FullText Service)
Also does activating RPC service have any security issues.
Thanks :-)
Wednesday, March 21, 2012
How to allow FULLTEXT SEARCH INDEXING to non-admin user (in MSSQL 2000)?
I've tried searching a lot on the net but am not able to find out how to allow a user (not admin/owner) to be able to create & populate the FullText Indexing Catalogs on the tables he creates (in MSSQL 2000) .
Currently although with admin account, I can create FullText Catalogs but I have to provide the permissions to build & populate catalogs to some user, so that he can use FullText Search on his tables.
Please Help.
I'm not very experienced in using SQL, so if you can give a bit of explaination also then it would be really helpfull :-)
Cheers :-)
Hey
So no one knows abt it?
Although the user has been given db_owner but in Sql Server Enterprise Manager it shows FullText Service with a red Flag (Stopped) & when i try to start it, then it shows the following error --
"An error 1722- (The RPC server is unavailable) occurred while performing this service operation on the MSSearch service."
But logging with admin a/c it shows green Flag (started FullText Service)
Also does activating RPC service have any security issues.
Thanks :-)
How to allow FULLTEXT SEARCH INDEXING to non-admin user (in MSSQL 2000)?
I've tried searching a lot on the net but am not able to find out how to allow a user (not admin/owner) to be able to create & populate the FullText Indexing Catalogs on the tables he creates (in MSSQL 2000) .
Currently although with admin account, I can create FullText Catalogs but I have to provide the permissions to build & populate catalogs to some user, so that he can use FullText Search on his tables.
Please Help.
I'm not very experienced in using SQL, so if you can give a bit of explaination also then it would be really helpfull :-)
Cheers :-)
Hey
So no one knows abt it?
Although the user has been given db_owner but in Sql Server Enterprise Manager it shows FullText Service with a red Flag (Stopped) & when i try to start it, then it shows the following error --
"An error 1722- (The RPC server is unavailable) occurred while performing this service operation on the MSSearch service."
But logging with admin a/c it shows green Flag (started FullText Service)
Also does activating RPC service have any security issues.
Thanks :-)
How to allow FULLTEXT SEARCH INDEXING to non-admin user (in MSSQL 2000)?
I've tried searching a lot on the net but am not able to find out how to allow a user (not admin/owner) to be able to create & populate the FullText Indexing Catalogs on the tables he creates (in MSSQL 2000) .
Currently although with admin account, I can create FullText Catalogs but I have to provide the permissions to build & populate catalogs to some user, so that he can use FullText Search on his tables.
Please Help.
I'm not very experienced in using SQL, so if you can give a bit of explaination also then it would be really helpfull :-)
Cheers :-)
Hey
So no one knows abt it?
Although the user has been given db_owner but in Sql Server Enterprise Manager it shows FullText Service with a red Flag (Stopped) & when i try to start it, then it shows the following error --
"An error 1722- (The RPC server is unavailable) occurred while performing this service operation on the MSSearch service."
But logging with admin a/c it shows green Flag (started FullText Service)
Also does activating RPC service have any security issues.
Thanks :-)
how to allow anonymous login to rep services on local machine ?
I cant seem to allow reporting services on 2003 SBS to accept anonymous
logon (i.e im always prompted for user/pass from windows).
I added EVERYONE and ANONYMOUS LOGON with full control to INETPUB and
C:\program files\Microsoft SQL server dirs and made sure these settings
replaced all child dirs security i.e cascaded down.
Its a stand alone machine for demos so im not worried about security.
Can someone help ?
Thanks
Scottok sorted it using the IIS dir security options.
scott
Monday, March 19, 2012
How to add sql login to a database user? e.g. after restoring database with users from oth
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
Andrew J. Kelly
SQL Server MVP
"Ales Baranek" <baranek@.extranet.cz> wrote in message
news:erckFDsRDHA.2252@.TK2MSFTNGP12.phx.gbl...
>
How to add same user to diff DBs on diff Servers?
how to add same user to diff DBs on diff Servers?
something like this,
EXEC sp_adduser 'xxxxx'--add user to server1.DB1
EXEC server2.master.dbo. sp_adduser 'xxxxx'--add user to server2.DB2
or other ways?
Thanks.Since SQL Server uses logins at the server level and users at the database
level probably you would need to add the logins first. You can use the
Transfer Logins DTS Task or simply use Enterprise Manager/Management Studio.
This would add the login at the server level.
To add the user, just select the login name on 'Security, Logins',
right-click and select Properties. On the Database Access tab, select the
database and database roles.
Giving exactly the right permissions as the original database would require
scripting the original database.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"hh" wrote:
> Does anybody know,
> how to add same user to diff DBs on diff Servers?
> something like this,
> EXEC sp_adduser 'xxxxx'--add user to server1.DB1
> EXEC server2.master.dbo. sp_adduser 'xxxxx'--add user to server2.DB2
> or other ways?
> Thanks.|||Thanks Ben.
"Ben Nevarez" wrote:
> Since SQL Server uses logins at the server level and users at the database
> level probably you would need to add the logins first. You can use the
> Transfer Logins DTS Task or simply use Enterprise Manager/Management Studi
o.
> This would add the login at the server level.
> To add the user, just select the login name on 'Security, Logins',
> right-click and select Properties. On the Database Access tab, select the
> database and database roles.
> Giving exactly the right permissions as the original database would requir
e
> scripting the original database.
> Hope this helps,
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "hh" wrote:
>