Daily Archives

Articles indexed Tuesday June 12 2012

Page 9/18 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Finding day of week in batch file? (Windows Server 2008)

    - by Daniel Magliola
    I have a process I run from a batch file, and i only want to run it on a certain day of the week. Is it possible to get the day of week? All the example I found, somehow rely on "date /t" to return "Friday, 12/11/2009", however, in my machine, "date /t" returns "12/11/2009". No weekday there. I've already checked the "regional settings" for my machine, and the long date format does include the weekday. The short date format doesn't, but i'd really rather not change that, since it'll affect a bunch of stuff I do. Any ideas here? Thanks! Daniel

    Read the article

  • Umbraco on Windows 7 64-bit

    - by HeavyWave
    I'm trying to install Umbraco CMS on Windows 7 64-bit and I get the following exception: [HttpException (0x80004005): Could not load file or assembly 'ImageManipulation, Version=1.0.2105.41209, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission required. The application pool's trust mode is set to 'Full', all the user permissions are just as on other sites hosted on the same machine. I went through all relevant topics on Umbraco's forum, but all advices are about the trust level. How do I fix this?

    Read the article

  • Win7 XP mode install fails with cryptic error

    - by MAW74656
    Trying to install XPmode on Win7 Professional 64-bit SP1, but getting an error. I downloaded XPMode, Virtual PC and the update as specified here: http://www.microsoft.com/windows/virtual-pc/download.aspx. When I open XP mode for the first time it goes into the setup ("Setting up Windows XP Mode for first use..."; pick your VM password, etc.), then it runs through the progress bar until almost the end (99%?). At that point I get the error: Could not complete Setup. Please try again. Whats going on here? I've uninstalled Virtual PC and xpmode, and reinstalled in several different orders, no luck. Is there some log file that will tell me whats happening? Theres nothing showing up in the Event log that I can find. How can I fix this?

    Read the article

  • Updating with using custom class collection not working

    - by Risho
    I've posted this yesterday on asp forum but no one replied so perhaps I'll have better luck here. For some reason the OnUpdating method does not pull new values from the grid which is in edit mode. I've search and have come across several blogs and sites, some sugesting that an ObjectDataSource is required in order to use the "e.NewValue" construct others provide code to the contrary. I don't get any errors - the variables in the code file would contain the old values rather then new ones. I don't want to use the ODS way of manipulating the data. My delete method works but not the update one. Can you suggest what is wrong with the code? Here is what I've got: aspx file: <asp:GridView ID="gvBlack" runat="server" AutoGenerateColumns="False" OnRowUpdating="gvBlack_OnUpdating" OnRowEditing="gvBlack_RowEditing"> <Columns> <%--<asp:BoundField DataField="Ident_Black" ReadOnly="True" visible="false" />--%> <asp:TemplateField ItemStyle-Width="1px"> <EditItemTemplate> <asp:Label ID="lblIdent_Black" runat="server" Text='<%# Bind("Ident_Black") %>' Visible="false" /> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Model" > <ItemTemplate> <asp:Label ID="lblModel_Black" runat="server" Text='<%# Bind("Model_Black") %>' width="130px" /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtModel_Black" runat="server" Text='<%# Eval("Model_Black") %>' width="100px" /> <asp:RequiredFieldValidator ID="rfvModel_Black" runat="server" ControlToValidate="txtModel_Black" SetFocusOnError="true" ErrorMessage="*" ValidationGroup="CurrentMfg" ForeColor="Red" Font-Bold="true" /> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Description" > <ItemTemplate> <asp:Label ID="lblDesc_Black" runat="server" Text='<%# Bind("Desc_Black") %>' width="200px" /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtDesc_Black" runat="server" Text='<%# Eval("Desc_Black") %>' width="170px" /> <span></span> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Qty" > <ItemTemplate> <asp:Label ID="lblQty_Black" runat="server" Text='<%# Bind("Qty_Black") %>' width="35px" /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtQty_Black" runat="server" Text='<%# Eval("Qty_Black") %>' width="35px" /> <asp:RequiredFieldValidator ID="rfvQty_Black" runat="server" ControlToValidate="txtQty_Black" SetFocusOnError="true" ErrorMessage="*" ValidationGroup="CurrentMfg" ForeColor="Red" Font-Bold="true" /> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Reorder<br />Limit"> <ItemTemplate> <asp:Label ID="lblBlack_Reorder_Limit" runat="server" Text='<%# Bind("Black_Reorder_Limit") %>' width="35px" /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtBlack_Reorder_Limit" runat="server" Text='<%# Eval("Black_Reorder_Limit") %>' width="35px" /> <asp:RequiredFieldValidator ID="rfvBlack_Reorder_Limit" runat="server" ControlToValidate="txtBlack_Reorder_Limit" SetFocusOnError="true" ErrorMessage="*" ValidationGroup="CurrentMfg" ForeColor="Red" Font-Bold="true" /> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Notes"> <ItemTemplate> <asp:Label ID="lblNotes" runat="server" Text='<%# Bind("Notes") %>' width="200px" /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtNotes" runat="server" Text='<%# Eval("Notes") %>' width="170px" /> <span></span> </EditItemTemplate> </asp:TemplateField> <asp:CommandField ShowEditButton="True" ShowDeleteButton="false" ValidationGroup="CurrentToner" /> </Columns> </asp:GridView> aspx.cs file: protected void Page_Load(object sender, EventArgs e) { LoadData_TonerBlack(); } private void LoadData_TonerBlack() { dalConsumables_TonerBlack drTonerBlack = new dalConsumables_TonerBlack(); gvBlack.DataSource = drTonerBlack.GetListTonersBlack(); gvBlack.DataBind(); } protected void gvBlack_OnUpdating(object sender, GridViewUpdateEventArgs e) { //GridView gvBlack = (GridView)sender; //GridViewRow gvBlackRow = (GridViewRow)gvBlack.Rows[e.RowIndex]; int _Ident_Black = Convert.ToInt32(gvBlack.DataKeys[e.RowIndex].Values[0].ToString()); TextBox _txtModel_Black = (TextBox)gvBlack.Rows[e.RowIndex].FindControl("txtModel_Black"); TextBox _txtDesc_Black = (TextBox)gvBlack.Rows[e.RowIndex].FindControl("txtDesc_Black"); TextBox _txtQty_Black = (TextBox)gvBlack.Rows[e.RowIndex].FindControl("txtQty_Black"); TextBox _txtBlack_Reorder_Limit = (TextBox)gvBlack.Rows[e.RowIndex].FindControl("txtBlack_Reorder_Limit"); TextBox _txtNotes = (TextBox)gvBlack.Rows[e.RowIndex].FindControl("txtNotes"); string _updatedBy = Request.ServerVariables["AUTH_USER"].ToString(); dalConsumables_TonerBlack updateTonerBlack = new dalConsumables_TonerBlack(); updateTonerBlack.UpdateTonerBlack(_Ident_Black, _txtModel_Black.Text, _txtDesc_Black.Text, Convert.ToInt32(_txtQty_Black.Text), Convert.ToInt32(_txtBlack_Reorder_Limit.Text), _txtNotes.Text, _updatedBy); gvBlack.EditIndex = -1; LoadData_TonerBlack(); } protected void gvBlack_RowEditing(object sender, GridViewEditEventArgs e) { gvBlack.EditIndex = e.NewEditIndex; LoadData_TonerBlack(); } Thanks in advance! Risho

    Read the article

  • How to boot directly into an application

    - by denonth
    I have an application that I want to boot in directly when windows xp starts. So after that "welcome" screen I don't want to see anything and load directly into the app. How can I do that? I tried adding a exe file to startup folder. But he is loading some 2-3 thing and then my app and I see windows desktop normally. Is it possible to load it directly? It is a windows form application not an cmd.

    Read the article

  • Imac g5 with no OS nor CD drive

    - by sinekonata
    What I want: Ubuntu on a g5 Imac. What I have: An empty PC (Intel g5 17" Imac) with broken CD drive. Its model is A1173. This PC with Ubuntu 12.04 and an old Vista partition. a usb flash drive. Problems: No CD means the only boot Drive I could use is USB. There are no BIOS on Macs so I can't set boot settings or even see if it detects my USB drive. When I start the machine and press ALT the first and only thing I see is an old corrupted winXP partition and not a single option or additional information. So assuming blindly that the Mac hardware/firmware works normally, I don't have any Mac OS to use any of the tools that I found on different tutorials for building a bootable .img drive for macs. I can't find much software on Linux/Windows to substitute to those tools, for example among others converting an .iso file (win/linux) to .img (mac I guess). Which makes me think that the scenario where someone like me has Mac hardware but no Mac OS is extremely rare. So other than finding someone that has a Mac I have no solution. So I ask what would you do? the only thing is it should not involve any money (I know mac soft is rarely free) which also excludes getting any MacOS unless I can use a free macos.img for VM or restore the original Mac for free. Thank you

    Read the article

  • Delete files on external hard drive affect SSD?

    - by haar
    I've got a SSD as my primary hard drive. I have an external HDD hard drive which I use to store downloaded files. At the moment I have to delete 80 GB of that external hard drive. I realized that if I delete it normally, it would probably go to the recycle bin of my SSD. I am wondering how I can delete the files on my HDD without affecting the SSD or putting any files on it. Do you know how to do this? Best, haar

    Read the article

  • launchctl - use rvm instead of system Ruby in executed scripts?

    - by Stefan Kendall
    I have a launchctl job I define as such: <key>ProgramArguments</key> <array> <string>/bin/sh</string> <string>-c</string> <string>~/projects/script.sh</string> </array> When I run script.sh manually, the script works fine, as it uses the currently configured rvm version of ruby. When I run this through launchctl, the system version of Ruby is used, which breaks the script. How can I get this script to run with the right version of ruby available?

    Read the article

  • Why do I get "General Failure" when pinging host name on a Win 7 node on the network?

    - by hydroparadise
    This is a very peculiar problem with a station on our network. The client pc is running Windows 7 Pro. What makes this problem interesting is that this client is the only node on the network that seems to be experiencing this proglem. When I try to ping a specific Win 08 server by host name, I get an IPv6 address and get General failure. But when I ping it's IPv4 address, it responds just fine. My first thought would check the DNS server the name resolutions to see what would be going on, but the problem begs the quesion, why does the station get an IPv6 address back and fails as opposed to using the IPv4 settings (which are static btw). What gives? I am including a screen shot of trying the one specific server and failing while trying another server with success. All other nodes on the network don't have problems communicating with the server the one station is having issues with.

    Read the article

  • USB Drive cannot detect in Windows 7

    - by Perdana Putra
    Have you ever plugged in a USB drive or any external device with a hard drive and wondered why you cannot see it in My Computer? I often have, I believe my USB is not broke .. because if I plugin the USB to another computer could be seen / detected. I tried following this tutorial http://www.howtogeek.com/howto/22251/find-your-missing-usb-drive-in-windows-7-vista/ but I am afraid of going wrong, and caused my data is lost. is there any easy way around this problem? many thank's for your attentions Guys ..

    Read the article

  • Why is Xampp unable to start Apache?

    - by jribeiro
    I formatted my computer a week ago. Installed wampp on Windows XP, git and everything I needed. When I run git for the first time it told me it had a problem with my user folder (because of the accents) so I created a new user and migrated everything to the new one. After this, wampp wouldn't start anymore. I uninstalled it and installed xampp which is what I'm using now. My problem is that even though I requesed xampp to install Apache as a service it isn't installed. It doesn't show in Windows' services screen. Xampp control panel shows mysql service running OK. When I click to install Apache as a service it returns no error. When I click Start Apache no error is outputed. No file and no errors under c:/xampp/apache/log/ If I restart my computer it says that Apache service is not installed. I tried to reinstall wampp and the same problem occurs. If I run netstat -a -no nothing is running on port 80! What can I do?

    Read the article

  • Sync Gmail label with Outlook folder

    - by Prashant
    I am using Outlook 2011 with gmail. I moved to Outlook 2011 recently. Before that I was using web mail. When I moved to Outlook recently, I got all my labels with the emails. But now when I go the web mail and create a label, it does not come up as a folder in Outlook 2011. Similarly if i delete a label from Gmail, it does not come up in Outlook 2011. PS - I used this link to set up my Outlook 2011 - http://www.macstories.net/tutorials/how-to-wrangle-outlook-2011-to-work-with-gmail/

    Read the article

  • Networking DOS within Windows 7 XP Mode, with a Windows XP/7 Networked Share

    - by theonlylos
    For awhile now, one of my clients has been stuck with Corel Paradox 4.0 (it used to be the biggest database system in the DOS days, until Microsoft released Access in the early 90's) so for awhile I've managed to keep it on life support on Windows XP for a few years, however since switching to Windows 7 x64, I've had to resort to using XP Mode as the sandbox to keep it up and running. While I am able to run Paradox as usual in XP Mode, I'm having a serious issue where if I try connecting the install to the network share (which is located on the Windows 7 portion of the system), Paradox keeps exiting because it says the serial number is invalid. Now, I know for a fact that this is an issue with the virtual loopback adapter and also having the VM linked to the physical ethernet adapter -- and while I have solved this issue before, most of my fixes have been bandages since after a few weeks the issue pops up again. Long story short, I wanted to ask if there is a permanent way to link a DOS program to a network share address. For example, when I try doing \tsclient\paradox (the Windows 7 Address) I keep getting an error saying I need a valid network address. I've tried mapping that folder to various drive letters such as P:\Paradox -- but for some reason that keeps failing over time. For what it's worth, Paradox uses a .SOM file to store the network settings, however it isn't editable in Notepad but rather it's controlled by a wizard in Paradox. But if that extension rings any bells, I'd welcome any insights.

    Read the article

  • How to swap ctrl and caps lock using xmodmap

    - by Maruti
    Or any other tool, but I prefer xmodmap. I tried this: remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L I also tried this: xmodmap -e "keycode 66 = Control_L" But neither seem to fully work. Here's the event log for pressing caps lock: KeyPress event, serial 28, synthetic NO, window 0x1a00001, root 0x12d, subw 0x0, time 914826, (679,342), root:(680,362), state 0x12, keycode 66 (keysym 0xffe3, Control_L), same_screen YES, XKeysymToKeycode returns keycode: 37 // 37 is the control key code XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False I'm running Ubuntu 10.10 with awesome window manager.

    Read the article

  • Why do my proxy settings keep changing?

    - by tjrobinson
    I am running Windows 7 and a few times a day the "Use a proxy server for your LAN (These settings will not apply to dial-up of VPN connections)." under "Local Area Network (LAN) Settings" checkbox becomes checked seemingly on it's own. Am I pressing some kind of hidden keyboard shortcut accidentally? What sort of applications might alter this setting and why? Unfortunately as this is a developer box, there's a lot of stuff that could be interfering, e.g. Visual Studio 2010, Windows Azure SDK and various browsers. Has anyone else come across this?

    Read the article

  • Soda Cans Exploding Under the Stress of High Voltage [Video]

    - by Jason Fitzpatrick
    In an effort to start your Monday off in true Mad Scientist style, we bring you soda cans being decimated by thousands of volts in a “Thumper”. What is a thumper, you ask? During office hours, it’s a high-voltage testing unit most often used to stress test electric cables. In the off hours, however, the electrical engineering geeks over at The Geek Group like to shove anywhere from a few hundred to thousands of volts through unsuspecting objects to see what happens. In this installation they’re shooting high voltage through a variety of soft drink cans with an end result that sounds and looks like a cannon loaded with Mountain Dew. [via Hacked Gadgets] HTG Explains: What Is RSS and How Can I Benefit From Using It? HTG Explains: Why You Only Have to Wipe a Disk Once to Erase It HTG Explains: Learn How Websites Are Tracking You Online

    Read the article

  • 10 Easy DIY Father’s Day Gift Ideas

    - by Jason Fitzpatrick
    If you’re looking for a DIY gift for this Father’s Day that really shows off your maker ethic, this roundup of 10 DIY gifts is sure to have something to offer–fire pistons anyone? Courtesy of Make magazine, we find this 10 item roundup for great DIY projects you could hammer out between now and Father’s Day. The roundup includes everything from the mini-toolbox (really, more of a parts box) see in the photo here to more dynamic gifts like a homemade fire piston and a spider rifle. Hit up the link below to check out all the neat projects which, intended as a gift or not, will prompt you to head out to the workshop. Top 10: Easy DIY Gifts My Dad Would Dig [Make] HTG Explains: What Is RSS and How Can I Benefit From Using It? HTG Explains: Why You Only Have to Wipe a Disk Once to Erase It HTG Explains: Learn How Websites Are Tracking You Online

    Read the article

  • Microsoft Patches Bugs, Improves Visual Studio 2012

    First, let's talk about the bug patches. Programs getting fixes include Windows, Internet Explorer, Office, the .NET Framework, Microsoft Dynamics AX and Microsoft Visual Basic. You can read the full security advisory. Out of the seven bulletins containing the fixes, three were deemed critical, which means a hacker could exploit an unpatched system by remotely executing malicious code. The remaining four were dubbed important; if exploited, they could give an attacker elevated privileges. Multiple versions of the Windows operating system and Internet Explorer should receive these patches....

    Read the article

  • Visual Studio : quatre nouvelles promotions avant l'augmentation des prix de certaines versions de l'EDI

    Visual Studio : quatre nouvelles promotions avant l'augmentation des prix de certaines versions de l'EDI Le verre à moitié vide : la sortie de la nouvelle version de Visual Studio avec MSDN s'accompagnera de la hausse des tarifs de plusieurs références. Le verre à moitié plein : quatre nouvelles promotions permettent aujourd'hui de négocier cette augmentation et d'optimiser son budget. La première est une prolongation de l'opération qui permet d'avoir jusqu'à 35% de réduction sur MSDN (lire par ailleurs). La deuxième est elle aussi une prolongation. Pour chaque offre licence achetée, le c...

    Read the article

  • Visual Studio 2012 : le développement pour desktop réintroduit dans la version Express gratuite, l'EDI s'ouvre à l'open-source

    Visual Studio 2012 : Microsoft réintroduit le développement d'applications desktop dans la version Express Gratuite, et poursuit son ouverture à l'open-source avec son EDI star Microsoft a écouté. Plusieurs décisions qui viennent d'être prises concernant la prochaine version de son EDI star, Visual Studio 2012 (ex-Visual Studio 11), feront certainement plaisir à la communauté. Tout d'abord, l'interface monochrome (ou plus exactement bicolore dans les gris) pourra être remplacée par une UI « à l'ancienne », avec plus de couleurs. C'est ce qu'a montré avant-hier un VP Microsoft sur la scène du TechEd d'Orlando. Deuxième bonne nouvelle, la version Express (gratuite) de Visual ...

    Read the article

  • How to use a list of values in Excel as filter in a query

    - by Luca Zavarella
    It often happens that a customer provides us with a list of items for which to extract certain information. Imagine, for example, that our clients wish to have the header information of the sales orders only for certain orders. Most likely he will give us a list of items in a column in Excel, or, less probably, a simple text file with the identification code:     As long as the given values ??are at best a dozen, it costs us nothing to copy and paste those values ??in our SSMS and place them in a WHERE clause, using the IN operator, making sure to include the quotes in the case of alphanumeric elements (the database sample is AdventureWorks2008R2): SELECT * FROM Sales.SalesOrderHeader AS SOH WHERE SOH.SalesOrderNumber IN ( 'SO43667' ,'SO43709' ,'SO43726' ,'SO43746' ,'SO43782' ,'SO43796') Clearly, the need to add commas and quotes becomes an hassle when dealing with hundreds of items (which of course has happened to us!). It’d be comfortable to do a simple copy and paste, leaving the items as they are pasted, and make sure the query works fine. We can have this commodity via a User Defined Function, that returns items in a table. Simply we’ll provide the function with an input string parameter containing the pasted items. I give you directly the T-SQL code, where comments are there to clarify what was written: CREATE FUNCTION [dbo].[SplitCRLFList] (@List VARCHAR(MAX)) RETURNS @ParsedList TABLE ( --< Set the item length as your needs Item VARCHAR(255) ) AS BEGIN DECLARE --< Set the item length as your needs @Item VARCHAR(255) ,@Pos BIGINT --< Trim TABs due to indentations SET @List = REPLACE(@List, CHAR(9), '') --< Trim leading and trailing spaces, then add a CR\LF at the end of the list SET @List = LTRIM(RTRIM(@List)) + CHAR(13) + CHAR(10) --< Set the position at the first CR/LF in the list SET @Pos = CHARINDEX(CHAR(13) + CHAR(10), @List, 1) --< If exist other chars other than CR/LFs in the list then... IF REPLACE(@List, CHAR(13) + CHAR(10), '') <> '' BEGIN --< Loop while CR/LFs are over (not found = CHARINDEX returns 0) WHILE @Pos > 0 BEGIN --< Get the heading list chars from the first char to the first CR/LF and trim spaces SET @Item = LTRIM(RTRIM(LEFT(@List, @Pos - 1))) --< If the so calulated item is not empty... IF @Item <> '' BEGIN --< ...insert it in the @ParsedList temporary table INSERT INTO @ParsedList (Item) VALUES (@Item) --(CAST(@Item AS int)) --< Use the appropriate conversion if needed END --< Remove the first item from the list... SET @List = RIGHT(@List, LEN(@List) - @Pos - 1) --< ...and set the position to the next CR/LF SET @Pos = CHARINDEX(CHAR(13) + CHAR(10), @List, 1) --< Repeat this block while the upon loop condition is verified END END RETURN END At this point, having created the UDF, our query is transformed trivially in: SELECT * FROM Sales.SalesOrderHeader AS SOH WHERE SOH.SalesOrderNumber IN ( SELECT Item FROM SplitCRLFList('SO43667 SO43709 SO43726 SO43746 SO43782 SO43796') AS SCL) Convenient, isn’t it? You can find the script DBA_SplitCRLFList.sql here. Bye!!

    Read the article

  • T-SQL Tuesday #31 - Logging Tricks with CONTEXT_INFO

    - by Most Valuable Yak (Rob Volk)
    This month's T-SQL Tuesday is being hosted by Aaron Nelson [b | t], fellow Atlantan (the city in Georgia, not the famous sunken city, or the resort in the Bahamas) and covers the topic of logging (the recording of information, not the harvesting of trees) and maintains the fine T-SQL Tuesday tradition begun by Adam Machanic [b | t] (the SQL Server guru, not the guy who fixes cars, check the spelling again, there will be a quiz later). This is a trick I learned from Fernando Guerrero [b | t] waaaaaay back during the PASS Summit 2004 in sunny, hurricane-infested Orlando, during his session on Secret SQL Server (not sure if that's the correct title, and I haven't used parentheses in this paragraph yet).  CONTEXT_INFO is a neat little feature that's existed since SQL Server 2000 and perhaps even earlier.  It lets you assign data to the current session/connection, and maintains that data until you disconnect or change it.  In addition to the CONTEXT_INFO() function, you can also query the context_info column in sys.dm_exec_sessions, or even sysprocesses if you're still running SQL Server 2000, if you need to see it for another session. While you're limited to 128 bytes, one big advantage that CONTEXT_INFO has is that it's independent of any transactions.  If you've ever logged to a table in a transaction and then lost messages when it rolled back, you can understand how aggravating it can be.  CONTEXT_INFO also survives across multiple SQL batches (GO separators) in the same connection, so for those of you who were going to suggest "just log to a table variable, they don't get rolled back":  HA-HA, I GOT YOU!  Since GO starts a new batch all variable declarations are lost. Here's a simple example I recently used at work.  I had to test database mirroring configurations for disaster recovery scenarios and measure the network throughput.  I also needed to log how long it took for the script to run and include the mirror settings for the database in question.  I decided to use AdventureWorks as my database model, and Adam Machanic's Big Adventure script to provide a fairly large workload that's repeatable and easily scalable.  My test would consist of several copies of AdventureWorks running the Big Adventure script while I mirrored the databases (or not). Since Adam's script contains several batches, I decided CONTEXT_INFO would have to be used.  As it turns out, I only needed to grab the start time at the beginning, I could get the rest of the data at the end of the process.   The code is pretty small: declare @time binary(128)=cast(getdate() as binary(8)) set context_info @time   ... rest of Big Adventure code ...   go use master; insert mirror_test(server,role,partner,db,state,safety,start,duration) select @@servername, mirroring_role_desc, mirroring_partner_instance, db_name(database_id), mirroring_state_desc, mirroring_safety_level_desc, cast(cast(context_info() as binary(8)) as datetime), datediff(s,cast(cast(context_info() as binary(8)) as datetime),getdate()) from sys.database_mirroring where db_name(database_id) like 'Adv%';   I declared @time as a binary(128) since CONTEXT_INFO is defined that way.  I couldn't convert GETDATE() to binary(128) as it would pad the first 120 bytes as 0x00.  To keep the CAST functions simple and avoid using SUBSTRING, I decided to CAST GETDATE() as binary(8) and let SQL Server do the implicit conversion.  It's not the safest way perhaps, but it works on my machine. :) As I mentioned earlier, you can query system views for sessions and get their CONTEXT_INFO.  With a little boilerplate code this can be used to monitor long-running procedures, in case you need to kill a process, or are just curious  how long certain parts take.  In this example, I added code to Adam's Big Adventure script to set CONTEXT_INFO messages at strategic places I want to monitor.  (His code is in UPPERCASE as it was in the original, mine is all lowercase): declare @msg binary(128) set @msg=cast('Altering bigProduct.ProductID' as binary(128)) set context_info @msg go ALTER TABLE bigProduct ALTER COLUMN ProductID INT NOT NULL GO set context_info 0x0 go declare @msg1 binary(128) set @msg1=cast('Adding pk_bigProduct Constraint' as binary(128)) set context_info @msg1 go ALTER TABLE bigProduct ADD CONSTRAINT pk_bigProduct PRIMARY KEY (ProductID) GO set context_info 0x0 go declare @msg2 binary(128) set @msg2=cast('Altering bigTransactionHistory.TransactionID' as binary(128)) set context_info @msg2 go ALTER TABLE bigTransactionHistory ALTER COLUMN TransactionID INT NOT NULL GO set context_info 0x0 go declare @msg3 binary(128) set @msg3=cast('Adding pk_bigTransactionHistory Constraint' as binary(128)) set context_info @msg3 go ALTER TABLE bigTransactionHistory ADD CONSTRAINT pk_bigTransactionHistory PRIMARY KEY NONCLUSTERED(TransactionID) GO set context_info 0x0 go declare @msg4 binary(128) set @msg4=cast('Creating IX_ProductId_TransactionDate Index' as binary(128)) set context_info @msg4 go CREATE NONCLUSTERED INDEX IX_ProductId_TransactionDate ON bigTransactionHistory(ProductId,TransactionDate) INCLUDE(Quantity,ActualCost) GO set context_info 0x0   This doesn't include the entire script, only those portions that altered a table or created an index.  One annoyance is that SET CONTEXT_INFO requires a literal or variable, you can't use an expression.  And since GO starts a new batch I need to declare a variable in each one.  And of course I have to use CAST because it won't implicitly convert varchar to binary.  And even though context_info is a nullable column, you can't SET CONTEXT_INFO NULL, so I have to use SET CONTEXT_INFO 0x0 to clear the message after the statement completes.  And if you're thinking of turning this into a UDF, you can't, although a stored procedure would work. So what does all this aggravation get you?  As the code runs, if I want to see which stage the session is at, I can run the following (assuming SPID 51 is the one I want): select CAST(context_info as varchar(128)) from sys.dm_exec_sessions where session_id=51   Since SQL Server 2005 introduced the new system and dynamic management views (DMVs) there's not as much need for tagging a session with these kinds of messages.  You can get the session start time and currently executing statement from them, and neatly presented if you use Adam's sp_whoisactive utility (and you absolutely should be using it).  Of course you can always use xp_cmdshell, a CLR function, or some other tricks to log information outside of a SQL transaction.  All the same, I've used this trick to monitor long-running reports at a previous job, and I still think CONTEXT_INFO is a great feature, especially if you're still using SQL Server 2000 or want to supplement your instrumentation.  If you'd like an exercise, consider adding the system time to the messages in the last example, and an automated job to query and parse it from the system tables.  That would let you track how long each statement ran without having to run Profiler. #TSQL2sDay

    Read the article

  • ClearTrace for SQL Server 2012

    - by Bill Graziano
    I’ve updated the beta for ClearTrace that support SQL Server 2012.  This requires SQL Server 2012 to be installed on the computer where ClearTrace is running.  It will read traces from SQL Server 2008 R2, SQL Server 2008 and SQL Server 2005. It includes some minor improvements in performance and handling large SQL statements. It should also give better errors. If you do find any of those errors, please report them in the support forum.

    Read the article

  • Social Retailing

    - by David Dorf
    For retailers the move to mobile has been obvious.  More and more consumers are interacting with retailers, both online and in the store, using their mobile devices.  Retailers are quick to invest in both consumer facing mobile apps as well as ones to equip employees.  But when I talk to retailers about social, the value isn't as clear-cut.  Intuitively, retailers know that better relationships with customers will result in higher sales, but the trip to get there has many paths. The interesting thing about social media is that it has the potential to permeate all parts of the business.  Obviously it works well for marketing, but it also has a place with recruiting, knowledge management, trend analysis, and employee collaboration.  Information gathered from social media can enhance existing processes like assortment planning, product development, space planning, promotion planning, and replenishment.  Letting the customer influence each of these areas helps align the experience. One of the things holding retailers back is the lack of consistent and integrated tools to manage social media and make sense of the huge amounts of data.  To that end Oracle has been aggressively acquiring in the space, as depicted in the infographic below.  Soon, social will get the same level of investment as mobile. The Social CRM Arms Race: A Timeline - An infographic by the team at Pardot Marketing Automation

    Read the article

  • Java Spotlight Episode 86: Tony Printezis on Garbage Collection First

    - by Roger Brinkley
    Interview with Tony Printezis on Garbage Collection First (GC1). Joining us this week on the Java All Star Developer Panel is Arun Gupta, Java EE Guy. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link:  Java Spotlight Podcast in iTunes. Show Notes News JSR 358: A major revison of the Java Community Process - JCP 3.Next JAX-RS 2.0 Early Draft- Third Edition Events June 11-14, Cloud Computing Expo, New York City June 12, Boulder JUG June 13, Denver JUG June 13, Eclipse Juno DemoCamp, Redwoood Shore June 13, JUG Münster June 14, Java Klassentreffen, Vienna, Austria June 18-20, QCon, New York City June 19, CJUG, Chicago June 20, 1871, Chicago June 26-28, Jazoon, Zurich, Switzerland Jun 27, Houston JUG ?? July 5, Java Forum, Stuttgart, Germany Jul 13-14, IndicThreads, Delhi July 30-August 1, JVM Language Summit, Santa Clara Feature InterviewTony Printezis is a Principal Member of Technical Staff at Oracle, based in Burlington, MA. He has been contributing to the Java HotSpot Virtual Machine since 2006. He spends most of his time working on dynamic memory management for the Java platform, concentrating on performance, scalability, responsiveness, parallelism, and visualization of garbage collectors. He obtained a Ph.D. in 2000 and a BSc (Hons) in 1995, both from the University of Glasgow in Scotland. In addition, he is a JavaOne Rock Star, a title awarded for his highly rated JavaOne session on GC. Mail Bag What’s Cool JavaOne content selection is complete. Notifications done.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >