Monday, September 17, 2012

Better Spell & Grammar Checker

Ginger Software has developed a spelling and grammar checker that is so far above the rest they should be charging for it.  Their proofreader looks at complete sentences to find what was being said, compares that to billions of similar sentences from the web, and returns suggestions based on similarity with what you wrote.  Great product that can be downloaded for free from www.gingersoftware.com.

Thursday, January 26, 2012

Password Security

We recently had a customer who was permitted to change their password to something that was very easy to guess (that has been remedied). Here are a couple of suggested sites that can help you use good passwords.

Test the strength of your passwords:
https://www.microsoft.com/security/pc-security/password-checker.aspx

How to create passwords that are easy for you to remember but difficult for others to guess:
http://www.microsoft.com/security/online-privacy/passwords-create.aspx

Labels: ,

Wednesday, July 13, 2011

Useful network utilities

I used this yesterday to identify speed issues at a customer’s home.  Turned out there were four routers on channel 6 (his was one, moved to 7), four on channel 11 and two on channel 1, all of which I could connect to in his home office. It also showed me signal strength so I could adjust the location of his wireless adapter to get the best connection.
http://www.passmark.com/products/wirelessmonitor.htm (30 day free trial)
WirelessMon is a software tool that allows users to monitor the status of wireless WiFi adapter(s) and gather information about nearby wireless access points and hot spots in real time.

Overlook Fing (Freeware)
http://www.over-look.com/site/index.php/download
Network discovery tool


iPhone, iPod Touch, iPad Apps:

Overlook Fing (Free)
http://itunes.apple.com/us/app/overlook-fing/id430921107

IP Network Scanner Lite (only shows first five devices, paid app is $5.00)
http://itunes.apple.com/us/app/ip-network-scanner-lite/id335517828?mt=8

System Scope Lite (Full version is $4.99)
http://itunes.apple.com/us/app/system-scope-lite/id428822597?mt=8

Ping Scope Lite (Full version is $.99)
http://itunes.apple.com/us/app/ping-scope-lite/id431500107?mt=8


Not quite Network Utilities
These are not specifically "Network Utilities", but I have found them to be very useful.

WinDirStat (Free)
http://windirstat.info

Eraser (Free)
http://eraser.heidi.ie

Labels: , ,

Monday, April 11, 2011

Web Browser

Being in the computer field and being an online application developer I am often asked which browser I use.  The answer is, all the major ones.  I have Internet Explorer, Safari, Chrome, Firefox and Opera all installed on my office computer (Windows Vista).  On my home desktops (Windows 7) I have Internet Explorer, Chrome and Firefox.  On the PowerBook I have Safari and Firefox.  On the Asus Netbook and my Windows XP test machine I only have IE (versions 7 and 8).  The iPad and iPod are of course running Safari.

Of course now you will ask, "Yes, that is what you have installed, but what do you use?"  The answer is, all of them!  For example, at work there is a web cam I need to access, but the interface will not work with either Chrome or Firefox so I have to use IE for that page.  I also have a time sheet program that is my homepage in Chrome that I open and then keep that page open all day.  Etc., yes, I use them all and when I am working on a site design, I make certain I can view the site on everything I have.  If I can get the site to look right on all I have, I have never had a complaint from a client saying it didn't look or work right for them.

Labels: , , , , , , , , , , , , , , , ,

Microsoft Mathematics

Back when I was in college, we didn't have graphing calculators.  I remember  writing a program in my sophomore year that would do my homework for me.  Back then, we would have to manually enter points in the equations and then plot them on a piece of paper.  After doing about 10 problems that way, I wrote a program that would go through a loop of points, plug them into the equation and then print out the final graph.  Next morning I got up and my homework was done.  When I turned them in, my instructor asked if he could keep those graphs because they were more accurate than anything he had previously worked with.

A couple of years later I saw a program that would do 2D and 3D charts on the computer, but I haven't seen that application since the graphing calculators became common place.  I guess I just haven't kept up on the software side of things.  Microsoft came out with v4 of their Mathematics application back in January.
http://www.microsoft.com/Mathematics

Labels: , , , ,

Thursday, March 10, 2011

Search an Entire Database

