Showing posts with label accidental. Show all posts
Showing posts with label accidental. Show all posts

Saturday, February 25, 2012

Accidental Log Shipping?

Hi there, was just wondering...
I setup database replication , creating a publisher and a subscriber....
all seemed to go well.
Anyway, my question is... Can Log Shipping be setup accidently while doing
this process? I know nothing
about log shipping.. and someone is trying to point blame on me for creating
'Log shipping'.
Is it possible that I could have created log shipping without even knowing..
or does it require a bit of know how.
Also... if Log shipping was setup... Does it run automatically?
And last but not least.. If it was setup, and the standby server was turned
off.. and not running... Would log shipping run?
Sorry about my ignorance.. but I have a feeling the people who are making
these accusations are out to create / pass blame across to poor old me for
their own mistakes.
thanks in advance everyone
-Simon
That depends. On SQL Server Enterprise Edition and Developer Edition it is
conceivable that someone could blunder their way through the wizard being
totally ignorant about what they are doing. However most noobs would get
scared and back out of the dialogs pretty soon fearing they were doing
something destructive.
On other editions log shipping requires significant "programming" and the
chances of setting it up unintentionally are very remote.
It is possible that you scheduled transaction log dumps which are an
important step in log shipping (but only the first step and not the only
step). This can be done using the maintenance wizard.
All in all its pretty remote.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
"Simon" <none@.none.com> wrote in message
news:deeKf.12140$yK1.10202@.news-server.bigpond.net.au...
> Hi there, was just wondering...
> I setup database replication , creating a publisher and a subscriber....
> all seemed to go well.
> Anyway, my question is... Can Log Shipping be setup accidently while doing
> this process? I know nothing
> about log shipping.. and someone is trying to point blame on me for
> creating 'Log shipping'.
> Is it possible that I could have created log shipping without even
> knowing.. or does it require a bit of know how.
> Also... if Log shipping was setup... Does it run automatically?
> And last but not least.. If it was setup, and the standby server was
> turned off.. and not running... Would log shipping run?
> Sorry about my ignorance.. but I have a feeling the people who are making
> these accusations are out to create / pass blame across to poor old me for
> their own mistakes.
> thanks in advance everyone
> -Simon
>
>
|||Hi Hilary, Thanks very much for your response.
If it was in my error, Would there have to be transactions in the
msdb.logshipping_primaries / secondaries table on the standby server to show
that Log shipping actually took place?
Where on the stanby server could I check history of Log shipping taking
place.
Thanks in advance once again
P.S. They have already 'supposedly' turned off Log shipping on the primary
machine... but the 'accused' standby machine hasnt been connected to the
network for months.. so if log shipping did take place months ago before it
was removed from the network, would I be able to check its history some how.
Thanks again
-Simon
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:ueq2k1fNGHA.984@.tk2msftngp13.phx.gbl...
> That depends. On SQL Server Enterprise Edition and Developer Edition it is
> conceivable that someone could blunder their way through the wizard being
> totally ignorant about what they are doing. However most noobs would get
> scared and back out of the dialogs pretty soon fearing they were doing
> something destructive.
> On other editions log shipping requires significant "programming" and the
> chances of setting it up unintentionally are very remote.
> It is possible that you scheduled transaction log dumps which are an
> important step in log shipping (but only the first step and not the only
> step). This can be done using the maintenance wizard.
> All in all its pretty remote.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> 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
>
> "Simon" <none@.none.com> wrote in message
> news:deeKf.12140$yK1.10202@.news-server.bigpond.net.au...
>
|||You would really have to be day dreaming pretty badly to "accidentally" set
this up. Using the wizards in 2000 or 2005, you would have to wade through
at least half a dozen screens, some of which have at least a dozen options
that have to be set. You could conceivably load up a script from a Resource
Kit, hit the button and create a log shipping set up, but you would have to
edit the script in the first place with at least server names and share
names, not something that I would call accidental. So, I would pretty much
have to say that it is not possible to "accidentally" setup log shipping.
That would be pretty analogous to someone accidentally building a house, it
just doesn't happen.
If log shipping is setup, you will see at least 3 jobs. Backup, copy, and
restore. The backup jb will generally be on the primary. The copy and
restore would generally be on the secondary. You will have the backup job
creating the backups in a share on the primary. The copy job would pull
them from the share on the primary to the share on the secondary. So you
can look in two places for the pieces. SQL Server Agent will have the jobs.
The file system on both primary and secondary will have a share created
which will contain tran log backups.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Simon" <none@.none.com> wrote in message
news:deeKf.12140$yK1.10202@.news-server.bigpond.net.au...
> Hi there, was just wondering...
> I setup database replication , creating a publisher and a subscriber....
> all seemed to go well.
> Anyway, my question is... Can Log Shipping be setup accidently while doing
> this process? I know nothing
> about log shipping.. and someone is trying to point blame on me for
> creating 'Log shipping'.
> Is it possible that I could have created log shipping without even
> knowing.. or does it require a bit of know how.
> Also... if Log shipping was setup... Does it run automatically?
> And last but not least.. If it was setup, and the standby server was
> turned off.. and not running... Would log shipping run?
> Sorry about my ignorance.. but I have a feeling the people who are making
> these accusations are out to create / pass blame across to poor old me for
> their own mistakes.
> thanks in advance everyone
> -Simon
>
>

