Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Wednesday, March 7, 2012

How to do XML Configuration With Different Connection Manager in SSIS

Hi

I want know how to config SSIS Package With different connection Manager.

Sample .

When Design time i gave The Connection Manager(Devlopement Server) Name : STG1.XXXSchema

Server Name STG.ssss

Password : xxxxx

I make the The XML configuration file .

after deploy the Package i want from Development Server to Production Server . so i will change the Package Config File Open wiht Notepad .

Server Name STG.qqq

Password :xxxxxx

after Edit Connection String I run the Package . It Always Taking Whatever igave the Connection String When Design time only .is not taking what connection string edit hte in the Package Config File. Please Any one give the Solution .

How we can Change the connection string in XML Config File .Whne I tested . It always taking what ever we given in the Desing Time .

Thanks & Regards,

Jeyakumar .M

The whole point of configurations is that it should work like this, changing the file, means that the new value is read.

Obvious things to check are that the config file is in the correct location and is being read. When you run a package, if it cannot find the config file, it will raise a warning event. Depending on how you execute this may not be visible, but you can easily turn on logging to ensure you do capture this information. What warning events do you get?

You can also check that the package is using configuration correctlyon development, by looking in the log. You shoudl see an OnInformation event like this-

The package is attempting to configure from the XML file "E:\MyConfigdtsConfig".

If you cannot see this on development, then there is obviously a problem with the way you have setup the configuration to start with.

|||

Hi thanks for your reply message. Hi i need help from yourside. how to enable the Log or how to view the log. can you send me the Detail . what ever ur previuos answer . how can i view the log. or how to create the log and see the information .

Thanks & Regards,

Jeyakumar.M

How to do XML Configuration With Different Connection Manager in SSIS

Hi

I want know how to config SSIS Package With different connection Manager.

Sample .

When Design time i gave The Connection Manager(Devlopement Server) Name : STG1.XXXSchema

Server Name STG.ssss

Password : xxxxx

I make the The XML configuration file .

after deploy the Package i want from Development Server to Production Server . so i will change the Package Config File Open wiht Notepad .

Server Name STG.qqq

Password :xxxxxx

after Edit Connection String I run the Package . It Always Taking Whatever igave the Connection String When Design time only .is not taking what connection string edit hte in the Package Config File. Please Any one give the Solution .

How we can Change the connection string in XML Config File .Whne I tested . It always taking what ever we given in the Desing Time .

Thanks & Regards,

Jeyakumar .M

The whole point of configurations is that it should work like this, changing the file, means that the new value is read.

Obvious things to check are that the config file is in the correct location and is being read. When you run a package, if it cannot find the config file, it will raise a warning event. Depending on how you execute this may not be visible, but you can easily turn on logging to ensure you do capture this information. What warning events do you get?

You can also check that the package is using configuration correctlyon development, by looking in the log. You shoudl see an OnInformation event like this-

The package is attempting to configure from the XML file "E:\MyConfigdtsConfig".

If you cannot see this on development, then there is obviously a problem with the way you have setup the configuration to start with.

|||

Hi thanks for your reply message. Hi i need help from yourside. how to enable the Log or how to view the log. can you send me the Detail . what ever ur previuos answer . how can i view the log. or how to create the log and see the information .

Thanks & Regards,

Jeyakumar.M

How to do this Query ?

I have table structure like this :

Table Name : Info, Course

Table : Info

Name

CourseID

StudentID

Table : Course

CourseID

CourseDesc

Sample Data :

Info Table : Harsimrat Thukral, 1, 123

Something, 2, 176

Nothing, NULL, 208

Course Table Data : 1, CS121

2, CS321

Now the problem is if I do query something like this :

SELECT * FROM

Info i , Course c

WHERE i.CourseID = c.CourseID

From the above query I don't see the result where it is (NULL), how can I see all the 3 results.

Thanks for the help.

Harsimrat

You will need to use an outer join instead of an inner join. Give a look to OUTER JOINs in books online.

|||

First of all say good bye to the ancient SQL join syntax, always stick with ANSI standard. The following query can be rewritten as follow as for ANSI syntax.

Select * from info inf

Inner Join course cou on inf.[CourseID] = cou.[CourseID]

To get all the result of info even there is no match on course table, you have to use the OUTER JOIN.

Here your query,

Code Snippet

Create Table #info (

[Name] Varchar(100) ,

[CourseID] Varchar(100) ,

[StudentID] Varchar(100)

);

Insert Into #info Values('Harsimrat Thukral','1','123');

Insert Into #info Values('Something','2','176');

Insert Into #info Values('Nothing',NULL,'208');

Create Table #course (

[CourseId] Varchar(100) ,

[Coursedesc] Varchar(100)

);

Insert Into #course Values('1','CS121');

Insert Into #course Values('2','CS321');

Code Snippet

--ANSI Standard :: Recommanded

Select * from #info inf

Left Outer Join #course cou on inf.[CourseID] = cou.[CourseID]

Code Snippet

--SQL Server Standard, please forget this syntax

--It will work fine upto SQL Server 8.0 from 9.0 onwards this syntax won’t work

Select * from #info inf, #course cou

Where

inf.[CourseID] *= cou.[CourseID]

If you want to learn all type of ANSI Join check out this thread,

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1611077&SiteID=1