How often have you needed to search an entire database for a particular piece of information? Common problem, many different solutions are available on the internet. In my case I needed something that I could run from an intranet web site, written in classic ASP, that searched an in-house SQL 2005 database. Here is the code I finally came up with that will search all fields of all tables, with a selection to choose which database. Set the four values in the configuration section and edit the script timeout variable as needed.

<html><head><title>Database Search</title></head><body>
<%
'-------------------------------
'Set these values:
sqladdress = "ServerName"
sqluser = "Username" 'Usually the SA account
sqlpass = "Password"
filename = "SearchDB.asp" 'Name you saved this file as
Server.ScriptTimeout = 90 'Maximum number of seconds that a script can run before it is terminated
'-------------------------------
if Session("SearchDB") <> "True" then Response.Redirect "default.asp"

On Error resume Next
DBName = request.querystring ("DBName")
SearchText = trim(request.querystring ("SearchText")&" ")
NewSearch = request.querystring ("NewSearch")
exact = request.querystring("exact")
hide = request.querystring("hide")
if len(DBName) > 0 and len(SearchText) > 0 and NewSearch <> "Y" then
    response.write "<p>Searching <b>" & DBName & "</b> for <b>" & SearchText & "</b>"
 if exact = "Y" then response.write " using exact match"
 response.write ".</p>"
    response.write "<p><a href=""" & filename & "?NewSearch=Y&DBName=" & DBName & "&SearchText=" & SearchText & "&exact=" & exact & """>New Search</a></p>"

 SearchText = replace (SearchText, "'", "''")
    sqlopen = "Provider=SQLOLEDB;Data Source=" & sqladdress & ";"
    sqlopen = sqlopen & "Initial Catalog=" & DBName & ";User Id=" & sqluser & ";Password=" & sqlpass & ";"
    sqlopen = sqlopen & "Connect Timeout=15;Network Library=dbmssocn;"
    Set dbcon = Server.CreateObject("ADODB.Connection")
    dbcon.Open sqlopen
    Set dbcon2 = Server.CreateObject("ADODB.Connection")
    dbcon2.Open sqlopen
    Set dbcon3 = Server.CreateObject("ADODB.Connection")
    dbcon3.Open sqlopen

    Set rs = dbcon.Execute("SELECT * from sys.tables ORDER BY name")
    while not rs.eof
        TableName = rs.fields("Name")
        if TableName <> "dtproperties" then
            response.write "<p>Table - <b>" & TableName & "</b><br />"
            Set rs2 = dbcon2.Execute("SELECT * from " & TableName & ";")
            for each f in rs2.Fields
                FieldName = f.Name
    if exact = "Y" then
                 strSQL = "SELECT * from " & TableName & " WHERE " & FieldName & " = '" & SearchText & "';"
    else
                 strSQL = "SELECT * from " & TableName & " WHERE " & FieldName & " LIKE '%" & SearchText & "%';"
    end if
                Set rs3 = dbcon3.Execute(strSQL) 'text search
                If Err.number <> 0 then
                    if err.number <> -2147217913 and err.number <> 424 and err.number <> 3704  and err.number <> -2147217900 then
      txtMsg = "Warning:<br />    " & Err.Source & " | " & Err.Number & " | " & Err.description & "<br />    " & strSQL & "<br />"
     else
      'These errors will only occur when Exact Match is selected.
      '424  Object required
      '3704  Operation is not allowed when the object is closed.
      '-2147217900  The data types ntext and varchar are incompatible in the equal to operator.
      '-2147217913  [Various type conversion errors.]
      if hide <> "Y" then txtMsg = "Note:    " & Err.Source & " | " & Err.Number & " | " & Err.description & "<br />"
     end if
                    err.clear
                    if isnumeric(SearchText) then
                        strSQL = "SELECT * from " & TableName & " WHERE " & FieldName & " = " & SearchText & ";"
                        Set rs3 = dbcon3.Execute(strSQL) ' numeric search
                        If Err.number <> 0 then
       response.write "Warning:<br />    " & Err.Source & " | " & Err.Number & " | " & Err.description & "<br />    " & strSQL & "<br />"
                            err.clear
                        else
                            while not rs3.eof
                                response.write FieldName & " - " & rs3.fields(FieldName) & "<br />"
                                rs3.movenext
                            wend
                        end if
                    else
                        response.write txtMsg
                    end if
                else
                    while not rs3.eof
                        response.write FieldName & " - " & rs3.fields(FieldName) & "<br />"
                        rs3.movenext
                    wend
                end if
                rs3.close
            next
            response.write "</p>"
        end if
        rs.Movenext
    wend

    dbcon3.Close
    Set dbcon3 = Nothing
    dbcon2.Close
    Set dbcon2 = Nothing
    dbcon.Close
    Set dbcon = Nothing
 
 response.write "<p>Search Complete.</p>"
else
    sqlopen = "Provider=SQLOLEDB;Data Source=" & sqladdress & ";"
    sqlopen = sqlopen & "Initial Catalog=;User Id=" & sqluser & ";Password=" & sqlpass & ";"
    sqlopen = sqlopen & "Connect Timeout=15;Network Library=dbmssocn;"
    Set dbcon = Server.CreateObject("ADODB.Connection")
    dbcon.Open sqlopen
    %>
    <form action="<%=filename%>" method="get">
        <p>DB to search <select name="DBName" id="DBName"><option value=""></option><%
            Set rs = dbcon.Execute("SELECT name FROM sys.databases WHERE state=0 and name NOT IN ('master', 'tempdb', 'model', 'msdb') ORDER BY name;")
            while not rs.eof
                tmpName = rs.fields("Name")
                response.write "<option value=""" & tmpName & """"
                if tmpName = DBName then response.write " SELECTED"
                response.write ">" & tmpName & "</option>"
                rs.Movenext
            wend
        %></select></p>
        <p>Text to find <input name="SearchText" type="text" size="40" value = "<%=SearchText%>" /></p>
        <p>Exact match <input type="checkbox" name="exact" value="Y"<%if exact = "Y" then response.write " checked"%>></p>
        <p>Hide Errors <input type="checkbox" name="hide" value="Y" checked></p>
      <p><input name="submit" type="submit" value="Begin Search" /></p>
 </form>
    <%
    dbcon.Close
    Set dbcon = Nothing
end if
%>
</body></html>

Labels: , , , , , , , , ,

Friday, February 25, 2011

How to reset SQL Server SA Password

The problem is that you don’t know the password for the SQL Server SA account, and for whatever reason the Windows account you are using is being told you don’t have permissions to change the SA account properties.  If you can't login to Management Studio using Windows Authentication this will not work for you.

First, you need to get the name of the SQL Server Service that is running, do this by clicking on Start and running services.msc.

Scroll to SQL Server (name), there may be more than one, if so, get the information for all of them if you are not certain which is the instance for the account you need to reset. Double-click on the line and record the Service name.

Open a command prompt and enter:
          NET STOP [Service name]
          NET START [Service name] /m
This will start the service in single user mode, which will allow you to make changes to the SA user account.

Start SQL Server Management Studio and login to the instance using Windows authentication. Go up to File and close the object explorer. Now click on New Query and enter this code:

          USE [master]
          GO
          ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master],
          DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=ON, CHECK_POLICY=ON
          GO
          USE [master]
          GO
          ALTER LOGIN [sa] WITH PASSWORD=N’password’ MUST_CHANGE
          GO

In the code above where it says “password” you will enter your new password. You may have to change this again later so be prepared with two options for what you want your final password to be. Now execute the code. If there were no errors, exit from Management Studio and stop and restart the service:
          NET STOP [Service name]
          NET START [Service name]

Go back into Management Studio and login with the SA account using the new password you assigned. WARNING, you may get prompted to change the password, if so proceed with what will be the new final password.

One time when I did this I still had a problem because the SA account was not enabled. After doing the above, I had to create a new login that I gave sysadmin rights to that I then used to enable the SA account. I then deleted that temporary login. If I remember right, I did this while still in single user mode.

You may need to go back into Services and manually start dependent services that were shutdown when you first stopped the SQL Service.

Credits to the two sites that provided me with the help I needed to accomplish this:
http://deepakrangarajan.blogspot.com/2008/01/forgot-sa-password-in-sql-server-2005.html
http://worthposting.wordpress.com/2008/11/01/sql-server-reset-sa-password/

Labels: , , , , ,