WordPress – Images appearing in-between text – Line Breaks not helping

WordPress – Images appearing in-between text – Line Breaks not helping

Had a whale of a time trying to get things lined up as text and images kept getting wrapped around each other.

Finally, figured it out.

Each image’s property needs to be changed depending on the effect one wants.

To effect:

1] In edit mode

2] Select the image by left clicking on it

3] Two picture buttons will appear, select the first one

4] In the “Edit Image” window, choose the “Alignment” option you want

 

References:

 

1] WordPress.Com – Image Buttons -
http://en.support.wordpress.com/images/image-settings/

2] WordPress Tutorial – How to Position an Image and Wrap Text Around an Image Using WordPress

http://mcbuzz.wordpress.com/2007/11/04/wordpress-tutorial-how-to-position-an-image-and-wrap-text-around-an-image-using-wordpress/

 

 

Posted in Blogging | Leave a comment

Microsoft – SQL Server – Management Studio – v2008 – Database Objects not showing up

We had a bit of problem in Microsoft SQL Server – Management Studio – v2008.  

 

Though we had granted read permissions to one of our users via:

 

   create user [lab\myGoodUser] from login [lab\myGoodUser];
   exec sp_addrolemember [db_datareader], [lab\myGoodUser];

But, still the user upon logging on could not see any of the database objects. Looked everywhere, but no luck. So what to do:

  1. Kicked off “Microsoft SQL Server Profiler”
  2. Filtered for that user
  3. And, captured the sql generated when we refreshed the database object list

 

The Query we captured looks like:

 

 

SELECT

‘Server[@Name=' + quotename(CAST(serverproperty(N'Servername') AS sysname),'''') + ']‘ + ‘/Database[@Name=' + quotename(db_name(),'''') + ']‘ + ‘/Table[@Name=' + quotename(tbl.name,'''') + ' and @Schema=' + quotename(SCHEMA_NAME(tbl.schema_id),'''') + ']‘ AS [Urn],

tbl.name AS [Name],

SCHEMA_NAME(tbl.schema_id) AS [Schema],

CAST(

case

    when tbl.is_ms_shipped = 1 then 1

    when (

        select

            major_id

        from

            sys.extended_properties

        where

            major_id = tbl.object_id and

            minor_id = 0 and

            class = 1 and

            name = N’microsoft_database_tools_support’)

        is not null then 1

    else 0

end         
             AS bit) AS [IsSystemObject],

tbl.create_date AS [CreateDate]

FROM

sys.tables AS tbl

WHERE

(CAST(

case

    when tbl.is_ms_shipped = 1 then 1

    when (

        select

            major_id

        from

            sys.extended_properties

        where

            major_id = tbl.object_id and

            minor_id = 0 and

            class = 1 and

            name = N’microsoft_database_tools_support’)

        is not null then 1

    else 0

end         
             AS bit)=0)

ORDER BY

[Schema] ASC,[Name] ASC

 

 

Tried to understand the query, but it was not as easy. So what to do – Take the Easy way – Google….

 

SQL SERVER Management Studio 2008 can’t list all tables under SQL2005 database

http://www.sqlservercentral.com/Forums/Topic882092-391-4.aspx

 

In a nutshell:

 

  1. It seems that Management SQL Server Management Studio v2008 has problems when connecting to a v2005 database Instance
  2. The problem can be fixed by granting access to ‘view definition’

 

 

To grant access to ‘View Definition’

 

 

1) Grant ‘View Definition’ to specific object

–grant view definition on all database objects

use [msdb]

GRANT VIEW DEFINITION ON object::[dbo].[DTA_input] TO [lab\mygoodUser];

 

 

2) Grant ‘View Definition’ to specific schemas

use [myDB];

http://msdn.microsoft.com/en-us/library/ms187940.aspx

–grant ability to view schema definition

–GRANT VIEW DEFINITION ON SCHEMA::<schema> TO [login];

GRANT VIEW DEFINITION ON SCHEMA::dbo TO [lab\myGoodUser];

 

 

3) Grant ‘View Definition’ to specific database

http://msdn.microsoft.com/en-us/library/ms173848.aspx

–grant ability to view database definition

–GRANT VIEW DEFINITION ON DATABASE::<database> TO [login];

GRANT VIEW DEFINITION ON DATABASE::[myDB] TO [lab\mygoodUser];

 

4) Grant ‘View Definition’ to current database

–GRANT VIEW DEFINITION TO [login];

GRANT VIEW DEFINITION TO [lab\mygoodUser];

 

5) Grant ‘View Definition’ on all databases

–grant view definition on all database objects

GRANT VIEW ANY DEFINITION TO [lab\mygoodUser];


 

The problem appears to be with sys.tables. 

 

Data returned from this table is governed based on user’s permission granted via ‘view definition’.

To validate issue query ( select * form sys.tables) against sys.tables and results will vary depending on permissions.

The error will not be a hard-error \ fault, but a bit more subtle.

 

More data:

 

  1. The problem is confirmed in MS SQL Server v2005 Engine when accessed via MS SQL Server – v2008 – Management Studio
  2. There is a MS Connect Article that is created:

    Tables Node Does Not Show All Schemas In SSMSE 2008 by Nicholas Piasecki

    https://connect.microsoft.com/SQLServer/feedback/details/387616/tables-node-does-not-show-all-schemas-in-ssmse-2008

Posted in Uncategorized | Leave a comment

Microsoft – Windows 7 (x64) – HP LaserJ 2100 – Can’t we all get along

Microsoft – Windows 7 (x64) – HP LaserJ 2100 – Can’t we all get along

Another self betrothed Insomnia Night.

Started off last night.  Went online looking for a nice dinner to take the old lady.
Found a bunch in San Francisco, but wasn’t so sure as I knew the local team is
playing for the NFC Championship and so places might be crowded or we
might just get caught in Traffic.

Tried to float riding Bart.  But, newly done hair and rain does not work for
most ladies.

And, so make a long story short, visited “Check Please SF” (http://blogs.kqed.org/checkplease/) and checked out a bunch
of restaurants.

Made a good long list with web sites, phone numbers, and hours
of Operations; especially for Sunday Nights.

Next in line is to print – Connected to printer server using UNC (\\myprintserver\hplaserj).

But, no printer drivers, etc.

Stupid error messages:

Windows can't find a driver for HP LaserJet 2100 PCL6 on the
network.
To locate one manually, click OK. Otherwise, click Cancel and
consult your network administrator or the printer manufacturer's
website.

Visited Control Panel, Device Manager and tried to add printer manually:

  1. Control Panel \ System \ Device Manager
  2. Once in “Device Manager”, clicked on menu items “Add Legacy Hardware”
  3. In the “Add Hardware” window, choose to “Install the Hardware that I manually select” — This is only option as printer is not physically connected to laptop
  4. In the “Common hardware types” window, select “Printers”
  5. In the “Choose a printer port” choose LTPI, unless you are using your printer is accessible via network and you have a TCP/IP Address and port, etc”
 
 
 
 
 
 

See – “HP LaserJet 2100″ is not listed.

Tried the “HP LaserJet 2200 Series PCL 5″, but no luck.

Tried various iterations accessible via “Have Disk”; especially after downloading PCL5 and PCL6

The generic PCL5 & PCL6 Drivers are available via:

HP Universal Print Driver for Windows PCL6

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=3271552&prodTypeId=18972&prodSeriesId=503548&swLang=8&taskId=135&swEnvOID=4063

HP Universal Print Driver for Windows PCL5

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=18972&prodSeriesId=25469&swItem=ds-99378-2&prodNameId=14914&swEnvOID=4063&swLang=8&taskId=135&mode=4&idx=3

But, still no joy.

Also read a bunch of relevant links:

HP LaserJet, Color LaserJet, and LaserJet AiO/MFP Products -

Install the driver included in the Windows 7 operating system (OS)

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02536257

Windows 7 64 bits driver for HP LaserJet 1200

http://h30434.www3.hp.com/t5/Printer-All-in-One-Software/Windows-7-64-bits-driver-for-HP-LaserJet-1200/td-p/221446/page/3

Windows 7 – HP LaserJet 1200

http://www.sevenforums.com/drivers/6206-hp-laserjet-1200-a.html

Win 7 Drivers for Laserjet 2100

http://h30434.www3.hp.com/t5/Printer-All-in-One-Software/Win-7-Drivers-for-Laserjet-2100/td-p/257216

But, nothing quite nailed it.

What provided best relieve is:

1) From the run window, Enter the print server name (\\myprintserver)

2) Choose to view “remote printers”

3) Wait until the printers are shown

