Showing posts with label hence. Show all posts
Showing posts with label hence. Show all posts

Tuesday, March 20, 2012

question on recovery sql server 2000

Hi
I am using SQL 2000 std edition and hence using custom scripts to
restore the DB using standby file. I am backing up T-LOGs every 30 mins on
production and copying them on a network location which is accessible to
standby machine.
I run a job on standby machine which applies the transaction logs every 30
mins by checking in backmediaset & backupmediafamily tables of Production. DB
is running in read only and is working.
Question : In case my Production machine goes down and does not come up how
can I start the Standby "with data loss" if it has already appiled the last
T-logs generated on production.
Since Produciton (primary) is down I can not backup the last T-log.
Thanks
Mangesh
From BOL
This example sets up the MyNwind database on a standby server. The database
can be used in read-only mode between restore operations.
-- Restore the initial database backup on the standby server.
USE master
GO
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH STANDBY = 'c:\undo.ldf'
GO
-- Apply the first transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH STANDBY = 'c:\undo.ldf'
GO
-- Apply the next transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log2
WITH STANDBY = 'c:\undo.ldf'
GO
-- Repeat for each transaction log backup created on the
-- primary server.
-- Time elapses.. .. ..
-- The primary server has failed. Back up the
-- active transaction log on the primary server.
BACKUP LOG MyNwind
TO MyNwind_log3
WITH NO_TRUNCATE
GO
-- Apply the final (active) transaction log backup
-- to the standby server. All preceding transaction
-- log backups must have been already applied.
RESTORE LOG MyNwind
FROM MyNwind_log3
WITH STANDBY = 'c:\undo.ldf'
GO
-- Recover the database on the standby server,
-- making it available for normal operations.
RESTORE DATABASE MyNwind
WITH RECOVERY
GO
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
> Hi
> I am using SQL 2000 std edition and hence using custom scripts to
> restore the DB using standby file. I am backing up T-LOGs every 30 mins on
> production and copying them on a network location which is accessible to
> standby machine.
> I run a job on standby machine which applies the transaction logs every 30
> mins by checking in backmediaset & backupmediafamily tables of Production.
DB
> is running in read only and is working.
> Question : In case my Production machine goes down and does not come up
how
> can I start the Standby "with data loss" if it has already appiled the
last
> T-logs generated on production.
> Since Produciton (primary) is down I can not backup the last T-log.
> Thanks
> Mangesh
>
|||So you are continuously doing RESTORE WITH STANDBY? And you now wand to make the database fully
accessible? If so:
RESTORE DATABASE dbname WITH RECOVERY
No actual restore is performed, only the recovery work to get it out of standby mode.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in message
news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
> Hi
> I am using SQL 2000 std edition and hence using custom scripts to
> restore the DB using standby file. I am backing up T-LOGs every 30 mins on
> production and copying them on a network location which is accessible to
> standby machine.
> I run a job on standby machine which applies the transaction logs every 30
> mins by checking in backmediaset & backupmediafamily tables of Production. DB
> is running in read only and is working.
> Question : In case my Production machine goes down and does not come up how
> can I start the Standby "with data loss" if it has already appiled the last
> T-logs generated on production.
> Since Produciton (primary) is down I can not backup the last T-log.
> Thanks
> Mangesh
>
|||Yes. I am doing a continuous restoration of my standby database using standby
file.
Thanks for help.
"Tibor Karaszi" wrote:

> So you are continuously doing RESTORE WITH STANDBY? And you now wand to make the database fully
> accessible? If so:
> RESTORE DATABASE dbname WITH RECOVERY
> No actual restore is performed, only the recovery work to get it out of standby mode.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in message
> news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
>
>

question on recovery sql server 2000

