Resetting an SQL Server account when there is no access through SQL Server Authentication

Scenario:

  1. SQL Server ‘sa’ or any user id is locked out.
  2. User has no access to SQL Server authenitcation.
  3. Windows Logged in user is part of Windows local Administrators group where the SQL Server is running and has currently logged into the machine.

Microsoft has removed the functionality of automatically adding the local windows system admin to SQL 2008 Users. The following solutions are workaround to get inside the SQL server by adding a user to SQL Users Table.

Note: Since this involves SQLCMD and starting, stopping of SQL Instance the logged in user should be an administrator of that server where the SQL Server is running and both solutions should be run under an elevated command prompt.

Solution 1 : (Little difficult Solution. Check Solution 2 for automated script by Microsoft)

Open command prompt.

  • If you have default instance run following command on command prompt to stop SQL service: “net stop mssqlserver”
  • Now go to the directory where SQL server is installed. In my case the directory is “C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLBinn”. So need to run CD C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLBinn.
  • Now run the following command to start sql server in single user mode. As we have specified “SQLCMD”, now only SQLCMD connection can be made.

sqlservr -m”SQLCMD”

  • Now open another command prompt window and write command SQLCMD
  • Run following two commands

CREATE LOGIN [testAdmin] WITH PASSWORD=N’test@1234′, DEFAULT_DATABASE=[master];
EXEC sys.sp_addsrvrolemember @loginame = N’testAdmin’, @rolename = N’sysadmin’;
GO

  • Go back to first command window and press Ctrl+C to stop the SQL server and then type ‘Y’ for confirmation. This will stop the sql server.
  • Start SQL server again and no startup parameters need to specified this time.
  • Now using SSMS, try to connect with “testAdmin” as user and “test@1234” as password.
  • Create your own logins.
  • Drop testAdmin as it is not required any more.

Note: If you do not have SQL authentication enabled then you can try adding your windows user and replace setp-6 with below queries. Here <<DOMAINUSERNAME>> is placeholder for your user name

create login [<<DOMAINUSERNAME>>] from windows;
EXEC sys.sp_addsrvrolemember @loginame = N'<<DOMAINUSERNAME>>’, @rolename = N’sysadmin’;
GO;

Source: http://beyondrelational.com/blogs/chintak/archive/2010/07/20/sql-2008-r2-new-installation-and-login-password-unknown.aspx

Solution 2 : (Easy Solution)

Download the following file, extract and run the cmd file in elevated command prompt.
http://downloads.binarybits.net/blog/addselftosqlsysadmin.zip

Input:
%1 specifies the instance name to be modified. Defaults to SQLEXPRESS.
%2 specifies the principal identity to be added (in the form “<domain><user>”).
If omitted, the script will request elevation and add the current user (pre-elevation) to the sysadmin role.
If provided explicitly, the script is assumed to be running elevated already.

Method:
1) restart the SQL service with the ‘-m’ option, which allows a single connection from a box admin (the box admin is temporarily added to the sysadmin role with this start option)
2) connect to the SQL instance and add the user to the sysadmin role
3) restart the SQL service for normal connections

Output:
Messages indicating success/failure.
Note that if elevation is done by this script, a new command process window is created: the output of this window is not directly accessible to the caller.

Source: http://archive.msdn.microsoft.com/addselftosqlsysadmin/

Standard for Wireless Regional Area Networks in TV Whitespaces

Standard for Wireless Regional Area Networks in TV Whitespaces – What it basically means is a long range wireless broadband access.

More about the press release below…

PISCATAWAY, N.J.–(BUSINESS WIRE)–IEEE, the world’s largest professional association advancing technology for humanity, today announced that it has published the IEEE 802.22TM standard. IEEE 802.22 systems will provide broadband access to wide regional areas around the world and bring reliable and secure high-speed communications to under-served and un-served communities.

This new standard for Wireless Regional Area Networks (WRANs) takes advantage of the favorable transmission characteristics of the VHF and UHF TV bands to provide broadband wireless access over a large area up to 100 km from the transmitter. Each WRAN will deliver up to 22 Mbps per channel without interfering with reception of existing TV broadcast stations, using the so-called white spaces between the occupied TV channels. This technology is especially useful for serving less densely populated areas, such as rural areas, and developing countries where most vacant TV channels can be found.

IEEE 802.22 incorporates advanced cognitive radio capabilities including dynamic spectrum access, incumbent database access, accurate geolocation techniques, spectrum sensing, regulatory domain dependent policies, spectrum etiquette, and coexistence for optimal use of the available spectrum.

The IEEE 802.22 Working Group started its work following the Notice of Inquiry issued by the United States Federal Communications Commission on unlicensed operation in the TV broadcast bands.

Additional information on the standard can be found at the IEEE 802.22 WG page. To purchase the standard, visit the IEEE Standards Store.

To learn more about IEEE-SA, visit us on Facebook at http://www.facebook.com/ieeesa, follow us on Twitter at http://www.twitter.com/ieeesa or connect with us on the Standards Insight Blog at http://www.standardsinsight.com.

Source: http://www.businesswire.com/news/home/20110726007223/en/IEEE-802.22TM-2011-Standard-Wireless-Regional-Area-Networks

My Mobile (Part 1)

Mobile’s presence in India started somewhere in 1990’s and my first mobile was Panasonic GD 95.

I started my own website and got my personal mail somewhere in 2003. From that time onwards I was looking at accessing my email more frequently and staying in touch with my friends through IMs.

So my next mobile was Sony Ericsson’s P990i. It was my perfect mobile with large touch screen, physical keypad and a jog wheel.


Picture copyright: GSM Arena & Mobil Mania

Then my needs increases towards better procesing capability, native push email, mobile applications. During 2007-2008 the stable mobile operating system was Windows Mobile and Microsoft launched Windows Mobile 6.1.

So my next mobile was HTC Touch Diamond. It was a radical looking mobile and first mobile from HTC which switched it’s business from OEM to it’s own mobile business.

It served my for 3.5 years before it’s battery started giving up and sourcing battery even from other countries was difficult. So then came the need again for a mobile device.

This time the confusion started for choosting a mobile or a table. By this year, Apple, Samsung and many more companies are doing good in tablets as well as mobile. Also my needs changed a lot and I was very particular about the following aspects.

  1. Better connectivity
  2. OS with customization
  3. Stable OS
  4. Larger Screen
  5. Support for gaming
  6. Future compatible
  7. Good looking
  8. Video Conferencing
  9. Compatibility when roaming around the world.

So I was planning to go for a iOS based device or Android and somehow I didn’t like Windows Phone’s Metro UI.

After some analysis, I decided it can’t be iPhone as the OS was severly restricted in terms of customization and screen size was ok.

So I decided to think about Android. Previously I was duabooting my HTC’s Touch Diamond with Android Fryo. Thanks to XDA Devs. With more apps and prices of apps ranging between 30 bucks to an average of 100 bucks I felt this was ok. But which handset or tablet to choose?.

I was planning to go for Tablet and did some researching. Thanks to local shops like Poorvika, I was able to check out Samsung Galaxy Tab, HTC Touch HD, Samsung Galaxy S & Samsung Galaxy SL.

Initially I felt Tab was heavy, but screen was upto my mark. But then I realized, tablets are restricted in my office environment. Still I was planning to go for tablet. Thanks to my friend who bought iPad 2. It too was heavy and roamng around with it was difficult until unless you have a back pack.

More over dual core was becoming popular. So I thought Galaxy Tab is not going to be future compatible and iPad 2 with the same restrictions as iPhone 4 and usless front cam and rear cam and a simple LCD, it too was out of my list.

So I decided I will settle on a 4+ inch devices. Mean while I was doing lot of research on the dual core processors, screen types, RAM, OS & bench marks. During my whole reaserch one mobile kept on coming on top and it was Samsung Galaxy S II.

Few years back I use to hate Samsung for it’s quality. But for couple of years, Samsung was doing good and it was getting in my list next to HTC.

Finally one day I came to know the Samsung has launched Galaxy S II in India and that too with an offer.

After couple of days of quick research I thought I would better settle in for Galaxy S II. Especially being a geek, I felt Galaxy S has more fans in custom ROM community.

With an offer, where I need to spend 2000 bucks instead 4500 bucks for accessories, I decided I will go for it.

Meanwhile my Touch Diamond’s back cover got damaged and was hard time keeping the battery within the phone. Every now and then it was falling of, especially during calls.

So I was getting a sign to get a mobile as soon as possible and with a business trip being planned out of India, I wanted a better mobile.

So I went to Samsung’s officially supported letsbuy.com’s offer and pre-booked the Samsung Galaxy S II.

More about my Samsung Galaxy S II in next post.

A hidden magnetic effect of light could lead to an optical battery

An heading which says “Solar power without solar cells: A hidden magnetic effect of light could make it possible”. A discovery has been made at University of Michigan, the magnetic effect which previously was ignored due to weak magnetic field can now be made strong 100 millions times. This could lead to a new kind of solar cell without semiconductors and without absorption to produce charge separation.

The following are some of the excerpts.

Light has electric and magnetic components. Until now, scientists thought the
effects of the magnetic field were so weak that they could be ignored. What Rand
and his colleagues found is that at the right intensity, when light is traveling
through a material that does not conduct electricity, the light field can
generate magnetic effects that are 100 million times stronger than previously
expected. Under these circumstances, the magnetic effects develop strength
equivalent to a strong electric effect.

 

“This could lead to a new kind of solar cell without
semiconductors and without absorption to produce charge separation,” Rand said.
“In solar cells, the light goes into a material, gets absorbed and creates heat.
Here, we expect to have a very low heat load. Instead of the light being
absorbed, energy is stored in the magnetic moment. Intense magnetization can be
induced by intense light and then it is ultimately capable of providing a
capacitive power source.”

 

Read more at http://ns.umich.edu/htdocs/releases/story.php?id=8368

LIFEBOOK X2 concept

Designer Park Hyun Jin has created a concept laptop which can fold.

An excerpt from the source 

The LIFEBOOK X2 concept takes a different approach to portability. It’s not only thin, but also folds into quarters which leads to some interesting features. Open the LIFEBOOK X2 halfway and you have sort of an ultra widescreen palm top. Unfold it completely and you have one full size notebook. This denotes a seam running right across the LCD which is enough for me to dismiss it but the idea is intriguing. What’s say you?

Some pictures from the designer..

 

 

 

 

Souce: http://www.yankodesign.com/2011/04/12/folded-notebook/

FRIDA concept robot from ABB

In any manufacturing unit, still humans are required to do some of the taks which autonomous robots can’t do. Now ABB has come up with a robot “FRIDA” which might take the place of humans.

Following is an exerpt from ABB site

An ABB concept robot for industrial dual-arm assembly applications

To meet the agile production scenarios frequently found in the consumer electronics industry and increasingly in other market sectors, the proposed concept includes a flexible gripper, camera-based part location plus all the features that are well known from ABB’s state-of-the-art robot controller, the IRC5. In addition, the robot is compact and intended to fit into spaces ergonomically designed for human workers. This allows the robot to be easily interchanged with a human coworker when the production order is changed or a new layout is required.The robot prototypes come as portable dual-arm units with a controller that is integrated into the torso. They can be carried around easily and mounted into work stations with minimum installation requirements. Due to the intrinsic safety of the proposed robot solution, the requirements for performing a safety assessment of the installation are minimized. Normally, no safeguarding or enclosing of any kind is required, which allows for very fast installation, commissioning and relocation. Key technology features:

  • Harmless robotic coworker for industrial assembly
  • Human-like arms and body with integrated IRC5 controller
  • Complements human labor with scalable automation
  • Padded dual arms ensure safe productivity and flexibility
  • Lightweight and easy to mount for fast deployment
  • Agile motion based on industry-leading ABB robot technology

Today, the development is at a stage where several prototypes have left the research lab and are being tested in pilot applications, with more work required to reach a fully agile assembly scenario. Substantial parts of the remaining research work are being done in the FP7 project ROSETTA.

Pictures of FRIDA

 
 
 
 
 

Source: http://www.abb.com/cawp/abbzh254/8657F5E05EDE6AC5C1257861002C8ED2.aspx