Incorrect Hostname In Sysprocesses

Jun 27, 2000

On SQL Server 6.5, we tried to track down the owner of a process,which was hogging the CPU. Using Currently Activity Detail, we went to the hostname that seemed to be the culprit, but the users had not accessed SQL Server in a few days. Where is SQL Server get the hostname from? We are on an NT4.0 network, using DHCP.

View 1 Replies


ADVERTISEMENT

Sysprocesses

Jul 20, 2005

Hi everyone,I'm a bit new til ms sql server and hope that anyone here can answer aquestion I have. I'm running a ms sql server 7.0. The server isaccessed by a application written in Access (help..) and sometimes Iexperience that the server performance is slowing down. When I do asp_who I find alot of the processes (or sids) with the statussleeping? Can anyone please tell med what this means, and is it ok forme to kill these processes? Since this is happening quite often Iwould like to make a script that automatically kills all sleepingprocesses, is this ok?Looking forward to hearing from anyone!B'regSql server newbee

View 2 Replies View Related

Sysprocesses.waittype

May 24, 2004

Hi,

The column waittype of master..sysprocesses table contains binary numbers.
I am looking for their codes. I know that Microsoft has published these codes for SQL Server 7 (here: http://support.microsoft.com/default.aspx?scid=kb;EN-US;244455 ), but I need the codes of SQL Server 2000.

And yes, I've checked spt_values - they are not there.


Any help will be appreciated,
Thanks,
kukuk.

View 4 Replies View Related

How To See All Sysprocesses In SQL 2005?

Sep 11, 2007



My application was written in SQL 2000 where a non-dbo account could see all logged in users. Is there some way I can do this in SQL 2005?
Here is the query I run in SQL 2000:
SELECT spid
FROM master.dbo.sysprocesses, master.dbo.syslogins
WHERE master.dbo.sysprocesses.sid = master.dbo.syslogins.sid
AND master.dbo.sysprocesses.dbid = db_id()
AND LOWER(master.dbo.syslogins.name) IN ('grnl_security','log_security')


Right now, my application (where many users log in with gnrl_security) can only see thier own SPID; but I need to see all logged on SPIDS.

I have tried adding a SELECT permission to the new sysprocesses view for user grnl_security.

View 5 Replies View Related

Sysprocesses Says: Wait Forever

Sep 30, 2004

I'm doing an update on a table with about 113m rows, the update-statement is fairly simple: update tab set col = null where col is not null.
The col column is mostly null.

Sysprocesses shows three rows for this statement: 1 CXPACKET (its a dual processor, 2000 box with sp3 installed), 2 PAGEIOLATCH_SH (waitresource is filled). My guess would be that the where-clause is executed in a seperate process blocking the update.

I changed the statement into update [...] set col = null; sysprocesses shows one row with PAGEIOLATCH_SH. Executing forever.

I checked other processes including those outside sqlserver but none are using the db, let alone accessing the table involved. Even restarted sqlserver to be sure there's no dead process blocking the update. Didn't help.

So I added a search condition to the where-clause, involving a clustered index in order to reduce the rowcount. The execution plan shows a 97% hit on the clustered index, but sysprocesses shows the three rows again...

So far the profiler didn't help me out either: there's a SP: CacheInsert on the update-statement... then nothing.

What should I do?

View 6 Replies View Related

Joining Sysprocesses With Fn_get_sql

May 16, 2006

ok, I have a requirement where I need to get a list of sql commands currently being blocked.
This is very easy to do via stored procedure, and I have it working well using a vb.net console app to fire it off.

Trouble is, I need to ship it to different offices on an ad hoc basis. I don't want to install a stored procedure on each site because it'll be a one off job and there is not likely to be anyone available who would know how to even install a new sp. So, I thought I'd try and pull back the sql commands via a select statement, joining together sysprocesses and the fn_get_sql udf. This returns a table, so I presumed I could join the two together using a subquery via the sql_handle with something like this :

SELECT sql_handle,
(
SELECT top 1 [text] FROM ::fn_get_sql(sysprocesses.sql_handle)
) as sqlcommand

FROM master..sysprocesses

The error back is incorrect syntax near 'sysprocesses'. I can't see if I'm doing anything obvious wrong.

Anyone any ideas? I'm using SQL Server 2000 sp3.

View 6 Replies View Related

SysProcesses Login Time

Apr 1, 2008

Hi,

We have written various applications that have a connection table for managing users logins, we have a connect stored proc that inserts the SIPD and the login time from sysprocesses.

From time to time we clean up our connections table by queryng against the SPID and login_time in sysprocesses and clear it if these don't match. This has been fine for a few years, howver we have found recently with a client that with some SPID's in sysprocesses that SQL server is changing the login time, this is unexpected behaviour.

The client is using SQL server 2005 and this has caused us problems, we have worked around it for now but wondered if anyone new why on this particular setup why the login time would change even though they have not disconnected.

We have other clients using SQL 2005 but have never seen this issue before, I wondered if there was a setting we have not seen that can cause this.

Thanks

View 4 Replies View Related

Sysprocesses Memusage Sleeping

Nov 3, 2005

I was trying to find the bottle neck on our server while we wererunning a couple very large updates.I ran the following query and noticed there were a couple sleepingspid's that were really eating up the memory. One had a value of16000.I guess my question is was this query still holding on to that memoryeven though the query had finished? Why didn't SQL Server clean it up?select spid,substring(Loginame,1,10) Login,memusage,substring(hostname,1,15) Host,program_name,cmd,statusfrom master..sysprocessesorder by memusage desc

View 1 Replies View Related

What Happened To Sql_handle In Sysprocesses?

Sep 13, 2007

In SQL Server 2000 you can monitor active processes by looking at the sql_handle column in sysprocesses. In SQL Server 2005 BOL says sql_handle ...


Represents the currently executing batch or object.


In SQL 2000 a non-zero value in sql_handle indicated an active process. You could not simply rely on the status column to check for an actively running process. This is not the case in 2005. I ran a profiler trace to confirm that just because sql_handle reports a non-zero value does not mean the corresponding process is active. Does anyone know why this has changed and how we are now to interpret sql_handle in 2005? Why are non-zero entries reported for processes that are not currently running?


Thanks, Dave

View 1 Replies View Related

SQL SERVER 2000 - Table SYSPROCESSES

Mar 8, 2004

Hello friends,

Despiste what it is mentioned in B.O.L., in the Table SYSPROCESSES, the column KPID has almost always the value 0 !!!

If anyone knows how I can find the right link between a SPID and the corresponding KPID, I shoud be very happy to know to.

It concerns SQL SERVER 2000 under WINDOWS 2000 SP3.

Thanks in advance for any help about that ...

View 1 Replies View Related

Finding Active Users From Sysprocesses

Jul 20, 2005

I am trying to find a select on sysprocesses that would list all the activelogins. An active login is a login that has a TSQL statment being executedon the server,This didnt work to well! Any ideas. Thanks in advance.select sp.loginame,-- more columnsfrom master..sysprocesses spwhere sp.status not in ('sleeping','background' )order by 1

View 2 Replies View Related

NET_ADDRESS In The Master.dbo.sysprocesses Table

Oct 24, 2006

Does anyone knows how the field NET_ADDRESS in the master.dbo.sysprocesses table is encoded ?
May I extract the IP address or MAC address from that field ?

View 9 Replies View Related

Linking Sysprocesses To Results Of DBCC Inputbuffer

May 23, 2008

Guys,
I need to send a group of people a list of specific processes running on the server, one of the requirements is to send them what's actually being ran on the machine. I have the information I was on the sysprocess tabke and the results of the DBCC Inputbuffer. Is there a way to link both result sets?

This is the criteria of the processes that neeed to be sent out to my users:

SELECT *
FROM master.dbo.sysprocesses p
WHERE last_batch < DATEADD(mi, -5, GETDATE())
AND dbo.fncGetNumLocks(p.spid, DB_ID('EngDataMart')) > 1
GROUP BY p.spid, p.loginame, p.hostname, dbo.fncGetNumLocks(p.spid, db_id('DBName'))
ORDER BY p.spid

Thanks,

View 1 Replies View Related

SQL 2005 Does Not Work With ADO Query On SYS.sysprocesses After Update Installed From Microsoft

Jul 11, 2007



str = "select nt_username, hostname, nt_domain, loginame, login_time, program_name " &
"from master.sys.sysprocesses where spid=@@SPID"



-This is the Query to display the username in the application.

-The client is MS-Access 2003, MDAC 2.8

-It was and is Ok both on SQL 2005 and SQL 2000. The qury runs under Query Analyzer 2000 or Management Studio 2005 without problem



-After Downloading the updates from Microsot Website. The embedded code returns no result set:

Data provider or other service returned an E_FAIL status



If anybody has any idea, I will be thankful.

View 8 Replies View Related

How To Get Hostname

Sep 3, 2004

We are using sql server 2000

Problem:
========
A few records in a particular table are getting updated with incorrect values everyday somehow by some process. No one is manually changing these records.
Every morning I query the database and fix these records. But somehow they again get set to the incorrect values.

So I want to figure out how this is happening. I'm thinking of creating an update trigger on that table. And whenever this update trigger is fired, check the modified record's id and if it is the problematic record, then get the hostname, username, processid which is doing this update.

Can someone give me ideas on how to get the hostname, username.

Any other ideas are also appreciated

Thanks in Advance!

View 2 Replies View Related

Hostname

Sep 27, 2001

Hi everyone,

ON SQL 7.0

I want to capture hostname of the client computer making changes to a table on the server. I tried to use sysprocesses table, but the max(last_batch) column is giving the datetime and hostname of previously ran query. I need to find the hostname of the client who is making change at that instant of time.

Can anyone help me.

Thanks

sekhar

View 4 Replies View Related

Hostname

Jun 18, 2008

Hi,

Question:
How do I get the hostname from the instance name please?

My present design at present is something as follows:

We have several sql server 2005 machines
i.e.
ServerSQLA, ServerSQLB, etc....

Each machine may have one or more instances,
i.e.
ServerSQLAinstace1
ServerSQLAinstace2, etc...

The server name in this case is ServerSQLA

Instance naming and node convention is different for clusters

i.e.
C_ServerSQLAinstance1
C_ServerSQLAinstance2

on the node(s):
N_ServerSQLA or N_ServerSQLB


Thanks

View 6 Replies View Related

Use Of Hostname

Sep 9, 2007

Hello

Can anyone explain how HOSTNAME works?

I have problem with identitys when subscriptions uploads new inserted data, I need somehow create a partitions for each user. All user need exactly the same data (now 10 user but in future about 100 users).

In the database is 116 tables and still growing. Because this is a project i working with.

My system is a one Server, one publication and server is acting as its own distibutor, and multi users

I have really problems with conflicts plz somebody help

View 1 Replies View Related

How To Get Hostname Via SQL Command?

May 21, 2004

Hi!

Can something tell me how I can obtain the machine name (either IP address or DNS name) on which SQL Server is running via a SQL query?

select @@version returns a lot of useful information, however it doesn't return the host name.

thanks in advance
- Garry

View 8 Replies View Related

HostName And ReinitializeSubscription

Apr 28, 2006

Hello all,

I'm having trouble with my Merge Replication setup in regards to changing the HostName property of the SqlCeReplication object. As we all know, if you modify the HostName value, you must then call the ReinitializeSubscription(true) method before calling Synchronize(). Unfortunately, this isn't working for me. Following this sequence of steps consistently results in error messages saying that I need to either call ReinitializeSubscription, or change my HostName back to it's original value. Has anyone ever experienced this problem?

Regards,

Rob Tiffany

View 5 Replies View Related

SQL Server Name Equil To Hostname

Jan 19, 2008

Can someone explain me, if it's possible to set my SQL servername equal to the hostname of the server ?
 Of the moment, i have to log in with : WS003/sqlexpress
But I want to log in like this : WS003
 
regards

View 4 Replies View Related

DB Hostname, Username, Password Etc

Jun 25, 2007

I'm trying to get into an installation of v.6.5 to use with anotherserver and I need the following information:Database hostnameDatabase nameDatabase usernaneDatabase passwordIs this information available anyplace within the installation files?I'm not asked for uname and pwd to get into the database.Thanks!

View 1 Replies View Related

Can I Use A Hostname On Registering The Server With TCPIP?

Jan 7, 1999

Hi everyone,

my SQL is running TCPIP and everytime I register the server from a client, I have to enter in the IP address. Can I use a hostname to map an IP address to a server name and then enter the server name to register the server?

Thanks..Binh

View 2 Replies View Related

Restrict Login Access By Hostname/ip Possible?

Oct 2, 2007

In SQL2005, is it possible to restrict incoming sql or windows authentication logins by source hostname or IP address? Perhaps using endpoints?

We are currently using hosts file on the db server as a temporary solution, but the SA will not allow us to use this as a permanent solution.

The app team I support is asking me to build an "idiot proof" database so that an Dev or Test app server they may configure, doesn't unintentionally connect to the Production database and damage/alter data.

Don't worry, I've already asked if they can't follow some kind of M&P's to prevent this kind of silly behavior, but they insist on DBA team creating a bullet-proof database that can outsmart app developers who try to attempt something dumb like this.

Any ideas or suggestions would be greatly appreciated.

TIA,
Phil

Phil Streiff

View 2 Replies View Related

Rename Hostname On Server 2005

Nov 16, 2007

Do I have to do anything when hostname (servername) with SQL Server 2005 install was changed from OLDNAME to NEWNAME? If yes, what need to be done and syntax? I notice it under SYSSERVERS table still contain the OLDNAME.

EX. TEST1PROD01 was changed to TEST2PROD01

Thanks,

Vu

View 1 Replies View Related

HostName Function With Access2K Front End

Jul 20, 2005

In an Insert Into statement I have used the Host_Name() function toidentify which user has suppied a record to a table that holdstemporary data.I'm using an Access2K front end.Code:Alter procedure SPName@parameter1 intASSet nocount OnSet xact_abort offDeclare @myHost nvarchar(50)Set @myHost = Host_Name()Insert Into tblMyNameTEMP(UniqueID, AnyField1, AnyField2,myMachineName)SELECT tblMyName.UniqueID, AnyField1, AnyField2, @myHostFROM tblMyNameWHERE tblMyName.UniqueID = @parameter1I have two problems.In some cases (and only on one or two of maybe about 250 clientworkstations) Host_Name() returns the name of MY machine. I'm thinkingthis is because I developed the app and distributed it and for somereason it's retaining the info contained in my original connectionsetup set in the MS-Access Connection window???Also, on some occasions, I get blocking messages in my trace logfollowing this operation.Any help on these two issues is appreciated.lq

View 1 Replies View Related

SqlCeReplication.HostName Size Limit Fix?

Jul 17, 2006

We are attempting to improve our merge replication process between our SQL Server 2005 server and SqlCe Mobile 3 client by switching to Data Partitions. We are using IIS as a proxy to SQL Server 2005 running on a different box using a DOMAIN account.

We've setup row filters to use HOST_NAME() and have set the option "Automatically define a partition and generate a snapshot if needed when a new Subscriber tries to synchronize" to true in the Data Partitions options under the publication's properties in SQL server management studio.

If I use a .HostName value of "1234", everything works fine. A subdirectory is created under a our publication's folder in the shared replication directory that relates to the host_name. Data is copied to the device and can be observed through query analyzer that the data is in fact filtered properly.

However, when using a .HostName based on the GetDeviceUniqueID (which results in '3D321F7212B2AD2CC824954662B9023441BB2D20'), replication works sometimes and sometimes fails with "The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have ben unable to create or write to the message file. [etc]". The final HRESULT is 80045017.

While this error indicates a permission problem, there were no permission problems when creating the "1234" partition. In researching the problem, I ran across KB905395 which states:
Limitations on the HostName property and the Subscriber-requested snapshotIf you try to initialize a SQL Server Mobile Edition subscription by using a filtered HostName property, initialization fails. This problem occurs when the value that is supplied for the HostName
property contains more than 12 characters. To work around this problem,
disable Subscriber-requested snapshot delivery at the Publisher. You
can also use a value for the HostName property that contains fewer than 12 characters.

====

This seems to be consistent with what we've observed (which actually led to the "1234" test). Does anyone know if a fix for this exists? Has anyone else run across this issue? I saw a previous post from March that did, but never got resolved. However, the KB article above was posted in March - hmmm...

This is an existing application and filtering based on the device's id is ingrained in the application. Changing it now would be large undertaking.

Regards,
Santino Lamberti
Senior Software Engineer
Launch Technologies, Inc.

View 5 Replies View Related

Sql Express As Witness Hostname Truncation

Jun 22, 2007

Not sure if this is relevant here but I thought someone might have seen this.

I am trying to set up Express edition as a mirror witness and am running into a problem.

It seems the express instance thinks its "Host Name"[1] is foo-prod-witnes rather than it's real name foo-prod-witness (notice the additional "s")

When I try to create the security endpoints everything appearsd to work as far as connecting to the express instance but i cannot start the mirror because the address listed is

TCP://foo-prod-witnes:5022 (not a valid hostname)

My enterprise editions report foo-prod-sql01.fqdn:5022

Any ideas how to fix this?

1. As shown in the Host Name tab of the Configuration Manager

View 4 Replies View Related

Applying HOSTNAME Filter To Subscription

Mar 20, 2008

Hello,

I am using Merge replication for synching data between SQL Server 2005 and Mobile units (SQL CE 3.5). I have created one publication and there are around 300 subscribers in the production.

If I want to use a HostName() filter so that each user gets his or her own data, do I have to set up 300 different subscriptions with different HOSTNAME values or can I use the same subscription somehow?

I would appreciate if someone can let me know whats the best way to approach this problem.

Thanks

Apurva

View 1 Replies View Related

How To Find Client's Hostname Using RDP From MSSQL Command.

Apr 7, 2008

Hi,
Can anyone help, how to find client's hostname using RDP from MSSQL command.
In simple words,
I am connecting to Remote desktop and using MSSQL server management studio in the remote desktop. And when I run select host_name(), it returns the RDP machine name. However, I wish to see my own computer name.
Thanks in advance.
susuown

View 3 Replies View Related

Replication When Publisher And Subscriber Hostname Conflicts?

Sep 23, 2015

We've got x2 data centers in the US:

NYC & SAC

Sadly the hostnames for the boxes I am trying to replicate are similar:

- db1.nyc.mydomain.tld
- db1.sac.mydomain.tld

The servers can talk to each other over all necessary ports however when I generate a push subscription from the publisher, I am asked to add the SQL Server subscriber and it already shows DB1 listed since itself is DB1.nyc. How can I attach the remote subscriber when setting up the subscription from the publisher if the hostname conflicts in my unique scenario?I created a entry on the publishers host file to use db2sac for the SAC IP and entering that alias in as the remote subscriber but no dice.

View 4 Replies View Related

Connection SQL Server 2005 With DNS Hostname Mismatch

Dec 29, 2006

When using the MS SQL 2005 JDBC driver, I now need to have the DNS nameresolution to the client correctly set up. If not I get the followingerror:SQLState: 08S01SQLError: 0Message: hostname : hostnameWhere "hostname" is the client host name. It doesn't seem to matter ifIuse an IP address or hostname in my connection URL. When searching thenet,I have seen a similar error, but not exactly the same, where themessage is"Hostname: hostname not found" (once again, here "hostname" is theclientmachine) where they suggested the issue was the DNS name conflict.I found the error goes away if the client machine's hostname match theDNSname used for the same IP addess that the DB server is using. Onework-around is to set hostname on the client to the IP address beingused.I know the right thing to do is set the hostname and the DNS namelookup thesame, but I have a customer who doesn't want to do this. They didn'thave tofor 2003, and they don't want to for 2005. Sigh. Is there a way todisablethis feature?

View 3 Replies View Related

SQL Server 2000: Block Access From Hostname

Apr 8, 2008



Is possible block access to sql server database, from hostame (pc name). I know only the hostname and not the user.
Is possible?


Thanks

View 1 Replies View Related







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