4) Right click on your printer and choose “properties”

5) In the “Properties” window, access the “Sharing Tab”

6) Choose the “Additional Drivers…” button

7) Ensure that you have selected all the Drivers for each Processor Architecture (x86, x64).

8) For each missing OS (that you need supported), click on the “Add…” button

In our case, the x64 driver was not previously chosen.

You might need Windows 2003 x64 Server, Windows 2008 x64 server CD depending on the OS that is running on your print server.

So go your Print Server, place the Windows 2003 x 64, Windows 2008 x64 CD, etc in your CD plate or install from Network Location.

Once all drivers are installed and available, return to your client workstation, and try connecting to your Network Printer once again.

This time you should receive an option asking whether you will like to “Install Driver”.

Kind of reminds me of “Steve Winwords – Back in the HighLife” again.

References:

Update and Manage Printer Drivers

http://technet.microsoft.com/en-us/library/cc732946.aspx

How to: Add 64-bit print drivers on 32-bit Windows Server 2003 or Windows Server 2008 print server

http://blogs.technet.com/b/yongrhee/archive/2009/09/14/how-to-add-64-bit-print-drivers-on-32-bit-windows-server-2003-or-windows-server-2008-print-server.aspx

Installing Windows Vista Print Drivers on Windows Server 2003

http://blogs.technet.com/b/askperf/archive/2008/09/19/installing-windows-vista-print-drivers-on-windows-server-2003.aspx

How to find a compatible printer driver for a computer that is running a 64-bit version of Windows

http://support.microsoft.com/kb/895612

Windows 7 Compatibility Center

http://www.microsoft.com/windows/compatibility/windows-7/en-us/default.aspx

 

 

 

Posted in HP, HP LaserJet 2100, Printers | Leave a comment

OSError – Failed to execute command

Playing a  bit with Jython lately.

As in other programming languages & scripting tools needed to invoke another Application.  Be it another script or Application, one occasionally needs to spawn another stand-alone app:

So looked at some sample code and ended up with something resembling

import sys
import os
import tempfile
import popen2
script_contents = 'Echo "Hello World"'
script_file = tempfile.mktemp('.cmd')
file = open(script_file, 'w')
file.write(script_contents)
file.close()

command = r'"%s"' % script_file 

proc = popen2.Popen3(command, True)
proc.tochild.close()
output = proc.fromchild.read()
errors = proc.childerr.read()
status = proc.wait()

print '[DEBUG] OUTPUT: %s' % output
print '[DEBUG] ERRORS: %s' % errors
print '[DEBUG] RETURN CODE: %s' % status

if os.path.isfile(script_file):
    os.remove(script_file)
 

Though, the above script is a bit watered-down it basically does the following:

  1. Dynamically generates a payload
  2. Creates a temporary file
  3. Saves the generated payload unto the temporary file
  4. Invokes the Temp file
  5. Cleans-up by removing the temp file

As I tried running the app kept getting an error that resembles the error listed below:

