Monday 28 July 2014

Checking memory (spaced) used, numbers of records in SQL Table

Problem: 
I was told in one of the project to give find the rate at which table is growing in terms of memory and number of records.


Solution: 
After bit research I found a stored procedure ‘sp_spaceused’. This procedure take table name as parameter and give you result of space and count used by tables. 



I stored this result in an table along with dates and executed query via job every week to track the increase. After 3 months i was able to answer the question that at what rate my fact tables is growing.

The best way to execute on all table is to use sp_msforeachtable stored procedure. 

sp_msforeachtable 'exec sp_spaceused [?]'

MSDN Reference Link: SP_SPACEUSED

Wednesday 9 July 2014

Hindi typing was never this easy on Android phone !

अब अपने अंदरीओड़ फोन पर आसानी से हिन्दी में टाइप करिए। 

Like typing in Hindi? Then there is good news for you. Google has come up with easy solution. Type Hindi in English and it will be converted to Hindi font.

Interesting huh!! Follow the below steps to claim you Hindi keyboard. 

STEP 01 : Download "Google Hindi Input" from play store 
              [प्ले स्टोर चालू करे और "Google Hindi Input" टाइप करे और डाउन लोड कर ले]  

 STEP 02: After installing go to settings, select 'Language & Input'
              [इन्स्टाल होने के बाद सेटटिंग में जाए और 'Language & Input' मेनू सिलैक्ट करे

STEP 03: Select 'Google Hindi Input'
             [वह पर 'Google Hindi Input' को सिलैक्ट करे।]

STEP 04: Come out of setting and open any application for typing. Select the input method as 'Hindi'. This menu can be find at different location on different phone. Mostly it appears at top as keyboard when keyboard is opened. 

[सेटटिंग से बाहर आए। मैसेज करने वाले किसी भी एप्लिकेशन को खोलिए। कीबोर्ड आयेगा। उपर आपको कीबोर्ड का नीसान नजर आयेगा। नेचे स्लाइड करके खोले और 'Hindi' सिलैक्ट करे]

STEP 05: You are done! you type in Hindi in English and it will be converted in Hindi font. Please note the Underline on 'a-अ' key.

[अब आप हिन्दी में लिखना सुरू कर सकते है। ध्यान दे की अगर आपके कीबोर्ड पर 'a-अ' बटन के नीचे रेखा है तो आप एनलिश में हिन्दी टाइप करे और आपका फोन उससे हिन्दी में अनुवाद कर देगा]

STEP 06: You can write in English with same keyboard by setting underline off on 'a-अ' key. 

[आप इसी कीबोर्ड से इंग्लिश भी लिख सकते है। ये करने ले लिए आप 'a-अ' बटन को दबाए और सुनिश्चित करे की 'a-अ' बटन के नीचे रेखा नहीं है]

STEP 07: If you want to see Hindi keyboard then you click on the globe and Hindi keyboard will appear. But it is very tough to type Hindi with Hindi keyboard :) 

[अगर आप हिन्दी में हे लिखना चाहते है तो 'दुनिया' के निशान वाले बटन को दबाये। पर यहा टाइप करना थोड़ा मुसकिल है :)]


Cheer!! Happy Hindi Typing!!
हिन्दी त्यपिंग के मजे लीजिये!!

Thanks!
Ravi Kumar V.








Friday 4 July 2014

Hyper-V: Windows 7 does not reboot after installation


Have you ever scratched your head that after installation Windows 7 refuse to restart and black screen is displayed? It’s frustrating, isn’t it? I too banged my head for days after I find this solution. After following the below step Windows 7 rebooted. 

1. Install Windows 7 using ISO file or DVD whatever is suitable to you.
2. Select "Generation 1" of Hyper-V



3. On final reboot you will get final black screen.
4. Reboot the VM by restarting Hyper-V.
5. Message will come to “Press any key to boot from CD/DVD..” press am key to

    enter into installation.
6. On the below screen Press “Shift+F10” to open the command prompt



7. On the command prompt type the command 

      bootsect.exe /nt60 all /force 

8. Then type EXIT and reboot

Windows 7 rebooted! ENJOY !!

Changing System Administrator Account of Master Data Services (MDS)

When you restore the MDS database from some other computer, may be from different domain or from different computer where your username is not present, you will get error on web site as “Access Denied”. Or you will not see the “User and Group Permissions” link.

Reason for this is that since you have restored the MDS database from different domain or computer you username might not be present as administrator on MDS database. Solution is to change the administrator by following the below steps.

Execute the following command to change the administrator

EXEC [mdm].[udpSecuritySetAdministrator] @UserName='USERNAME', @SID = 'SID', @PromoteNonAdmin = 1

Steps to get SID

Open PowerShell command line and type the following command

$AdObj = New-Object System.Security.Principal.NTAccount("User or Group Name")
$AdObj.Translate([System.Security.Principal.SecurityIdentifier]).Value



After performing above steps you should be able to access the MDS web page as administrator.