Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Powershell for data transfer from non-SQL Server database


Powershell for data transfer from non-SQL Server database

Author
Message
mcginn
mcginn
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 316
I have a tool that uses SSIS and stored procedures to extract data from a non-SQL Server database (Sybase) and loads the data into a SQL Server database. I have upgraded to SQL Server 2008 R2 and I am in the process of upgrading to Powershell 2.0. I want to wrap this process in a Powershell script and I would like to be able to remove SSIS from the equation if there is an OLEDB type SMO object available which would allow me to connect to a Sybase database source and manage the data in much the same way as I manage SQL Server databases through the use of SMO.
patricklambin
patricklambin
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3508 Visits: 1240
Hello,

What does that mean SMO ? = SQL Server Management Objects
SMO , when it connects to an instance , is using a ServerConnection object , itself using a SqlConnection object which cannot be used with databases which are not included in a SQL Server instance.
For what you want to do ( if i have well understood ), you should rely on a linked server.

But there is some classes in the namespace System.Data.Oledb which could help you like
OledbConnection, OledbCommand
For that, i suggest you to have a look at this link :

http://msdn.microsoft.com/en-us/library/system.data.oledb(v=VS.90).aspx

Have a nice day
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search