Failed to get environment, environ will be empty: (0, 'Failed to execute command
([\'sh\', \'-c\', \'env\']): java.io.IOException: Cannot run
program "sh": CreateProcess error=2, The system cannot find the file specified')

script_file name is: e:\temp\tempfile.cmd

Traceback (innermost last):

File "C:\Windows\TEMP\eqscript1323213519948", line 41, in ?

File "E:\Program Files (x86)\jython\Lib\popen2.py", line 72, in __init__

File "E:\Program Files (x86)\jython\Lib\javashell.py", line 64, in execute

OSError: (0, 'Failed to execute command ([\'sh\', \'-c\', "e:\\\\temp\\\\tempfile.cmd"\']): java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified')

Had a bit of difficulty understanding the problem:

  1. Was the system having difficulty determining the temporary folder
  2. Did we not have access to the temporary folder

To get a bit closer to what was happening behind the scene, commented out the bit of code

that was removing the script file:

Doing so allowed us to preserve the payload and execute the payload file directly (against the OS).

if os.path.isfile(script_file):
    os.remove(script_file)

Ended up the at the same place \ space:

Could not execute due to file not found.

More goggling brought us joy.  The problem is that sometimes one has to explicitly specify the OS.

The clue came from:

Jython – javaos.getenv() gives “Failed to get environment, environ will be empty”
http://stackoverflow.com/questions/245787/jython-javaos-getenv-gives-failed-to-get-environment-environ-will-be-empty

 

Try to uncomment and change the os setting in the 'registry' file

(it is in the same directory as your jython.jar / i hope)

# python.os determines operating-specific features, similar to and overriding the
# Java property "os.name".
# Some generic values are also supported: 'nt', 'ce' and 'posix'.
# Uncomment the following line for the most generic OS behavior available.
#python.os=None
python.os=nt
# try nt or dos

Once we knew we had to deal with the registry file the next question is what is actual name of the registry file, where should it be placed, what determines where the system looks for it:

The easiest path would have being to go back and read the Language’s documentation, but as always took the laziest path. Googled for it:

Found some help along the way via:

  1. “Failed to execute command ([\'sh\', \'-c\', \'env\']): java.io.IOException: Cannot run program “sh”: CreateProcess error=2, The system cannot find the file specified.”
    http://www-01.ibm.com/support/docview.wss?uid=swg21411513

 

The registry file:

  1. The name of the registry file is registry
  2. Review our jython is invoked – In our case jython.bat and make a note of any arguments passed in or initialized

 

In our case, we created a file named registry and added this lone line:

python.os=nt

Things worked well once we explicitly specified that our OS is Windows.

It is probably that by default the OS is Unix.

But, as Billy Currington said, thank God for good directions, on the way home went back (after the fact) and read the Jython’s FAQ:

http://jython.org/archive/22/userfaq.html#where-s-the-registry-file

The location and name of the registry was a bit clearer.

 

 

Posted in Uncategorized | Leave a comment

Microsoft – SQL Server – Reporting Services – Scheduled Reports not going out ( Error Failure sending mail: Attempted to read or write protected memory. This is often an indication that other memory is corrupt)

Microsoft – SQL Server – Reporting Services – Scheduled Reports not going out ( Error Failure sending mail: Attempted to read or write protected memory. This is often an indication that other memory is corrupt)

From one of our servers scheduled reports were not going out.

Reviewed the “MS Reporting Services” log files and noticed error entries that correlated with the date and time reports were scheduled to go out:

Error Entries:

Failure sending mail: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


Full Error Message:

ReportingServicesService!emailextension!3!01/19/2012-15:00:03:: Error sending email. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)

 

Remediation:

Restarted Microsoft SQL Server Reporting Services.

Posted in Microsoft, MS SQL Server, Reporting Services, Technical | Leave a comment

Microsoft – SQL Server – Connectivity – Error – SSL Provider: The Local Security Authority cannot be contacted (HResult 0×80090304, Level 16, State 1)

From this one host,  Connecting to any MS SQL Server Instance on the Network came back with this error:

HResult 0×80090304, Level 16, State 1
SSL Provider: The Local Security Authority cannot be contacted

Tried with the following NCipher \ SSL Configuration Changes:

1) Check the version and date modified for the file dbnetlib.dll located under c:\windows\system32 in your client . If the date modified is not the same then replace the file with the one from working box.
2) Since you are using nCipher, change the following registry key: HKLM\Software\nCipher\Cryptography\UseModulekeys to 0 and reboot, change it back to 1 and reboot and see if that helps.

3) I can see a number of cases where the issue occur when nCipher is the default CSP. Set SQL Server as the default CSP for the SQL Servers.

4) If the below key is enabled, disable it. This is only for SQL 2008 (which support nCipher) so for other SQL server we need to disable it
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\TLS 1.0\Server]
“Enabled”=hex:00,00

But, nothing quite helped until we un-installed the NCipher\nFast Client.

We went this route as  we were no longer using NCipher\nFast on that box.

Posted in Microsoft | Leave a comment

Microsoft – SQL Server – SQLCmd – Error – Sqlcmd: Error: Connection failure. SQL Native Client is not installed correctly.

Trying to connect to a MS SQL Server Instance using sqlcmd.exe and got the error message below:

Sqlcmd: Error: Connection failure. SQL Native Client is not installed correctly.

Of course, Googled and discovered that it is probably a Windows Path issue (manifested by the system picking up a wrong \ mismatched dll).

Errors such as this is common in cases where multiple SQL Server Binaries are loaded on the system.

As a work-around:

  1. Review and correct your path
  2. Transverse to the folder that contains the version of the sqlcmd that you want and run sqlcmd from that folder

To fix:

  1. Un-installed previous Microsoft SQL Server Client
