The behavior seems to have changed on SP_WHO2 in SQL 2005.
In SQL 2000 I could be logged in as a regular user in my system and run SP_WHO2 and get all the users currently logged in. This is no longer working in SQL 2005. It now only returns "me".
What kind of rights do you need to have to see who is logged in?
Whe we execute sp_who2 on a SQL server Command column displays the following:Any idea on what is CONDITIONAl?? SIGNAL HANDLER LOCK MONITOR LAZY WRITER LOG WRITER CHECKPOINT SLEEP AWAITING COMMAND BULK INSERT CONDITIONAl
sp_who2 shows the block by user and some information.Currently we are moving from sql 2000 to sql 2005. if i execute the sp_who2 in sql 2005 it shows only my login block information. it does not show other users. is there any admin rights has to give to view other block user ??? how to do that.
Is there any way to calculate (just an approximation is fine) theamount of work that is done for an insert statement?For example, can I calculate the approximate row size of my table andthen compare that with the DiskIO for my SPID to determineapproximately how many rows have already been written? Or, does theDiskIO include shuffling data around or other DiskIO that makes thiskind of comparison impossible?Thanks,-Tom.
Thanks, folks, for taking time to help!In query analyzer and profiler, there seem to be system processes thatare generating high cpu time and disk io. Well, I guess the short ofit is that I am having a problem interpreting what I am seeing so thatI can take the next step in corrective action. There are also severaldomain controlled logins that appear to be on the same host name, atthe same time--these are laptops, not terminal servers--why would thesystem be reporting such a thing?Here is a sample of the output from sp_who2:SPIDSTATUSLOGINHOSTNAMEBLKBYDBNAMECOMMANDCPU TIMEDISKIOLASTBATCHPROGRAMNAME1BACKGROUND sa . . NULLLAZY WRITER75006/3/2005 5:142sleeping sa . . NULLLOG WRITER1025006/3/2005 5:143BACKGROUND sa . . masterSIGNAL HANDLER1606/3/2005 5:144BACKGROUND sa . . NULLLOCK MONITOR20306/3/2005 5:145BACKGROUND sa . . masterTASK MANAGER01516/3/2005 5:147sleeping sa . . NULLCHECKPOINTSLEEP243822396/3/2005 5:1410BACKGROUND sa . . masterTASK MANAGER0256/3/2005 5:1411BACKGROUND sa . . masterTASK MANAGER01636/3/2005 5:1412BACKGROUND sa . . masterTASK MANAGER0706/3/2005 5:1413BACKGROUND sa . . masterTASK MANAGER01556/3/2005 5:1451sleeping saMyServer . msdbAWAITINGCOMMAND683371386/8/2005 13:00SQLAgent - Generic Refresher52sleeping saMyServer . msdbAWAITINGCOMMAND1746266/8/2005 13:00SQLAgent - Alert Engine53sleeping DomainUser1LT1 . VPNMasterAWAITING COMMAND1687546/8/2005 12:31Crystal Reports54sleeping saMyServer . VPNMasterAWAITING COMMAND377296/8/2005 10:49MS SQLEM55RUNNABLE DomainUser2MyServer .masterSELECT 86006/8/2005 12:40SQL Profiler56RUNNABLE DomainUser2LT2 . VPNSELECT34496/8/2005 12:50Microsoft® Access57sleeping DomainUser3LT2 . VPNMasterAWAITING COMMAND110296/8/2005 12:52Microsoft® Access58sleeping DomainUser1LT1 .masterAWAITING COMMAND1172156/8/2005 9:31Crystal Reports59sleeping DomainUser4LT2 . VPNMasterAWAITING COMMAND1516/8/2005 12:50Microsoft® Access62sleeping DomainUser5LT2 . VPNMasterAWAITING COMMAND3226/8/2005 12:52Microsoft® Access63sleeping DomainUser6LT2 . VPNMasterAWAITING COMMAND50106/8/2005 12:52Microsoft® Access64sleeping DomainUser6LT2 . VPNAWAITINGCOMMAND101606/8/2005 12:52Microsoft® Access65sleeping DomainUser6LT2 . VPNMasterAWAITING COMMAND47496/8/2005 12:52Microsoft® Access66sleeping DomainUser3LT2 . VPNAWAITINGCOMMAND20306/8/2005 12:50Microsoft® Access67sleeping DomainUser6LT2 . VPNAWAITINGCOMMAND24906/8/2005 12:52Microsoft® Access68RUNNABLE saMyServer . masterSELECTINTO 62126/8/2005 12:59SQL Query AnalyzerThanks,Eric
In the sql server analyzer, i ran sp_who2 store procedure to find out the procesess and locks on the sql server. I noticed on the status column some entries "RUNNABLE", does this could trigger blocked to other processess if not closed by our application? or What does runnable status mean?
am experiencing excessive SSB thread block'n...sql error log is reporting LOTS of Resource Monitor messages about non-yielding threads (nothing meaningful can be surmised from it).
I am running on a 4way 64bit 2003 box w/6gb ram!!!
SSB architecture is simple implementation... Leveraging async trigger(s) in 42 db's (all on same instance) that post (via srvc) into a mstr db queue...where a listener is pull'n them off and applyies to a table (trying to avoid excessive 1205's that I was experiencing using sync trigger approach before)....messages sit in respective db's trans queue and draining of queues is extremely SLOW!!!! I mean SLOW!!!
Eventually SqlServer.exe process pegs out ALL processors!!! Only can reboot box to get connectivity back...~
Anyone have this experience!? (really hope not...but I need help)
Have completely cycled SSB machinery (via disable/enable)...and have even stepped thru enabling one db at a time...but still very poor performance!!!
Anyone?
-mt
sp_who output here...
BACKGROUND sa . 16 NULL RESOURCE MONITOR BACKGROUND sa . . NULL LAZY WRITER SUSPENDED sa . . NULL LOG WRITER BACKGROUND sa . . master SIGNAL HANDLER BACKGROUND sa . . NULL LOCK MONITOR sleeping sa . . master TASK MANAGER BACKGROUND sa . . master TRACE QUEUE TASK sleeping sa . . NULL UNKNOWN TOKEN BACKGROUND sa . . master BRKR TASK BACKGROUND sa . . master TASK MANAGER SUSPENDED sa . . master CHECKPOINT sleeping sa . . master TASK MANAGER sleeping sa . . master TASK MANAGER BACKGROUND sa . 16 ThompsonTractorD43 KILLED/ROLLBACK sleeping sa . . master TASK MANAGER BACKGROUND sa . . master KILLED/ROLLBACK BACKGROUND sa . 16 master KILLED/ROLLBACK sleeping sa . . master TASK MANAGER BACKGROUND sa . . master BRKR TASK BACKGROUND sa . 16 master BRKR TASK sleeping sa . . master TASK MANAGER sleeping sa . . master TASK MANAGER sleeping sa . . master TASK MANAGER sleeping sa . . master TASK MANAGER BACKGROUND sa . 16 YancyMachineryCat KILLED/ROLLBACK BACKGROUND sa . . master BRKR EVENT HNDLR BACKGROUND sa . . master BRKR TASK sleeping NT AUTHORITYSYSTEM REFINERY1 . msdb AWAITING COMMAND sleeping NT AUTHORITYSYSTEM REFINERY1 . msdb AWAITING COMMAND sleeping NT AUTHORITYSYSTEM REFINERY1 . msdb AWAITING COMMAND sleeping NT AUTHORITYSYSTEM REFINERY1 . msdb AWAITING COMMAND SUSPENDED NT AUTHORITYSYSTEM REFINERY1 . msdb DELETE sleeping fastironweb DETROIT . Cat_Lvl3 AWAITING COMMAND sleeping mike REFINERY1 . master AWAITING COMMAND SUSPENDED NT AUTHORITYSYSTEM REFINERY1 . distribution WAITFOR sleeping mike REFINERY1 . Cat_Cfsc AWAITING COMMAND sleeping mike REFINERY1 . Cat_Cfsc AWAITING COMMAND sleeping mike REFINERY1 . Cat_Cfsc AWAITING COMMAND RUNNABLE mike REFINERY1 . Cat_Cfsc SELECT INTO sleeping NT AUTHORITYSYSTEM REFINERY1 . msdb AWAITING COMMAND
I've got a new server with Pentium4 xeon processors. I've used sp_who2for quite a while on my old server -- to look at CPU and IO usage. Onthe new server, the CPU times are huge -- although actual performanceis quite good. I know sp_who2 is an undocumented proc. Has anyoneexperienced this or is it just me?
When I installed VS 2005, it installed the default version of SQL Server 2005 Express that ships with Visual Studio 2005 installer media.
How can apply SQL Server 2005 Express SP1 to update this existing instance?
Currently, if I run this query:
SELECT @@version
I get the following:
Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
After applying SP1, I should get 9.00.2047.00.
Should I just go to this link and download & install the SQL Server 2005 Express Edition SP1:
First of all I am planning to install sql 2005 standard and sql standard sp2 on vista ultimate professional using vs 2008 pro I have some questions about installing sql 2005 what is the best way to install sql 2005 on vista My article I got this from ms 403393 (upgrading sql standard 2005 to sql standard 2005sp2) 1 sql standard .(shortcut right click from cd/dvd not possible) I have heard command prompt start menu, click cmd type run D: cd/dvd exe From a wizard (sql sp2)
2. sql standard sp2 a. upgrade using a wizard b. open a command prompt (not sure if right click is best option) install dvd media example dqlserver2005sp2-kb921896-exe SKUUPGRADE=1(is run as administrator option on media) do I type run or what do I type ? c. go to system configuration page(where is this) you should see a single warnining you need to install sp2, the edition should say success if it does not please reapply d. on the registration page please enter your registeration number e. on the comments to install please enter database services, reporting services workstation components, books online and development tools( I wish to install all components)
f. on the instance page click default instance(default install) g. finish rest of wizard h. apply sql sp2
I also have of seperate question of upgrading sql from vista using a Configuring local admin account account (configuring administration from a wizard-will this notify me by default) I do not want my administrative priviledges elevated. I will be using default configurations for my installations......... I often wish there would a nice picture examples of doing this Please help
I have a problem regarding forwarding 'n number of parameters' from Visual Studio 2005 using VB to SQL-Server 2005 stored procedure.I have to save N number of rows in my stored procedure as a transaction. If all rows are not saved successfully, I have to roll-back else update some other table also after that. I am unable to handle - How to send variable number of parameters from Visual Stduio to Sql - Server ? My requirement is to use the SQL-Stored Procedure to store all the rows in the base table and related tables and then update one another table based on the updations done. Please Help .....
I am trying to import Access reports using Visual Studio 2005 and Access 2007. SQL Server 2005 with Reporting Services is also installed. I select Reports in the Solution Explorer and then Import Reports... Microsoft Access and browse to my Access database. After I select the database I see it open briefly as if it is trying to import the reports but then Access quickly closes and a error pops up: "You already have the database open." I have checked and double checked and the database is not open. I have even tried several different databases and the same errror occurs. Any help would be greatly appreciated.
We have a large number of clients attempting to replicate two publications on 2005 Express databases (2 publications subscribed to the one subscriber database) with our 2005 Server (9.00.3042.00 SP2 Standard Edition) and experiencing two significant problems:
1) Users experience the following message:
The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the Subscriber for changes not yet sent to the Publisher. You must reinitialize the subscription (without upload).
This problem should not apparently occur with SQL Server 2005 (or 2005 Express) instances with SP2 applied. All clients experiencing this problem have SP2 installed as does our Server and the retention period is 30 days. The subscribers have been replicating well under that.
2) Replications never succeed after appearing to replicate/loop around for hours
This issue is the most critical as we have clients who have been installed and re-installed with new instances of SQL Server 2005 Express, new empty databases (on subscriber before snapshot extraction), and using fresh snapshots (less than an few hours old) which cannot successfully replicate.
Interestingly there is at least 1 instance where several computers are subscribed and successfully replicating the same database as another where replication refuses to succeed.
To test we have taken a republished database from another 2005 Server which is working fine and restored it to the same server as the one holding the database with which we are experiencing problems and subscribed to it. This test worked fine and replication of both publications went through fast and repeatedly without showing any signs of problem.
This indicates that the problem is perhaps data related as it appears localised to that database.
Below are two screenshots which may assist.
Screenshot 1 Shows that on the server side the replication attempts look like they are succeeding despite the fact that the subscriber end does not indicate success. Also the history indicates the the subscription has spent all it's time initialising and not merging any changes.
Screenshot 2 Shows a rogue process which has appears on many of the problem child subscribers. It shows a process running with no end time even though the job indicates failure in the message and even though other replication attempts appear to have succeeded after it. This process stays in the history showing that it is running even when I can find no corresponding process for it.
Can anyone suggest a further course of action/further testing/further information required which may assist?
This is extremely urgent and any assistance would be greatly appreciated!
Is there any way to measure bandwith usage during merge replication between sql server 2005 and sql server mobile 2005 running on a cradled wm5 mobile device.
Attaching the windows performance monitor to the network connection established over usb would work although I was wondering if there was something specific for this case integrated into Sql server 2005 / sql server mobile 2005 / Sql server management studio / third party tools that i could use ?
I have created a database using VB Express 2005 express edition and I have created number of tables and SP's etc.
I am trying to use the database diagram tool but I get an error stating that the database doesn't have a valid dbo. I say yes to the prompt about making myself a valid dbo but I then get a message stating that I do not have permissions to imprersonate the dbo.
I have a problem when i start sincronyzing with the emulator of MSVS2005 to SQL2005 in Windows Vista. I have the same program in the emulator, but sincronyzing with windows XP Pro and no problem...
"Failure to connect to SQLServer with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect"
A first chance exception of type 'System.MissingMemberException' occurred in Microsoft.VisualBasic.dll Public member 'Variables' on type 'IDTSPackage90' not found.
I am update/inserting records threw a web form in vb.net. I need to insert 'NULL' into my microsoft sql server database. I am not talking about the below line of code where website is the name of my paramater. If i do that it will just place a blank into that field in the database. If i dont enter anything into that textbox I want it to to say NULL in that field. So if I go into the actual table in the SQL Server Management Studio and look at the website field of the recored I just added or updated and did not type anything into the web site textbox it needs to say NULL. I also tried the second line of code but that places a single quote in front and behind NULL. So the field will have the value 'NULL'. website.value = txtwebsite.text.tostirng if txtwebsite.text ="" then website.value ="NULL" end if The reason why I need the NULL there is because I bind the website filed to a hyperlink template in a gridview. The actual text of the hyperlink is bound to PAYER which is a name of a insurance payer but the navigateto is bound to the website field. If i do not enter any data into the website field and it stays as NULL, then when my gridview is loaded, payers that dont have a website will not be underlined and user wont have the option to click on them since there is no value for the navigateto. But if i use my form to update/add a payer and leave the website textbox blank in puts a blank into that field in my database and when it loads that new row into the gridview the PAYER is underlined and u can click on it but it will just take u to the web site is unavailable page. So is there anyway to actaull have NULL placed into a filed and not just blank space
I am out of brain cells. I can not figure out how to upgrade instances of sql express to sql 2005 or even add an instance of sql 2005. I have installed/upgraded everything else (SSMS, etc.) to SQL 2005. I am dazed and confused. I don't even know where to start in explaining what I have tried and done. I have 303 log files going back to 3/27/2007 from various attempts. Where do I start in figuring this debacle out???
Just installed SQL Server 2005 and tested my old VS 2005 ASPnet websites, which were connected toSQL Server 2000 databases before. All my websites were created for local HTTP applications, coded with a connection string with User ID and Password. The SQL Server 2000 was configured as mixed authentication (i.e. with User ID and Password). These websites worked very well with SQL Server 2000 database server.Testing my old VS 2005 websites with SQL Server 2005 database, showed a 'Login failed for a User ''.' error msgalthough the 'Test Connection' on VS 2005 design showed a perfect query for e.g. a GridView control. I have assured that the UserID/Password were correct for Management Studio Security object'slogin and Database Security's user. The server instance was configured with mixed authentication mode. One thing I am not sure of is, when clicking the Management Studio icon, a Connection dialog showed up, asking for a Windows or MIxed authentication? I just stayed with the Windows authentication. What does the authenticationmode have anything to do with the VS 2005 website connection? Should I change to mixed authetnication mode?TIA,Jeffrey
Parameter passing in SSIS 2005 sometimes appears to be a cumbursome task. I have been digging into this topic for quite some time and here i note down some simple steps to demonstrate parameter passing at Package level.
(1) Create a SSIS project using Business Intelligence 2005 Or VS 2005.
(2) Create datasource (.ds) and Data Source View as required.
(3) A default SSIS Package by the name Package.dtsx is created. Double click this and you are shown tabs for Control Flow, Data Flow, Event Handlers, Package Explorer. On the Control Flow, drap and drop Execute SQL Task from Control Flow Items in the toolbar.
(4) Lets now create a variable at Package level. Right click anywhere in the control flow box (not on the Task created in Step 3 above). Click on the Variables on the context menu displayed. Variables window appears on the left of the screen. Click the Add Variable box in this window to create a variable. Name it var1 (or whatever you may like), Scope as Package, DataType as String and Value as MyValue. This is only the default value.
(5) Now let us edit the SQL Task created in Step 3. Double on it, on the General tab you can change its Name, Description. Set ResultSet as None. We shall proceed to execute a stored procedure by name MySPName and pass it a parameter. Set ConnectionType as OLE DB. Select the connection you creates in step 2. Set SQLSourceType as Direct input. SQLStatement as MySPName ? . Note the ? mark after the name of the stored procedure. This is important to accept the variable value (var1) created in Step 4.
(6) Select Parameter Mapping tab now. Click on Add button. Select the Variable Name as User::var1. This is the user created variable of Step 4. Select Direction as Input, DataType as Varchar and Parameter Name as @var1. Click on OK now.
(7) This sets up the basic of parameter passing. Compile the project to verify everything works. Right Click on the SQL Task and select Execute Task. This will execute the package taking default value of the variable. This can be used along with dtexec command with /set option to pass the parameter at command prompt.
I have a central database server that is runnning on SQL 2005 standard edition and Windows server 2003 standard as OS.
I realise that I can use SQL statements to encrypt and decrypt the data inside the standard SQL.
However, how do I read and write the data via an web application coded in C#.net and is also running on the same machine?
Another issue is, I need to replicate some of the data in this SQL standard over to a SQL mobile running on a mobile device running on Windows CE 5.0.
The mobile device also needs to read and write data to the encrypted data via a C#.net application.
Question is, with all these requirements to be met, can I use AES? I know that AES is not available on Windows XP and Windows Server 2000 and I cant find AES in the .net compact framework.
how do i go about ensuring security? how do I ensure that the symmetric key is the same both on the SQL standard and SQL mobile?
I currently have SQL Server Management Studio Express 2005 and would like to upgrade my machine to SQL Developer 2005 as easily as possible. Keeping my databases and such.
Any recommendations on the best way to do this would be greatly appreciated.
I have a windows forms application that runs on my PC that populates a SQL Server Compact 2005 database and then transfers that .sdf file to my mobile device. The communication between the mobile device and PC is done using the Desktop RAPI class from OpenNetCF (http://www.opennetcf.com/FreeSoftware/DesktopCommunication/tabid/90/Default.aspx)
Anyway, I was previously using SQL Server Mobile 2005 and my populated .sdf was around 1.7 MB and I could transfer it to my mobile device in a minute. Once I switched to SQL Server Compact 2005, the transfer process began taking 3 minutes with a 1.5 MB .sdf file. The SSCE also got bloated more easily so I added in the Compact operation each time after I fully populate the SDF to keep the file size at 1.5 MB, but even then it still takes 3 minutes.
I've done a few tests where I simply switch between the two database versions and that simple switch of the version changes the transfer time. I am dumbfounded trying to figure out what the cause might be. Since it is just a file transfer, why would the version even matter unless somehow SSCE is really not compacting and lying about its actual size.
Has anyone run into anything similar to this or may have any ideas what might be going on?
Hello, I would like to know if anyone here has any information on how to change the default version of SQL Server 2005 Express which ships with Visual Studio 2005 to the new SQL 2005 Express SERVICE PACK 1?
I see a file under disc:vswcuSSESQLEXPR.exe I am wondering if changing that file with the new one from Microsoft Download Center will do it...
There's another file under that folder named sqlexpr32.exe I am wondering what it's for?
Hello, I would like to know if anyone here has any information on how to change the default version of SQL Server 2005 Express which ships with Visual Studio 2005 to the new SQL 2005 Express SERVICE PACK 1?
I see a file under disc:vswcuSSESQLEXPR.exe I am wondering if changing that file with the new one from Microsoft Download Center will do it...
There's another file under that folder named sqlexpr32.exe I am wondering what it's for?
Hi, I am running SQL Server 2005 x64 DE on Vista x64. I installed MS VS 2005 Pro. Edition. During the setup of VS, I did a custom install, un-checking the SQL Express addition box. After installation, I received errors that indicated the SQL Express did not install. Even though I do not have SQL Express installed on my machine, MS Update says that I need SQL Express SP2. My SQL DE is up to date with SP2 and MS Update indicates as "optional" that I need SQL SP2.
Is SQL Express a necessity for VS Pro? If not, why is MS Update indicating that I need SQL Express SP2? In addition, why is MS Update telling me I need SQL SP2 when it is already installed?
Note: I installed SQL SP2 manually, not through MS Update. This makes me believe that MS Update is not detecting it.