Showing posts with label helloi. Show all posts
Showing posts with label helloi. Show all posts

Wednesday, March 28, 2012

mirrored sql servers

Hello:
I have 2 MS SQL Servers 2000 Developer edition.
Both have same settings and databases. I'd like to have them as mirrored
servers - all transaction on one server must be performed on the other
automatically. More than that I'd like to get possible if something happened
to one server, all transactions will be performed on another one.
Please, give me a hint how to do that.

Thanks,
GBGB (v7v1k3@.hotmail.com) writes:
> I have 2 MS SQL Servers 2000 Developer edition.
> Both have same settings and databases. I'd like to have them as mirrored
> servers - all transaction on one server must be performed on the other
> automatically. More than that I'd like to get possible if something
> happened to one server, all transactions will be performed on another
> one.

Symmetric or one-way? If one server is a main server, and the other is a
standby server, you can use either log shipping or transactional
replication. Log shipping is easier to manage, as transactional
replication leaves its mark on the source database. On the other hand,
the standby server will not be accessible each time a log is applied,
and the lag time is longer.

If it is symmetric, that actions are to be replicated in both directions,
then you may want to look into merge replication. But this sounds anything
about trivial to me. What about if the same row was updated in both
databases? Who wins?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||The only purpose I have is to have a "backup" server to be ready
to substitute main server at any time with recent data in it
and "seamless" switching in production mode.

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns970419D43A88Yazorman@.127.0.0.1...
> GB (v7v1k3@.hotmail.com) writes:
> > I have 2 MS SQL Servers 2000 Developer edition.
> > Both have same settings and databases. I'd like to have them as mirrored
> > servers - all transaction on one server must be performed on the other
> > automatically. More than that I'd like to get possible if something
> > happened to one server, all transactions will be performed on another
> > one.
> Symmetric or one-way? If one server is a main server, and the other is a
> standby server, you can use either log shipping or transactional
> replication. Log shipping is easier to manage, as transactional
> replication leaves its mark on the source database. On the other hand,
> the standby server will not be accessible each time a log is applied,
> and the lag time is longer.
> If it is symmetric, that actions are to be replicated in both directions,
> then you may want to look into merge replication. But this sounds anything
> about trivial to me. What about if the same row was updated in both
> databases? Who wins?
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||GB (v7v1k3@.hotmail.com) writes:
> The only purpose I have is to have a "backup" server to be ready
> to substitute main server at any time with recent data in it
> and "seamless" switching in production mode.

OK. The I would suggest log shipping.

However, you cannot really switch into real production mode with
Developer Edition, as you don't have a license for it. But it is
of course, perfectly OK to set up log shipping to learn how to
use it for a production scenario.

Oh, I should add that once you come to production, you may only
have Standard or Workgroup Edition. Log Shipping is included in
Enterprise Edition only, so for these edition replication is about
the only option.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||In message <Xns97047DCD3077Yazorman@.127.0.0.1>, Erland Sommarskog
<esquel@.sommarskog.se> writes
>GB (v7v1k3@.hotmail.com) writes:
>> The only purpose I have is to have a "backup" server to be ready
>> to substitute main server at any time with recent data in it
>> and "seamless" switching in production mode.
>OK. The I would suggest log shipping.
>However, you cannot really switch into real production mode with
>Developer Edition, as you don't have a license for it. But it is
>of course, perfectly OK to set up log shipping to learn how to
>use it for a production scenario.
>Oh, I should add that once you come to production, you may only
>have Standard or Workgroup Edition. Log Shipping is included in
>Enterprise Edition only, so for these edition replication is about
>the only option.

If GB wants clustering and failover I think he will need the enterprise
edition.

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author.|||Bernard Peek (bap@.shrdlu.com) writes:
> If GB wants clustering and failover I think he will need the enterprise
> edition.

That is correct. (OK, since Developer Edition has all that Enterprise
Edition has, you can put that on a cluster. But if you put Developer
Edition on a cluster, then your hardware budget for your development
environment is quite excessive.)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Bernard Peek" <bap@.shrdlu.com> wrote in message
news:ahtXDqTk30aDFwG3@.shrdlu.com...
> In message <Xns97047DCD3077Yazorman@.127.0.0.1>, Erland Sommarskog
> <esquel@.sommarskog.se> writes
> >GB (v7v1k3@.hotmail.com) writes:
> >> The only purpose I have is to have a "backup" server to be ready
> >> to substitute main server at any time with recent data in it
> >> and "seamless" switching in production mode.
> >OK. The I would suggest log shipping.
> >However, you cannot really switch into real production mode with
> >Developer Edition, as you don't have a license for it. But it is
> >of course, perfectly OK to set up log shipping to learn how to
> >use it for a production scenario.
> >Oh, I should add that once you come to production, you may only
> >have Standard or Workgroup Edition. Log Shipping is included in
> >Enterprise Edition only, so for these edition replication is about
> >the only option.
> If GB wants clustering and failover I think he will need the enterprise
> edition.

SQL Server 2005 will be released with DB mirroring, though in a "beta form".

He may want to look at this.

> --
> Bernard Peek
> London, UK. DBA, Manager, Trainer & Author.

Monday, March 26, 2012

Minus Sign ()

Hello:

I need to change minus brackets () with - sign in SSRS. How i can do this?

Thanks

Amit

Hi Amit,

See this post for information and links on how to do this:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=105700&SiteID=1

You'll want to do something similar to this: ##.##;-##.##

-Jessica

|||

Dear Jessica,

Thanks for your reply and i tried couple of formats and still not able to get correct results.

i need to change (123.90) to -123.90

Any help!!

Thanks

Amit

|||iif(number is negative,
Cint( replace(
replace((your number),")" ,"")
,"(","")

) * -1
,your number)

sorry if syntax on replace is wrong

it's pseudo code ish:

replace the brackets with nowt and then * by -1|||

Hello Amit,

Since your value is stored as a string, this should work for you:

=Iif(InStr(Fields!Number.Value, "(") > 0, "-" & replace(replace(Fields!Number.Value, "(", ""), ")", ""), Fields!Number.Value)

Jarret

|||Haven't I seen that somewhere before....?|||

If you are referring to the pseudo code you posted, almost.

Since his field is stored as a string, there's no need to convert to an integer and then negate it when all you need to do is prefix it with '-'. Should be a little more efficient, and, a conversion using CInt will fail if a non-numeric value is stored there.

Jarret

|||

Hi,

I don't know if I'm missing a point here, but if the field is stored as a string, just converting it to Double should be sufficient.

For example:

CDbl("(23.45)") = -23.45

Please correct me if I'm wrong.

-Aayush.

|||The CINT is because I was multiplying by -1

String * Integer?

Nice.

So when you export to excel and it is not a number, how exactly does that help the user?|||

Adolf - I understand what you were doing in regards to the CInt and -1. I am unsure of what you mean by this though:

String * Integer?

Nice.

I don't know if this was meant to be sarcastic or not, but if you look at my reply, "there's no need to convert to an integer and then negate it". The "negate it" means multiply by -1, I wasn't saying to leave it as string and still multiply by -1.

As for the export to Excel question... Amit didn't mention anything about exporting to Excel to do further processing, and since the values are already strings and didn't work this way before, I wouldn't think this would be a concern. However... If the number is not negative, you're not converting to Integer in your pseudo code. I just did a test export with some integers and some strings in the same field (as with your code), all values are considered strings in Excel. The only way to get all numbers in Excel with your version is if they are all negative numbers.

Another thing, converting to Integer using CInt will lose the decimals from the negative number (if it is a number), I doubt this was Amit's intention.

Aayush - Yes, that will work also, assuming that all values in that field are numbers stored as strings. I'm not sure if it matters to the Amit, but CDbl("(123.90)") becomes -123.9 without the ending 0.

Jarret

|||- you never know how users are going to use reports (just yesterday a report which 'had to fit on a single A4 for PDF' is now fine because they are sending it out in excel)

- export to excel functionality in RS is utterly ***. A cell formatted with N2, shows up in excel as [$-1010809]#,##0.00;-#,##0.00 in one cell and [$-1010809]General in another! I have to use CDbl in addition to the N2 formatting otherwise it comes out as a string

Ok so it should have been CDbl not CInt.

Right I'm done with this now.

Next!

Minus Sign ()

Hello:

I need to change minus brackets () with - sign in SSRS. How i can do this?

Thanks

Amit

Hi Amit,

See this post for information and links on how to do this:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=105700&SiteID=1

You'll want to do something similar to this: ##.##;-##.##

-Jessica

|||

Dear Jessica,

Thanks for your reply and i tried couple of formats and still not able to get correct results.

i need to change (123.90) to -123.90

Any help!!

Thanks

Amit

|||iif(number is negative,
Cint( replace(
replace((your number),")" ,"")
,"(","")

) * -1
,your number)

sorry if syntax on replace is wrong

it's pseudo code ish:

replace the brackets with nowt and then * by -1|||

Hello Amit,

Since your value is stored as a string, this should work for you:

=Iif(InStr(Fields!Number.Value, "(") > 0, "-" & replace(replace(Fields!Number.Value, "(", ""), ")", ""), Fields!Number.Value)

Jarret

|||Haven't I seen that somewhere before....?|||

If you are referring to the pseudo code you posted, almost.

Since his field is stored as a string, there's no need to convert to an integer and then negate it when all you need to do is prefix it with '-'. Should be a little more efficient, and, a conversion using CInt will fail if a non-numeric value is stored there.

Jarret

|||

Hi,

I don't know if I'm missing a point here, but if the field is stored as a string, just converting it to Double should be sufficient.

For example:

CDbl("(23.45)") = -23.45

Please correct me if I'm wrong.

-Aayush.

|||The CINT is because I was multiplying by -1

String * Integer?

Nice.

So when you export to excel and it is not a number, how exactly does that help the user?|||

Adolf - I understand what you were doing in regards to the CInt and -1. I am unsure of what you mean by this though:

String * Integer?

Nice.

I don't know if this was meant to be sarcastic or not, but if you look at my reply, "there's no need to convert to an integer and then negate it". The "negate it" means multiply by -1, I wasn't saying to leave it as string and still multiply by -1.

