Search Results

Search found 22756 results on 911 pages for 'power query'.

Page 90/911 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • SQL SERVER – Using RAND() in User Defined Functions (UDF)

    - by pinaldave
    Here is the question I received in email. “Pinal, I am writing a function where we need to generate random password. While writing T-SQL I faced following issue. Everytime I tried to use RAND() function in my User Defined Function I am getting following error: Msg 443, Level 16, State 1, Procedure RandFn, Line 7 Invalid use of a side-effecting operator ‘rand’ within a function. Here is the simplified T-SQL code of the function which I am using: CREATE FUNCTION RandFn() RETURNS INT AS BEGIN DECLARE @rndValue INT SET @rndValue = RAND() RETURN @rndValue END GO I must use UDF so is there any workaround to use RAND function in UDF.” Here is the workaround how RAND() can be used in UDF. The scope of the blog post is not to discuss the advantages or disadvantages of the function or random function here but just to show how RAND() function can be used in UDF. RAND() function is directly not allowed to use in the UDF so we have to find alternate way to use the same function. This can be achieved by creating a VIEW which is using RAND() function and use the same VIEW in the UDF. Here is the step by step instructions. Create a VIEW using RAND function. CREATE VIEW rndView AS SELECT RAND() rndResult GO Create a UDF using the same VIEW. CREATE FUNCTION RandFn() RETURNS DECIMAL(18,18) AS BEGIN DECLARE @rndValue DECIMAL(18,18) SELECT @rndValue = rndResult FROM rndView RETURN @rndValue END GO Now execute the UDF and it will just work fine and return random result. SELECT dbo.RandFn() GO In T-SQL world, I have noticed that there are more than one solution to every problem. Is there any better solution to this question? Please post that question as a comment and I will include it with due credit. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Function, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: technology

    Read the article

  • SQL SERVER – Fix Visual Studio Error : Connections to SQL Server files (.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL

    - by pinaldave
    In one of the virtual environment while I was trying to add SQL Server Database (.mdf) file to asp.net project I encountered following error: Connections to SQL Server files (.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL:  For a long time I am using SQL Server 2012 but this error was a bit interesting to me. I realize that there should not be any need of the SQL Server 2005 installation. I quickly figured out that I can remove this error if I do as mentioned below: Open Microsoft Visual Studio Select Tools >> Options >> Database Tools >> Data Connections Enter the name of an installed instance in “SQL Server Instance Name” field. Click OK If you do not know the instance name, you can follow either of the options. 1) Use the command line sqlcmd utility 2) Using SQL Server Management Studio Is there any other way to resolve this error? Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Error Messages, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: sqlcmd, Visual Studio

    Read the article

  • SQL SERVER – Caption the Cartoon Contest – Last 2 Days

    - by pinaldave
    Developer’s life is very interesting, we often want to start my day early at a job so we can go home early. However, the day never comes as the life of the developer is always about working late hours. If the developer goes to the office early – there are good chances that his co-workers will come late. Additionally, I am confident that there will be always something urgent for developers or DBA to solve right at the time they are ready to go home. This is the life of the developers!  Here is the interesting story of a DBA who was about to go to the home. He had to take his girlfriend to a movie and dinner in 30 minutes. However, his manager asks him to fix the performance related issues with their production server. In normal case, he had only two choices a) Job or b) Girlfriend. Well, our super hero DBA decided to use efficient tools and improve the performance of the production server in merely 30 minutes. When he was done, his manager was absolutely surprised by his efficiency and accuracy of the work. He asked him following question - Here is the contest – you need to guess what was the answer of our Super Hero DBA. If you guess the answer correct you may win Star Wars R2-D2 Inflatable Remote Controlled device. Additionally, if you Download DB Optimizer before Dec 8, 2012 – you will be eligible for USD 25 Amazon Gift Card (there are total 10 such awards). Please do not leave comments in this thread – to participate in the contest – please leave a comment here in the original contest page. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Is it better to always purchase as much as higher in Watts SMPS, for PC?

    - by metal gear solid
    Is it better to always purchase as much as higher in Watts SMPS, for PC? Does higer watts SMPS also consume more power (electricity bill)? How to know how much watts of SMPS we should purchase? What are factor who decide how much watt of power will need? I'm going to purchase a new Motherboard + CPU + HDD + RAM + DVD Wrtiter + SATA 500 GB HDD ? I'm not purchasing any external Graphic Card. How to decide which watt of SMPS ,I should purchase?

    Read the article

  • replacement drive cage for power edge R710

    - by bumble_bee_tuna
    Hi I'm performance tuning a DB server its a Dell R710 there is a very significant I/O bottleneck. Unfortunately the server was purchased with the 6 x 3.5 inch sata configuration which doesn't give me the leeway I need to address the issue. Before going to DAS does anyone know if it is possible to purchase a replacement front drive enclosure ? I know the server is configurable with something like 12 or 16 2.5 inch drives and it appears to be modular ? I tired contacting dell but the offshore parts department reps are not very bright lol. Thanks.

    Read the article

  • Disable or sleep secondary HDD in Macbook

    - by cpak
    I've done some quick Googling but didn't find an answer. I've put an SSD in my Macbook, and at the same time moved the original HDD to the optical drive bay. I'm running the OS and most of my daily apps off the SDD so the HDD is really just for storing stuff I need now and then. Now I'd like to disable (as in power off or "force sleep") the HDD when I don't need it. Tried unmounting the disk using diskutil unmountDisk but it kept spinning for like 10 minutes. Maybe that's to be expected, but I'd imagined it would stop instantly on unmount. Also, it would be nice to have it disabled by default, and only mount it (= power on) when I need it. Grateful for any input on this!

    Read the article

  • Why Does My Windows 7 PC Freeze After Waking from Sleep?

    - by Blaenk
    Hey guys. I have Windows 7 running on my computer and everything is perfect. There's only one little problem. Sometimes when I leave my computer, I come back and my monitor is turned off or asleep, whichever it is. This is fine, I set it to do this. However, after turning on the monitor and moving the mouse around, the mouse cursor freezes; both the keyboard and mouse don't respond to anything, for example the keyboard's windows key won't bring up the start menu and moving the mouse around does not move the cursor around on the screen. I have to wait about a minute or two before things start working again. I figured this was a power savings setting problem, so I went into Control Panel Power Options. I only have Turn off Display = 30 minutes and Put Computer to Sleep = Never. Of course, I went into the advanced power settings to look through there. I put Never to turn off the hard disk, Sleep after never, and that's about it. Nothing else there looks like it might be causing this. I went into the device manager and checked the mouse and the keyboard, and they both have the Allow this device to wake the computer checked for both of them. Perhaps this other bit of information might help: Sometimes I VNC into my PC using my MacBook, and sometimes, as soon as it shows me the desktop, the same thing happens. The mouse won't move and VNC won't register any events on the server (Which is my PC of course). I close the client (And I know it has nothing to do with the client), then immediately restart it and try to connect. When I click the connect button, it hangs there, as if the PC is not responding. Basically it's like whenever I try to wake the computer from sleep, it does so by showing me the desktop, then it freaks out. Then again, I guess the computer isn't sleeping because the setting is set to 'Sleep after = Never'. I honestly don't know what's going on, would appreciate any insight. Thanks!

    Read the article

  • SQL SERVER – FIX ERROR – Cannot connect to . Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452)

    - by pinaldave
    Just a day ago, I was doing small attempting to connect to my local SQL Server using IP 127.0.0.1. The IP is of my local machine and SQL Server is installed on the local box as well. However, whenever I try to connect to the server it gave me following strange error. Cannot connect to 127.0.0.1. Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452) The reason was indeed strange as I was trying to connect from local box to local box and it said my login was from an untrusted domain. As my system is not part of any domain, this was really confusing to me. Another thing was that I have been always able to connect always using 127.0.0.1 to SQL Server and this was a bit strange to me. I started to think what did I change since it  last time I connected to SQL Server. Suddenly I remembered that I had modified my computer’s host file for some other purpose. Solution: I opened my host file and immediately added entry like 127.0.0.1 localhost. Once I added it I was able to reconnect to SQL Server as usual. The location of the host file is C:\Windows\System32\drivers\etc. You will find file with the name hosts in it, make sure to open it with notepad. If you are part of a domain and your organization is using active directory, make sure that your account is added properly to active directory as well have proper security permissions to execute the task. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Error Messages, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Laserjet Experts: How many power cycles per month?

    - by marienbad
    I recently got a nice Laserjet 8100DN for my house. I will probably never print more than 1% of its rated monthly duty cycle. But it runs some fairly noisy fans 24/7 if it's left on, so I am in the habit of turning the machine off as soon as I'm done with it. So, for all you who have a lot of experiencing administrating workgroup LaserJets, do you think I'll end up killing it from too many on-off cycles?

    Read the article

  • Dell PowerEdge 860 won't boot but gets power

    - by fierflash
    I have a Dell PowerEdge 860. Got an 2008 R2 running on it. Here is the scenario I'm currently in: I can boot it up and work as usuall. But when I restart it, it just shuts down, doesn't reboot, and it won't boot up again. Then it stays in this "mode", On/off button blinking green(standby mode?) and System Indicator LED blinking amber. If I try to press the On/Off button on the frontpanel it won't boot. It's like you can hear the fan from the PSU running but nothing else is trying to boot. If I unplug the powercable and then put it back in again it's the same, the extremley noisy fans won't start and it's just sitting there. If I let it "rest" for like 1 to 24 hours while the powercable is unplugged and I plug it in again, it boots directly, without me having to push the On/Off button. What I have tried: Run diagnostics(not the one in POST phase) and everything is fine Booting without any cables except the powercable Boot without memory installed Boot without the raidcable plugged in Cleared NVRAM Reseated all the components and cables Googling like a freak for any possible solution Tried Dell Support but I don't have any warranty left so they can't help me unless i pay some ridiculous amount of money I suppos Do anyone have some experience with the same issue? Do I need to replace something or is there any other way to determine the problem? Any help will be greatly appreciated.

    Read the article

  • Redundant APC UPS units, single server set up

    - by Sholom
    Hi All We have a very simple set up, looking for a very simple (reliable) solution: Setup: One Dell box with redundant power supplies running Windows 2003, plugged into two separate APC SmartUPS 1500 units (USB, no smart cards) on two separate circuits. Solution required: IF (UPS1 = Low) AND (UPS2 = Low) THEN: Shutdown gracefully ELSE: DO NOTHING!! APCUPSD only allowes for one instance (and therefore one UPS) in a windows environment. PowerChute can't do this without using APC Smart Cards which means utilizing our switch, but the switch does not have redundant power supplies, so it will only live for as long as one of the two UPS units. And no, i don't have the budget to buy two smart cards pluse a switch with redundancy ;) Thanks

    Read the article

  • Keyboard Slow on a high power machine.

    - by Tim Pierson
    I am having a terrible time with my high powered machine. The keyboard is not displaying the keys as quickly as I type. Sometimes I have to wait up to a minute for the key to display. When I type ahead it sometimes loses characters. I am not sure where to start looking for this problem. It started about a month ago and I still have not figured out why. It does not always do it. But acts up about 2-3 minutes out of ever hour of use or thereabout. How can I look to isolate and find the problem, and solve it?

    Read the article

  • Power Shell does not like command

    - by Campo
    Any ideas what I did wrong here? I copied this script from a tutorial and get this error.... PS C:\Windows\system32> Get-Service | Where-Object ($_.status -eq "running") Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert value "False" to type "System.Management.Automation .ScriptBlock". Error: "Invalid cast from 'System.Boolean' to 'System.Management.Automation.ScriptBlock'." At line:1 char:27 + Get-Service | Where-Object <<<< ($_.status -eq "running") + CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand

    Read the article

  • solaris + EMC + power-path

    - by yael
    please advice - when I run powercf command on my Solaris machine , which changes this command do on the EMC storage , or on Solaris file system ? from maanual page: DESCRIPTION During system boot on Solaris hosts, the powercf utility configures PowerPath devices by scanning the HBAs for both single-ported and multiported storage system logical dev- ices. (A multiported logical device shows up on two or more HBAs with the same storage system subsystem/device identity. The identity comes from the serial number for the logical device.) For each storage system logical device found in the scan of the HBAs, powercf creates a corresponding emcpower device entry in the emcp.conf file, and it saves a primary path and an alternate primary path to that device.

    Read the article

  • HDD not detected whenever first power on (detected at BIOS level)

    - by Alvin Lim
    I am using Asus P8H61-M LX Motherboard with latest version of BIOS: 4401 One SATA-3 Western Digital Black Series 1.5TB is attached to SATA port 0 A Samsung 22x DVDRW SATA drive attached to SATA Port 1. ps/2 Logitech mouse and keyboard. CPU is i3 with DDR3 8Gb RAM. no other devices are installed. My problem is that when I turn on the computer, the WD HDD is not detected. ie cannot be booted. I have to press ctrl+alt+del in order to get it detected. I'd used the WD data lifeguard software to scan the HDD, the smart status is OK, the surface scan does not show any error at all. Where did I do wrong? Any advice is greatly appreciated.

    Read the article

  • BSOD after PC has been running for a while

    - by user1389999
    I'm having a problem where my computer is getting a blue screen. I have noticed that the BSOD happens after the PC has been running for about 2 days. The BSOD's seem to be an error with atikmpag.sys with an error code of 0x00000116. The problem started about a month ago.It has happened all five times that I left my computer on that long in the past month. Because my computer is a pre-built one from Dell, and I had upgraded the graphics card (at least a year ago) to a more demanding one, I replaced the stock 360W power supply that came with it. I replaced it with a more powerful, 680W one, because it seemed like the problem could be related to a lack of power supply wattage, but it didn't affect the problem at all. Here are the minidump files for the five BSOD's that I have experienced: https://dl.dropbox.com/u/3488338/bsoddumps.zip System info: Windows 7 Home Premium x64 Dell Studio XPS 435MT Radeon HD 5670 (Version 12.4 of the Catalyst driver) Intel Core i7 920 2.67 GHz 6GB of RAM

    Read the article

  • Mouse Hang with voltage fluctuation

    - by user265495
    I bought a new assembled PC about a month ago, but for the past 7 or 8 days I found my mouse cursor hangs every time there is a voltage fluctuation on my UPS (I guess it as when sound comes from ups then mouse hang for 2 or 3 sec. and them it goes normal again). My PC also seems to shut down while I'm working and it refuses to boot again - I end up needing to switch off my UPS and press and hold the power button for 30 seconds. It will then boot as per normal. Could the trouble be with my PSU? Am I potentially damaging my computer by pressing and holding the power button? I have : Motheboard : intel Chipset Model - DH61WWAAG23116-303 Processor : Intel Core i3 3.20 Ghz RAM : Zion 4 gb DDR3 HDD : 1 tb GRAPHICS : 2 gb NVIDIA GeForce GT-610 CABINET : Frontech Rock OS : Win 7 32 Bit

    Read the article

  • Windows 7 reboot and freezing, possible power problems?

    - by mikelbring
    My Gateway LX Series desktop is about 6-8 months old. When I bought it, it had Windows Vista. I then put the RC version of Windows 7 on it. About 3 months after I bought it, it would randomly start to reboot, actually just shut off. I monitored the temperature levels and they seemed normal. So I installed a fresh Windows 7 Ultimate OEM 64bit. It actually got worse and would reboot more frequently. I then contacted Gateway and they said my machine was built for Windows Vista (made me chuckle), and told me to update my BIOS. So I did, and it was fixed for a good couple months. Recently, it started to do it again. Now I noticed early on it was doing it most often, if not every time when I was either watching a flash video or playing a flash game. So I decided to download the drivers again and I also downloaded my motherboard drivers. Seemed to be okay. A week later it started doing it again. And now it's doing it even more frequently. Sometimes I would turn it on, login into Windows and *BAM!* it would shut off. Now I am at the point where I can hardly get it to turn on. It would freeze at the point where it says "Starting Windows", with the Windows logo. Sometimes it would say "Checking disk for consistency" or whatever and freeze there (not shut off, just freeze). I even got the prompt to launch startup repair. But that also freezes when it says starting Windows. It does not really freeze, just never loads up. I am kind of lost as to what's going on. I have a few ideas but nothing I want to pursue (graphics card? hard drive?). Another thing I did try was to boot into a live disk of Ubuntu and try to launch every program I could and get on the internet but I never got it to reboot. So it sounds like to me it's a Windows thing, but I have no idea. I am just stuck and would like to see if any one has any ideas or could lead me in the right direction.

    Read the article

  • Computer won't stay powered up

    - by Android
    I have just tried to turn my PC on this morning and it won't stay powered up. It will come on as normal for about 5 seconds, not quite long enough for the monitor to wake up. Then it will power off. After about 2 seconds it will start again, it will continue like this until I pull out the plug. Plugging it in again doesn't restart the cycle although pressing the power button does. I have tried to clear the cmos but beyond that I have no ideas. It was working perfectly when I put it in hibernate last night.

    Read the article

  • Bind9 not doing anything with forwarded query responses?

    - by Rykaro
    I have a Bind DNS server that is the local production DNS server and a Windows 2008 R2 domain controller which provides DNS for a lab environment with the domain xyz.lab. I've configured the Bind DNS to forward DNS requests for the domain xyz.lab to the Windows DNS server with this config: zone "xyz.lab" { type forward; forward only; forwarders { x.x.x.x; }; }; zone "x.x.x.in-addr.arpa" { type forward; forward only; forwarders { x.x.x.x; }; }; And Bind options are (the all_internal acl includes the subnets of both the production and lab networks as well as the loopback of the bind server): allow-query { all_internal; }; allow-recursion { all_internal; }; allow-transfer { none; }; notify no; minimal-responses yes; version "unknown"; Unfortunately, when I do an nslookup or dig on the bind server for a host on the lab domain, the request times out. The logs on the Windows 2008 DNS server show it receiving the query and responding to it and a network packet trace shows the query responses arriving at the Bind DNS server. The servers reside on the same switch with a router providing connectivity between the layer 3 subnets (production and lab are on different subnets) and there is a round trip time of between 3ms and 5ms on pings between the two servers, so I don't think there is an issue with latency causing a timeout of the query. In summary a query-response arrives back at the Bind server and the nslookup/dig times-out. Why does the Bind DNS not seem to be doing anything with the query responses when it receives them?

    Read the article

  • Forcing Windows to be 'awake' during certain hours?

    - by Mun
    I'm running Windows 7 and have the power options currently set up to put the machine to sleep after 2 hours of inactivity. Is there any way to force the machine not to sleep between certain hours, or to automatically wake up? I'm assuming this can't be done directly from within the Windows power settings, but is there a third party utility (preferably free) that could take care of this? I've got backups scheduled every morning at 3-4am, and these don't run if the machine is suspended, so I just need to make sure that the everything is powered up during this time.

    Read the article

  • where can i get cables for the canon Mx310

    - by Tarrasch
    Hey there, a friend of mine gave me a printer/scanner because he could not print with it anymore. the point is this thing has been lying in the cellar for quite some time now and the cables are missing. that is the power cable for my power plug ( there are foreign ones included) and more importantly the connection to the computer. I have googled around for a bit and tried to get to a hotline,but my problem is : Where can i get those cables from? Can anyne help me get a clue where to find those, where to ask for something like this? cheers

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >