Jan 31, 2015

Lookup / Describe a Stored Procedure in SQL Server

I was working with a invisible database for which I had a JNDI connection to but not its credentials to get onto a SQL Server Management Studio IDE and look up the objects such as Tables and Stored procedures. So I end up working with a Stored Proc which slammed me repeatedly for several hours with a "Too many arguments" error, was trying to find out any possible ways to lookup the signature of the SP.

For SQL tables, we had queries like "DESC TABLE_NAME" to lookup the columns, and I wanted something similar to lookup the input/output definition of a stored procedure. So after going through the documentation of SQL server, I find this command that got me exactly what I need. sp_helptext is the built in function that helped me see the source code, and finally figure out how it works. This is the syntax.

sp_helptext @objname = N'dbo.spNameGoesHere'";

Ha! I would no longer worry when that DBA goes on vacationing!

Sep 28, 2014

Tips on New Jersey - Driving Knowledge Test

Tags: nj driving test sample questions tips new jersey
Amongst 12 oz of beer and 5 oz of wine, which has higher content of alcohol? What is the stopping distance of a vehicle travelling at 50 mph on a dry surface? What is the "two-second rule"? What is the earliest age you can register a new car in New Jersey? These are some of the questions that you may need to correctly answer if you are applying for a driver's license in the state of New Jersey. Taking a computer-based knowledge test is compulsary for all applicants, in addition to a road test if any is suggested by the DMV officer.

Out of 50 questions, you need to answer 40 correctly to pass. While a pass percentage of 80% might sound daunting, proper preparation will surely help you cross the line. Follow these tips, and you are highly likely to clear in your first attempt. 

Tip #1: 
First take a practice test and evaluate where you are. Below link from the official DMV site has 20 sample questions to help you gauge where you stand.
http://www.state.nj.us/mvc/Licenses/sample_knowledge_test.htm

Tip #2: 

Read the official manual. All the questions are sourced either directly or indirectly from the manual. It is not like if you are a pro driver, you can ace the exam. There are several questions (around 15-20) which can be answered only with a knowledge of the book's content. The first 30 pages are like "gold", and will help answer atleast 10 questions. Read from page 1, where it starts with the heading "LAWS GOVERNING DRIVER LICENSES". 

I would logically categorize the questions in 3 types.
  • 10-15 Questions on licenses (eligibility, types, restrictions)
  • 20-30 Questions on driving skills (signals, turns, yielding, lane markings)
  • 10-15 Questions on Fines and Fees (violations, drugs & alcohol, suspension) 
Online PDF: 
http://www.state.nj.us/mvc/pdf/Manuals/drivermanual.pdf

Tip #3:
Go through the questions in the below pdf file. It has around 150 questions. These are most frequently asked questions, and this file could just be the difference between passing the exam or failing at a very close margin. In my first attempt, I was almost there with correct 39 questions but couldn't get the 40th and failed. The ones I answered wrongly were part of this pdf file, I later found out. So read this as many times as you can and remember it well. 

Important questions, collection link:
https://drive.google.com/file/d/0B_nE614XLwdLVkFjNXFfcFJpSk0/edit?usp=sharing

Tip #4: 

Once you have read the book (Chapters 1-9) once, or twice, it is time for you to take test practice, as much as you can. Here are some good "free" resources you can use. Practice until you are able to get 95% or more in all the tests. First two are important, and the rest are for additional practice if you have time.
  1. http://driving-tests.org/new-jersey (famous link. contains several free tests)
  2. http://www.accudriving.com/test/online.shtml (questions change every time you open) 
  3. http://www.spicersdrivingschool.com/ (3 test links in this site)
  4. http://www.driverknowledge.com/new-jersey-dmv-practice-test/
  5. http://www.proprofs.com/quiz-school/story.php?title=nj-drivers-sample-practice-test-written
  6. http://www.edisondriving.com/quiz.php
  7. http://driverslicensetest.net/dmv/newjersey_drivers_test.php
Tip #5:
Now, let's discuss about the exam. Knowing the fact that you can "skip" a question would do wonders. When you are not sure with any of the questions, "Skip" them. There is an option for it. The outcome of every question is displayed immediately after you select an option. So for every single question you complete, you know how many went correct, how many are left to be answered. The test will end once you answer 11 questions wrongly (FAIL), or once you answer 40 questions correctly. So always SKIP the questions you are unsure of. In my second attempt, I was on the 43rd question when I passed the test. Two of those 43 were skipped. I got only one wrong. 

Other tips - Documents required, DMV timings, 6-points for Non-Immigrants, dependents.

Here are few tips not related to the test. 
  1. Try to go on a weekday if you want to avoid long lines. 
  2. On Tuesdays, they are open till 7:30 PM. Make use of it. 
  3. If you have a driver license from a different state or country, take it with you. You might be considered for a direct basic driver license without taking up a road test.
  4. Ensure you have enough documents to prove that you have 6-points. You dont want to wait in a long line, only to be sent back home without even giving the test.
  5. I am on a non-immigrant visa, I showed my Passport+Visa and I-94 (4 points), SSN (mandatory), Rental lease (address proof), Debit card (1 point), and Health Insurance card (1 point). 
  6. My wife is on a dependent non-immigrant visa, so we obtained a "SSN Denial Letter" from the Social security office, and for 6-points, showed the same set of documents as me. To get SSN Denial letter, you need a valid passport + visa, and proof of address.  
  7. Prepare for long lines. They verify the ID 3 times totally before the test, and again, 3 more times after the test.

You may also like these writeups

Related Posts with Thumbnails

Join our Gang