Showing posts with label back. Show all posts
Showing posts with label back. Show all posts

Wednesday, March 28, 2012

load balancing

Hello,

How is load balancing working in SQL Server 2000. We want to have two different servers as a back end for our web based eCommerce application. Is this possible? While there be any modification requirement in the application?

As long as both servers are ODBC-DB or OLE-DB compatible you can do this using Enterprise Manager or T-SQL code. It happens on server side.

Linked servers are listed under the security node under each server in EM. (Left hand pane) Right click node and select 'New Linked Server'

|||

Both servers are SQL Server 2000. What I am trying to achieve is to have a backup for our SQL Server so that if one of them is down, the other is still alive and serving the application. Is this possible? If I have linked server, does that provide me what I need?

|||No. You are looking for clustering.|||

Yes Motley is right.

Clustering will give the impression of two or more servers acting as one and thus provide high-availabiltiy.

A SQL Server cluster however do not balance the SQL load and will not provide scalability.

load balancing

Hello,
How is load balancing working in SQL Server 2000. We want to have two
different servers as a back end for our web based eCommerce application. Is
this possible? While there be any modification requirement in the application?
There's no transparent load balancing in SQL Server. There are options to spread load over several
servers, each has advantages and disadvantages. Things you might want to read about in Books Online:
Distributed partitioned views (aka federated servers)
Replication
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
news:946586F9-803E-4248-AA8E-576A144A21FD@.microsoft.com...
> Hello,
> How is load balancing working in SQL Server 2000. We want to have two
> different servers as a back end for our web based eCommerce application. Is
> this possible? While there be any modification requirement in the application?
>

load balancing

Hello,
How is load balancing working in SQL Server 2000. We want to have two
different servers as a back end for our web based eCommerce application. Is
this possible? While there be any modification requirement in the application?There's no transparent load balancing in SQL Server. There are options to spread load over several
servers, each has advantages and disadvantages. Things you might want to read about in Books Online:
Distributed partitioned views (aka federated servers)
Replication
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
news:946586F9-803E-4248-AA8E-576A144A21FD@.microsoft.com...
> Hello,
> How is load balancing working in SQL Server 2000. We want to have two
> different servers as a back end for our web based eCommerce application. Is
> this possible? While there be any modification requirement in the application?
>

load balancing

Hello,
How is load balancing working in SQL Server 2000. We want to have two
different servers as a back end for our web based eCommerce application. Is
this possible? While there be any modification requirement in the applicatio
n?There's no transparent load balancing in SQL Server. There are options to sp
read load over several
servers, each has advantages and disadvantages. Things you might want to rea
d about in Books Online:
Distributed partitioned views (aka federated servers)
Replication
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
news:946586F9-803E-4248-AA8E-576A144A21FD@.microsoft.com...
> Hello,
> How is load balancing working in SQL Server 2000. We want to have two
> different servers as a back end for our web based eCommerce application. I
s
> this possible? While there be any modification requirement in the applicat
ion?
>sql

Monday, March 26, 2012

Live backups

Maury
You will find that most sites use the native SQL Server backup to back the
databases up to disk and then use something like Legato or Backup exec to
copy them from disk to offsite storage.
There are several reasons for doing it this way. Certainly most of the
backup programs did not work very well with SQL Server in older versions. It
was always a bit hit of miss if you could actually restore your backups. Mos
t
of the main tools do know have SQL Server speciffic modules now, which means
they are better at backing up SQL Server.
Using the native SQL Server backup means no version problem issues, which
can be useful.
By using the SQL Server backup to disk you have an easily accessable version
of the backup. This can be useful if you need to restore from it or want to
copy it to another server for support purposes.
The bottom line is that most people use native SQL Server backup to disk and
then a third party tool, because in most cases it is the best way to do it.
Regards
John
"Maury Markowitz" wrote:

> I consider the documentation on this topic somewhat confusing, so I figure
d
> I'd ask here.
> If I use any one of the common network backup utilities, and tell it to
> "live backup" my database and log, will this work as a backup?
> Right now I'm doing a full backup every night, but we DO have such softwar
e
> installed that's backing up the rest of our systems live onto offsite
> storage. I consider this to be much "safer", and if we can use this on our
> SQL Server as well, I would rest better.
> Maury"John Bandettini" wrote:

> There are several reasons for doing it this way. Certainly most of the
> backup programs did not work very well with SQL Server in older versions.
Can you be more specific on this particular issue? We're currently running
SS2k, is this one of the "older versions" you mention? Do you know what sort
of problems should be expected in these cases?
Technically it seems there shouldn't be a problem. Writes to the logs should
be flushed through immediately, which is what I would suspect COULD cause a
problem.
Maury|||Maury Markowitz wrote:
> "John Bandettini" wrote:
> Technically it seems there shouldn't be a problem. Writes to the logs shou
ld
> be flushed through immediately, which is what I would suspect COULD cause
a
> problem.
John's point, and the general consensus, is that it is FAR safer to
rely on the built-in native SQL Server backup utility to create the
database backups, than on a third-party tool. Use the SQL BACKUP
command to dump the database and/or t-logs to disk, then backup those
disk files using your favorite backup tool. Far more flexible, far
more reliable, you'll save yourself much grief doing it this way.|||"Tracy McKibben" wrote:
> John's point, and the general consensus, is that it is FAR safer to
> rely on the built-in native SQL Server backup utility to create the
> database backups, than on a third-party tool. Use the SQL BACKUP
But the problem with this approach is that it only gets done "every so
often". A failure is more likely to occur during the day (high activity) tha
t
at night when the backups run, so the delay between a nightly backup and the
failure represents a real risk for loss of data.
Let's approach this another way: is there a product that bills itself as a
suitable real-time backup system for SS 2k?
Maury|||Maury Markowitz wrote:
> But the problem with this approach is that it only gets done "every so
> often". A failure is more likely to occur during the day (high activity) t
hat
> at night when the backups run, so the delay between a nightly backup and t
he
> failure represents a real risk for loss of data.
> Let's approach this another way: is there a product that bills itself as a
> suitable real-time backup system for SS 2k?
What you're saying is true if you're only running FULL database
backups. You also have to ability to do transaction log backups, at
any interval you'd like. The transaction log is a record of every
change that occurs within the database. If you backup the transaction
log at regular intervals, let's say 15 minutes, you'll never lose more
than 15 minutes of data should a failure occur.
For instance, on my production servers, full database backups are done
nightly. After that, a transaction log backup is done every 5 minutes.
We also log-ship those backups to a standby database. Should a
database failure occur, we are virtually guaranteed not to lose more
than 5 minutes worth of data.|||Tracy McKibben wrote:
> What you're saying is true if you're only running FULL database
> backups. You also have to ability to do transaction log backups, at
> any interval you'd like. The transaction log is a record of every
> change that occurs within the database. If you backup the transaction
> log at regular intervals, let's say 15 minutes, you'll never lose more
> than 15 minutes of data should a failure occur.
> For instance, on my production servers, full database backups are done
> nightly. After that, a transaction log backup is done every 5 minutes.
> We also log-ship those backups to a standby database. Should a
> database failure occur, we are virtually guaranteed not to lose more
> than 5 minutes worth of data.
Also, your database must be in "Full" or "Bulk-Logged" recovery mode to
do transaction log backups.|||Maury Markowitz wrote:
> "Tracy McKibben" wrote:
>
>
> But the problem with this approach is that it only gets done "every so
> often". A failure is more likely to occur during the day (high activity) t
hat
> at night when the backups run, so the delay between a nightly backup and t
he
> failure represents a real risk for loss of data.
> Let's approach this another way: is there a product that bills itself as a
> suitable real-time backup system for SS 2k?
> Maury
Hi Maury
No backup systems I'm aware of is more "real-time" than what you can do
with SQL servers native backup.
The procedure is to e.g. backup your database once every night, and then
run transaction log backups every so and so often (e.g. every 15
minutes). By doing it this way you will always (at least) be able to
restore your database to the state it was in 15 minutes before it got
damaged. Depending on what has gone wrong, you'll actually in many case
be able to take a backup of you actual logfile and then also apply this
log backup with the STOP AT option that will stop the restore at the
time just before things went wrong.
In my opinion this is the most reliable and safe backup method and I'm
not aware of anything that can do it better.
Regards
Steen Schlüter Persson
Database Administrator / System Administrator|||I consider the documentation on this topic somewhat confusing, so I figured
I'd ask here.
If I use any one of the common network backup utilities, and tell it to
"live backup" my database and log, will this work as a backup?
Right now I'm doing a full backup every night, but we DO have such software
installed that's backing up the rest of our systems live onto offsite
storage. I consider this to be much "safer", and if we can use this on our
SQL Server as well, I would rest better.
Maury|||Maury
You will find that most sites use the native SQL Server backup to back the
databases up to disk and then use something like Legato or Backup exec to
copy them from disk to offsite storage.
There are several reasons for doing it this way. Certainly most of the
backup programs did not work very well with SQL Server in older versions. It
was always a bit hit of miss if you could actually restore your backups. Mos
t
of the main tools do know have SQL Server speciffic modules now, which means
they are better at backing up SQL Server.
Using the native SQL Server backup means no version problem issues, which
can be useful.
By using the SQL Server backup to disk you have an easily accessable version
of the backup. This can be useful if you need to restore from it or want to
copy it to another server for support purposes.
The bottom line is that most people use native SQL Server backup to disk and
then a third party tool, because in most cases it is the best way to do it.
Regards
John
"Maury Markowitz" wrote:

> I consider the documentation on this topic somewhat confusing, so I figure
d
> I'd ask here.
> If I use any one of the common network backup utilities, and tell it to
> "live backup" my database and log, will this work as a backup?
> Right now I'm doing a full backup every night, but we DO have such softwar
e
> installed that's backing up the rest of our systems live onto offsite
> storage. I consider this to be much "safer", and if we can use this on our
> SQL Server as well, I would rest better.
> Maury|||"John Bandettini" wrote:

> There are several reasons for doing it this way. Certainly most of the
> backup programs did not work very well with SQL Server in older versions.
Can you be more specific on this particular issue? We're currently running
SS2k, is this one of the "older versions" you mention? Do you know what sort
of problems should be expected in these cases?
Technically it seems there shouldn't be a problem. Writes to the logs should
be flushed through immediately, which is what I would suspect COULD cause a
problem.
Maury

Friday, March 23, 2012

Little help with a ReturnValue from SQL

I use a SP to write resident information to the SQL table. Then, I want to get the newly created RESIDENT_ID and send it back to my page.

Can someone give me a hand with it? I get the error:
"Cast from type 'DBNull' to type 'Integer' is not valid. "

Here is my SP:


CREATE PROCEDURE LS_resident_add
@.RESIDENT_ID int output,
@.HOUSE_ID as int,
@.Type as int = '0',
@.FName as varchar(50)=NULL,
@.LName as varchar(50)=NULL,
@.NickName as varchar(50)=NULL,
@.Email as varchar(50)=NULL,
@.Notes as varchar(1000)=NULL,
@.Access_Level as int = '0',
@.Password as varchar(8)=NULL,
@.Status as int = '0'

AS

INSERT INTO Street_Resident
(House_ID,
Type,
FName,
LName,
NickName,
Email,
Notes,
Access_Level,
Password,
Status)

VALUES
(@.House_ID,
@.Type,
@.FName,
@.LName,
@.NickName,
@.Email,
@.Notes,
@.Access_Level,
@.Password,
@.Status)
GO

Here is my script:


Sub resident_add(Source as Object, E as EventArgs)
Dim myConnection as New SqlConnection(ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_LindenStreet"))
Dim myCommand as New SqlCommand("LS_resident_add", myConnection)
myCommand.CommandType=CommandType.StoredProcedure

myCommand.Parameters.Add(New SQLParameter("@.HOUSE_ID", frm_HOUSE_ID.SelectedItem.Value))
myCommand.Parameters.Add(New SQLParameter("@.Type", frm_Type.SelectedItem.Value))
IF frm_FName.text > "" THEN
myCommand.Parameters.Add(New SQLParameter("@.FName", frm_FName.Text))
END IF

IF frm_LName.text > "" THEN
myCommand.Parameters.Add(New SQLParameter("@.LName", frm_LName.Text))
END IF

IF frm_NickName.text > "" THEN
myCommand.Parameters.Add(New SQLParameter("@.NickName", frm_NickName.Text))
END IF

IF frm_Email.text > "" THEN
myCommand.Parameters.Add(New SQLParameter("@.Email", frm_Email.Text))
END IF

IF frm_Notes.text > "" THEN
myCommand.Parameters.Add(New SQLParameter("@.Notes", frm_Notes.Text))
END IF

IF frm_Access_Level.SelectedIndex > -1 THEN
myCommand.Parameters.Add(New SQLParameter("@.Access_Level", frm_Access_Level.SelectedItem.Value))
END IF

IF frm_Password.text > "" THEN
myCommand.Parameters.Add(New SQLParameter("@.Password", frm_Password.Text))
END IF

myCommand.Parameters.Add(New SQLParameter("@.Status", 1))

'Returns the new Resident ID so we can add any activities they signed up for
MyCommand.Parameters.Add("@.RESIDENT_ID", SqlDbType.Int)
MyCommand.Parameters("@.RESIDENT_ID").Direction = ParameterDirection.Output

myCommand.Connection.Open()
myCommand.ExecuteNonQuery

'Returns the new Resident ID so we can add any activities they signed up for
RESIDENT_ID = myCommand.Parameters("@.RESIDENT_ID").Value

myCommand.Connection.Close()
'Resident_Activity_delete()
Resident_Activity_Update()
Notify_User()
Dim strClose As String
strClose = "<script>"
strClose &= "window.close();"
strClose &= "</"
strClose &= "script>"
Response.Write(strClose)
End Sub

You're not returning anything from the sproc, thus the null reference error. Add a line something like this to the stored procedure:

RETURN SCOPE_IDENTITY()

Don

Monday, March 12, 2012

List of what the server is running

I am working with the web service here, is there any way to get a list back
of all the current reports being ran? thanks!On Mar 2, 11:25 am, "Smokey Grindel" <nos...@.nospam.com> wrote:
> I am working with the web service here, is there any way to get a list back
> of all the current reports being ran? thanks!
I don't have the link but if you check the microsoft report packs I
beleive there are some reports for this...
Cheers,
Ben|||Take a look at the ReportService2005 Web service... There is a job class
that I think does what you wish.
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Smokey Grindel" wrote:
> I am working with the web service here, is there any way to get a list back
> of all the current reports being ran? thanks!
>
>|||Just want to verify a "job" is not just a scheduled one but any report or
task that the report server is currently running correct? thanks!
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:DEF182B0-BEEE-4F7B-B597-580C91778982@.microsoft.com...
> Take a look at the ReportService2005 Web service... There is a job class
> that I think does what you wish.
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "Smokey Grindel" wrote:
>> I am working with the web service here, is there any way to get a list
>> back
>> of all the current reports being ran? thanks!
>>