Updating SQL Server tables through BizTalk's SQL adapter - sql

We are getting data from an external website via BizTalk 2009. Several SQL Server tables are being updated with this data through a SQL adapter and SOAP. So the Visual Studio 2008 project that already updates tables has schemas and mappings. I need to add 3 columns to each SQL Server table so these columns are also updated with data from that website (those columns are already in the website and the SQL Server tables just need to be updated with that data).
I can add column to the actual SQL tables (using ALTER TABLE), but how would I actually retrieve data from that website through the Visual Server project so these tables are updated? Do I add columns to the schema?
Thanks!

You would need to add the three fields to the message schema your SQL data is mapped onto.
Also update the SQL statement which is executed inside your sql adapter settings to return the new columns.
UPDATE
The sql statement executed in the adapter can be found in BizTalk admin:
Application -> Receive Locations -> SQL Receive Location properties -> Configure -> SQL Command
In my case this is a stored procedure call so I would need to adjust the returned dataset of the stored procedure.

Related

No PK or FK when exporting SQL Server database

We have a Production and a Staging database hosted on Microsoft Azure. We're using Microsoft SQL Server Management Studio 19 to do the migrating.
Here goes the steps
Right click the database -> Tasks -> Export Data...
We select SQL Server Native Client 11.0 as the Data Source.
For authentication we select "Use SQL Server authentication" and type in our user name and password.
In "Database", we select our Production database
After clicking Next, we'll now select our destination. For Destination we use "SQL Server Native Client 11.0" and the same setup as above, but just with our Staging database as destination.
Now it's time to "Specify Table Copy or Query" and here we select "Copy data from one or more tables or views".
We now mark all the tables and select Edit Mappings..., where we enable Enable identity insert.
If we then press Next and start the migration, everything seems to be completed without any errors or warnings.
BUT - For some reason all our PK and FK relations are not exported into our Staging database.
We have tried to look up a single table, just to see the SQL query which are generated and it looks like the image attached.
Can anyone tell us, what we're doing wrong. We have no idea, why the PK and FK's aren't migrated. Stored procedures and everything are working as expected.
There are two ways to export the PK and FK.
Using SSMS to generate the sql script. We just need to select the tables. It will generate a script.sql in your local PC.
2 We can query System tables and views to splicing FK and PK's SQL statement.

What is the best way to copy a set of records from Oracle to SQL Server using code where table and columns are identical?

Basic idea is we have our Silverlight application, and need to provide data to third party application when user want to send (export) a record of T_MainList
We maintain our data in Oracle and third party's SQL Server, third party people are providing us access to write a stored procedure, and a web service if needed.
Same table schema is maintained on both databases (Oracle and SQL Server), need to copy a record of T_MAINLIST on user request and it has other dependent data sublist can have multiple records and each sublist record can have multiple subsublist records
Is serializing data of whole dataset as xml and send them in stored procedure. De-serialized data in stored procedure (on SQL server) and insert data into the appropriate tables good idea?
Oracle has the possibility to directly connect to another database, see the example for MS SQL server here. That should be faster then using xml ex- and import...

SSIS import all Paradox tables into SQL Server 2012

Writing my first SSIS package in VS 2012 and have managed to get it to connect to he Paradox tables without any problems.
What I need to do is go though each table and import the data into a corresponding table on a SQL Server database. There is no transformation of the data, as the table structures are the same. All that needs to be done is the data in the SQL Server database must first be deleted and then the data from the Paradox tables inserted.
I can connect one table in Paradox to one table in SQL Server but I want to do them all, please tell me I don't need a separate data task for each
Thanks
Ken
Try using a ForEach Loop Container to enumerate all the tables in your database.

How to create table in SQL Server 2012 using script file generated from SQL Server 2005?

How to use a script file generated from SQL Server 2005 and create the same table in SQL Server 2012?
Plus I have a script file for each table, how could I combine them all to generate my database?
Just create a database on SQL Server 2012 and run each create object script.
If some error or warning arises you can work it by demand.
note the tables got dependencies, so it's a good idea to create that tables in the right order.
You also can create the tables and put a no check in the FKs creation snipets and switch all FKs to check once all tables ar in place.
Also it's good to create all tables before creating the views, etc.

Can we define procedure or select statement on more than one database?

I need some data of one db and some data of another db and perform some operation. Can we do this in sql server 2008? In my project suppose I want to fetch data of doctor and Chemist database in CRM Database and want to generate operation, How can we do that?
If both db belongs on the same sql server instance you can use full qualified names of objects like [DbName].[scheme].[table] if on different instances then you must create linked server. Of course, providing access as expected.