The current time is

Monday, March 23, 2009

Shrinking the "Unshrinkable" SQL Transaction Log

I've found this "catch" in some blog and thought that I must share it with more people who may have the same problem :)))

Here it goes...

"

Various reasons may cause SQL Server to get in a rut and not empty the transaction log of a database. In my case, our database backups were failing without our knowledge for several weeks, so the backups were never successful, and the transaction logs of a few databases grew so large that the backup process would still not clear out the transaction log. In one case, we had a 187MB database with a 37GB transaction log!

The insanity had to stop! A handful of databases like this would put us over the top on that particular server's hard drive storage.

The SQL Server GUI for shrinking the database rendered no effect, and even using the DBCC SHRINKFILE command was not working.

The key, as explained by Pinal Dave, is to run the SHRINKFILE command twice,with an explicit backup log truncation in between both runs. This code here will get you up and running:

SQL:
  1. DBCC SHRINKFILE("MyDatabase_Log"1)
  2. BACKUP LOG MyDatabase WITH TRUNCATE_ONLY
  3. DBCC SHRINKFILE("MyDatabase_Log"1)

This freed up dozens of gigabytes on our server.

"

Sunday, March 22, 2009

"Unable to load client print control" bug is finally fixed !!!

I finally got this annoying “Printing” error fixed and out of my wayyyy... Yaaaaaaaaaay... So, find the steps here below :)))
First, you have to install the MS Security patch 956391 on all the client machines. They normally would get installed if these machines are running the "Windows Updates"...
Secondly, you should install SQL server Service Pack 3 on Reporting Services 2005: You can find the installation files at this link: http://www.microsoft.com/downloads/details.aspx?FamilyID=ae7387c3-348c-4faa-8ae5-949fdfbe59c4&DisplayLang=en
Finally, you should install Microsoft Report Viewer Redistributable 2005 Service Pack 1 on the Share Point machines. You can find the installation files at this link: http://www.microsoft.com/downloads/details.aspx?familyid=82833F27-081D-4B72-83EF-2836360A904D&displaylang=en

Now, sit back and enjoy printing all your reports :))))))

Monday, January 12, 2009

Some Sharepoint lessons learnt... Just today

Some lessons that I've learnt today:
1- The Sharepoint control "SharePoint:SPGridView"'s columns' HeaderText cannot be bounded in the HTML design view with server tag's values
2- Always do backups for the Sharepoint applications' web.config (I had so many huge issues just because I tried to re-format a web.config file in the visual studio). Those file are better never touched... Take veryyy good caution... :))

Thursday, December 18, 2008

There are no primary or candidate keys in the referenced table

Couple of days back... I got this error
"There are no primary or candidate keys in the referenced table 'dbo.Table01' that match the referencing column list in the foreign key 'FK_Table01_Table02'."

Although the column list in the first table DO MATCH the column list in the second table with the same data types...

After alot of investigations, my collegue and I discovered it has to do with the order of columns being referrenced... Never thought that this matters... but this solved the issue... :)))

Wednesday, November 26, 2008

Live webinar: Accelerate the deployment and provisioning of your SharePoint e-learning platform

Challenges faced by today’s educational institutions typically lie in three main areas: efficiency, security, and accuracy.

When it comes to building a Microsoft based e-learning platform, thousands of students, teachers, and parents’ accounts should be provisioned for tens or hundreds of your schools on an interrelated set of Microsoft application servers such as Active directory, SharePoint, Exchange, and Office Communication Server (OCS). In reality, these activities are painful. In such large-scale deployments of Microsoft Learning Gateway (MLG) or other connected e-learning solutions, manual provisioning becomes practically impossible. Consider data incompleteness and inconsistency. And add the fact that mass provisioning is needed every new academic year and ongoing re-provisioning is needed through the year.

Build your Microsoft e-learning platform. Automate your most mission-critical provisioning and ongoing management activities. Rely on a secure, reliable, and scalable provisioning solution; ITWorx Education Catalyst Provisioning Suite.

ITWorx introduces Catalyst 2.0, the second release of its market- sweeping provisioning product, with a richer set of functions and capabilities to further expedite and facilitate your provisioning processes.

In this webinar you will learn how Catalyst can:

  • Decrease the provisioning time from weeks to hours.
  • Meet the real education business challenges.
  • Automate the synchronization with Schools’ Management Information Systems.
  • Guarantee data consistency and accuracy across the board.
  • Tailor to administrator needs for reduced complexity.

