Problem SSIS Package Scheduling

by Hari Mukkapati 26. June 2009 04:45

 

While scheduling the SSIS package some of you already might have seen the following problem.

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)

The reason for this problem is that you the SP2 patch is not applied properly. Why I said properly here is because that the SQL Server installed first and then installed SP2. Later you might have decided to install SSIS later in the game. SP2 is missing on the SSIS. This can happen any changes that you make to .Net Framework 2.0 (either uninstall or do some changes to it) to SQL server adding or removing features. So, Patch it up when you see the above problem or some thing like

Unable to cast object of type 'X' to type 'Y'.

Tags: , ,

SQL Server | SSIS | Database

Data Mining Concepts

by Hari Mukkapati 26. June 2009 04:26

Data mining is frequently described as "the process of extracting valid, authentic, and actionable information from large databases." In other words, data mining derives patterns and trends that exist in data. These patterns and trends can be collected together and defined as a mining model. Mining models can be applied to specific business scenarios, such as:

  • Forecasting sales.
  • Targeting mailings toward specific customers.
  • Determining which products are likely to be sold together.
  • Finding sequences in the order that customers add products to a shopping cart.

An important concept is that building a mining model is part of a larger process that includes everything from defining the basic problem that the model will solve, to deploying the model into a working environment. This process can be defined by using the following six basic steps:

Here is the link to the Microsoft web site for

Data mining concepts

Tags: , , ,

Time out issues in cube processing SSAS 2005 Options

by Hari Mukkapati 26. June 2009 04:25
 
Right click on Analysis Services in Management Studio
=> Properties.
=> Show Advanced (all) Properties
=> ExternalCommandTimeout 0
=> ExternalConnectionTimeout 0
 

Tags: , , ,

T-SQL Script for Grant(ing) permissions to all tables in a database to a user

by Hari Mukkapati 26. June 2009 04:22
set nocount on 
declare @object varchar(40) 
declare mycursor scroll cursor 
for 
   select name from sysobjects 
   where type = 'u' 
   order by name 
  
open mycursor 
fetch first from mycursor into @object 

while @@fetch_status <> -1 
begin 
  if @@fetch_status <> -2 
  begin 
     exec('grant SELECT, INSERT, UPDATE, DELETE on '+@object+' to [userid]') 
  end 
  fetch next from mycursor into @object 
end
 
close mycursor 
deallocate mycursor
 
set nocount off
Recently I was working on a database and Had to GRANT Select, Update, Delete, Insert permissions to one user on all  tables in one data base. So, Below script will do the job.
 

Tags: , , ,

Removing windows service from command line

by Hari Mukkapati 26. June 2009 04:20

Removing a windows service from command line using “SC” command line utility.

Here is the syntax and help.

DESCRIPTION:

     SC is a command line program used for communicating with the
     NT Service Controller and services.

USAGE:

sc <server> [command] [service name] <option1> <option2>...
The option <server> has the form "\\ServerName"
Further help on commands can be obtained by typing: "sc [command]"
Commands:
query-----------Queries the status for a service, or
enumerates the status for types of services.
queryex---------Queries the extended status for a service, or
enumerates the status for types of services.
start-----------Starts a service.
pause-----------Sends a PAUSE control request to a service.
interrogate-----Sends an INTERROGATE control request to a service.
continue--------Sends a CONTINUE control request to a service.
stop------------Sends a STOP request to a service.
config----------Changes the configuration of a service (persistant).
description-----Changes the description of a service.
failure---------Changes the actions taken by a service upon failure.
qc--------------Queries the configuration information for a service.
qdescription----Queries the description for a service.
qfailure--------Queries the actions taken by a service upon failure.
delete----------Deletes a service (from the registry).
create----------Creates a service. (adds it to the registry).
control---------Sends a control to a service.
sdshow----------Displays a service's security descriptor.
sdset-----------Sets a service's security descriptor.
GetDisplayName--Gets the DisplayName for a service.
GetKeyName------Gets the ServiceKeyName for a service.
EnumDepend------Enumerates Service Dependencies.

The following commands don't require a service name:
sc <server> <command> <option>
boot------------(ok | bad) Indicates whether the last boot should
be saved as the last-known-good boot configuration
Lock------------Locks the Service Database
QueryLock-------Queries the LockStatus for the SCManager Database
EXAMPLE:
   
sc start MyService
The installed services can be found in the registry under
\\HKEY_LOCAL_MACHNINE\SYSTEM\CurrentControlSet\Services

Tags: ,

COM+ application starting and stopping

by Hari Mukkapati 26. June 2009 04:12

COM+ application starting and stopping can be done easily using the COM+ Admin dll.  It can be done using VB or in a script language like VBS (which you can run using WSH).  Here's example code:

On Error Resume Next 
    ' if VB add a reference to COM+ 1.0 Admin Type Library. 
    ' if VBS just declare this object without a type 
    Dim oCatalog As COMAdmin.COMAdminCatalog 
    Dim sName As String 
    Set oCatalog = CreateObject("COMAdmin.COMAdminCatalog") 
  
    sName = "the package name goes here"    
    oCatalog.ShutdownApplication sName 
    
    ' to start the app use this syntax 
    'oCatalog.StartApplication sName 
    
    If Err.Number = 0 Then 
        MsgBox sName & " has been shut down.", vbOKOnly + vbInformation 
    Else 
        Const cMsg = "Error 0x#ERR# trying to shut down #APP#. (#DESC#.)" 
        Dim sMsg 
        sMsg = Replace(cMsg, "#ERR#", Hex(Err.Number), 1, 1) 
        sMsg = Replace(sMsg, "#APP#", sName, 1, 1) 
        sMsg = Replace(sMsg, "#DESC#", Err.Description, 1, 1) 
        MsgBox sMsg, vbOKOnly + vbInformation 
        Err.Clear 
    End If 
    Set oCatalog = Nothing 
del.icio.us Tags: ,,

Tags: , ,

Mukkapati.com

About the author

Hari Mukkapati

Month List

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar