Archive for May, 2010

Execute Process Task

May 20th, 2010 by admin | 1 Comment | Filed in MS BI-SSIS

The Execute process task execute a windows or console application .

Process to Create Package :-

a)      Open Business intelligence Development studio (BIDS) –> select File –>New Project  —> choose Integration service Project

Execute-Process.1

b)      Put the project name and press ok button .The Project will be created and screen will be look like this and you will find default package.dtsx package file in solution explorer.Rename the package name whatever you would like to change .

Execute-Process-package.2

c)      Drag and drop Execute Process Task  to execute console or window application .The following screen will be appear :-

Execute-Process.3

d)      Now double click on execute process task .The Execute Process Task editor will be appear . Now go to Process tab and Executable properties enter the name of console or windows application path , whatever you would like to process. Here I want to execute calc.exe That’s why I have entered calc.exe name in executable Properties .Which is shown in picture bellow :

Execute-Process.4.0

e)      Now Click Ok Button and run the package . The calculator will be appear when the package will be execute .

Execute-Process.5

Bulk Insert Task

May 10th, 2010 by admin | 2 Comments | Filed in MS BI-SSIS
  1. 1.       Bulk Insert Task: – The bulk insert task allows to insert bulk data from a flat file into Sql Server . This task hasn’t any data flow.

Process to Create Package :-

a)      Open Business intelligence Development studio (BIDS) à select Fileà New Project àchoose Integration service Project

Main

a)      Put the project name and press ok button .The Project will be created and screen will be look like this and you will find default package.dtsx package file in solution explorer.Rename the package name whatever you would like to change .

Package

a)      Drag and drop Bulk Insert   Task  to transfer bulk data from Flat file to Sql Server ..The following screen will be appear :-

Bulk_Insert

a)      Press double click on Bulk insert task , the properties page will be appear .In Bulk Insert task you have to choose source connection and destination connection . Bulk Insert task basically transfer the flat file data to sql server so obvisally source connection will be your flat file and desitination will be database.Now click source connection and browse button to select a flat file to do further process

Bulk_Insert_Browse

a)      Choose file and press open button for process the file

Bulk_Insert_Browse2

a)      Now choose Destination connection à GO To Connection Properties à select New Connection à Click New Button for establish to coneection to databaseà after selection of database -à Press OK Button to establish the connection

Bulk_Insert_Task_Properties

a)      Now select Destination Table  and press ok button .You have completed all process to move data from flat file to sql server . Press F5 to execute .

Bulk_Insert_Task_Properties1

Unload vs UnloadAndstop

May 7th, 2010 by admin | 2 Comments | Filed in Flash AS 3.0

I had a SWfLoadersClass for a large application which loads a bunch of external swfs, and when requested distributes copies of those swfs to the part of application. The application was developed in

Flash CS3. When I was using Loader.unload() method of Flash Player 9 I found it was very difficult to remove a loaded SWF from memory after it is unloaded . Most fired Events were still running and within

15 minutes my application hanged.

How I knew the Events were still running after unload ?

package {

import flash.display.*;

import flash.net.URLRequest;

public class loadSWF  extends MovieClip {

private  var ldr:Loader = new Loader();

private function loadSWF(){

     var url:String = "http://www.unknown.example.com/content.swf";
     var urlReq:URLRequest = new URLRequest(url);
     ldr.load(urlReq);

this.addEventListener(Event.ENTER_FRAME,traceEnterFrameLisnerIsWorking);

btnUnload.addEventListener(MouseEvent.CLICK, unloadButtonClicked);

}

private function traceEnterFrameLisnerIsWorking (e:Event):void {

trace(”ENTER_FRAME is running.”);

}

private function unloadButtonClicked(e:MouseEvent):void {

ldr.unload()

}

}

}

I found ‘trace’ calls that the listeners were still  active even after the loader.unload() was called.

After some Googling J I found The Loader.unload() method doesn’t do much. In that case Garbage

Collector is not working properly.

I found some other facts too :

A SWF file that has a music track is loaded into an application. Later, the SWF is unloaded using Loader.unload(). Though the SWF will be removed from the screen, the music will still be heard.

Solution :

In Flash Player 10, there is a new method, Loader.unloadAndStop(). The latter method stops execution of the left-over listeners and prompts the garbage collector to remove the external swf file from memory.

Loader.unloadAndStop() method is supposed to trigger garbage collector to remove an unloaded swf file from memory.

The unloadAndStop() method tries to solve this by stopping all actions running in a loaded element and clearing the element out of RAM. The unloadAndStop() methos belongs to the Loader class. The idea is to call this method on your Loader instance to clean what you have loaded.

What unlaodAndStop() does ? :

  • Stops all MovieClips
  • Stops all sounds playing/streaming
  • Stop/removes all Timer objects
  • Removes all global listeners for enterFrame, exitFrame, frameconstructed, activate, deactivate
  • Removes all stage listeners that have been created by the child.
  • Closes all NetConnection/NetStream and Video.attachNetStream/attachCamera(0) and Microphone.setLoopback(0)
  • Removes AS3 fonts from the global font table
  • Stops sockets, xmlsockets, filereference downloads, other downloading objects (grandchildren SWF), etc.
  • Frees bitmap related to cacheAsBitmap/filter, etc.

After converting my files into Flash CS4 and calling unlaodAndStop() my application worked fine :) .

Thank you various sources..

Keep reading coming soon with some thing amazing about the CPU Memory usage in a multiplayer virtual world :)

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,