Sp_helpuser , Active Usernames For Database Question
Jan 31, 2000
If sp_helpuser showed some Username with (null) LoginName, I believe these must be some obsolete username defined in the database before ,can I have them cleaned up , anyone has this experience ?
Also, I was able to find out from sp_who, or select * from sysprocesses the active login id to the system, is there quick way ,stored procedure etc to find out the usernames for the current active session for a particular database ?? I don't think these usernames are shown up in the current activity under EM..
Anthony
View 1 Replies
ADVERTISEMENT
Mar 25, 2008
Hello,
I am writing a SP, inside the SP i have a select statement.
I also have another SP, when i run it, it sends a list back with all the users that are currently online.
Now in my first SP, i want to construct a select statement that returns a users data, but only for the users that are online.
This is the first SP (GetAllOnlineUsers), that produces a list with users online (just abit rewritten from the membership function total users online):
SELECT u.Username FROM dbo.aspnet_Users u(NOLOCK), dbo.aspnet_Applications a(NOLOCK), dbo.aspnet_Membership m(NOLOCK) WHERE u.ApplicationId = a.ApplicationId AND LastActivityDate > @DateActive AND a.LoweredApplicationName = LOWER(@ApplicationName) AND u.UserId = m.UserId
This is my second SP, in witch i want to get the online users data:
SELECT m.username, d.data1, d.data2 FROM m.userstable INNER JOIN data ON (data.username = m.username) WHERE (m.username IN (EXEC GetAllOnlineUsers))
Is it possible to exec a SP into a select statement?
View 3 Replies
View Related
Mar 15, 2006
i have been reading many asp.net books
where is a good place to hold user name and password while the user is on your side in a cookie or applicaion user variable?
and if the user closes the navigator..what command removes the log in information ?
View 1 Replies
View Related
Jul 20, 2005
Hi all,I want to create a stored procedure which will extract the "GroupName"from the record returned by "sp_helpuser". In order to do this I needto execute "sp_helpuser" which returns the entire record. I want tojust extract the "GroupName" from the record and return it to myapplication. How do I go about this?Thanks in advance,Alvin
View 4 Replies
View Related
Sep 11, 2007
I am working on creating a configuration database. This will connect to many databases on many different servers. What I would like to do is run sp_MSForEachDB then store the name of the current server and database the package is connected to. Then add both of these into a column before running sp_helpuser. I don't know how confusing this is, but I think I may have the code worked out pretty well. If you have any questions, please post them and I will try to answer as best as I can. What I would like the ending result to look like is...
<server1> <database1> <userID1> <datareader>
<server1> <database1> <userID1> <datawriter>
<server1> <database1> <userID2> <datawriter>
<server1> <database2> <userID1> <datawriter>
I am at a loss, and I can't use the sys.<table> tables because it has to be backward compatible. Thanks for any help in advance.
View 1 Replies
View Related
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
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
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
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
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
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
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
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
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
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
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
Mar 14, 2008
HOW DO WE CHECK ACTIVE SQL SERVER DATABASE?
Please advice!
View 4 Replies
View Related
Jun 12, 2006
How can I determine if everyone has logged off of the SQL Express database, ie, no one else is connected.
I need to clean up some files that are generated in my code, but I only want to do that when everyone has logged off the database?
In MS Access, I could try to re-open the MDB file exclusively.
Is there a connection number etc?
View 3 Replies
View Related
Dec 28, 2007
I work for a company that uses a Microsoft Access database to do everything. Information is constantly being inserted and updated. I am looking for a way to replicate or mirror the database so that I can have a real time backup. Is there any way to do this?
(I have to use an .mdb file or else the host program will not work properly.)
View 1 Replies
View Related
Jan 9, 2008
Why in the hell doesn't SQL Server provide a facility for dropping anactive connection on an attached database in SQL Server Managementconsole? I can't detach an attached database because apparently thereis an active connection.I know you can use SSEUTIL but it seems like kluge for a poorlythought out function.Crazy
View 2 Replies
View Related
May 23, 2007
I need to add one of our servers to active directory. I found some documents on SQL 2000 but no good document on SQL 2005. Can you please guide me to the documentation for this? Thanks
View 4 Replies
View Related
Feb 8, 2007
HI ,
I Created one database named login.sdf in sql Ce ,i created one table login having two fields (username and password).it is working well.I trying to synchronise these with SQL2000 using Active sync.it is not working ..And one more things ,i tried to connect the default pocket PC 2002 emulator with Active sync.it is also not working.can anybody give some solution for these problem
Thanks in Advance
Regards
Ihsan
View 8 Replies
View Related
Mar 5, 2001
Hi
While configuring an active / active cluster, do I need to run the SQL setup on both nodes?
The SQL2K setup installs binaries on localdisks of both nodes - hence the question.
thanks
Liju
View 3 Replies
View Related
Feb 22, 2000
I have setup an active/active clustering environment for SQL Server, however it is 2 seperate virtual servers. How can I set them up to exist as one virtual server containing both active installations? Can this be done? I have two compaq 8500 w/8 processors each. I need to be able to cluster these configurations to take advantage of all 16 processors in one virtual SQL Server. Can it be done?
If you can answer these questions, you will have my undying gratitude.
Thanks in advance.
View 1 Replies
View Related
Sep 21, 2000
Hi
I am running some tests on SQL7 in an active/active cluster and have a couple of queries
1. When I create an ODBC DSN, why is the "Use the Failover SQL Server if the primary SQL Server" checkbox disabled
2. To test, I was running SQL queries from Access over the DSN created. When the Primary Server went down, I had to reconnect to re run the query - Is this normal?
3. Can someone point me to any documentation on the above scenario that would shed some more light?
Thanks
Liju
View 5 Replies
View Related
Oct 26, 1999
I currently have a two node HP hardware active/active cluster server. Running windows NT 4.0 Enterprise and dSQL server 6.5 sp 3. I want to upgrade the cluster to SQL 7. I would like to know if anyone ran into any problems or has sucessfully attempted this.
Also I read a few months ago about a gottcha involving NT sp4 and SQL sp5a that would prevent a node from failing over. Has this been corrected and does it affect SQL 7.
thanks
View 1 Replies
View Related
Sep 27, 2002
Hi
Is there anyone who knows where I can get some information about
installing an ACTIVE/ACTIVE SQL 2000 Cluster server (MSCS).
I have no problem setting up an active/passive failover cluster.
Where can I get more information? Do I need two instances? Two databases?
What's the difference between active/active and active/passive?
Thanks!
View 2 Replies
View Related
Jan 20, 2004
Hello, Can anyone please explain how the failover processes works on a sql server 2000 2 node active/active cluster.
Given the following
You have 2 node active/active cluster NodeA & NodeB
Question
1. How many SQL instances need to be installed on each node?
2. If the answer to question #1 is one instance per node, then
say if NodeA fails NodeB will take over all the resources of NodeA
including the master database, How does that work , how can once instance (in nodeB) handle two master database i.e its own master database and the one taken over from NodeA.
View 1 Replies
View Related
May 18, 2008
Hi,
I've just setup an 2 node active/active sql cluster (my first). Both servers have exactly the same specification, 16GB of RAM each and SAN attached. My question is, how do I configure the min and max memory for each sql instance. I've read some where that I need to follow the 20-40-40 rule as, 20% for the OS, 40% for the active sql instance on the node and the other 40% is for the other sql instance if it fails over. Are there any other gotcha that I need to be aware of? Can someone share some light with me in regards to this? Thanks
Ken
View 4 Replies
View Related
Jul 3, 2007
We have an active/active node setup with SQL 2005. Does anyone have any samples of VBS I could use to see what node is actually taking requests at a certain time? What I want to determine is what the actual active node is.
Thanks.
View 1 Replies
View Related
May 18, 2006
I want to host 2 seperate SQL databases and wanted to know if it would be possible to run this in an active active cluster config which each database running on a different server.
The clustering would be there in the event of failure of one of the servers but for normal operation the two sql instances would be completely seperate.
Is this configuration possible and would this give the best performance and resiliance from a 2 server setup.
What do you think?
View 4 Replies
View Related
Jun 3, 2007
Help, I have an active/active cluster with SQL2k5 Ent with SP2 installed on node1 that is currently running live apps, I need to add the 2nd node to have fail over functionality but if I use the Change Install from Add or Remove Programs on the primary node to add the 2nd node I get the following error.
"The File 'c:....SqlRun_SQL.ms' is not a valid installation package for the product Microsoft SQL Server 2005(SQL2K5VVS01). Try to find the installation package 'SqlRun_SQL.msi' in a folder from which you can install Microsoft SQL Server 2005(SQL2K5VVS01).
No I assume this is because node 1 has had service pack two applied. Does anyone have instructions how I can add node two without having to completely uninstall Node 1, as the doc€™s with SQL2005 SP2 say it can not be removed, a complete uninstall of 2005 must be done???
View 3 Replies
View Related
Sep 18, 2006
Hi,
I can't seen to find any info on the exact version of OS and SQL one needs to run active / active cluster.
I want to run 2 window server 2003 box with SQL 2005 in an active / active mode. What version of windows 2003 and SQL2005 would I need?
Thanks
Frank
View 1 Replies
View Related