Hi
I am using SQL 2000 std edition and hence using custom scripts to
restore the DB using standby file. I am backing up T-LOGs every 30 mins on
production and copying them on a network location which is accessible to
standby machine.
I run a job on standby machine which applies the transaction logs every 30
mins by checking in backmediaset & backupmediafamily tables of Production. D
B
is running in read only and is working.
Question : In case my Production machine goes down and does not come up how
can I start the Standby "with data loss" if it has already appiled the last
T-logs generated on production.
Since Produciton (primary) is down I can not backup the last T-log.
Thanks
MangeshFrom BOL
This example sets up the MyNwind database on a standby server. The database
can be used in read-only mode between restore operations.
-- Restore the initial database backup on the standby server.
USE master
GO
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH STANDBY = 'c:\undo.ldf'
GO
-- Apply the first transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH STANDBY = 'c:\undo.ldf'
GO
-- Apply the next transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log2
WITH STANDBY = 'c:\undo.ldf'
GO
-- Repeat for each transaction log backup created on the
-- primary server.
--
-- Time elapses.. .. ..
--
-- The primary server has failed. Back up the
-- active transaction log on the primary server.
BACKUP LOG MyNwind
TO MyNwind_log3
WITH NO_TRUNCATE
GO
-- Apply the final (active) transaction log backup
-- to the standby server. All preceding transaction
-- log backups must have been already applied.
RESTORE LOG MyNwind
FROM MyNwind_log3
WITH STANDBY = 'c:\undo.ldf'
GO
-- Recover the database on the standby server,
-- making it available for normal operations.
RESTORE DATABASE MyNwind
WITH RECOVERY
GO
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
> Hi
> I am using SQL 2000 std edition and hence using custom scripts to
> restore the DB using standby file. I am backing up T-LOGs every 30 mins on
> production and copying them on a network location which is accessible to
> standby machine.
> I run a job on standby machine which applies the transaction logs every 30
> mins by checking in backmediaset & backupmediafamily tables of Production.
DB
> is running in read only and is working.
> Question : In case my Production machine goes down and does not come up
how
> can I start the Standby "with data loss" if it has already appiled the
last
> T-logs generated on production.
> Since Produciton (primary) is down I can not backup the last T-log.
> Thanks
> Mangesh
>|||So you are continuously doing RESTORE WITH STANDBY? And you now wand to make
the database fully
accessible? If so:
RESTORE DATABASE dbname WITH RECOVERY
No actual restore is performed, only the recovery work to get it out of stan
dby mode.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in me
ssage
news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
> Hi
> I am using SQL 2000 std edition and hence using custom scripts to
> restore the DB using standby file. I am backing up T-LOGs every 30 mins on
> production and copying them on a network location which is accessible to
> standby machine.
> I run a job on standby machine which applies the transaction logs every 30
> mins by checking in backmediaset & backupmediafamily tables of Production.
DB
> is running in read only and is working.
> Question : In case my Production machine goes down and does not come up h
ow
> can I start the Standby "with data loss" if it has already appiled the las
t
> T-logs generated on production.
> Since Produciton (primary) is down I can not backup the last T-log.
> Thanks
> Mangesh
>|||Yes. I am doing a continuous restoration of my standby database using standb
y
file.
Thanks for help.
"Tibor Karaszi" wrote:

> So you are continuously doing RESTORE WITH STANDBY? And you now wand to ma
ke the database fully
> accessible? If so:
> RESTORE DATABASE dbname WITH RECOVERY
> No actual restore is performed, only the recovery work to get it out of st
andby mode.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message
> news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
>
>

question on recovery sql server 2000

Hi
I am using SQL 2000 std edition and hence using custom scripts to
restore the DB using standby file. I am backing up T-LOGs every 30 mins on
production and copying them on a network location which is accessible to
standby machine.
I run a job on standby machine which applies the transaction logs every 30
mins by checking in backmediaset & backupmediafamily tables of Production. DB
is running in read only and is working.
Question : In case my Production machine goes down and does not come up how
can I start the Standby "with data loss" if it has already appiled the last
T-logs generated on production.
Since Produciton (primary) is down I can not backup the last T-log.
Thanks
MangeshFrom BOL
This example sets up the MyNwind database on a standby server. The database
can be used in read-only mode between restore operations.
-- Restore the initial database backup on the standby server.
USE master
GO
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH STANDBY = 'c:\undo.ldf'
GO
-- Apply the first transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH STANDBY = 'c:\undo.ldf'
GO
-- Apply the next transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log2
WITH STANDBY = 'c:\undo.ldf'
GO
-- Repeat for each transaction log backup created on the
-- primary server.
--
-- Time elapses.. .. ..
--
-- The primary server has failed. Back up the
-- active transaction log on the primary server.
BACKUP LOG MyNwind
TO MyNwind_log3
WITH NO_TRUNCATE
GO
-- Apply the final (active) transaction log backup
-- to the standby server. All preceding transaction
-- log backups must have been already applied.
RESTORE LOG MyNwind
FROM MyNwind_log3
WITH STANDBY = 'c:\undo.ldf'
GO
-- Recover the database on the standby server,
-- making it available for normal operations.
RESTORE DATABASE MyNwind
WITH RECOVERY
GO
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
> Hi
> I am using SQL 2000 std edition and hence using custom scripts to
> restore the DB using standby file. I am backing up T-LOGs every 30 mins on
> production and copying them on a network location which is accessible to
> standby machine.
> I run a job on standby machine which applies the transaction logs every 30
> mins by checking in backmediaset & backupmediafamily tables of Production.
DB
> is running in read only and is working.
> Question : In case my Production machine goes down and does not come up
how
> can I start the Standby "with data loss" if it has already appiled the
last
> T-logs generated on production.
> Since Produciton (primary) is down I can not backup the last T-log.
> Thanks
> Mangesh
>|||So you are continuously doing RESTORE WITH STANDBY? And you now wand to make the database fully
accessible? If so:
RESTORE DATABASE dbname WITH RECOVERY
No actual restore is performed, only the recovery work to get it out of standby mode.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in message
news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
> Hi
> I am using SQL 2000 std edition and hence using custom scripts to
> restore the DB using standby file. I am backing up T-LOGs every 30 mins on
> production and copying them on a network location which is accessible to
> standby machine.
> I run a job on standby machine which applies the transaction logs every 30
> mins by checking in backmediaset & backupmediafamily tables of Production. DB
> is running in read only and is working.
> Question : In case my Production machine goes down and does not come up how
> can I start the Standby "with data loss" if it has already appiled the last
> T-logs generated on production.
> Since Produciton (primary) is down I can not backup the last T-log.
> Thanks
> Mangesh
>|||Yes. I am doing a continuous restoration of my standby database using standby
file.
Thanks for help.
"Tibor Karaszi" wrote:
> So you are continuously doing RESTORE WITH STANDBY? And you now wand to make the database fully
> accessible? If so:
> RESTORE DATABASE dbname WITH RECOVERY
> No actual restore is performed, only the recovery work to get it out of standby mode.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in message
> news:72D84926-67E3-4A3F-A011-E5F5A6ACA8CC@.microsoft.com...
> > Hi
> >
> > I am using SQL 2000 std edition and hence using custom scripts to
> > restore the DB using standby file. I am backing up T-LOGs every 30 mins on
> > production and copying them on a network location which is accessible to
> > standby machine.
> >
> > I run a job on standby machine which applies the transaction logs every 30
> > mins by checking in backmediaset & backupmediafamily tables of Production. DB
> > is running in read only and is working.
> >
> > Question : In case my Production machine goes down and does not come up how
> > can I start the Standby "with data loss" if it has already appiled the last
> > T-logs generated on production.
> > Since Produciton (primary) is down I can not backup the last T-log.
> >
> > Thanks
> > Mangesh
> >
> >
>
>

Wednesday, March 7, 2012

Question on deploying .SQL files

Hi..

I would not like my customers to have access to any SQL code that is
being packaged with our product and hence would like to encrypt it in
some fashion. What's your recommendation on packaging/deploying .sql
files?

Would appreciate any feedback.

Thanks,
Sandeep Madduri.Sandeep Madduri's group (sandeepmadduri@.gmail.com) writes:

Quote:

Originally Posted by

I would not like my customers to have access to any SQL code that is
being packaged with our product and hence would like to encrypt it in
some fashion. What's your recommendation on packaging/deploying .sql
files?


First of all, keep in mind that while you can create a stored procedure
WITH ENCRYPTION, it is not real encryption, but merely obfustication.
Any users who is dead set will be able to recover the original code.
(Can easily be found on Google.) That is not to say that WITH ENCRYPTION
is useless. It does act like a sign saying "NO TRESPASSING" and will
keep honest people out. But you still need a license agreement.

As for the setup, you could ship the files in some obfusticated
fashion, and then have a program that knows how to "decrypt" the files
and then pass them to SQL Server unecrypted.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx