Is it possible to use multiple database in a single edmx - silverlight-4.0

I am using a database "abc"and a edmx to work with the database tables. Now i want to add a new database "efg". is it better to add a new edmx file for the second database "efg" or use single edmx for both database? how can i achieve this?

No, you can only have a single database in each edmx file. You will have to create a new edmx file for the second database.

Related

Sybase: Generate a script Between two SQL?

I've a Sybase database where I will make a LOT of changes, and I would like to make my changes (currently using PowerDesigner 16), save it as .SQL then generate a .SQL to migrate my initial database to the new database structure.
I don't care about the data, I just want to update the structure with this script.
Any idea how to create this script?
EDIT: It has nothing to do with the given "duplicate", the other ticket is speaking on how to export the sql for SP/... In my case I only want the difference between the two sql
If you don't have one, you can create a model from your initial database, with File > Reverse Engineer > Database.
Create a copy of this model with File > Save As (as type Archived PDM), say copy.apm.
Then modify the model as you wish.
Then use Database > Apply Model Changes to Database, using the option Using an archive model (select the above copy.apm), to generate the ALTER script.
Anybody looking for a program agnostic way of generating the DDL for a database could use the ddlgen program that comes with ASE
See http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc30191.1572/html/utilityguide/CHDBBGGC.htm
So to create the DDL of database pubs2, you could do something like
ddlgen -Usa -Ppassword123 -SSERVERNAME -TDB -Npubs2 -Ooutput_file.sql

Nhibernate Fluent update schema without data removing

I'm using NHibernate Fluent Code First for c# desktop app. Is there a way to update db schema without removing existing data.
In my case I need simply add a new column with no constraints, allows nulls, and not a foreign/primary key, but I need to save all the existing data in db.
The db is Postgre 9.2 if it matters
fluentConfiguration.ExposeConfiguration(config => new SchemaUpdate(config).Execute(false, true)) updates database schema automatically and doesn't change existing data. It can only add tables or columns.
Rename and delete can be executed with FluentMigrator but then you have to manually write data migrations if you need to save your data.

Creating DB Schema from sqlite in sqlite manager

I have a sqlite database in sqlite manager. I would like to create DB schema. How can i do that? Or is it best to use some software to create the DB Schema?
Need some suggestions and guidance.
there is a system table called sqlite_master. It contains the SQL CREATE statements for all objects.
So, all you need to do is to select all rows from this table, and run the sql statements.
You can also use Database->Export Database Structure, which will effectiveley do the same thing
there is only one database in SQLite for file.
probably you can create a new file and open that with sqlite manager.
certainly you can
go to Database menu + create new Database
http://code.google.com/p/sqlite-manager/wiki/CommonTasks

Create New Database By SSIS

I have two database named: olddatabase and newdatabase. I want to create a new database named newdatabase2 then copy database structure from newdatabase to newdatabase2 and then convert data from olddatabase to newdatabase2.
To copy database structure from newdatabase to newdatabase2 I use Transfer SQL Server Object Task component in SSIS, and then execute SSIS Package to convert data. But in step 1 I dont now how to create new database named newdatabase2. Currently I create the database manually.
There is a "Transfer Database Task". You can use it to make a copy of newdatabase to newdatabase2:
EDIT:
or you can use the "Copy Database Wizard" once. It will generate an SSIS package and a SQL Server job, then you can re-use it as many times as you want.
EDIT2:
it would't make much sense to open on BIDS because you will only see something like this:
I don't think these packages are meant to be editable.
You can access it, though:

SQL Server Schema to Schema Migration

I would like to know which one is the best approach for migrating existing DB data to another new DB with entirely different structure. I want to copy the data from my old DB and need to insert the data in new DB. For me the table names and column names of new DB is entirely different. I am using SQL Server 2008.
You should treat this as an ETL problem, not a migration, as the two schemas are entirely different. The proper tool for this is SSIS. SSIS allows you to create dataflows that map columns from one table to another, add derived sources, perform splits, merges, etc. If possible you should create source queries that return results close to the schema of the target database so you need fewer transformations.
In this you have to migrate most of the parts manually by running scripts. AFAIK automatically it will not synchronize. But using SSMS you Map tables of two different db's. hope that will help.