Change The Active User In Sp

Mar 19, 2004

Hello,
I would like to change the active user in a stored procedure
Ex. :
I'm logged on sql as "userA".
I call the stored procedure "spGetInfo".
In the first line of "spGetInfo" I would like to do something like "su poweruser", query some data and do "su system_user"

Is there anything like the unix "su" command in SQL ?

Thank a lot

Felix Pageau
fpageau@SPAMSUCK.str.ca

View 6 Replies


ADVERTISEMENT

Show User Groups Associated With User ID Report From Active Directory

Jan 11, 2008



Hello. I am trying to write a report that pulls information in from Active Directory. I have a view created that gets a listing of users and a view that creates a listing of user groups, but I can't seem to figure out how to get all user groups that are associated with the users. This is what I have.



SELECT TOP 100 PERCENT *
FROM OPENQUERY(ADSI, 'SELECT cn, groupMembershipSAM FROM ''LDAP://wmdomain.local'' WHERE objectcategory=''group''') Rowset_1



SELECT *
FROM OPENQUERY(ADSI,
'SELECT title, displayName, sAMAccountName, givenName, telephoneNumber, facsimileTelephoneNumber, sn
FROM ''LDAP://wmdomain.local''
WHERE objectCategory = ''Person'' AND objectClass = ''user''')
Rowset_1



Let me know if you have any suggestions!



BJ

View 1 Replies View Related

Change The Username In Active Directory

Jul 18, 2007

We use extended properties of Active Directory to filter the data in reporting services throw a web services. We send the userid (User!UserId) to the webservices and retrieve some information about the user.
But if we change the name of one user (rename not recreate), he lost all this properties. When try to execute a report show an error:


Parameter validation failed. It is not possible to provide valid values for all parameters. (rsParameterError) I know this issue is in the border of reporting services, but we have spent a lot of time without results and we need any help.

Thanks in advance

View 3 Replies View Related

Change Display Message When Else Is 0 To Show (Non Active Member)

Feb 11, 2015

I want to change the display message when else is 0 to show "non active member", how to edit this query for this result .

---------------------------------------------------------------
Current Query

cast(sum(case when trx_date > dateadd(month, -3, getdate()) then 1 else 0 end) as varchar(10))+ ' Active Member := '+ user_member
---------------------------------------------------------------

I try this query but not work and prompt error.

cast(sum(case when trx_date > dateadd(month, -3, getdate()) then 1 else "non active" end) as varchar(10))+ ' Active Member := '+ user_member
----------------------------------------------------------------

View 1 Replies View Related

How To Capture First && Last Active Connection Per User?

Jun 2, 2003

Any suggestions on how to create a report to show when someone first connected to SQL Server and when they last processed anything on SQL Server?

I wrote a query to check sysprocesses every 10 minutes, but it only reports that the person has a connection. It does not tell me if the connection is active. I thought I may need to look at processor and disk to see if those numbers change, but I'm not sure if that is the best approach. Any thoughts?

Thanks, Dave

View 4 Replies View Related

Is It Possible To Use T-SQL To Create A User In Active Directory?

Jan 9, 2006

Is it possible to use T-SQL to create a user in Active Directory?

View 7 Replies View Related

User Name And Email Address From Active Directory

Jun 26, 2007

I would like to use ISS to extract the user name and email address out of the active directory. I would like to put it in an MS-SQL 2005 table that I can use stored procedures on. I am hoping I can use a query to do it but I understand there is a 1000 entry limit on the extraction of the Active Directory and I have more than 1000. Could someone point me in the right direction please. Thanks.

View 1 Replies View Related

T-SQL (SS2K8) :: Checking User Active Directory Group

Jul 17, 2014

Is it possible to check for Active Directory group.. ie see if the user running the Stored Proc, is in a specific Active Directory Group? Or if I set up Login's using Active Directory, can I get the Login that way... or will it give me the user's account?

View 6 Replies View Related

Cannot Re-establish A User That Is Deleted And Readded To Active Directory In Reporting Services

Sep 14, 2006






The permissions granted to user 'xxxxyyy' are insufficient for performing this operation. When a user is deleted and then readded to active directory. Reporting services returns the insufficient permissions granted error. In dbo.users in the sql database there are 2 entries for the deleted user one with UserType 0 and another with UserType 1. How do you clean up reporting services or sql to allow the reciently re-added user to re-connect to reporting services. We use the MY-Reports option of reporting services but cannot delete the home directory for this user either in report Mgr. The same error is returned for this action.

View 1 Replies View Related

How To Determine If The Logged On User Is A Member Of An Active Directory Security Group?

Aug 7, 2007



We are using Windows authenication within our system, and I was wondering how it would be possible to determine if the user conected to the SQL SERVER instance was a member of a particular active directory security group?

Thanks.

View 3 Replies View Related

SQL Server 2012 :: Query To Count How Many Sessions Are Active And Remain Active Per Hour

Jan 22, 2015

I have a table with the following columns employeeSessionID, OpDate, OpHour, sessionStartTime, sessionCloseTime. I need to see how many users remain active per hour. I can calculate how many logged in per hour, but I am stumped on how to count how many are active per hour. I have a single table that stores login data. I have created a query that pulls out the only the data needed from the table into a temp table using this query. Also note it is possible that the sessionCloseTime is null if the device has not been logged out this would need to be counted a active.

TABLE NAME #empSessionLog Contains the time stamp data OpDate, sessionStartTime and sessionCloseTime.
OpDatesessionStartTimesessionCloseTime
2015-01-202015-01-20 14:32:59.1302015-01-20 14:33:14.6299166
2015-01-202015-01-20 06:58:33.7302015-01-20 15:27:16.9133442
2015-01-202015-01-20 09:56:22.8402015-01-20 17:56:29.7555853
2015-01-202015-01-20 05:59:18.6132015-01-20 14:05:19.0426707

[code]....

can see how many sessions logged in per hour with the following statement:

SELECT
opDate,
FORMAT(DATEPART(HOUR, sessionStartTime), '00') AS opHour,
Count(*) AS Total
FROM #empSessionLog
Group BY opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00')
Order BY opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00') ASCResults:
opDateopHourTotal
2015-01-20041

[code]....

Where I am stuck is how do I count the sessions that remain active per hour until the session is closed with the sessionCloseTime.

View 5 Replies View Related

There Is Not Enough Disk Space Error While Installing SQL In A Active/Active/Passive Cluster

Mar 5, 2008



Hi

I am having some teething problems while installing SQL on a 3 node cluster. Within the Cluster configuration I have 3 Cluster Groups with each of them having their associated disk resources. All these disk resources physically exist on a SAN.

The actual cluster is running absolutely fine and I can access all the disks from their respective owner node. The problem only starts when I start installing SQL Server 2005 on this cluster. I specify the Cluster group from the Cluster Group Selection and choose the desired partition and then the error message pops up

"There is not enough diskspace on the destination disk for the current SQL Server data files. To proceed, free up disk space to make room for data files, or install the data files to a different drive"

But the disk I am trying to install it on is 264Gb and none of it is used. I have also tried to change it to a different disk within the same Cluster group but to no avail. I have even tried to install it in a different cluster group all together but I get the same error message.

I have googled around havent found anything so far. The disks have got full permissions for the account I am installing SQL with.

Any help will be much appreciated.


Regards

Adnan

View 5 Replies View Related

CHANGE OF USER NAME

Sep 24, 2007

Hi Friends,

I want to change my USER NAME of the USER.

CHANGE THE OWNER SHIP Of the user 'shiv' - 'kumar'

what is command of that one OR GUI how can i change plz explain me

Meti BEST OF THE BEST

View 3 Replies View Related

Active/Active SQL Server Clustering With Multiple Instances

May 12, 2008

Hi

I am newbie in SQL Clustering. I have set up a Windows Server Cluster with 2 nodes and am having the following problem with Physical Disk resource for cluster groups:

My Default Cluster Group (named Cluster Group) has IP Address, Network Name, Physical Disk and MSDTC resources. In addition to that my Default SQL Server instance resources are also in this group. I had this initial set up for Active/Passive mode.

Now I am trying to set up a SQL Cluster in Active/Active mode. For this I have to install another instance of SQL Server in the existing cluster and make a separate cluster group for its resources. I made a new cluster group (SQL Instance Group) with an IP Address and a Network Name resource for this new instance but I dont have any Physical Disk resource to allocate to it. As such while installing the SQL Server Instance I get stuck when I'm asked to select the quorum disk to be used.

Is it possible to configure two quorum disks, one for each group?
What's the concept of dedicated disks resource for each sql instance in a group? Is this same as the quorum disk? If this is not a shared disk how do I configure a dedicated disk resource for my second cluster group (SQL Instance Group)?

Anyone could please help me out with this?

View 12 Replies View Related

Are There Any Issues With An Active/Active Cluster With A Remote Mirror For DRP

Nov 30, 2006

Hi folks,

We are going thru the process of scoping an active/active cluster at one site.
I was wondering whether there will be any issues with mirroring (DB by DB) off the cluster into non clustered server at an alternate DRP site.

Regards, Brian
Sutherland

View 1 Replies View Related

Install Active Active Sql 2005 2 Node Cluster

Mar 12, 2008




Hi all, My aim to install active/active 2 node SQL 2005 cluster. I have installed sql cluster on one mode, which automatically installed on node 2.

it works great. However When i tried to install second virtual server, it is not allowing me to install.

it says already install, can anyone tell me how to install active active cluster

View 1 Replies View Related

How To Change The User Name And Password

Sep 30, 2006

Hello

I newly installed SQL Server 2005 .I did not mention any username and password during installation.But now i want to specify one.Can you tell me how to do so .My Operating System is WindowsXp.

Thanks In Advance
Poornima

View 2 Replies View Related

Active/active Sql Server Config; Shared Dbs

Nov 2, 1999

Hi,

We are trying to set up an active/active configuration of a SQL Server
cluster, and we had a few questions.

Initially, we want to have 2 Database Servers that would share the same
Database (both reading/writing to the same tables).
However, from reading the MS docs, we find out that we can have what
they call an "active/active" configuration using a Cluster but they
need to have 2 different disk sets, i.e. having 2 separate databases.
If this assumption is correct, how does the data get synchronised
between the 2 databases (that are on the 2 different disks sets)?

Can anyone help? thanks
Axel

View 1 Replies View Related

ACTIVE/ACTIVE SQL Server 2000 Cluster

Oct 12, 2002

ACTIVE/ACTIVE SQL Server 2000 Cluster

This was my plan.

Physical box - box1,box2
virtual box - virtual1

i have a active/passive cluster virtual1 (primary node box1, secondary box2)

I am creating another virtual box on box2 as primary node by name virtual2)

whenever my installation setup runs my default server name is greyed out. it always requires a instance name.

Is that the way it should work?

i can only use instance for active/active failover?

please advice

View 1 Replies View Related

MSDTC In Active/Active MSCS Cluster

Jun 29, 2004

How do I install MSDTC in an active/active MSCS cluster environment?
If I run comclust.exe, I can only activate MSDTC on one of the nodes at a time.

I need DTC on both nodes.

(Opsys is W2K with SQL 2000)


//Mange :)

View 2 Replies View Related

Active/Active SQL Server Cluster And OLTP

Sep 27, 2005

Hello folks,

have you ever heard of an Active/Active SQL Sever 2000 Cluster deployed in a pure OLTP environment?

Some 8 years ago I have learned about a bespoke solution for the SAP ERP system (not the BW!) with DB2 Parallel Server for a huge German company. Then again, I would expect that Oracle RAC might fit into an OLTP environment, although I never heard about a real world implementation.

All this led me to believe clustering is good for failover purposes, and for decision support services, not quite for OLTP applications.

So if you see a point in Active/Active Clustering and OLTP please come forward and explain.

Cheers,

Johann

P.S: For those of you who want to know: Consultants from www.hiltes.com want us to deploy an Active/Active Cluster for their Fashion 3000 Net stock software.

View 6 Replies View Related

SQL 2000 Active/active Cluster And Different IP Adresses

Mar 22, 2007

We run several SQL 2000 SP4 instances on IA64 active/active cluster. The OS we run with is Windows Server 2003 SP1. We have different network cards : 2 network cards teamed for production purposes in domain X and 1 network card dedicated for problem solving in domain Y.
First we configured the cluster with only the 2 teamed network cards for production purposes in domain X. Later we introduced the second network card for problem solving in domain Y.
Everything looks fine. The (virtual) SQL instance listens on two different IP adresses on TCP port 1034. If we try to make connection via isql, EM or Query analyzer than we can directly contact the SQL instance from a workstation/server within domain X but this doesn't work form a workstation/server within domain Y. However if we use the specific TCP port in the connection in domain Y the connection is setup. We wish however not to use explicit TCP ports in setting up connections.
Has anyone experienced the same problem before or has anyone an idea how to solve the problem?

View 1 Replies View Related

Applying SP To 2005 Active/active Cluster

Jun 8, 2007

I have a 2005 active/active cluster and want to apply SQL server 2005 SP2 to both node.
I know that for active/passive , the sp can simple be installed on the active node(instance) and everything will be replicated to the other node.
bear in mind what I have SSIS and SSAS and SSRS running on the active/active cluster.

what is the rigth method for applying the SP to activeactive cluster?

Thanks

View 1 Replies View Related

How To Change The User Account And Password

May 23, 2008

HI,

I m swagatika and working on a s/w company.I am facing some problem in MS SqlServer2005.

my problem is:-

i installed sql server2005 completely .At the install time , i set the username='xyz' and password=blank (windows authentication mode).

Now i want to change my user account to 'sa' and password to blank.

After installation,how to change the user account and password.

Please can anybody help me ?

View 3 Replies View Related

Can't Change Sql Login User's Password

Jan 13, 2006

SQL Server 2005 Express will not allow me to change the password for my login user. I tried deleting the user and re-creating the user. Another password is being put in although the password I put in was accepted. I even test to see what would happen if I left the password blank. It got accepted. But when I look at the password for my login user again, a different and much longer password was put in. I even tried this T-SQL statement:

CREATE LOGIN <loginname> WITH PASSWORD='<passwordname>', CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF

I am out of ideals. Is this a bug?

View 5 Replies View Related

Change The Number Of User Propertie

Feb 28, 2008

Hi,

I'm new in all this, I have sql server 2005 and have a problem I need let access to more users to the database, in the properties page of my DB I hava a Number of user field with 5, how can change this to up number?

I hope can help me.

View 1 Replies View Related

Visible Parameters That User Cannot Change

Mar 17, 2008

I have a report that I want users to navigate to and I want them to see the parameters of the report, but I don't want them to be able to change them. Is this possible?

View 3 Replies View Related

Change Owner User Defined Datatype

Jan 12, 2006

Hello, We had a developer that created some user defined data types. He is no longer with our company and we want to change owner of those user defined data types so we will be able to delete his UUID. Is their a way to change the owner of the user defined data types from his ID to dbo. I don't see a way to change them with sp_changeobjectowner



Thanks in advance
Jef Wain

View 3 Replies View Related

Domain Change (User Logins Broken)

Jan 22, 2008

Is there a way to change a logins based on domain users, we just changed domains so all the domainlogin logins are not working anymore. Do I have to reapply every security on every database object? There has to be a fix for this, its a common thing.

Any help is greatly appreciated, everything i googled applied to SQL Server 2000 and system tables that dont exist in 2005

View 3 Replies View Related

Newbie Question: Change Login Name Of Dbo User

Jun 22, 2006

My database has a user "dbo" which is dbo of all database objects. The login name for this user is e.g. "Login1". Now I need to change the login name for user "dbo" from "Login1" to a new login name "Login2".

It is not possible to change the related login name of the user "dbo" in the user's properties dialog. And it is also not possible to change or remove the dbo relation in the login name's properties dialog (because a dbo user can not be removed).

Is there any possibility to change the login name of an dbo user? How can I do it?

View 4 Replies View Related

How Can A User Change Password In SQL2005 Via TSQL?

Mar 30, 2007

I have an application that controls user logins, passwords, etc. at the front end for a SQL database. I am in the stage of migrating to SQL2005 and cannot get the TSQL code to allow a user to change their own password. Here's the background;



The ADMIN of the app is a Sysadmin on the SQL server and can create logins, set roles, etc. Assume the Admin creates a user TOM with a password of xxxx. This works fine using the create login statement from a Connect.Execute statement from my app like so;



"Create Login 'TOM' With Password 'xxxx', Default_Database = 'myDB', Check_Policy = OFF"



TOM will be setup with db roles as well



When TOM logins into my app, he will have to change his password at some point. The TSQL code I am using (which fails) is executed by TOM who has a connection to the SQL db because he is logged into the app.



"Alter Login TOM With Password = 'xxxx' Old_Password = 'xxxxx', Check_Policy = OFF"



At this point I get an error:


RunTime error -2147217900 (80040e14)
ODBC SQL Server Driver][SQL Server] Cannot alter
the login 'TOM', becuase it does not exist or you do
not have permission.

Obviously it exists since TOM is currently logged into the SQL Server. So if it's permissions related, what permissions does a user need to change his/her password? Or is there another way to do it?

Thanks in advance for your help.

CH


View 7 Replies View Related

How To Change What LOGIN Is Mapped To A Db USER (windows Not SQL)

Aug 17, 2007



Is there a form of ALTER USER or other option that would allow me to change the Windows-based login associated with a user account?

According to BOL, I cannot use the sp_change_users_login trick since I want to rewire up to a Windows login, not a SQL Server login.

-- Margo

View 1 Replies View Related

Change The User Interface Language Of The Sql Server 2005

Feb 22, 2008

Hi.,Can any one help me,  how to change the interface language of the sql server 2005??? Thanks 

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved