Showing posts with label existing. Show all posts
Showing posts with label existing. Show all posts

Friday, March 30, 2012

Impact of Existing replication

Scenario.
A db published for transactional replication will be backed up and restored
on a server in a different facility. There, all new replication will be
defined (completely different articles, completely different targets)
Question.
Will pre-existing replication prevent correct functioning of the db at the
time of restore and new replication being defined? Dropping replication
prior to backing up the db is not an option.
Thank you for your help
Oscar
Once restored, execute sp_removedbreplication @.dbname = 'MyPubDB', then
reconfigure replication...
ChrisB
MCDBA OCP
www.MyDatabaseAdmin.com
"Oscar" wrote:

> Scenario.
> A db published for transactional replication will be backed up and restored
> on a server in a different facility. There, all new replication will be
> defined (completely different articles, completely different targets)
> Question.
> Will pre-existing replication prevent correct functioning of the db at the
> time of restore and new replication being defined? Dropping replication
> prior to backing up the db is not an option.
> Thank you for your help
> Oscar
>
|||Actually you want to execute:
-- REMOVE TRANSACTION IN LOG TO ALLOW FOR TRUNCATE -
EXEC sp_repldone @.xactid = NULL, @.xact_segno = NULL, @.numtrans = 0, @.time =
0, @.reset = 1
ChrisB
MCDBA OCP
www.MyDatabaseAdmin.com
"Chris" wrote:
[vbcol=seagreen]
> Once restored, execute sp_removedbreplication @.dbname = 'MyPubDB', then
> reconfigure replication...
> ChrisB
> MCDBA OCP
> www.MyDatabaseAdmin.com
> "Oscar" wrote:

Wednesday, March 21, 2012

Image Date Types

Hi,
Can any one tell me how to change an existing
Image column in a table to binary type. I am looking at
the T-SQL .
Thanks and Regards,
SajeevCREATE TABLE Tmp_myImageTable ( imagefield binary(1000) )
GO
EXEC ('INSERT INTO Tmp_testimage (im)
SELECT CONVERT(binary(1000), imagefield) FROM myImageTable ')
GO
DROP TABLE myImageTable
GO
EXECUTE sp_rename N'Tmp_myImageTable', N'myImagetable', 'OBJECT'
GO
Nathan H.O.

Monday, March 19, 2012

Image , text , ntext..

Is there any way I can comapre the new value of text, ntext and image with
the existing text, ntext and image column value. I have to do validation if
that text is not exist then it should inserted otherwise not..
Anyway I can do this validation?
Thanks in advance.
Hello,
You may check for NULL but cannot compare the values.
Example:
SELECT * FROM SomeTable WHERE TextColumn IS NULL
Hope that helps.
Amit Basu
"Rogers" wrote:

> Is there any way I can comapre the new value of text, ntext and image with
> the existing text, ntext and image column value. I have to do validation if
> that text is not exist then it should inserted otherwise not..
> Anyway I can do this validation?
> Thanks in advance.
>
>
|||Hello,
You may check for NULL but cannot compare the values.
Example:
SELECT * FROM SomeTable WHERE TextColumn IS NULL
Hope that helps.
Amit Basu
"Rogers" wrote:

> Is there any way I can comapre the new value of text, ntext and image with
> the existing text, ntext and image column value. I have to do validation if
> that text is not exist then it should inserted otherwise not..
> Anyway I can do this validation?
> Thanks in advance.
>
>
|||Hello,
You can check for existence of data only and not compare values like:
select * from SomeTable where TextColumn is null
Hope that helps.
Amit Basu
"Rogers" wrote:

> Is there any way I can comapre the new value of text, ntext and image with
> the existing text, ntext and image column value. I have to do validation if
> that text is not exist then it should inserted otherwise not..
> Anyway I can do this validation?
> Thanks in advance.
>
>