“Missing Operating system” on Boot

ERROR Yikes.
When  playing with BIOS settings to try and use Graphics card + OnBoard (see previous post), I was curious to see if OnBoard would work on it’s own. So change one option to IDE, with no graphics card. At this point I had no monitor, possibly only on boot. I may have at some point used some form of Restore Default Settings. From this point forth it would not boot, but would just display “Missing Operating System”.

SOLVED: With more technical support we realised that the SATA configuration settings were something other than RAID, which this machine is on. After reverting this back to RAID the machine booted again.

How to set up 3 monitors by using a graphics card plus onboard graphics and BIOS

The following is instructions received from a technical support, regarding my new PC

I can advise of the following settings that need to be set for 3 monitor support on your system.
You need to enter the BIOS by pressing either DEL or F2 during the POST. 

(1)    In the Chipset section, then Northbridge, the Initiate Graphic Adaptor setting needs to be set to PEG/IGD
(2)    In the Chipset section, then Northbridge, the IDG Memory setting needs to be set to at least 64MB.
(3)    In the Chipset Section, then Northbridge, the IDG Multi-monitor setting needs to be set to Enabled.
(4)    In the Advanced Section. Then Intel IDG SWCSI OpRegion. The DMVT/Fixed Memory needs to be set to at least 256MB. 

You will then need to press either F4 or F10 to save and exit.

SQL Agent job calling stored procedure msdb.dbo.sp_send_dbmail @query does not return any records

ERROR:
SQL Agent job calling stored procedure msdb.dbo.sp_send_dbmail @query does not return any records

SOLUTION
Add the Database Name into the @query

BACKGROUND
This may be because of the default database of the account which executes the SQL Agent job.

EXAMPLE
If @query does not include the database name (three-part naming), it is possible that although the EXISTS may fire, the @query does not.
To solve add the Database Name into the @query.

BEGIN TRY

IF EXISTS(SELECT * FROM Production.vAuditSOCDBTable)
  BEGIN
   DECLARE @MyBody nvarchar(100)
   SET @MyBody = ‘<message>’ + char(13) + char(10)

   EXEC msdb.dbo.sp_send_dbmail
    @profile_name = ‘<>’,
    @recipients = ”,
    @blind_copy_recipients = ”,
    @query = ‘SELECT * FROM <databasename>..’,
    –or possibly @execute_query_database = ‘databasename’,
    @subject = ‘subject’,
    –@attach_query_result_as_file = 1 ,
    @body = @MyBody;

   PRINT ‘message’
  END
 ELSE
  PRINT ‘nothing in audit’

END TRY
BEGIN CATCH
 SELECT ERROR_NUMBER() ErrorNumber, ERROR_MESSAGE() [Message]
 PRINT ‘FAILED’
END CATCH

Calculate Code Metrics – Troubleshooting

Project A references B
Code metrics work fine for B. Project A builds OK in Visual Studio. However “Calculate Code Metrics” on project produces error.

Message: An error occurred while calculating code metrics for target file ‘<My Assembly1 path>’ in project <My Assembly1>. The following error was encountered while reading module ‘<My Assembly2>’: Could not resolve member reference: <My Assembly3>.Models.IModel::get_FunctionTable.

SOLVED
It is possible that Code Metrics is using a different reference to Visual Studio. In my particular case my “Common Assemblies” folder had an older reference for Project B. By deleteing the reference from Common Assemblies, Code Metrics was forced to use the more up to date Project Reference, and then worked.

SQL Server Table Fragmentation

USE AdventureWorks;
GO
DBCC SHOWCONTIG (‘HumanResources.Employee’)
GO

DBCC SHOWCONTIG scanning ‘Employee’ table…
Table: ‘Employee’ (869578136); index ID: 1, database ID: 6
TABLE level scan performed.
– Pages Scanned…………………………..: 7
– Extents Scanned…………………………: 3
– Extent Switches…………………………: 2
– Avg. Pages per Extent……………………: 2.3
– Scan Density [Best Count:Actual Count]…….: 33.33% [1:3]
– Logical Scan Fragmentation ………………: 14.29%
– Extent Scan Fragmentation ……………….: 33.33%
– Avg. Bytes Free per Page…………………: 172.6
– Avg. Page Density (full)…………………: 97.87%

  • sys.dm_db_index_physical_stats DMV example:

USE AdventureWorks
GO
SELECT object_id, index_id, avg_fragmentation_in_percent, page_count
FROM sys.dm_db_index_physical_stats(DB_ID(‘AdventureWorks’), OBJECT_ID(‘HumanResources.Employee’), NULL, NULL, NULL);

http://msdn.microsoft.com/en-us/library/ms189858.aspx

As a guideline from above

 

avg_fragmentation_in_percent value Corrective statement
> 5% and < = 30% ALTER INDEX REORGANIZE
> 30% ALTER INDEX REBUILD WITH (ONLINE = ON)*

 

 

1.Do you have a consistent .NET Solution Structure?

See http://rules.ssw.com.au/SoftwareDevelopment/RulesToBetterDotNETProjects/Pages/default.aspx

While I like many projects and it solves some problems, it also causes others for instance if changing the connection string at run-time this must be done in all projects.

Computing Frustrations – Annoyances

Written to see if this presents any ways of reducing frustration
List is:

  1. Computerstaking a long time to turn on
  2. Always updating whether you want to do so now or not
  3. You are working on one job when the computer/software another problem intervenes nothing to do with this work

Things that help:

  1. Blog solutions to problems for future reference
  2. Do things which are satisfying
    • Work on code generation
    • Use code generation
    • DRY – make something re-useable
  3. Satisfaction is a function of expectation

 

LINQ errors

Error:

  • ‘First’ is not a member of ‘System.Data.EnumerableRowCollection(Of System.Data.DataRow)
  • “Definition of method ‘GroupBy’ is not accessible in this context”
  • ‘ToList’ is not a member of ‘System.Linq.Iqueryable(Of T)’

Solution:
Imports System.Linq
Also ensure that the DataSet is up to date. Use Run Custom Tool on the DataSet to ensure this.
Then ensure there is a reference to “System.Data.DataSetExtensions”.

See MSDN “How to Create a LINQ Project”
http://msdn.microsoft.com/en-us/library/bb546156.aspx

See MSDN 101 LINQ Samples
http://msdn.microsoft.com/en-us/vbasic/bb688088

Windows XP icons all hi-lighted AND Office 2003 loses color

My NVidia Control Panel was set for dual monitors. However one was detached, so it seemed to have switched it to Main monitor name + TV.
Changed back to single monitor and both of the above problems disappeared

Other sites have different answers for the Windows XP icons all hi-lighted. This was not the issue in my case.

Windows 7 SDK – Hilo

Cool sample http://code.msdn.microsoft.com/Hilo-0e6f10bf
http://msdn.microsoft.com/en-us/library/ff708696%28v=MSDN.10%29.aspx

Initially had error “cmd.exe exited with code 9009”
The code.msdn page where Hilo is in Q+A had this solution:

Hey, Try to open Properties for Annotator (right click) and select Configuration Properties –> General. Then set Platform Toolset to “Windows7.1SDK” (need to install Windows SDK 7.1 first). Good Luck
 
Then I had a message saying that the SDK was not installed. It seems that even though Windows SDK is installed with Visual Studio, I needed to install v7.1 to get Hilo sample working. The SDK did not install completely first time. But on trying to install it again, it suggested it was installed, did I want to Repair it, which I did, this seemed to work and Hilo then built and ran.