I ran into an unusual Error in SQL “Msg 15331, Level 11, State 1” “cannot take the action auto_fix due to duplicate SID”. I had restored a database from another server and decided to update the database owner name to one that had a mismatched SID.
Here is how to find it:
SELECT u.name, u.sid, sp.name, sp.sid
FROM sys.sysusers u
LEFT JOIN sys.server_principals sp
ON u.name = sp.name
WHERE u.sid != sp.sid
So at first I tried to fix it myself by updating that SID and found:
Msg 259, Level 16, State 1, Line 1
Ad hoc updates to system catalogs are not allowed.
The SID for the owner would not repair until I changed the owner of the database to “sa” or myself. (go to db properties, select files, change owner value.) Once this was updated the autofix statement will repair the user: EXEC sp_change_users_login ‘Auto_Fix’, ‘username’
At that point I could set the db owner back to the desired name.
Where else should you put your keys than a keyboard keyboard? Of course it should light up, connect to USB and be Starcraft 2 branded. I put an outlet in the wall with USB connectors as well as standard plugs. The keys clip onto stainless steel drawer handles. Only one of the electrical paths was damaged by drilling the holes for bolts. I tested it each time I drilled one out. The lower left corner of the key backlights no longer have an LED. Everything else works! Now the family fights: Is it a keyboard keyboard©, or is it a key keyboard©?
I was perusing the MSSQL Agent logs and came across a job that kept printing errors every 20 seconds. It has an id with a long number. How can you find what job this is by name?
Here is what the error looks like: “Request to run job 0x17DF82795C5C224CBF7DC88E8E3C4E12 (from Alert 2618) refused because the job is not currently enabled.”
To find the job I must assume that this mess of numbers is a GUID, and therefore it relates to a name?
select * from dbo.sysjobs
I find a job_id that relates to the problem above by just grabbing the last part of the guid without dashes. Here is the real job_id:
I can also look for when this job might fire again:
select top 100 * from sysjobschedules where job_id like ‘%C88E8E3C4E12%’
The job is disabled and there are no schedules for it. So why is it erroring every 20 seconds? It is an alert:
select * from dbo.sysalerts where id = 2618
Someone created a check for blocking transaction job, and fired it upon Blocking Alert. Then they found out that they didn’t want the thousands of emails so they disabled the job. The alert is enabled, calling a disabled job. Error logs get filled now instead of inboxes. The solution was to disable the alert.
The school computers are all ASUS G1Sn laptops. Asus didn’t bother to write drivers for this system, so here is a path for rebuilding and loading XP tharupon. 4 gig systems have to pull the memory back to 2 sometimes. With one memory strip the Video card will find itself. Some people have been able to disable PCI express ports to get around this. (P.S. Thank you Nvidia for finally allowing Mobile drivers to install without a hammer and custom .inf files!) Note: G1s (not g1sN) have 205 and 300 BIOS to allow the following:
1. Go to BIOS Utility F2 during splash screen
2. Select advanced – IDE SATA CONFIGURATION – Compatibility.
3. Boot from CD and Install Windows XP and Service Pack 3.
4. Download and run 7kim06ww.exe
5. Go to C:\DRIVERS\WIN\IMSM\PREPARE, and double-click install.cmd.
6. Reboot and enter the BIOS.
7. Select Advanced – IDE SATA CONFIGURATION – ENHANCED
8. Start Windows XP. The Welcome to the Found New Hardware Wizard appears.
9. Click No, not this time and click Next.
10. Select Install from a list or specific location (Advanced), then click Next.
11. Select Search for the best driver in these locations. Then select Include this location in the search:, specify the path, C:\DRIVERS\WIN\IMSM, and click Next. The Completing the Found New Hardware Wizard appears.
12. Click Finish.
13. When the System Settings Change window appears, click Yes. Restarts.
Two Acer Aspire Ones have died on my watch. A pink 150 and a sapphire blue AOA 150-1447. Both were almost a year old. In both cases the failure occurred after closing and opening the lid (when they should have gone to sleep mode) They act like they want to boot, make hard drive spin sounds, but never display on the screen. The good news is that Aspire has built-in a BIOS recovery routine, so it is possible to flash the BIOS even if the system doesn’t boot anymore. (note that the windows license sticker is right where it will rub off. Put some clear tape over the product key so you don’t loose it.)
The following steps completely recovered one of my two Aspires:
1. Format an USB thumb drive as FAT. (My Computer – right-click the USB drive – select FAT and format.)
2. Download the latest BIOS to your USB stick: (ftp://ftp.acer-euro.com/netbook/aspire_one_150/bios, ftp://ftp.acer-euro.com/netbook/aspire_one_110/bios).
3. Open the downloaded BIOS file and put both “FLASHIT.EXE” and the BIOS file (named like “3011.fd”) in the root directory (main folder) of the stick. Rename the BIOS file to exactly “ZG5IA32.FD” < – – everything between the quotes.
4. Connect your USB drive to Aspire 1 while it is powered off.
5. Make sure the battery is installed and the power adapter is connected.
6. Hold both the “Fn” and “Esc” keys down together, keep them pressed and press the power button to turn the Aspire on. Release all these keys after a couple seconds, the power button should be blinking.
7. Press the (now flashing) power button. The power button will continue to blink. Your Aspire should initiate the BIOS flash at this point. Do not interrupt this process! You should see it briefly access the USB drive (USB lights blink), the Aspire will reboot shortly after. You will see the Aspire power lights go on and off and then it should reboot. Wait patiently.
8. If a full reboot happens rejoice when you see life on the screen again! Your BIOS has been updated and all settings will be at default. This whole process should be no longer than 5-10 minutes.
This worked for my blue Aspire, and not the pink one. No matter how many ways, different BIOS files or USB formats I tried nothing worked. The Pink one would not access the USB. The only difference between the two was that the USB light never flashed during the process. It ended up requiring an RMA and a new mainboard. The warrantee process was quick, within about two weeks total the original pink machine came back fully repaired.
I have not been keeping record of why I can’t stand Vista. Microsoft is so ashamed of their work they call it “Windows 6” for the service packs. Anyhow the recent support cry was for a webcam, which Microsoft kindly and intentionally removed support for. Apparently something in Service Packs can help, so here is the friendly message:
One hour? That is longer than installing the OS takes! Plus the service packs are no longer cumulative, so SP1 has to go first. What a joke! A gigabyte download and all of this to add support for a native XP function. Please indicate whether you want to read this post. Windows needs your permission to do what you are trying…
Ever download a trial version to handle one of those EVIL proprietary image formats like .daa or .uif? Thanks to Luigi’s tools problem solved. I tested UIF2ISO and DAA2ISO using a multi-part image. Very sweet. Whoever creates non-standard image makers like MagicISO or PowerWhatever makes me angry.
So you need to automate some long SQL crunching process in the background? You don’t want slow code and you do not want the browser tied up. You need a fire and forget method. There are several interesting ways to accomplish this. Using ColdFusion 8 you can create a CFthread to hold the process, but we are not at that version yet. We also do not have permission to create CF schedules. I did not want to attempt to consume a webservice from SQL or do anything risky from a security point of view.
My first solution involved scheduling a SQL Job that checks every now and then in a table and fires off based on the values stored there. The problem with this is notifications of when the Job finishes.
Another solid method was to build an AJAX loading screen and use a CFFlush to give most of the page back but leave the long running process as a background part of the page. This also was painful, creating timed out pages and locked tables. More details on this solution at ColdFusionJedi.com.
The final solution I built is similar to the above, but with one interesting difference. I still populate the queue table with the variables I want processed. I still have the stored procedure set up to look in the table and do the work. The trick is to launch a Stored Procedure using the sp_start_job in a table trigger. Sp_start_job has a special quality that it does not need to return a status. Here is what the actual trigger looks like. Simple!
CREATE TRIGGER [dbo].[DoThisLongThing]
EXECUTE msdb..sp_start_job N’LongRunningJobName’ ;
I ran into two gotchas. They both relate to sp_start_job living in another db (msdb). The first error below is an indicator that the job or a child job does not have proper permissions. The database cannot see the job even though it exists and you get something like:
“The specified job_name (‘Your_Job_Here’) does not exist.”
And the other frustratingly cryptic problem:
“The EXECUTE permission was denied on the object ‘sp_start_job’, database ‘msdb’, schema ‘dbo’.”
To solve these, first attempt to authenticate as the web db account using Microsoft SQL Management Studio and perform an insert. This should narrow the problem down. If the web insert fails to fire the trigger with the above errors, here is a path to investigate:
- SQL Agent must be running
- The target db account needs the ‘SQLAgentUserRole’
- Make the target db account owner of the job
If you still end up with errors look into the following:
- Explicitly grant the EXEC permission to the target account
- Set the target database as trustworthy from msdb
- Verify the current version of MDAC on SQL and on CF server
The IT world seems to regurgitate catch phrases and “power words”. This leaves us meager developers with the need to build a list of these things for future reference:
Robust dynamic feature-rich flexible architectures with stylized integrated automated procedure-driven enterprise-wide application-specific configurable intuitive modular adaptive beneficial structures.
This post should get edited frequently with generic phrase banter upon occasion. Feel free to submit more for when creative juices are not flowing.