Thursday, May 27, 2010

Windows Vista:: how to delete failed mapped network drive?

NET USE * /delete will delete all network drives and printers. Replace the * with the full UNC path and share name to delete a specific connection to a share. A standard user may not have the rights to disconnect from a network share.

Tuesday, May 25, 2010

Analysis Services:: Problem Starting SQL Server Analysis Services.

For those who are facing problem in Starting SQL Server Analysis Services, please follow the following steps to fix the issue.

Open Control Panel
Go to Regional and Language Options Locale Settings
Change the Format, Location and Administrative from English(India) to English(United States)
Restart the System
Once your system is Restarted open the Registry Editor (from Start = > Run => regedit)
Navigate to HKEY_USERS
Look for LSA entry @ S-1-5-18
Search for LocaleName
Update the following keys
Locale = 00000409
LocaleName = en-US
sCountry = United States
10. Open the SQL Server Configuration Manager, and start the SQL Server Analysis Services.

FYI: This is caused because Windows Vista is supporting en-IN whereas SQL Server 2005 does not provide support for en-IN, so if you try to run SQL Server Analysis Services it will give the following exception (can be found in Event Viewer)

The service cannot be started: Message-handling subsystem: The message manager for the default locale cannot be found. The locale will be changed to US English. Errors in the metadata manager. LOG file extension can be only .LOG. Message-handling subsystem: The message manager for the default locale cannot be found. The locale will be changed to US English. Message-handling subsystem: The message manager for the 16393 locale cannot be found. Internal error: Failed to generate a hash string.

http://dotnetslackers.com/Community/blogs/bmdayal/archive/2009/04/04/problem-starting-sql-server-analysis-services.aspx

Monday, May 24, 2010

Reporting Services:: Subscription Fail - The user or group name ‘Domain\User’ is not recognized

For any of you that work closely with Reporting Services, I am sure you can vouch that the system offers a great amount of flexibility and capability. At the same time though you also have probably encountered your fair share of strange, random and undocumented issues. One today I found happened with a Subscription.

Failed sending mail: The user or group name ‘Domain\UserNoMore’ is not recognized

Recently, we had a user leave the company. For the sake of this article we will happily refer to him as UserNoMore. When you create a subscription you are not propted to define an owner. You get the happy assignement automagically. When the user account is deactivated authentication ceases and emails and file archives begin to fail.

In my experience here it took a little finess and hackery to correct. Now let me first say I niether condone nore dismiss the need of making direct changes to data. So in this case after attempting any known fix or finding any interface I determined the fix would be in a bit of DML. Really the fix was pretty simple. Find the subscription, determine a different user to own, update the subscriptions. In this case I selected the service account for Reporting Services so I wouldn’t have to worry later (and I guess technically you could do this for all subscriptions if thats how you shop is set security wise).

In the ReportServer$InstanceName database for reporting services you will find 3 key tables:

Catalog – Reports, Folders and basically all Items
Subscriptions – The scheduled report processes
User – Well…any user or group in Reporting Services

Step 1- Get the Report ID in Question

SELECT ItemID, Name
FROM [ReportServer$InstanceName].[dbo].[Catalog]
WHERE [Name] =‘MonthlySalesReport’
and [Type] = 2 –Report Item Type

Step 2 – Find the Subscription

SELECT

[SubscriptionID],[OwnerID],[Report_OID]
FROM [ReportServer$InstanceName].[dbo].[Subscriptions]
WHERE [Report_OID] = ’1551AA5B-0FF1-494B-8725-73E22AA34D9F’

Step 3 – Select another User

SELECT [UserID],[UserName]
FROM [ReportServer$InstanceName].[dbo].[Users]
WHERE [UserName] = ‘Domain\RSServiceAccount’

Step 4 – Update the Subscription

UPDATE

