Thursday, February 18, 2010

Auditing a Shared Folder

Windows 7 and Server 2008 both have the feature to audit File Share. As stated by Microsoft, "This security policy setting determines whether the operating system generates audit events when a file share is accessed." We will be using this feature as other Systems Administrators do to detect if there has been intrusion. Remember that to stop the intrusion, effective firewalls are necessary.
Follow these steps to use Audit File Share:
  1. Open Local Security Policy by clicking the Start button, typing secpol.msc into the search box, and then clicking secpol.If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

  2. In the left pane, expand the Advanced Audit Policy Configuration folder. Expand System Audit Policies - Local Group. Double-click on Object Access.

  3. In the right pane double-click on Audit File Share.

  4. In the Audit File Share Properties window select the Configure the following events: check box. Then select the Success check box and the Failure check box to audit both successful and unsuccessful attempts to access a shared folder. Then click OK.
Source: http://technet.microsoft.com/en-us/library/dd772690%28WS.10%29.aspx

Friday, February 5, 2010

WAMP: MySQL



The debate was between whether or not MySQL when installed from WAMP would work on Server 2003 with SQL Server 2005 installed. The concern was that with the IIS already running that Apache would have a conflict. I installed WAMP. The WAMP notification icon was yellow indicating that one service was running. When I tried to start all services I received an error.
I was able to access MySQL, create add records to a table I created in a database I created.

Follow these instructions modifying names with your own.

Click on the MySQL console in WAMP Server.
When promted for a password hit enter (password is blank).
To Create a Database
type:
CREATE DATABASE database_name

To create a Table
type:
USE database_name; Create Table table_name (column_one text NOT NULL, column_two text NOT NULL, column_ID int(5) NOT NULL default '0' , PRIMARY KEY (column_ID) ) TYPE=MyISAM;

To add records to the Table
type:
USE database_name; Insert into table_name (column_one, column_two, column_ID) values ("value1", "value2", value3);

To display specific columns
type: USE database_name; Select column_one, column_two From table_name;

I learned how to create a database in MySQL from the MySQL Manual.
I learned how to create a table in MySQL from netadmintools.com.
I learned how to add records to a table from webdevelopersnotes.com

SQL Server 2005: Creating a View

Another day at work:
Let's say your boss wants to see orders with a line total less than $5. He is planning on writing up the Sales people who have made such orders. He just wants the line total.

Hint: The table used is sales.salesorderdetail.

In a New Query type:

USE AdventureWorks
Select
SalesOrderID, LineTotal

FROM
Sales.SalesOrderDetail

WHERE
LineTotal

Order by LineTotal

Execute and you will see two columns the SalesOrderID and the LineTotal. The Line Total will be ordered (sorted) least to greatest because of the "Order by" command.
If you want to know more about views see The Code Project article about Views.

Monday, February 1, 2010

Listing Files in Fedora


Fedora is a flavor of linux.
To list files in a specified directory use the ls command.

Option Description
-a Lists all filenames & --all
Lists all filenames

-A
Lists most filenames (excludes the . and .. special files)
--almost-all

-c
Lists filenames in column format

--color=n
Lists filenames without color

-d & --directory
Lists directory names instead of their contents

-f
Lists all filenames without sorting

see more ls command options

Friday, January 29, 2010

SQL Server 2005: Delete Table in Database

Using T-SQL statements, Microsoft's version of SQL (Standard Query Language).
To delete a table in a database let's use this example.
Database called Textbooks. Table called Publishers.
Type
Use Database Textbooks
Go
Drop TABLE Publishers



Among the great SQL resources of Books Online, Microsoft support, MSDN Online, Codezone, and Technet; SQLAuthority.com is useful.

If you've had an error attempting to delete tables, but receiving the message that the database "is currently in use."
See http://blog.sqlauthority.com/2007/12/07/sql-server-fix-error-3702-cannot-drop-database-because-it-is-currently-in-use/

Friday, January 1, 2010

System's Request

When submitting your system's request ensure that you've included all the variables including ROI and Initial Cost. Make sure to also explain how beneficial this new system will be.

Dilbert.com

For example, it is amazing how certain banks and credit unions have leapfrogged other competitors and left them in the dust. The technology and updates that have enabled members to access their accounts from a computer or phone has become more user friendly, increasing the utilization, and customer satisfaction.

Dilbert.com

Tuesday, December 1, 2009

Access can't append all the records in the append query

I am using tables individual by month. After converting my Select query to a Make Table query I managed to leave the Sales Dollars field blank (at this point it went unnoticed) . I continued, and created a Select query from the New Table (created from the Make Table query) that required the user to enter a parameter value (month) and then converted the query into an Append Query. At this point I ran into the
Error: "Access can't append all the records in the append query."
Research: I researched two sites one by Allen Browne and the other by Microsoft. Allen Browne's site was the most informative on understanding this error.

I recognized that the "null fields" or blank fields were the cause of the problem.
At this point I back-tracked and noticed that my Sales Dollars field was blank.
Hypothesis: Fixing the Sales Dollars field will allow all the fields to be appended.

I recreated the query that was originally made into a table. I ensured that Sum was selected in the Total section in Design View.
Solution: Fixing the Sales Dollars field allowed all the fields to be appended.

Wrap-up: make sure all your fields match with "Sums" and the appropriate "properties" and don't attempt to match blank sells with content cells.