Showing posts with label replicate. Show all posts
Showing posts with label replicate. Show all posts

Thursday, March 8, 2012

"Select *" in Replication Tables

Hi,
I used "select * from replicate_table_name" in my stored procedures and my
application.Now i want to replicate that tables.
Will it affect my application and Replication.
Please Advice me.
Regds
Soura
It has zero effect on replication, since replication is not going to look at
your code.
It will have no effect on your application as long as you are using
transactional replication. If you are using any other method of
replication, an additional column will be added to your tables which can
then be picked up by that select * and returned to your application which
might not be expecting it, thereby causing it to blow up.
It is VERY STRONGLY recommended that you do NOT use select * in any code
that you ever write in an application. It is bad programming practice and
can lead to some very nasty errors after your application is deployed.
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:56C4D4EC-2E19-4648-81E0-621E8EF821E7@.microsoft.com...
> Hi,
> I used "select * from replicate_table_name" in my stored procedures and my
> application.Now i want to replicate that tables.
> Will it affect my application and Replication.
>
> Please Advice me.
> Regds
> Soura
>
>
>
|||It depends . The table schema is modified if you have updatable
subscribers or merge replication - an extra column is added. However, in the
case of merge if you already have a guid column with the rowguid attribute
there won't be another column added.
So, in those cases which cause a schema modification, will the extra column
cause an issue? This depends on your code. In TSQL, if you use:
Insert into x
select * from Y
and Y has an extra column added, it'll fail.
If your code simply does
select * from Y
then it depends on how the recordset/dataset is used in the client app.
There may be some code that iterates through the columns collection which'll
fail if it encounters a new column. Actually this is unlikely as most
columns are referenced directly by name, and the new column will simply
exist but never be referred to.
Anyway - hopefully this gives you some ideas of what to look for to see if
these things will be an issue in your code...
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

"Replicating" SQL user accounts

Good day,
I am wanting to "replicate" user accounts between two SQL 2000 servers automatically. I.E. If I create a user on the first server, I want it automatically created on the second SQL server, if it doen't already exist.
Is there a quick and easy way to do this? If so how? I don't have to use replication, so if there is another way (I.E. DTS, etc) then that would also be great.
Thank you in advance,
Brian
no, you can't do this - the system tables can't be replicated only user
objects.
"Brian" <Brian.Louw@.sbs.siemens.co.za> wrote in message
news:17CDD729-D396-4FAC-80AB-FEE5555C530F@.microsoft.com...
> Good day,
> I am wanting to "replicate" user accounts between two SQL 2000 servers
automatically. I.E. If I create a user on the first server, I want it
automatically created on the second SQL server, if it doen't already exist.
> Is there a quick and easy way to do this? If so how? I don't have to use
replication, so if there is another way (I.E. DTS, etc) then that would also
be great.
> Thank you in advance,
> Brian
|||Brian,
there is no way to automatically do this; replication/triggers can't be used
on system tables, but you can use DTS transfer logins task, or you can
script out the logins using sp_help_revlogin (search for this proc on Google
to get info).
Regards,
Paul Ibison

Tuesday, March 6, 2012

"Out of memory" error

I get Run-time error '-2147024882 (8007000e) & "Out of menory" errors when I replicate with SQL server 7. I have made a VB program that uses SQLServer7 SP3's replication. Program gets through most of it's subscriptions but in the last one it gives these error messages. Sometimes when I push ok on that message box, replication continues and end with no errors, but sometimes it just shuts down without ending the replication process.

M.U.RMicrosoft talks about a memory leak in the following Technet article, I don't know if this helps?

FIX: Replication Initialize Method Causes Handle Leak on Failure (Q243741) (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q243741)

Also this article mentions error number -2147024882 (8007000e), I know it's about DTS and Oracle, but at the bottom it makes note that the "Out of Memory" is due to another problem.

PRB: DTS Transfer From SQL Server to Oracle Through OLE DB Provider Shows Ongoing Private Bytes Consumption (Q293320) (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q293320)

Thursday, February 16, 2012

"General network error. Check your network documentation."

I try to make a replication on my SQL Server2000 SP3 on Windows2000. I want to replicate 8 tables from Server1 to Server2. I found that 6 tables is work fine, however only 2 table that have an error that show below. How can I correct it?

The process could not deliver the snapshot to the Subscriber.

The process could not deliver the snapshot to the Subscriber.
(Source: Merge Replication Provider (Agent); Error number: -2147201001)
----------------------------------
The process could not bulk copy into table '"dbo"."Table1"'.
(Source: Server2 (Agent); Error number: 20037)
----------------------------------
General network error. Check your network documentation.
(Source: Server2 (Data source); Error number: 11)
----------------------------------Ok for the latest time I post my problem is only happen on Table1 but on Table2 is has something difference.

On Table1:
The process could not deliver the snapshot to the Subscriber.

The process could not deliver the snapshot to the Subscriber.
(Source: Merge Replication Provider (Agent); Error number: -2147201001)
----------------------------------
The process could not bulk copy into table '"dbo"."Table1"'.
(Source: Server2 (Agent); Error number: 20037)
----------------------------------
General network error. Check your network documentation.
(Source: Server2 (Data source); Error number: 11)
----------------------------------

On Table2:
The process could not query row metadata at the 'Subscriber'.

The process could not query row metadata at the 'Subscriber'.
(Source: Merge Replication Provider (Agent); Error number: -2147200996)
----------------------------------
Genetal network error. Check your network documentation.
(Source: Server2 (Data source); Error number: 11)
----------------------------------
The process was successfully stopped.
(Source: Merge Replication Provider (Agent); Error number: -2147199469)

Friday, January 27, 2012

"..Transform requires script Text and Language.." error?

Hi,
I'm trying setup a package to replicate a database table into a another
database's table.
I thought a Data Driven Query Task would work. I got as far as making the
two connections and setting up the Data Driven Query's source SELECT (with
stored procedure I created in the source database) and destination table
under the Bindings tab.
However, when I run the task I get the error below
"ActiveX Scripting Transform requires script Text and Language and at least
one Phase function to be specified."
When I preview the data in under the task's Source tab, I see data AND the
destination table gets created but not data gets transfered. Can someone
please help on what this error means?
Also, I eventually want to update this destination table with several other
subsequent queries from other databases in order to conslidate related data
into one large reporting table but I have to get the initial population of
data to work first. This will be refreshed daily
Does this approach/package task seem to be applicable?
Thanks, Dave.
Dave,
you'd be best off posting in the separate DTS discussion group.
Rgds,
Paul Ibison
|||Open up your package, save it as a bas file and post it here.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
|||I have the exact same problem as this guy. Could you please help?
thanks
marlene
url:http://www.ureader.com/msg/1156295.aspx