Showing posts with label schema. Show all posts
Showing posts with label schema. Show all posts

Sunday, March 11, 2012

Change XML/XSD Source Location - Gives Lineage Errors!

Hi,

I have developed a SSIS package on my desktop and the package involves loading of XML data into a database. The XML does not have inline schema and I generated the XSD file from SSIS.

I used Derived Column and Data Conversion to load the data into the database.

Now, i want to migrate the package to a server. Now, when i change the path of the XML and XSD files, all the tasks show error such as

"Input column 'Last_Updated' (4433) has lineage id 3586 that was not previously used in data flow...."

Why is this so? I am using the same XML/XSD files after i moved to the server.

Please advice a fix for this?

Regards,

Vikram

I was looking into this and i think i understand why this is happenning:

When we actually select a XML/XSD file, for every column which flows throught he data flow, SSIS assigns it a Lineage ID which is Unique and this Lineage ID is used internally.

When i change the XML/XSD file location, SSIS is assigning new Lineage ID's for the columns in the XML file.

The Data Flow tasks down of the XML source still try to look for the Lineage ID which was generated while the tasks were created.

As the Lineage ID's changed, they thrown error such as "Input column 'Last_Updated' (4433) has lineage id 3586 that was not previously used in data flow....". Here, 3586 is the Lineage ID which was created initially.

I am not sure how to avoid this error but once this error occurs, we have the open the immediate task after the XML source and fix it.

If anyone has an idea how to avoid this (This might help in large packages during migrations), please enlighten us.

Regards,

Vikram

Wednesday, March 7, 2012

Change the schema of a mirrored database

Simple question, I hope. I need to add a column to a table of a database that is mirrored. How do I have to do that? Do I need to stop mirroring? Is it sufficient to simply pause mirroring? If I make the change on the principal db, what do I need to do the make the same change on the mirror?

Thanks,

Greg,

You don't need to stop the mirroring, you can perform any changes in the principal db and it will automatically get reflected in the mirror db......you can verify the same as follows,

1. add any column in the principal db and it will get reflected to mirror db automatically then after 5 minutes

2. in the mirror db take a database snapshot and just query through the table you can see the column which was added....

|||Is the same true for add/altering stored procedures?

|||

any changes you make in the principal database will get reflected just check and see by creating database snapshot........

|||All these commands TSQL DDL , DML etc are logged in Transaction Log and in Database Mirroring the Logs record are transferred. Even Replication commands like Create Publication etc are transferred.|||Also remember; a Principal database can only use the Full Recovery model which means all operations are fully logged.

Sunday, February 19, 2012

Change Schema on multiple tables

How do I change schema on multiple tables ?
ALTER SCHEMA .....? For more details please refer to the BOL
"Dammark" <dammark@.gmail.com> wrote in message
news:1140429273.758398.79760@.o13g2000cwo.googlegro ups.com...
> How do I change schema on multiple tables ?
>
|||In order to move an object from one schema to another in the same database
the ALTER SCHEMA command can be used.
For example to move the HumanResources.Department table to the Sales schema
you can use the following command:
USE AdventureWorks
GO
ALTER SCHEMA Sales TRANSFER HumanResources.Department
HTH
- Peter Ward
WARDY IT Solutions
"Dammark" wrote:

> How do I change schema on multiple tables ?
>

Change Schema on multiple tables

How do I change schema on multiple tables ?ALTER SCHEMA .....? For more details please refer to the BOL
"Dammark" <dammark@.gmail.com> wrote in message
news:1140429273.758398.79760@.o13g2000cwo.googlegroups.com...
> How do I change schema on multiple tables ?
>|||In order to move an object from one schema to another in the same database
the ALTER SCHEMA command can be used.
For example to move the HumanResources.Department table to the Sales schema
you can use the following command:
USE AdventureWorks
GO
ALTER SCHEMA Sales TRANSFER HumanResources.Department
HTH
- Peter Ward
WARDY IT Solutions
"Dammark" wrote:

> How do I change schema on multiple tables ?
>

Change Schema on multiple tables

How do I change schema on multiple tables ?ALTER SCHEMA .....? For more details please refer to the BOL
"Dammark" <dammark@.gmail.com> wrote in message
news:1140429273.758398.79760@.o13g2000cwo.googlegroups.com...
> How do I change schema on multiple tables ?
>|||In order to move an object from one schema to another in the same database
the ALTER SCHEMA command can be used.
For example to move the HumanResources.Department table to the Sales schema
you can use the following command:
USE AdventureWorks
GO
ALTER SCHEMA Sales TRANSFER HumanResources.Department
HTH
- Peter Ward
WARDY IT Solutions
"Dammark" wrote:
> How do I change schema on multiple tables ?
>

Change schema name on Tables and Stored procedures

Hi,

Is there a way I can change schema name on tables and stored procedures? How do I do this?

I´m very news to SQL and .net

Thanks

You can use ALTER SCHEMA command, the following command will transfer mytable under myschema to dbo schema:

ALTER SCHEMA dbo TRANSFERmyschema.mytable

For more information, you can refer to:

http://msdn2.microsoft.com/en-us/library/ms173423.aspx