As for the export to Excel question... Amit didn't mention anything about exporting to Excel to do further processing, and since the values are already strings and didn't work this way before, I wouldn't think this would be a concern. However... If the number is not negative, you're not converting to Integer in your pseudo code. I just did a test export with some integers and some strings in the same field (as with your code), all values are considered strings in Excel. The only way to get all numbers in Excel with your version is if they are all negative numbers.

Another thing, converting to Integer using CInt will lose the decimals from the negative number (if it is a number), I doubt this was Amit's intention.

Aayush - Yes, that will work also, assuming that all values in that field are numbers stored as strings. I'm not sure if it matters to the Amit, but CDbl("(123.90)") becomes -123.9 without the ending 0.

Jarret

|||- you never know how users are going to use reports (just yesterday a report which 'had to fit on a single A4 for PDF' is now fine because they are sending it out in excel)

- export to excel functionality in RS is utterly ***. A cell formatted with N2, shows up in excel as [$-1010809]#,##0.00;-#,##0.00 in one cell and [$-1010809]General in another! I have to use CDbl in addition to the N2 formatting otherwise it comes out as a string

Ok so it should have been CDbl not CInt.

Right I'm done with this now.

Next!
sql

Wednesday, March 21, 2012

Minimally Logged Operations in SQL Server 2005

Hello!
I am trying to confirm what BOL says (
http://msdn2.microsoft.com/en-us/library/ms191244.aspx):
'...Bulk-logging is more efficient than full logging, and it reduces the
possibility of a large-scale bulk operation filling the available
transaction log space during a bulk transaction. However, if the database is
damaged or lost when bulk logging is in effect, you cannot recover the
database to the point of failure.
Note:
Unless a backup is running, minimal logging is used under the simple
recovery model.
...'
Does this mean that BULK-LOGGED recovery mode is more efficient in
terms of logging when database backup is running?
Thanks,
Igor
Yes, it is especially useful if you want high performance during bcp or bulk
insert operations.
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
"imarchenko" <igormarchenko@.hotmail.com> wrote in message
news:elYju2KyHHA.3768@.TK2MSFTNGP06.phx.gbl...
> Hello!
> I am trying to confirm what BOL says (
> http://msdn2.microsoft.com/en-us/library/ms191244.aspx):
> '...Bulk-logging is more efficient than full logging, and it reduces the
> possibility of a large-scale bulk operation filling the available
> transaction log space during a bulk transaction. However, if the database
> is damaged or lost when bulk logging is in effect, you cannot recover the
> database to the point of failure.
> Note:
> Unless a backup is running, minimal logging is used under the simple
> recovery model.
> ...'
> Does this mean that BULK-LOGGED recovery mode is more efficient in
> terms of logging when database backup is running?
> Thanks,
> Igor
>
>
|||Hilary,
Sorry for not making my question clear.
I was trying to compare performance/IO footprint of SIMPLE vs.
BULK-LOGGED during backup activities. Our database is in SIMPLE mode (I do
understand the implications of that) and we are contemplating whether we
should switch to BULK-LOGGED to imrpove performance during BACKUP operations
(we are working with multi-terabyte databases). Would you have any comments
on that?
On a similar note, we are doing a lot of bcp into the database. My
assumption was that both BULK-LOGGED and SIMPLE modes would behave in
similar way when it comes to logging during bcp operation. Is this
assumption correct?
Thanks,
Igor
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uhdDaESyHHA.1184@.TK2MSFTNGP04.phx.gbl...
> Yes, it is especially useful if you want high performance during bcp or
> bulk insert operations.
> --
> 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
> "imarchenko" <igormarchenko@.hotmail.com> wrote in message
> news:elYju2KyHHA.3768@.TK2MSFTNGP06.phx.gbl...
>

Monday, March 12, 2012

MIGRATIONSQL7 to SQL2000

Hello!!
I have a Data Base in sql7 and I want to transfer to another PC with a clean installation of SQL2000. How do I do this?
Thanks!!
You can both attach and restore 7.0 databases into 2000:
Moving SQL Server Databases
http://www.support.microsoft.com/?id=224071
Moving Databases between Servers
http://www.support.microsoft.com/?id=314546
Using WITH MOVE in a Restore to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465
How To Transfer Logins and Passwords Between SQL Servers
http://www.support.microsoft.com/?id=246133
Mapping Logins & SIDs after a Restore
http://www.support.microsoft.com/?id=298897
Utility to map users to the correct login
http://www.dbmaint.com/SyncSqlLogins.asp
How to Resolve Permission Issues When a Database Is Moved Between SQL Servers
http://www.support.microsoft.com/?id=240872
User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
Disaster Recovery Articles for SQL Server
http://www.support.microsoft.com/?id=307775
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Utopian" <gla1972@.yahoo.com.ar> wrote in message news:ORGDjc$JFHA.3516@.TK2MSFTNGP10.phx.gbl...
Hello!!
I have a Data Base in sql7 and I want to transfer to another PC with a clean installation of
SQL2000. How do I do this?
Thanks!!