Showing posts with label whenever. Show all posts
Showing posts with label whenever. Show all posts

Thursday, March 29, 2012

Can I have replication between two completely different schemas?

Hi SQL guys,

I have 2 different databases and an import tool that reads from one and fills the other one and then whenever we run it, it should synch the two databases and its kind of a heavy task. I was wondering if i can replace it with replication between these databases. I defined publisher and subscriber, but i cannot find anywhere that i can say which field in source maps to which field in destination.

Is it possible at all to have a replication between 2 databases with totally different schemas? If so, please let me know how.

Thanks,

Sina

No, the schemas should match. Aleast they should be compatible.|||

yes, you can, but only if the subscriber is not updating the data.

if you are only importing data from the publisher, then you can , what you need is create a transformable subscription, you use dts in that subscription to make all matching or convertions you need between source and destination.

Thank you

Armando Marrero

|||

hi Armando...

can you please brief the steps of making the matches between source and destination for transformable subscription.

Thanks in advance

Can I have replication between two completely different schemas?

Hi SQL guys,

I have 2 different databases and an import tool that reads from one and fills the other one and then whenever we run it, it should synch the two databases and its kind of a heavy task. I was wondering if i can replace it with replication between these databases. I defined publisher and subscriber, but i cannot find anywhere that i can say which field in source maps to which field in destination.

Is it possible at all to have a replication between 2 databases with totally different schemas? If so, please let me know how.

Thanks,

Sina

No, the schemas should match. Aleast they should be compatible.|||

yes, you can, but only if the subscriber is not updating the data.

if you are only importing data from the publisher, then you can , what you need is create a transformable subscription, you use dts in that subscription to make all matching or convertions you need between source and destination.

Thank you

Armando Marrero

|||

hi Armando...

can you please brief the steps of making the matches between source and destination for transformable subscription.

Thanks in advance

Can I have replication between two completely different schemas?

Hi SQL guys,

I have 2 different databases and an import tool that reads from one and fills the other one and then whenever we run it, it should synch the two databases and its kind of a heavy task. I was wondering if i can replace it with replication between these databases. I defined publisher and subscriber, but i cannot find anywhere that i can say which field in source maps to which field in destination.

Is it possible at all to have a replication between 2 databases with totally different schemas? If so, please let me know how.

Thanks,

Sina

No, the schemas should match. Aleast they should be compatible.|||

yes, you can, but only if the subscriber is not updating the data.

if you are only importing data from the publisher, then you can , what you need is create a transformable subscription, you use dts in that subscription to make all matching or convertions you need between source and destination.

Thank you

Armando Marrero

|||

hi Armando...

can you please brief the steps of making the matches between source and destination for transformable subscription.

Thanks in advance

sql

Thursday, March 8, 2012

Can connect to sqlexpress but not the DB ?


whenever i try and choose the database i wish to work with like below. I end up with an error message about the user not being associated with a trusted sql server connection

cnStr = @."Data Source=server\SQLEXPRESS;Initial Catalog=sqldata;User ID=blah\me";

same with this one

cnStr = @."Data Source=STOCKYARD\SQLEXPRESS;Initial Catalog=DB;Trusted_Connection=Yes;";

i figured this was all permission based so i kept dorking around with security adding my user name to anything i could find, and also went through and dozen or so connection strings and found when i take out the DB name that i can open a connection.... as the code below works...

cnStr = @."Data Source=Server\SQLEXPRESS;Trusted_Connection=Yes;";

cn.Open();

I plan on importing another database so how will i later on choose between the two, i notice i can create logins only at the security for the sqlexpress and not for my database? did i mess up how i created the database?
i have added my username and given permissions to the security for the database i wish to connect to, but is there another step im missing? i would keep trucking but i would like to have multiple DB on the sql express and pick and choose at the code level, maybe im misunderstanding what the catalog should include or i can change the connections database at another point?

You need to have specific permissions in a database given to a Database User, and that user needs to be Associated with a Server Login. My guess is that you don't quite have things connected together correctly yet. Check ou this BOL topic that helps lay out how Windows Users, SQL Logins and Database Users all fit together.

Once you have things associated together, you should be able to work in a database.

Mike

|||

You cannot use "User ID=blah\me". If you are trying to use your domain account, just use "Trusted_Connection=Yes". User ID is used for SQL Authentication, and you cannot specify a domain account.

You must have login permission for the "Initial Catalog=DB", otherwise, you won't be able to login. Logins are for server and user id is for database. You can more inside here: http://builder.com.com/5100-6388-5055543.html

some quote:

<<<<While logins belong to servers, users belong to databases. A user ID identifies a particular user of
a particular database. Also, users are specific to databases—that is, user Fred in the Northwind database
is not the same as user Fred in the pubs database, although both Freds may be associated with the same login.>>>>>