Accidental duplicate results...

ALTER PROCEDURE discussions_GetTopics
(@.board_id as int)
AS

SELECT discussions_Topics.*, discussions_Posts.*, user_1.UserName AS Topic_Author_Username,
user_1.UserId AS Topic_Author_ID, user_2.UserName AS Post_Author_Username, user_2.UserId AS Post_Author_ID
FROM discussions_Topics INNER JOIN
discussions_Posts ON discussions_Topics.topic_id = discussions_Posts.topic_id INNER JOIN
aspnet_Users AS user_1 ON user_1.UserId = discussions_Topics.topic_poster INNER JOIN
aspnet_Users AS user_2 ON user_1.UserId = discussions_Posts.poster_id
WHERE (discussions_Topics.board_id = @.board_id)

I am simply trying to return a result for each topic, that has user info for both the author of the topic and the author of the last post (user_1, user_2)

The problem is, it will return multiple datarows with the same topic, and each of them have a different last post author.. when there can only be one last poster... idk.. im confused.. help?

Try:

ALTER PROCEDURE discussions_GetTopics(@.board_idas int)ASSELECT discussions_Topics.*, discussions_Posts.*, user_1.UserNameAS Topic_Author_Username, user_1.UserIdAS Topic_Author_ID, user_2.UserNameAS Post_Author_Username, user_2.UserIdAS Post_Author_IDFROM discussions_TopicsINNERJOIN discussions_PostsON discussions_Topics.topic_id = discussions_Posts.topic_idINNERJOIN aspnet_UsersAS user_1ON user_1.UserId = discussions_Topics.topic_posterINNERJOIN aspnet_UsersAS user_2ON user_2.UserId = discussions_Topics.last_poster_idWHERE (discussions_Topics.board_id = @.board_id)
|||

SELECT discussions_Topics.*, discussions_Posts.*, user_1.UserName AS Topic_Author_Username,
user_1.UserId AS Topic_Author_ID, user_2.UserName AS Post_Author_Username, user_2.UserId AS Post_Author_ID
FROM discussions_Topics INNER JOIN
discussions_Posts ON discussions_Posts.topic_id = discussions_Topics.topic_id INNER JOIN
aspnet_Users AS user_1 ON user_1.UserId = discussions_Topics.topic_poster INNER JOIN
aspnet_Users AS user_2 ON user_2.UserId = discussions_Posts.poster_id
WHERE (discussions_Topics.board_id = @.board_id)

In the Topics table, I did not have a field for "last_poster_id". I only have a "last_post_id" to use to search the "Posts" table to find the author of the post.

The problem with this query is that it returns a seperate topic for each user that has posted in the topic as the last poster. any help?

|||

WAIT!

GOT IT!

ALTER PROCEDURE discussions_GetTopics
(@.board_id as int)
AS

SELECT discussions_Topics.*, discussions_Posts.*, user_1.UserName AS Topic_Author_Username,
user_1.UserId AS Topic_Author_ID, user_2.UserName AS Post_Author_Username, user_2.UserId AS Post_Author_ID
FROM discussions_Topics INNER JOIN
discussions_Posts ON discussions_Posts.post_id = discussions_Topics.topic_last_post_id INNER JOIN
aspnet_Users AS user_1 ON user_1.UserId = discussions_Topics.topic_poster INNER JOIN
aspnet_Users AS user_2 ON user_2.UserId = discussions_Posts.poster_id
WHERE (discussions_Topics.board_id = @.board_id)

Dumb noob mistake.. lol... im still learning...