Posted in Client, Microsoft, SQLCMD, Technical | Leave a comment

Microsoft – SQL Server – Msg 7302 – Cannot create an Instance of OLE DB Provider “OraOLEB.Oracle” for Linked Server

One of our end-users upon issuing a Linked-Server Query was getting an error that read

“Microsoft – SQLServer – Msg 7302 – Cannot create an Instance of OLE DB Provider “OraOLEB.Oracle” for Linked Server”.

I re-issued  a similar query and confirmed that that the exact query was working for me.

This led me to believe that the error was user or permission related.

There are a few tools and areas that one use to gather more diagnostic information:

Tools:

1) Use Microsoft\SysInternals Process Monitor tool

a) Initiate a Process Monitor Session
b) From MS Windows Task Manager, determine the “Process ID” for the MS SQL Server Service
c) filter for all events excluding those whose result is marked “success”

2) Using Local Policy, ensure that Object access failures are logged in the Event Viewer

Using the result from the areas briefly discussed above led us to determine that the user account lacked
some permissions.

To augment the user’s account:

1) Via Component Services, offer more permissions by default to all DCOM objects

2) Via Component Services, offer more permissions to specific DCOM Objects

a) MSDAINITIALIZE (DCOM Configuration \ MSDAINITIALIZE)

b) OraOLEDB.Oracle  (DCOM Configuration \ OraOLEDB.Oracle)

3) Determine Account incubator Group – which group will “carry” the permissions

a) local or Machine “Distributed Com Users” group

b) Custom Active Directory Group

c) Default Active Directory group such as “Domain Users’

Related Error Messages:

1) The machine-default permissions settings do not grant Local Activation permission for the Com Server application with CLSID {2206CDB0-19C1-11D1-89E0-00C04FD7A829} to the User <xxxx>.  Thus security permissions can be modified using the Component Services Administration tool.

Images:

Results of running “Microsoft\SysInternals” Tool:

Filtered on:

  1. MS SQL Server’s Process ID (derived from Task Manager)
  2. Results not tagged Success

NamenotFound-v3

Results of running “Microsoft\SysInternals” Tool:

Review list of modules loaded:

a) msdaora.dll

Event Properties - msdaora.dll

Results of enabling auditing on failed object access (via Local Policy):

What to look for

a) Source –> DCOM

b) Type –> Error

c) Event ID –> 10016

Event - DCOM - 10016 - whittedout

 

 

References:

  1. Troubleshooting “Cannot create an instance of OLE DB provider”
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2011/09/28/troubleshooting-cannot-create-an-instance-of-ole-db-provider.aspx
Posted in Linked Server, Microsoft, MS SQL Server, Oracle, OraOLEDB.Oracle | Leave a comment

Microsoft – Windows – Network Connections is empty

Microsoft – Windows – Network Connections is empty

Earlier today, post MS Windows XP – SP3 upgrade ended up with a problem where the “Network Connection” network applet was empty.

Also, noticed the error pasted below:

The COM+ Event System detected a bad return code during its internal processing. HRESULT was 80070005 from line 44 of d:\comxp_sp3\com\com1x\src\events\tier1\eventsystemobj.cpp. Please contact Microsoft Product Support Services to report this error.

The web has a few very interesting article:

1) You may experience various problems after you install the Microsoft Security Bulletin
MS05-051 for COM+ and MS DTC
http://support.microsoft.com/kb/909444

2) How to troubleshoot missing network connections icons in Windows Server 2003 and in Windows XP
http://support.microsoft.com/kb/825826

3) Device Manager may not show any devices and Network Connections may not show any network connections after you install Windows XP Service Pack 3 (SP3)
http://support.microsoft.com/kb/953979

 

The steps that worked for us are:

1) Downloading and running KB 953979 (via http://support.microsoft.com/kb/953979)

2) Per KB 909444 – Restore Permissons on the Com+ Catalog

In the %windir%/registration folder:

a) Make sure that the Everyone group has Read permissions

b) Make sure that the Administrator group and system user has full permissons

c) For each *.db file, ensure that the
“Allow inheritable auditing entries from the parent to propagate to
this object and all objects.” is granted

d) Using the ”Local Policies” MMC, granting “Bypass traverse checking” to the
Everyone Group

 

 
 

 

 

Posted in Microsoft, Network Connections, Networking, Technical | Leave a comment