[ReportServer$InstanceName].[dbo].[Subscriptions]
SET [OwnerID] = ’6BDB4964-EE28-4E96-BCB2-E4509FAC909B’
WHERE [OwnerID] = ’3D272CE2-A9B3-4B89-8993-C72E8D43A6EE’
AND [Report_OID] = ’1551AA5B-0FF1-494B-8725-73E22AA34D9F’

Really an easy fix…not clean but it worked for me. Feel free to provide feedback.

Enjoy!


http://speeddba.wordpress.com/2008/10/17/failed-sending-mail-the-user-or-group-name-domainuser-is-not-recognized/

Saturday, May 22, 2010

Set permissions on SSRS

  1. Run Sql Server Management Studio as Administrator (right click "Run as Administrator")
  2. Connect to a Reporting Services server using Windows Authentication.
  3. Right click Home, Select Properties, Select Permissions.
  4. Click Add Group or User, Type your Username, Click Ok.
  5. Check the box for Content Manager, Click Ok.

Now you can access Reporting Services via Sql Server Management Console without running as administrator.

You should also have permissions to browse Report Manager (http://localhost/Reports). If not, but you do see the Information Bar complaining then add http://localhost/ to Explorer's Trusted Sites Zone.

Friday, May 21, 2010

How to Disable Adobe Updater

  1. Step
    1. 1

    Open "My Computer" by double-clicking on the desktop icon or clicking on the "Start" menu and selecting the "My Computer" button. Open the drive that contains your Adobe programs. By default, this is the "C" drive.

  2. Step2

    Double-click on "Program Files" to view software files installed on your computer. Open the "Common Files" folder by double-clicking on the folder name.

  3. Step3

    Locate the Adobe folder and double-click on it to open it. The Adobe folder contains files for all Adobe programs installed on your system. Locate and open the Adobe Updater folder, which will be named "Updater" followed by a version number, such as 5 or 6.

  4. Step4

    Locate the executable file titled "Adobe Updater" within the "Updater" folder. Double-click the file to initiate the Adobe Updater application. The program will take a few moments to connect to the Internet to search for updates.

  5. Step5

    After it finishes searching, a prompt window will appear to install new updates. Click "Preferences" on the left-hand side and uncheck the "Automatically check for Adobe updates" box. Click "OK" to accept the changes. Adobe Updater will not check for available updates unless manually instructed to do so.


http://www.ehow.com/how_5098323_disable-adobe-updater.html

Thursday, May 20, 2010

SubSonic 2.x

http://www.codeproject.com/KB/database/SubsonicDAL.aspx

Wednesday, May 19, 2010

SQL Server:: VIEW in a VIEW

AVOID REUSING VIEW IN ANOTHER VIEW

Subsonic

SubSonic2
Work through
http://www.codeproject.com/KB/database/SubsonicDAL.aspx

SubSonic3
FAQ
http://subsonicproject.com/docs/SubSonic_3_Frequently_Asked_Questions

How to generate classes for Views
http://stackoverflow.com/questions/1078311/sql-views-in-subsonic-3-0

Classes generated for View DO NOT work
http://stackoverflow.com/questions/1299998/activerecord-and-gethashcode-fails-if-int-is-nullable



Friday, May 14, 2010

Java Script

Lesson 1
Lesson 2

SQL Server :: Storing Images and BLOB files

  1. Insert BLOB 

    INSERT INTO BLOBTest (BLOBName, BLOBData)  

     SELECT 'First test file',    

      BulkColumn FROM OPENROWSET(Bulk 'C:\temp\nextup.jpg', SINGLE_BLOB) AS BLOB 


 

http://www.databasejournal.com/features/mssql/article.php/3724556/Storing-Images-and-BLOB-files-in-SQL-Server-Part-2.htm


 

  1. Export BLOB 

    bcp "select datei from Person.Address WHERE
    addressid=1 " queryout "c:\TestOut.doc" -T -n -Slocalhost\AdventureWorks

http://www.sqlservercentral.com/Forums/Topic487470-338-1.aspx