Showing posts with label amount. Show all posts
Showing posts with label amount. Show all posts

Thursday, March 29, 2012

How replication works in this scenario.. Please help

Hello all,
I am a newbie when it comes to replication. I have read the BOL but I
was overwhilemed with the amount of information about replication.
We are planning to have a server with sql server 2005 and disconnected
laptops with sql server express. How would replication work in this
scenario assuming we are using merge replication:
Table AA [ a replicated table on the server and 9 columns]
User #1 has table AA on his laptop... and has added 3 records, deleted
1 and
update 1 record (5 transaction in total)...
Table AA has 3 new records added after AA last sync his replica...
Joe Admin comes and decided to make schema changes to table AA on the
server...
Q#1 can he do that even though the log has 3 transactions?
Q#2 can he does it if the log was empty?
Q#3 assume the admin did the schema changes to table AA...and Now user
#1 trying
to sync
does that mean User #1 will lose all her changes (the 5 transaction
above)...
Q#4: What is the normal best practice if you have sql express.. How
would handle such
scheduled schema change?
Thank you very much!
There are some complications with 'altering' the schema of merge replicated
tables while the subscriber does data changes, but from your description you
are just adding a column on the publisher and this scenario looks OK. The
laptop users should not lose their changes. Finally remember that
sp_repladdcolumn is run on the publisher only.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Wednesday, March 28, 2012

How much time it usually takes to create a DR plan?

Hi,
In your opinion, how much time would be a reasonable amount of time for a
DBA to spend on the creation of a DR plan for a set of two MS SQL Server 2000
databases (OSes, and so on...) - one production and one standby, without
using replication, log shipping, or cluster, but only SAN storage block level
synchronization?
-- Hoping this makes any sense Oskar.You omitted almost all DR elements from the list :)
It depends on your environment. You just did not add your list Database
Mirroring however this is not applicable in SQL Server 2000 already.
So, what kind of a DR is this? A Cold-Standby? Like Backup\Restore or
Attach\Detach?
--
Ekrem Ã?nsoy
"Oskar" <Oskar@.discussions.microsoft.com> wrote in message
news:D6ECA2B1-D6DE-4FD4-A983-2971115693F1@.microsoft.com...
> Hi,
> In your opinion, how much time would be a reasonable amount of time for a
> DBA to spend on the creation of a DR plan for a set of two MS SQL Server
> 2000
> databases (OSes, and so on...) - one production and one standby, without
> using replication, log shipping, or cluster, but only SAN storage block
> level
> synchronization?
> -- Hoping this makes any sense Oskar.
>|||If you are doing this from scratch, the up-front time into the project can be
substantial to ensure the whole thing works with rigorous tests and to
document the procedures.
Once this is established, ongoing maintenance should be minimal.
Linchi
"Oskar" wrote:
> Hi,
> In your opinion, how much time would be a reasonable amount of time for a
> DBA to spend on the creation of a DR plan for a set of two MS SQL Server 2000
> databases (OSes, and so on...) - one production and one standby, without
> using replication, log shipping, or cluster, but only SAN storage block level
> synchronization?
> -- Hoping this makes any sense Oskar.
>|||If something goes wrong i.e. either one "processing unit", one "storage
unit", or both of them go bust I switch to the remaining "processing unit"
and "storage unit". If that doesn't work (e.g. because of some kind of
"logical", "non-storage-level" fault that couldn't be detected) I recover
from the last full DB backup + the chain of transaction log backups up to the
point of corruption for affected areas.
"Ekrem Ã?nsoy" wrote:
> You omitted almost all DR elements from the list :)
> It depends on your environment. You just did not add your list Database
> Mirroring however this is not applicable in SQL Server 2000 already.
> So, what kind of a DR is this? A Cold-Standby? Like Backup\Restore or
> Attach\Detach?
> --
> Ekrem Ã?nsoy
>
> "Oskar" <Oskar@.discussions.microsoft.com> wrote in message
> news:D6ECA2B1-D6DE-4FD4-A983-2971115693F1@.microsoft.com...
> > Hi,
> > In your opinion, how much time would be a reasonable amount of time for a
> > DBA to spend on the creation of a DR plan for a set of two MS SQL Server
> > 2000
> > databases (OSes, and so on...) - one production and one standby, without
> > using replication, log shipping, or cluster, but only SAN storage block
> > level
> > synchronization?
> >
> > -- Hoping this makes any sense Oskar.
> >
>|||I'm not counting the time for testing, just the "paperwork". When you write
"substantial", do you mean weeks or months?
"Linchi Shea" wrote:
> If you are doing this from scratch, the up-front time into the project can be
> substantial to ensure the whole thing works with rigorous tests and to
> document the procedures.
> Once this is established, ongoing maintenance should be minimal.
> Linchi
> "Oskar" wrote:
> > Hi,
> > In your opinion, how much time would be a reasonable amount of time for a
> > DBA to spend on the creation of a DR plan for a set of two MS SQL Server 2000
> > databases (OSes, and so on...) - one production and one standby, without
> > using replication, log shipping, or cluster, but only SAN storage block level
> > synchronization?
> >
> > -- Hoping this makes any sense Oskar.
> >|||It's hard to separate 'the paper work' from tests since you need to have
performed the tests to have the info for your paper work. If you are just
talking about creating a plan for doing the DR tests, we are talking about
hours or at most days.
Linchi
"Oskar" wrote:
> I'm not counting the time for testing, just the "paperwork". When you write
> "substantial", do you mean weeks or months?
> "Linchi Shea" wrote:
> > If you are doing this from scratch, the up-front time into the project can be
> > substantial to ensure the whole thing works with rigorous tests and to
> > document the procedures.
> >
> > Once this is established, ongoing maintenance should be minimal.
> >
> > Linchi
> >
> > "Oskar" wrote:
> >
> > > Hi,
> > > In your opinion, how much time would be a reasonable amount of time for a
> > > DBA to spend on the creation of a DR plan for a set of two MS SQL Server 2000
> > > databases (OSes, and so on...) - one production and one standby, without
> > > using replication, log shipping, or cluster, but only SAN storage block level
> > > synchronization?
> > >
> > > -- Hoping this makes any sense Oskar.
> > >|||One week should be sufficient.
"Oskar" <Oskar@.discussions.microsoft.com> wrote in message
news:48706660-18A6-4DB2-98F3-5F36D7A9A7BC@.microsoft.com...
> I'm not counting the time for testing, just the "paperwork". When you
> write
> "substantial", do you mean weeks or months?
> "Linchi Shea" wrote:
>> If you are doing this from scratch, the up-front time into the project
>> can be
>> substantial to ensure the whole thing works with rigorous tests and to
>> document the procedures.
>> Once this is established, ongoing maintenance should be minimal.
>> Linchi
>> "Oskar" wrote:
>> > Hi,
>> > In your opinion, how much time would be a reasonable amount of time for
>> > a
>> > DBA to spend on the creation of a DR plan for a set of two MS SQL
>> > Server 2000
>> > databases (OSes, and so on...) - one production and one standby,
>> > without
>> > using replication, log shipping, or cluster, but only SAN storage block
>> > level
>> > synchronization?
>> >
>> > -- Hoping this makes any sense Oskar.
>> >

Monday, March 19, 2012

How many characters has my field?

Does anyone know a function in SQL or how I can get the amount of characters of a field?

I have a column named NU_IPS wich contains data varchar type, that has a % symbol at the end, like 9.7% and so on... But in original table it can't be like this (it has to bem float type), I just want the number content, like this 9.7 For that I need in DTS put a query that convert it. That's why I need a function or something that can get the quantity of characters of each field.

So, It would be someting like this...

select substring(convert(varchar(getSizeField() - 1), nu_ipi), 1, 4) from dbo.t_STAGEAREACHAIR

It would cut always the last caracter, wich is '%'...

Any clues?
All posts are welcome, thanks.Look up the Len() - function ...|||Thanks Nephilim!

But why can't I put this function in the convert if it returns a int type?
I guess it can't process each field at time, 'cause we can admit there's a table in convert varchar paremeter, it's obvious.

Like:
select substring(convert(varchar(SELECT len(nu_ipi) - 1 FROM dbo.t_STAGEAREACHAIR), nu_ipi), 1, 4) from dbo.t_STAGEAREACHAIR

I've tried putting an IF statment...

Like:
if ((select len(nu_ipi) - 1 from dbo.t_STAGEAREACHAIR) = 1)
begin
select substring(convert(varchar(1), nu_ipi), 1, 4) from dbo.t_STAGEAREACHAIR
end

But it returns more than 1 value though.

Have you an idea how I can do it?
Thanks|||First of all, there really is no need to put a subselect in the select you posted :

select substring(convert(varchar(SELECT len(nu_ipi) - 1 FROM dbo.t_STAGEAREACHAIR), nu_ipi), 1, 4) from dbo.t_STAGEAREACHAIR

I think you are looking for something like this

select substring(convert(Varchar(10), NU_IPS), 1, len(convert(Varchar(10), NU_IPS)) -1 from dbo.t_STAGEAREACHAIR

however I'm not exactly certain I've understood your problem fully...|||maybe i don't understand it fully either, but NU-IPS is already a varchar, so...
select left(NU_IPS,len(NU_IPS)-1) ...or alternatively
select replace(NU_IPS,'%','') ...|||r937 and Nephilim
I think You got it, that's what I wanted.
It works...
Really thanks!
Juliane