Showing posts with label simply. Show all posts
Showing posts with label simply. Show all posts

Tuesday, March 27, 2012

Exporting Packages

Can I simply Export my packeges on my SQL Server 2005 and use them on another SQL 2005 Server ?

Ie.

Can I build them at home, burn to a CD then import in work ? without any issues at all ?

I have a completly different user name in work for instance.

If not, is it possible to do this at all ?

Thanks

Yes, use windows authentication and/or configurations|||I would rather choose the option encrypt sensitive with password.
Then you can deploy your package where you want.
When you execute the package don't forget to provide the password...

Fridtjof|||Perfect thanks :)|||

Is you are moving packages between locations, the chances are that the resources used will be different and therefore have different credentials, so saving passwords would not really solve the problem, in fact it would be a risk as you would may disclose local credentials to another site or organisation, when there is no need. I'd also suggest that do not save sensitive is safer, and when used with configurations it is very easy for both development and operationally.

Exporting multiple tables as flat files

Hi.

I've tried to create a SSIS package to simply export a bunch of tables as flat files, and am having troubles because when the for each loop hits the second table the column mappings in the flat file destination are not synchronised with its schema.

I created a for each loop with an enumerator that returns the table names and sets a user variable.

I created a data flow task which dynamically connects to the table name variable.

In the Flat File Destination there is a column mapping property, but I don't know how to reset these mappings on each iteration.

Any ideas?

Are all the tables you are trying to export have exactly same column metadata? If not, you can't do this using a for loop. This is because SSIS cannot dynamically update the column mapping/schema. If the tables have different metadata, you need to create separate data flow tasks for them.|||Thanks.

Sunday, March 25, 2012

Exporting Data to File using TSQL

Does anyone know of a way to do this without using DTS? Simply by
SELECT * FROM <table>John,
Something like this:
EXEC master..xp_cmdshell 'osql -E -dPubs -Q"select * from
authors" -o"C:\authors.txt"'
or BCP (OUT)
HTH
Jerry
"John Barr" <JohnBarr@.discussions.microsoft.com> wrote in message
news:4E489E6F-2CE8-416B-AAF3-A73349B7092C@.microsoft.com...
> Does anyone know of a way to do this without using DTS? Simply by
> SELECT * FROM <table>
>