Tuesday, March 27, 2012
Easy SQL 7 Replication question
I have replication b/w 2 SQL 7.0 SP4 servers over a t1
connection. The type of replication is non-immediate
updating transactional replication pushing 1 way.
Sometimes the t1 connection will die. When the connection
comes back up the SQL Servers begin replicating again.
What happens to the transactions on the push server during
the connection loss? Are they stored in the distribution
DB until the SQL Servers can communicate again?
Please advise...
Thanks,
Louis
Louis,
they are never lost - they stay in MSrepl_commands on the distribution
database until all subscribers have read them or they have reached the
Transaction Retention Period (assuming non-anonymous subscribers).
Regards,
Paul Ibison
|||I believe these commands will reside in the MSreplication_queue table.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Paul Ibison" wrote:
> Louis,
> they are never lost - they stay in MSrepl_commands on the distribution
> database until all subscribers have read them or they have reached the
> Transaction Retention Period (assuming non-anonymous subscribers).
> Regards,
> Paul Ibison
>
>
|||Thanks for the help, Paul.
>--Original Message--
>Louis,
>they are never lost - they stay in MSrepl_commands on the
distribution
>database until all subscribers have read them or they
have reached the
>Transaction Retention Period (assuming non-anonymous
subscribers).
>Regards,
>Paul Ibison
>
>.
>
|||MSreplication_queue is probably also of interest, but Louis mentions he is
referring to transactions on the push server.
Cheers,
Paul
|||yikes, that's correct Paul.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OKCEZ$FWEHA.3892@.TK2MSFTNGP10.phx.gbl...
> MSreplication_queue is probably also of interest, but Louis mentions he is
> referring to transactions on the push server.
> Cheers,
> Paul
>
Thursday, March 22, 2012
Easiest way to copy a MS-SQL Database from one machine to another
one server to another. The servers are not part of the same organization or
network.
I have received a backup of the database created with enterprise manager but
am unable to restore it into a database of the same name on my server.
Thanks,
Kevin"Kevin" <noemail@.provided.com> wrote in message
news:tr_Zd.699401$8l.384177@.pd7tw1no...
> Can anyone recommend the easiest way to get a full copy of a database from
> one server to another. The servers are not part of the same organization
> or
> network.
> I have received a backup of the database created with enterprise manager
> but
> am unable to restore it into a database of the same name on my server.
> Thanks,
> Kevin
http://support.microsoft.com/defaul...kb;en-us;314546
Backup and restore is usually the easiest way - if you're having a problem
restoring a backup, then I suggest you post whatever error message you get.
You can also try restoring from Query Analyzer:
restore database MyDB from disk = 'c:\temp\db.bak'
Sometimes errors in QA are more informative than what EM tells you. See the
full RESTORE syntax in Books Online for moving file locations etc.
Simon|||Did you checked the paths to database files before restoring?
If you are using the EM restore database function, the database name
doesn't matter. You can name your new database as you would like to.
The only importand thing is, check the path, where the database should
be restored to.
If the backup was done on other server, probably the Db files was
located under different path (for example: C:\Program
Files\Database\database_name.mdf").
Lets say, that you try to restore it over database BUBU. In this case,
you can have totaly diff. path and of course filenames ... (for
example: "C:\Databases\BUBU_Data.mdf). Therefore, you'll get an error
message, that the files does not match. This is because why, database
reads information from backup about location of database ...
Greatings
Matik|||Simon,
I've tried restoring from QA, the directories for the other server and my
server are different so I am using the MOVE option for the data and log
files. The same problem occurs that I was getting using EM, it complains
that the logical file being restored is not part of my database. I've tried
this without a database called 'Test', as well as after creating one and
using the RESTORE FILELISTONLY but the error message is always the same:
here's the code and error message:
RESTORE DATABASE Test FROM DISK = 'C:\Backups\Project Recovery\Sample
Data\RebillingMarch102005.SQLBackup'
WITH NORECOVERY,
MOVE 'g:\mssql\data\rebilling_Data.MDF' TO 'C:\Program Files\Microsoft
SQL Server\MSSQL\Data\Rebilling_Data.mdf',
MOVE 'E:\MSSQL\log\rebilling_Log.LDF' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\Rebilling_Log.ldf'
response:
Server: Msg 3234, Level 16, State 2, Line 1
Logical file 'g:\mssql\data\rebilling_Data.MDF' is not part of database
'Test'. Use RESTORE FILELISTONLY to list the logical file names.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Thanks,
- Kevin
"Simon Hayes" <sql@.hayes.ch> wrote in message
news:42387d3d$1_3@.news.bluewin.ch...
> "Kevin" <noemail@.provided.com> wrote in message
> news:tr_Zd.699401$8l.384177@.pd7tw1no...
> > Can anyone recommend the easiest way to get a full copy of a database
from
> > one server to another. The servers are not part of the same organization
> > or
> > network.
> > I have received a backup of the database created with enterprise manager
> > but
> > am unable to restore it into a database of the same name on my server.
> > Thanks,
> > Kevin
> http://support.microsoft.com/defaul...kb;en-us;314546
> Backup and restore is usually the easiest way - if you're having a problem
> restoring a backup, then I suggest you post whatever error message you
get.
> You can also try restoring from Query Analyzer:
> restore database MyDB from disk = 'c:\temp\db.bak'
> Sometimes errors in QA are more informative than what EM tells you. See
the
> full RESTORE syntax in Books Online for moving file locations etc.
> Simon|||Instead of 'g:\mssql\data\rebilling_Data.*MDF' use
'rebilling_Data.*MDF' and
rebilling_Log.*LDF'
Madhivanan|||The first name after "MOVE" should be the logical file name, not the
physical. In your case, probably, "rebilling_Data" and "rebilling_Log"
are the logical names you need to use.
Friday, March 9, 2012
Dynamically change report datasource based upon parameter.
off of stored procs on multiple servers. And am hoping someone can point me
in the right direction.
Example:
Report A will run off of storedProc1 which exists in every database.
However, the specific server and database to use will depend upon the user
currently logged in.
Currently I am trying to make use of the custom dataset extension (by Teo
Lachev) to report off of an XML string. Unfortunately, I am having fits
trying to get it to work and don't even know if this is the best way.
Any help would be appreciated.Various approaches for dynamic database connections in RS 2000 have been
discussed on this newsgroup:
* Use a custom data processing extension (as you currently do)
* Use the linked server functionality of SQL Server; please check this
thread:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=848bac6b-98a2-4de7-abfd-bf199a99b660&sloc=en-us
* If the databases are on the same server, use a dynamic query text (i.e.
="select * from " & Parameters!DatabaseName.Value & "..table")
* If you're just toggling between two or three databases, you can publish
the same report 3 times with 3 different names using 3 different data
sources and write a main report that shows/hides the correct subreport based
on whatever criteria you want.
Native support (expression-based connection strings) is available in RS
2005.
Hope this helps,
Robert
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tarik Peterson" <tarikp@.investigo.net> wrote in message
news:O4%23lPKA9EHA.960@.TK2MSFTNGP11.phx.gbl...
> I currently have one report that I would like to be able to use to report
> off of stored procs on multiple servers. And am hoping someone can point
me
> in the right direction.
> Example:
> Report A will run off of storedProc1 which exists in every database.
> However, the specific server and database to use will depend upon the user
> currently logged in.
> Currently I am trying to make use of the custom dataset extension (by Teo
> Lachev) to report off of an XML string. Unfortunately, I am having fits
> trying to get it to work and don't even know if this is the best way.
> Any help would be appreciated.
>
dynamically change db servers
I am confronted with multiple database servers with database names DB-1, DB-2, etc., table names are all the same.
I'm passing the DBServerName and DBname as variables in my stored procedure.
Is there any better ways to choose different server names other than using EXEC as shown in the sp below?
Any comments are greatly appreciated ;)
CREATE PROCEDURE sp_MyTest
@.SERVERNAME varchar(50),
@.DBNAME varchar(50),
@.CUST_ID varchar(10),
AS
Begin
DECLARE @.strsql VARCHAR(800)
SET @.strsql='Select Cust_ID From ['+@.SERVERNAME+'].['+@.DBNAME+'].dbo.[CUSTOM] WHERE CUST_ID='''+@.CUST_ID+'''
EXEC (@.strsql)
Endthats pretty much like i would go with|||Originally posted by Enigma
thats pretty much like i would go with
Hi,
One small suggestion if u have different servers , configure for remote server or linked server options u can use any object by giveing the servername.databasename.username.objectname.
If in same database u can use databasename.username.objectname
irrespective of procedure where ever it is.|||Hi,
One small suggestion if u have different servers , configure for remote server or linked server options u can use any object by giveing the servername.databasename.username.objectname.
If in same database u can use databasename.username.objectname
irrespective of procedure where ever it is.
i believe thats what he is doing when he says
SET @.strsql='Select Cust_ID From ['+@.SERVERNAME+'].['+@.DBNAME+'].dbo.[CUSTOM] WHERE CUST_ID='''+@.CUST_ID+'''