Tuesday, November 25, 2008

Writing a data-driven unit test

This was a really cool investigation…

It's all about one having a unit test case and it is required to run it using some number of data… An "easy" way out of this could be creating the same unit test case with different parameters every time. However, if one has enormous amount of data that should be tested on a specific method, he can create a unit test case and bind to it a datasource that is used by this test case.

Please follow the steps below:

  1. Create a new test Project (File New Test Project)
  2. Create a new method into the default class being created (Let us name it: TestTrimTexts())
  3. Above this method, you should write the code [TestMethod]
  4. To identify the datasource that would be used by this test method, you should write this line of code: [DataSource("System.Data.SqlClient", "Data Source=.\\OfficeServers;Initial Catalog=master;Integrated Security=SSPI;", "spt_values", DataAccessMethod.Sequential)]

    This instructs the CLR to use the table "spt_values" using the connection string "Data Source=.\\OfficeServers;Initial Catalog=master;Integrated Security=SSPI;" and the provider "System.Data.SqlClient". It also mentions that the data should be used sequentially.

    The most important part comes last, reading the data from the datasource just defined in the previous steps. You should add this pieace of code:


    Afterwards, inside the test method, TestTrimTexts(), you should use the TestContext.DataRow["name"] where it will contain data fetched from the datasource specified, the column named "name", in this case.

    Enjoy it then :)

    Notes: There is an overload for step number 4. Check the screen shot below:


    This overload had a small problem with me since it used data from the datasource randomly and this caused me to get frightened while debugging… I wasn't able to trace it with ease :)

References:

  1. http://msdn.microsoft.com/en-us/library/ms182528(VS.80).aspx
  2. http://msdn.microsoft.com/en-us/library/ms182527(VS.80).aspx
  3. http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testcontext.datarow(VS.80).aspx

Tuesday, November 18, 2008

Installing Visio for Enterprise Architects without installing the prerequisite Visual Studio

Today I faced a problem while installing Visio (Enterprise Architects version) on my work machine... Tried searching the net for solutions, but didn't find much. However, I still believed there was a way... After more searching, I found this amazing wicked method... Follow me :)

Open the registry at the following key:
HKLM\Software\Microsoft\VisualStudio\8.0\Setup\VS\VSTD\

Of course, if you didn't find any part of this path, create it till the end...

Afterwards, inside VSTD, create a String key with name "ProductDir" and put any text inside it.

Voilaaa, VSTA installation will start like a sparky :)

Enjoy it till it lasts...

Monday, November 03, 2008

Brain Computer Interface (BCI)

I've had some friends at university (The American University in Cairo - AUC) who actually implemented their thesis project to work out a BCI system and it did work in the demo...
Now, we even read more about it online !!!
Check this video below :)


Saturday, November 01, 2008

Gmail accessing methods

Ever thought of accessing your gmail using other ways than the ones you are used to...
I've listed them here for you
Enjoy

Safe mode

http://mail.google.com/mail/?labs=0.

It disables the experimental features from Gmail Labs, just in case some of them are buggy.


Secure mode

https://mail.google.com/.

It encrypts the traffic between your computer and Gmail’s servers.


Older version

http://mail.google.com/mail/?ui=1.

This version has been replaced in October 2007 by a rearchitectured Gmail, but the old version is a little bit faster.


Basic mode

http://mail.google.com/mail/?ui=html.

It’s the version that doesn’t use JavaScript, so it loads faster and it works well with older browsers.


Mobile mode

http://mail.google.com/mail/?ui=mobile or http://m.gmail.com.

This is a simplified Gmail interface for mobile phones that has even less feature than the basic mode. Use it if no other Gmail mode works for you.


iPhone mode

http://mail.google.com/mail/x/gdlakb-/gp/.

A more user-friendly mobile version for iPhone and other mobile phones that use WebKit-based browsers.


iGoogle gadget

http://www.google.com/ig/gmailmax.

This is the canvas view for the updated Gmail gadget which can be found in the new iGoogle.


“No browser checking” mode

http://mail.google.com/mail?nocheckbrowser.

If you use a cutting-edge new browser and Gmail serves you the basic HTML mode, try this URL to bypass browser detection.


Original source