Showing posts with label stored. Show all posts
Showing posts with label stored. Show all posts

Tuesday, March 20, 2012

Backup device

Hi
is there a stored procedure which allows me to query if there is an existing backup device? or which gives me a listing of existing backup devices?
Thanks!SP_HELPDEVICE and in SQL 2K this is used for backward compatibility with earlier versions of SQL Server.

Refer to books online for more information.|||Thanx Satya. Appreciate.

backup db

I'm trying to make a backup of a DB with a stored procedure. I call the sp
through an ODBC connection.When the backup is placed on a fixed disk
everything is OK. When a give a removable device as target the backup is
removed at the moment the odbc connection is closed. I need the backup on a
removable device.
How can I fix this?
an option is to make the backup on disk and copy it to the removable device,
but I don't know exactly when the backup is finished. can I add something in
the stored procedure to wait for the completion of the backup.
here is the sp:
CREATE PROCEDURE [dbo].[sp_Backup_DB]
@.path varchar (100)
AS
-- Back up the database.
BACKUP DATABASE PasV2 TO DISK = @.path
GOBert
I'm not sure undestand what are you after, however ,see in the BOL WAITFOR
command
"Bert Okkerse" <bizix@.skynet.be> wrote in message
news:uwpRa$LpGHA.148@.TK2MSFTNGP04.phx.gbl...
> I'm trying to make a backup of a DB with a stored procedure. I call the sp
> through an ODBC connection.When the backup is placed on a fixed disk
> everything is OK. When a give a removable device as target the backup is
> removed at the moment the odbc connection is closed. I need the backup on
> a removable device.
> How can I fix this?
> an option is to make the backup on disk and copy it to the removable
> device, but I don't know exactly when the backup is finished. can I add
> something in the stored procedure to wait for the completion of the
> backup.
> here is the sp:
> CREATE PROCEDURE [dbo].[sp_Backup_DB]
> @.path varchar (100)
> AS
> -- Back up the database.
> BACKUP DATABASE PasV2 TO DISK = @.path
> GO
>|||Hi,
If you want to make a copy of your database on removable media try
sp_create_removable
refer BOL for more info
Amol Lembhe
MCDBA
amol.lembhe@.patni.com
"Bert Okkerse" wrote:

> I'm trying to make a backup of a DB with a stored procedure. I call the sp
> through an ODBC connection.When the backup is placed on a fixed disk
> everything is OK. When a give a removable device as target the backup is
> removed at the moment the odbc connection is closed. I need the backup on
a
> removable device.
> How can I fix this?
> an option is to make the backup on disk and copy it to the removable devic
e,
> but I don't know exactly when the backup is finished. can I add something
in
> the stored procedure to wait for the completion of the backup.
> here is the sp:
> CREATE PROCEDURE [dbo].[sp_Backup_DB]
> @.path varchar (100)
> AS
> -- Back up the database.
> BACKUP DATABASE PasV2 TO DISK = @.path
> GO
>
>

backup db

I'm trying to make a backup of a DB with a stored procedure. I call the sp
through an ODBC connection.When the backup is placed on a fixed disk
everything is OK. When a give a removable device as target the backup is
removed at the moment the odbc connection is closed. I need the backup on a
removable device.
How can I fix this?
an option is to make the backup on disk and copy it to the removable device,
but I don't know exactly when the backup is finished. can I add something in
the stored procedure to wait for the completion of the backup.
here is the sp:
CREATE PROCEDURE [dbo].[sp_Backup_DB]
@.path varchar (100)
AS
-- Back up the database.
BACKUP DATABASE PasV2 TO DISK = @.path
GOBert
I'm not sure undestand what are you after, however ,see in the BOL WAITFOR
command
"Bert Okkerse" <bizix@.skynet.be> wrote in message
news:uwpRa$LpGHA.148@.TK2MSFTNGP04.phx.gbl...
> I'm trying to make a backup of a DB with a stored procedure. I call the sp
> through an ODBC connection.When the backup is placed on a fixed disk
> everything is OK. When a give a removable device as target the backup is
> removed at the moment the odbc connection is closed. I need the backup on
> a removable device.
> How can I fix this?
> an option is to make the backup on disk and copy it to the removable
> device, but I don't know exactly when the backup is finished. can I add
> something in the stored procedure to wait for the completion of the
> backup.
> here is the sp:
> CREATE PROCEDURE [dbo].[sp_Backup_DB]
> @.path varchar (100)
> AS
> -- Back up the database.
> BACKUP DATABASE PasV2 TO DISK = @.path
> GO
>|||Hi,
If you want to make a copy of your database on removable media try
sp_create_removable
refer BOL for more info
Amol Lembhe
MCDBA
amol.lembhe@.patni.com
"Bert Okkerse" wrote:
> I'm trying to make a backup of a DB with a stored procedure. I call the sp
> through an ODBC connection.When the backup is placed on a fixed disk
> everything is OK. When a give a removable device as target the backup is
> removed at the moment the odbc connection is closed. I need the backup on a
> removable device.
> How can I fix this?
> an option is to make the backup on disk and copy it to the removable device,
> but I don't know exactly when the backup is finished. can I add something in
> the stored procedure to wait for the completion of the backup.
> here is the sp:
> CREATE PROCEDURE [dbo].[sp_Backup_DB]
> @.path varchar (100)
> AS
> -- Back up the database.
> BACKUP DATABASE PasV2 TO DISK = @.path
> GO
>
>

backup databases in SQL Server 2005

Hello,
i've done some little stored procedures to backup an restore databases. If
you see some error or things that coul be better, any help would be
appreciated.
Greetings
Carlos
Why WITH ENCRYPTION?
"Carlos" <ca@.msn.es> wrote in message
news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
> Hello,
> i've done some little stored procedures to backup an restore databases. If
> you see some error or things that coul be better, any help would be
> appreciated.
> Greetings
>
>
>
|||Hi Uri,
I dont want that other people can see the content of the procedure, this is
the only reason :-)
"Uri Dimant" <urid@.iscar.co.il> escribi en el mensaje
news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
> Carlos
> Why WITH ENCRYPTION?
>
> "Carlos" <ca@.msn.es> wrote in message
> news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
>
|||Carlos
It is not safety for 100 percent.
create procedure hello
with encryption
as
print 'hello world'
--Now somebody opens QA and issue the following
alter procedure hello
as
print 'bye bye'
"Carlos" <ca@.msn.es> wrote in message
news:O9wCXYhvHHA.2352@.TK2MSFTNGP03.phx.gbl...
> Hi Uri,
> I dont want that other people can see the content of the procedure, this
> is the only reason :-)
>
> "Uri Dimant" <urid@.iscar.co.il> escribi en el mensaje
> news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
>
|||Hi Uri,
Databases and users are created trough a script that does:
-create the database
-create a user whith the procedure sp_addlogin
-DENY VIEW ANY DATABASE to this user
-DENY ALTER ANY LOGIN TO this user
-execute the procedure sp_changedbowner to this user and db created.
The backups/restores procedures are in "master" database; i try to alter
then with a normal user and I cant (this is ok!).
About the backups/restores procedures, do you think that are ok? I pretend
to do a weekly backup and a diary differential backup that will be stored in
the server during a week; after that i'll move it to a backup server and i
delete it.
Thanks for your help!
"Uri Dimant" <urid@.iscar.co.il> escribi en el mensaje
news:%23NjazfhvHHA.3500@.TK2MSFTNGP05.phx.gbl...
> Carlos
> It is not safety for 100 percent.
> create procedure hello
> with encryption
> as
> print 'hello world'
>
> --Now somebody opens QA and issue the following
> alter procedure hello
> as
> print 'bye bye'
>
> "Carlos" <ca@.msn.es> wrote in message
> news:O9wCXYhvHHA.2352@.TK2MSFTNGP03.phx.gbl...
>
|||Hi
It looks OK as it suits to your business requirements. Have you looked at
WITH NOINIT option to keep more than one file for example for DIFF backups
"Carlos" <ca@.msn.es> wrote in message
news:ugtpQphvHHA.3500@.TK2MSFTNGP05.phx.gbl...
> Hi Uri,
> Databases and users are created trough a script that does:
> -create the database
> -create a user whith the procedure sp_addlogin
> -DENY VIEW ANY DATABASE to this user
> -DENY ALTER ANY LOGIN TO this user
> -execute the procedure sp_changedbowner to this user and db created.
> The backups/restores procedures are in "master" database; i try to alter
> then with a normal user and I cant (this is ok!).
> About the backups/restores procedures, do you think that are ok? I pretend
> to do a weekly backup and a diary differential backup that will be stored
> in the server during a week; after that i'll move it to a backup server
> and i delete it.
> Thanks for your help!
>
> "Uri Dimant" <urid@.iscar.co.il> escribi en el mensaje
> news:%23NjazfhvHHA.3500@.TK2MSFTNGP05.phx.gbl...
>
|||Carlos
I'd keep a full/diff/log backup for each day. So in case of restore I easily
know what backup to be taken.
There is no need (in my opinion) to keep hundred of files within one single
file.
"Carlos" <ca@.msn.es> wrote in message
news:OT5xh1hvHHA.4796@.TK2MSFTNGP04.phx.gbl...
> Hi Uri,
> i think "WITH NOINIT" is the default value, isnt it? If i dont specify
> this option, will keep the diff backups?
> All backups files, full and differential will be in separate files, and i
> must be able to restore the database to any day, if i have backup of
> course ;-)
>
> "Uri Dimant" <urid@.iscar.co.il> escribi en el mensaje
> news:evynOthvHHA.4612@.TK2MSFTNGP03.phx.gbl...
>
|||Yes Uri, i agree with you. I need a file for each full and diff backup
(i.e., a new file for each day), not a file that contains all the backups
So, will you keep the procedures as they are?
"Uri Dimant" <urid@.iscar.co.il> escribi en el mensaje
news:OwSaj8hvHHA.4736@.TK2MSFTNGP05.phx.gbl...
> Carlos
> I'd keep a full/diff/log backup for each day. So in case of restore I
> easily know what backup to be taken.
> There is no need (in my opinion) to keep hundred of files within one
> single file.
>
>
> "Carlos" <ca@.msn.es> wrote in message
> news:OT5xh1hvHHA.4796@.TK2MSFTNGP04.phx.gbl...
>

backup databases in SQL Server 2005

Hello,
i've done some little stored procedures to backup an restore databases. If
you see some error or things that coul be better, any help would be
appreciated.
Greetings
begin 666 restorebackupdb_differential.txt
M+RH-"BHJ"45J96UP;&\Z(')E<W1O<F5B86-K=7!D8E]D:69F97)E;G1I86P@.
M)W1E<W0Q)RPG0SI<8F%C:W5P<UQB86-K=7!<=&5S=#%"86-K=7 N8F%K)RPG
M0SI<8F%C:W5P<UQB86-K=7!<=&5S=#%"86-K=7 N9&8Q)PT**B\-"D-214%4
M12!P<F]C961U<F4@.<F5S=&]R96)A8VMU<&1B7V1I9F9E<F5N=&EA; T*0$YO
M;6)R94)A<V4@.=F%R8VAA<B@.U,"DL#0I 4G5T84)A<V5#;VUP;&5T;R!V87)C
M:&%R*#(U-2DL#0I 4G5T84)A<V5$:69E<F5N8VEA;"!V87)C:&%R*#(U-2D-
M"E=)5$@.@.14Y#4EE05$E/3@.T*87,-"D)%1TE.#0H-"E)%4U1/4D4@.1$%404)!
M4T4@.0$YO;6)R94)A<V4-"D923TT@.1$E32R ]($!2=71A0F%S94-O;7!L971O
M( T*5TE42"!.3U)%0T]615)9+" -"B @.(%)%4$Q!0T4[( T*#0I215-43U)%
M($1!5$%"05-%($!.;VUB<F5"87-E#0I&4D]-($1)4TL@./2! 4G5T84)A<V5$
6:69E<F5N8VEA;#L-"@.T*14Y$#0H-"@.``
`
end
begin 666 backupdb_full.txt
M+RH-"BHJ"45J96UP;&\Z('!R;V-E9'5R92!B86-K=7!D8E]F=6QL("=T97-T
M,2<L)T,Z7&)A8VMU<'-<8F%C:W5P7'1E<W0Q0F%C:W5P+F)A:R<-"BHO#0I#
M4D5!5$4@.<')O8V5D=7)E(&)A8VMU<&1B7V9U;&P-"D!.;VUB<F5"87-E('9A
M<F-H87(H-3 I+ T*0%)U=&%"87-E('9A<F-H87(H,C4U*0T*5TE42"!%3D-2
M65!424].#0IA<PT*0D5'24X-"@.T*#0I"04-+55 @.1$%404)!4T4@.0$YO;6)R
H94)A<V4-"E1/($1)4TL@./2! 4G5T84)A<V4[#0I%3D0-"D=/#0H-"@.``
`
end
begin 666 backupdb_differential.txt
M+RH-"BHJ"45J96UP;&\Z(&)A8VMU<&1B7V1I9F9E<F5N=&EA;" G=&5S=#$G
M+"=#.EQB86-K=7!S7&)A8VMU<%QT97-T,4)A8VMU<"YD9C$G#0HJ+PT*0U)%
M051%('!R;V-E9'5R92!B86-K=7!D8E]D:69F97)E;G1I86P-"D!.;VUB<F5"
M87-E('9A<F-H87(H-3 I+ T*0%)U=&%"87-E('9A<F-H87(H,C4U*0T*5TE4
M2"!%3D-265!424].#0IA<PT*0D5'24X-"@.T*0D%#2U50($1!5$%"05-%($!.
M;VUB<F5"87-E#0I43R!$25-+(#T@.0%)U=&%"87-E( T*5TE42"!$249&15)%
73E1)04P[#0H-"@.T*14Y$#0I'3PT*#0H`
`
end
begin 666 restorebackupdb_full.txt
M+RH-"BHJ"45J96UP;&\Z(')E<W1O<F5B86-K=7!D8E]F=6QL("=T97-T,2<L
M)T,Z7&)A8VMU<'-<8F%C:W5P7'1E<W0Q0F%C:W5P+F)A:R<-"BHO#0I#4D5!
M5$4@.<')O8V5D=7)E(')E<W1O<F5B86-K=7!D8E]F=6QL#0I 3F]M8G)E0F%S
M92!V87)C:&%R*#4P*2P-"D!2=71A('9A<F-H87(H,C4U*0T*5TE42"!%3D-2
M65!424].#0IA<PT*0D5'24X-"@.E215-43U)%($1!5$%"05-%($!.;VUB<F5"
L87-E($923TT@.1$E32R ]($!2=71A(%=)5$@.@.<F5P;&%C93L-"D5.1 T*1T\`
`
endCarlos
Why WITH ENCRYPTION?
"Carlos" <ca@.msn.es> wrote in message
news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
> Hello,
> i've done some little stored procedures to backup an restore databases. If
> you see some error or things that coul be better, any help would be
> appreciated.
> Greetings
>
>
>|||Hi Uri,
I dont want that other people can see the content of the procedure, this is
the only reason :-)
"Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
> Carlos
> Why WITH ENCRYPTION?
>
> "Carlos" <ca@.msn.es> wrote in message
> news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
>> Hello,
>> i've done some little stored procedures to backup an restore databases.
>> If
>> you see some error or things that coul be better, any help would be
>> appreciated.
>> Greetings
>>
>>
>|||Carlos
It is not safety for 100 percent.
create procedure hello
with encryption
as
print 'hello world'
--Now somebody opens QA and issue the following
alter procedure hello
as
print 'bye bye'
"Carlos" <ca@.msn.es> wrote in message
news:O9wCXYhvHHA.2352@.TK2MSFTNGP03.phx.gbl...
> Hi Uri,
> I dont want that other people can see the content of the procedure, this
> is the only reason :-)
>
> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
> news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
>> Carlos
>> Why WITH ENCRYPTION?
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
>> Hello,
>> i've done some little stored procedures to backup an restore databases.
>> If
>> you see some error or things that coul be better, any help would be
>> appreciated.
>> Greetings
>>
>>
>>
>|||Hi Uri,
Databases and users are created trough a script that does:
-create the database
-create a user whith the procedure sp_addlogin
-DENY VIEW ANY DATABASE to this user
-DENY ALTER ANY LOGIN TO this user
-execute the procedure sp_changedbowner to this user and db created.
The backups/restores procedures are in "master" database; i try to alter
then with a normal user and I cant (this is ok!).
About the backups/restores procedures, do you think that are ok? I pretend
to do a weekly backup and a diary differential backup that will be stored in
the server during a week; after that i'll move it to a backup server and i
delete it.
Thanks for your help!
"Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
news:%23NjazfhvHHA.3500@.TK2MSFTNGP05.phx.gbl...
> Carlos
> It is not safety for 100 percent.
> create procedure hello
> with encryption
> as
> print 'hello world'
>
> --Now somebody opens QA and issue the following
> alter procedure hello
> as
> print 'bye bye'
>
> "Carlos" <ca@.msn.es> wrote in message
> news:O9wCXYhvHHA.2352@.TK2MSFTNGP03.phx.gbl...
>> Hi Uri,
>> I dont want that other people can see the content of the procedure, this
>> is the only reason :-)
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
>> Carlos
>> Why WITH ENCRYPTION?
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
>> Hello,
>> i've done some little stored procedures to backup an restore databases.
>> If
>> you see some error or things that coul be better, any help would be
>> appreciated.
>> Greetings
>>
>>
>>
>>
>|||Hi
It looks OK as it suits to your business requirements. Have you looked at
WITH NOINIT option to keep more than one file for example for DIFF backups
"Carlos" <ca@.msn.es> wrote in message
news:ugtpQphvHHA.3500@.TK2MSFTNGP05.phx.gbl...
> Hi Uri,
> Databases and users are created trough a script that does:
> -create the database
> -create a user whith the procedure sp_addlogin
> -DENY VIEW ANY DATABASE to this user
> -DENY ALTER ANY LOGIN TO this user
> -execute the procedure sp_changedbowner to this user and db created.
> The backups/restores procedures are in "master" database; i try to alter
> then with a normal user and I cant (this is ok!).
> About the backups/restores procedures, do you think that are ok? I pretend
> to do a weekly backup and a diary differential backup that will be stored
> in the server during a week; after that i'll move it to a backup server
> and i delete it.
> Thanks for your help!
>
> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
> news:%23NjazfhvHHA.3500@.TK2MSFTNGP05.phx.gbl...
>> Carlos
>> It is not safety for 100 percent.
>> create procedure hello
>> with encryption
>> as
>> print 'hello world'
>>
>> --Now somebody opens QA and issue the following
>> alter procedure hello
>> as
>> print 'bye bye'
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:O9wCXYhvHHA.2352@.TK2MSFTNGP03.phx.gbl...
>> Hi Uri,
>> I dont want that other people can see the content of the procedure, this
>> is the only reason :-)
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
>> Carlos
>> Why WITH ENCRYPTION?
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
>> Hello,
>> i've done some little stored procedures to backup an restore
>> databases. If
>> you see some error or things that coul be better, any help would be
>> appreciated.
>> Greetings
>>
>>
>>
>>
>>
>|||Hi Uri,
i think "WITH NOINIT" is the default value, isnt it? If i dont specify this
option, will keep the diff backups?
All backups files, full and differential will be in separate files, and i
must be able to restore the database to any day, if i have backup of course
;-)
"Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
news:evynOthvHHA.4612@.TK2MSFTNGP03.phx.gbl...
> Hi
> It looks OK as it suits to your business requirements. Have you looked at
> WITH NOINIT option to keep more than one file for example for DIFF backups
>
>
> "Carlos" <ca@.msn.es> wrote in message
> news:ugtpQphvHHA.3500@.TK2MSFTNGP05.phx.gbl...
>> Hi Uri,
>> Databases and users are created trough a script that does:
>> -create the database
>> -create a user whith the procedure sp_addlogin
>> -DENY VIEW ANY DATABASE to this user
>> -DENY ALTER ANY LOGIN TO this user
>> -execute the procedure sp_changedbowner to this user and db created.
>> The backups/restores procedures are in "master" database; i try to alter
>> then with a normal user and I cant (this is ok!).
>> About the backups/restores procedures, do you think that are ok? I
>> pretend to do a weekly backup and a diary differential backup that will
>> be stored in the server during a week; after that i'll move it to a
>> backup server and i delete it.
>> Thanks for your help!
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:%23NjazfhvHHA.3500@.TK2MSFTNGP05.phx.gbl...
>> Carlos
>> It is not safety for 100 percent.
>> create procedure hello
>> with encryption
>> as
>> print 'hello world'
>>
>> --Now somebody opens QA and issue the following
>> alter procedure hello
>> as
>> print 'bye bye'
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:O9wCXYhvHHA.2352@.TK2MSFTNGP03.phx.gbl...
>> Hi Uri,
>> I dont want that other people can see the content of the procedure,
>> this is the only reason :-)
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
>> Carlos
>> Why WITH ENCRYPTION?
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
>> Hello,
>> i've done some little stored procedures to backup an restore
>> databases. If
>> you see some error or things that coul be better, any help would be
>> appreciated.
>> Greetings
>>
>>
>>
>>
>>
>>
>|||Carlos
I'd keep a full/diff/log backup for each day. So in case of restore I easily
know what backup to be taken.
There is no need (in my opinion) to keep hundred of files within one single
file.
"Carlos" <ca@.msn.es> wrote in message
news:OT5xh1hvHHA.4796@.TK2MSFTNGP04.phx.gbl...
> Hi Uri,
> i think "WITH NOINIT" is the default value, isnt it? If i dont specify
> this option, will keep the diff backups?
> All backups files, full and differential will be in separate files, and i
> must be able to restore the database to any day, if i have backup of
> course ;-)
>
> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
> news:evynOthvHHA.4612@.TK2MSFTNGP03.phx.gbl...
>> Hi
>> It looks OK as it suits to your business requirements. Have you looked at
>> WITH NOINIT option to keep more than one file for example for DIFF
>> backups
>>
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:ugtpQphvHHA.3500@.TK2MSFTNGP05.phx.gbl...
>> Hi Uri,
>> Databases and users are created trough a script that does:
>> -create the database
>> -create a user whith the procedure sp_addlogin
>> -DENY VIEW ANY DATABASE to this user
>> -DENY ALTER ANY LOGIN TO this user
>> -execute the procedure sp_changedbowner to this user and db created.
>> The backups/restores procedures are in "master" database; i try to alter
>> then with a normal user and I cant (this is ok!).
>> About the backups/restores procedures, do you think that are ok? I
>> pretend to do a weekly backup and a diary differential backup that will
>> be stored in the server during a week; after that i'll move it to a
>> backup server and i delete it.
>> Thanks for your help!
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:%23NjazfhvHHA.3500@.TK2MSFTNGP05.phx.gbl...
>> Carlos
>> It is not safety for 100 percent.
>> create procedure hello
>> with encryption
>> as
>> print 'hello world'
>>
>> --Now somebody opens QA and issue the following
>> alter procedure hello
>> as
>> print 'bye bye'
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:O9wCXYhvHHA.2352@.TK2MSFTNGP03.phx.gbl...
>> Hi Uri,
>> I dont want that other people can see the content of the procedure,
>> this is the only reason :-)
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
>> Carlos
>> Why WITH ENCRYPTION?
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
>>> Hello,
>>> i've done some little stored procedures to backup an restore
>>> databases. If
>>> you see some error or things that coul be better, any help would be
>>> appreciated.
>>>
>>> Greetings
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>|||Yes Uri, i agree with you. I need a file for each full and diff backup
(i.e., a new file for each day), not a file that contains all the backups :)
So, will you keep the procedures as they are?
"Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
news:OwSaj8hvHHA.4736@.TK2MSFTNGP05.phx.gbl...
> Carlos
> I'd keep a full/diff/log backup for each day. So in case of restore I
> easily know what backup to be taken.
> There is no need (in my opinion) to keep hundred of files within one
> single file.
>
>
> "Carlos" <ca@.msn.es> wrote in message
> news:OT5xh1hvHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> Hi Uri,
>> i think "WITH NOINIT" is the default value, isnt it? If i dont specify
>> this option, will keep the diff backups?
>> All backups files, full and differential will be in separate files, and i
>> must be able to restore the database to any day, if i have backup of
>> course ;-)
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:evynOthvHHA.4612@.TK2MSFTNGP03.phx.gbl...
>> Hi
>> It looks OK as it suits to your business requirements. Have you looked
>> at WITH NOINIT option to keep more than one file for example for DIFF
>> backups
>>
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:ugtpQphvHHA.3500@.TK2MSFTNGP05.phx.gbl...
>> Hi Uri,
>> Databases and users are created trough a script that does:
>> -create the database
>> -create a user whith the procedure sp_addlogin
>> -DENY VIEW ANY DATABASE to this user
>> -DENY ALTER ANY LOGIN TO this user
>> -execute the procedure sp_changedbowner to this user and db created.
>> The backups/restores procedures are in "master" database; i try to
>> alter then with a normal user and I cant (this is ok!).
>> About the backups/restores procedures, do you think that are ok? I
>> pretend to do a weekly backup and a diary differential backup that will
>> be stored in the server during a week; after that i'll move it to a
>> backup server and i delete it.
>> Thanks for your help!
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:%23NjazfhvHHA.3500@.TK2MSFTNGP05.phx.gbl...
>> Carlos
>> It is not safety for 100 percent.
>> create procedure hello
>> with encryption
>> as
>> print 'hello world'
>>
>> --Now somebody opens QA and issue the following
>> alter procedure hello
>> as
>> print 'bye bye'
>>
>> "Carlos" <ca@.msn.es> wrote in message
>> news:O9wCXYhvHHA.2352@.TK2MSFTNGP03.phx.gbl...
>> Hi Uri,
>> I dont want that other people can see the content of the procedure,
>> this is the only reason :-)
>>
>> "Uri Dimant" <urid@.iscar.co.il> escribió en el mensaje
>> news:%23dgDnNhvHHA.3556@.TK2MSFTNGP02.phx.gbl...
>>> Carlos
>>> Why WITH ENCRYPTION?
>>>
>>>
>>>
>>> "Carlos" <ca@.msn.es> wrote in message
>>> news:u8hiC$gvHHA.3588@.TK2MSFTNGP06.phx.gbl...
>>> Hello,
>>> i've done some little stored procedures to backup an restore
>>> databases. If
>>> you see some error or things that coul be better, any help would be
>>> appreciated.
>>>
>>> Greetings
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>

Monday, March 19, 2012

Backup database without stored procedures

I have a requirement to ship a backup of our database to a customer at
regular intervals. Unfortunately our stored procedures are proprietary and
can't go with the backup. Is there a product out there that can back up a
database without the stored procedures?
I can't encrypt all the stored procedures because that just creates too much
of a headache in maintenance. The database is backed up nightly now to a
full backup.
One solution might be to replicate the database to another database on the
same server. I can't risk any performance degredation so it would have to
be the least intrusive replication model. A lot of lag is fine since the
database will only be shipped out wly. Log shipping won't work too well
since I dump the transaction log hourly after backing it up.
Any other suggestions?
Thanks,
DaveNo. [Backup Database] will backup all db objects. Replication seems like the
best approach here.
Else, you could:
1. backup -> restore to new db -> drop sproc -> backup -> ship
2. backup -> ship -> drop sproc after restore
-oj
"David D Webb" <spivey@.nospam.post.com> wrote in message
news:u9P1Du$BFHA.3416@.TK2MSFTNGP09.phx.gbl...
>I have a requirement to ship a backup of our database to a customer at
>regular intervals. Unfortunately our stored procedures are proprietary and
>can't go with the backup. Is there a product out there that can back up a
>database without the stored procedures?
> I can't encrypt all the stored procedures because that just creates too
> much of a headache in maintenance. The database is backed up nightly now
> to a full backup.
> One solution might be to replicate the database to another database on the
> same server. I can't risk any performance degredation so it would have to
> be the least intrusive replication model. A lot of lag is fine since the
> database will only be shipped out wly. Log shipping won't work too
> well since I dump the transaction log hourly after backing it up.
> Any other suggestions?
> Thanks,
> Dave
>
>|||Can you be more specific as to what they need to do with the db once they
get it? A db isn't of much good without the sp's. Do they just need a
schema or the actual data? Do they need all the tables or just a few?
Andrew J. Kelly SQL MVP
"David D Webb" <spivey@.nospam.post.com> wrote in message
news:u9P1Du$BFHA.3416@.TK2MSFTNGP09.phx.gbl...
>I have a requirement to ship a backup of our database to a customer at
>regular intervals. Unfortunately our stored procedures are proprietary and
>can't go with the backup. Is there a product out there that can back up a
>database without the stored procedures?
> I can't encrypt all the stored procedures because that just creates too
> much of a headache in maintenance. The database is backed up nightly now
> to a full backup.
> One solution might be to replicate the database to another database on the
> same server. I can't risk any performance degredation so it would have to
> be the least intrusive replication model. A lot of lag is fine since the
> database will only be shipped out wly. Log shipping won't work too
> well since I dump the transaction log hourly after backing it up.
> Any other suggestions?
> Thanks,
> Dave
>
>|||They are not going to do a damn thing with it. They just WANT it. (-; They
may eventually run ad-hoc queries against it with some reporting tools, I
suppose. It should just contain the schema (all tables) and data - just no
sps, triggers, or udfs. Constraints, indexes, keys, etc are fine.
Thanks,
Dave
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:uEtmQz$BFHA.3664@.TK2MSFTNGP14.phx.gbl...
> Can you be more specific as to what they need to do with the db once they
> get it? A db isn't of much good without the sp's. Do they just need a
> schema or the actual data? Do they need all the tables or just a few?
> --
> Andrew J. Kelly SQL MVP
>
> "David D Webb" <spivey@.nospam.post.com> wrote in message
> news:u9P1Du$BFHA.3416@.TK2MSFTNGP09.phx.gbl...
>|||> I can't encrypt all the stored procedures because that just creates too
> much of a headache in maintenance.
This shouldn't be an issue if you keep your database objects under source
control and use those scripts to build your database. However, WITH
ENCRYPTION is actually obfuscation so a determined person can still reverse
engineer the text.
Hope this helps.
Dan Guzman
SQL Server MVP
"David D Webb" <spivey@.nospam.post.com> wrote in message
news:u9P1Du$BFHA.3416@.TK2MSFTNGP09.phx.gbl...
>I have a requirement to ship a backup of our database to a customer at
>regular intervals. Unfortunately our stored procedures are proprietary and
>can't go with the backup. Is there a product out there that can back up a
>database without the stored procedures?
> I can't encrypt all the stored procedures because that just creates too
> much of a headache in maintenance. The database is backed up nightly now
> to a full backup.
> One solution might be to replicate the database to another database on the
> same server. I can't risk any performance degredation so it would have to
> be the least intrusive replication model. A lot of lag is fine since the
> database will only be shipped out wly. Log shipping won't work too
> well since I dump the transaction log hourly after backing it up.
> Any other suggestions?
> Thanks,
> Dave
>
>|||I don't know how large it is but how about restoring the backup to a machine
locally, dropping all the sps' and detaching it. Then give them the
detached db. It will be void of sp's and they can just attach it on their
end. It's faster than a restore as well.
Andrew J. Kelly SQL MVP
"David D Webb" <spivey@.nospam.post.com> wrote in message
news:ephEm5$BFHA.2460@.TK2MSFTNGP14.phx.gbl...
> They are not going to do a damn thing with it. They just WANT it. (-;
> They may eventually run ad-hoc queries against it with some reporting
> tools, I suppose. It should just contain the schema (all tables) and
> data - just no sps, triggers, or udfs. Constraints, indexes, keys, etc
> are fine.
> Thanks,
> Dave
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:uEtmQz$BFHA.3664@.TK2MSFTNGP14.phx.gbl...
>|||We have source control, but I have 53 copies of the database in production
on our servers, each with minor additions. Its easily managed, but I still
need to run SQL Compare for sanity sake. Encryption is out of the question.
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:uhRYxRACFHA.1836@.tk2msftngp13.phx.gbl...
> This shouldn't be an issue if you keep your database objects under source
> control and use those scripts to build your database. However, WITH
> ENCRYPTION is actually obfuscation so a determined person can still
> reverse engineer the text.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "David D Webb" <spivey@.nospam.post.com> wrote in message
> news:u9P1Du$BFHA.3416@.TK2MSFTNGP09.phx.gbl...
>|||You could easily write a procedure ( proprietary again I suppose :) to
create a new database, and then copy all of the data out. Something like:
declare @.copyOfDatabase sysname
set @.copyOfDatabase = 'copyOfDatabase'
exec('create database copyOfDatabase on (name = ''copy'' , filename = ''c:'
+ @.copyOfDatabase + '.mdf'')')
declare @.cursor cursor, @.query varchar(8000)
set @.cursor = cursor for
select 'select * into copyOfDatabase.' + table_schema + '.' + table_name +
' from ' + table_schema + '.' + table_name
from information_schema.tables where table_type = 'base table'
open @.cursor
fetch from @.cursor into @.query
WHILE @.@.FETCH_STATUS = 0
BEGIN
exec(@.query)
fetch from @.cursor into @.query
END
This is pretty basic, but it will move tables structure only. I would
suggest you probably want to add indexes and constraints back from a script,
but this script could easily be extended to do just that.
----
Louis Davidson - drsql@.hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design -
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are interested in
consulting services. All other replies may be ignored :)
"David D Webb" <spivey@.nospam.post.com> wrote in message
news:u9P1Du$BFHA.3416@.TK2MSFTNGP09.phx.gbl...
>I have a requirement to ship a backup of our database to a customer at
>regular intervals. Unfortunately our stored procedures are proprietary and
>can't go with the backup. Is there a product out there that can back up a
>database without the stored procedures?
> I can't encrypt all the stored procedures because that just creates too
> much of a headache in maintenance. The database is backed up nightly now
> to a full backup.
> One solution might be to replicate the database to another database on the
> same server. I can't risk any performance degredation so it would have to
> be the least intrusive replication model. A lot of lag is fine since the
> database will only be shipped out wly. Log shipping won't work too
> well since I dump the transaction log hourly after backing it up.
> Any other suggestions?
> Thanks,
> Dave
>
>|||Good idea. Probably better than what I suggested for sure.
----
Louis Davidson - drsql@.hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design -
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are interested in
consulting services. All other replies may be ignored :)
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:ekPzPUACFHA.2460@.TK2MSFTNGP14.phx.gbl...
>I don't know how large it is but how about restoring the backup to a
>machine locally, dropping all the sps' and detaching it. Then give them
>the detached db. It will be void of sp's and they can just attach it on
>their end. It's faster than a restore as well.
> --
> Andrew J. Kelly SQL MVP
>
> "David D Webb" <spivey@.nospam.post.com> wrote in message
> news:ephEm5$BFHA.2460@.TK2MSFTNGP14.phx.gbl...
>|||you might want to check out DB Ghost (http://www.dbghost.com) - you could se
t
up a scheduled synchronization at the least intrusive time, synchronizing
only tables and data to a database that then can be backed up and shipped ou
t.
"David D Webb" wrote:

> I have a requirement to ship a backup of our database to a customer at
> regular intervals. Unfortunately our stored procedures are proprietary an
d
> can't go with the backup. Is there a product out there that can back up a
> database without the stored procedures?
> I can't encrypt all the stored procedures because that just creates too mu
ch
> of a headache in maintenance. The database is backed up nightly now to a
> full backup.
> One solution might be to replicate the database to another database on the
> same server. I can't risk any performance degredation so it would have to
> be the least intrusive replication model. A lot of lag is fine since the
> database will only be shipped out wly. Log shipping won't work too wel
l
> since I dump the transaction log hourly after backing it up.
> Any other suggestions?
> Thanks,
> Dave
>
>

Sunday, March 11, 2012

backup database database remotely

i have a stored procedure that backups database on server A which i execute this SP from server B in a scheduled job. when i run this job it gives me an error:
Executed as user: domain\user_name. Could not relay results of procedure 'usp_BackupDBOnServerA' from remote server 'ServerB'. [SQLSTATE 42000] (Error 7221) [SQLSTATE 01000] (Error 7312). The step failed.
i searched MS KB, everywhere but could not find the solution or even explanation why this happenning.
both sql servers are 2000 and they are linked.It seems like an account permissions issue. I would look over the SP and make sure that the account which SQLServer service, SQLAgent service, and the scheduled job has access to the SP as well as the network share which the backup is being written too.

Does the whole backup fail or does it just not return what happened (the result or output)?|||actually there's no issue with account's permissions. and to asnwer your question the job itself fails.
but i just figured out how to solve the issue: i increased the Remote query timeout in the Server properties.
thanks for the help anyway.|||Great! Thanks for posting the answer, it helps with other people who might run into the same problem.

Backup database aborts job in the agent, but not when in a query window

Does anyone know why a backup database statement aborts a job in a stored procedure so that you can't handle the error with @.@.error, but when you run the same stored procedure in a query window the error handling does get run?

The snippet of code looks like this:

SET XACT_ABORT OFF

SET ANSI_NULLS OFF

set ansi_warnings off

set arithabort on

declare @.backup_status int

declare @.cmd varchar(1024)

SET NOCOUNT ON

print 'Options value: ' + convert(varchar, @.@.options)

set @.backup_status = 0

if (@.backup_mode = 'F')

begin

BACKUP DATABASE

@.DB TO DISK = @.BackupFile

with

NAME = @.Name,

DESCRIPTION = @.Description,

MEDIANAME = @.MediaName,

MEDIADESCRIPTION = @.Description,

STATS = 10,

init, nounload, noskip

if @.@.error != 0

begin

set @.backup_status = 1

print '**************** Backup of ' + @.DB + ' Failed'

end end

When this is run in a query window, the print statement at the bottom does get executed, but when run as a step in a sql agent job it does not.

Thanks.

As an additional comment, this doesn't seem to happen on my SQL 2000 server, just the SQL 2005 sp1 server.

Thursday, March 8, 2012

Backup check

Hello,
I want to create a stored procedure to
check if backups ended successfully at remote databases.
Which query can i run?
Many Thanks in Advance,
Galit.Gal
Assuming you are running your backups as jobs. The
information you need should be on sysjobhistory on the
msdb database. You can write a stored procedure to get the
information from there.
Regards
John

Wednesday, March 7, 2012

Backup and restore scripts

Any one have implemented backup, recovery stored procedures which
takes the uments for dbname, date, time ime and restores till that
time?
Look at http://www.winnetmag.com/Article/Art...09/42009.html. If
that's not enough, I can send you my script.
Quentin
"tram" <tram_e@.hotmail.com> wrote in message
news:26ee1067.0407080734.94bd55f@.posting.google.co m...
> Any one have implemented backup, recovery stored procedures which
> takes the uments for dbname, date, time ime and restores till that
> time?
|||Thanks for the reply. I am looking for centralized scripts where we
should able to able to restore any database by giving arguments as DB
name, time, standby restore/normal restore. We should able to run it
from centralized server. Any ideas?
"Quentin Ran" <ab@.who.com> wrote in message news:<uulGraTZEHA.2388@.TK2MSFTNGP11.phx.gbl>...[vbcol=seagreen]
> Look at http://www.winnetmag.com/Article/Art...09/42009.html. If
> that's not enough, I can send you my script.
> Quentin
>
> "tram" <tram_e@.hotmail.com> wrote in message
> news:26ee1067.0407080734.94bd55f@.posting.google.co m...

Backup and restore scripts

Any one have implemented backup, recovery stored procedures which
takes the uments for dbname, date, time ime and restores till that
time?Look at http://www.winnetmag.com/Article/ArticleID/42009/42009.html. If
that's not enough, I can send you my script.
Quentin
"tram" <tram_e@.hotmail.com> wrote in message
news:26ee1067.0407080734.94bd55f@.posting.google.com...
> Any one have implemented backup, recovery stored procedures which
> takes the uments for dbname, date, time ime and restores till that
> time?|||Thanks for the reply. I am looking for centralized scripts where we
should able to able to restore any database by giving arguments as DB
name, time, standby restore/normal restore. We should able to run it
from centralized server. Any ideas?
"Quentin Ran" <ab@.who.com> wrote in message news:<uulGraTZEHA.2388@.TK2MSFTNGP11.phx.gbl>...
> Look at http://www.winnetmag.com/Article/ArticleID/42009/42009.html. If
> that's not enough, I can send you my script.
> Quentin
>
> "tram" <tram_e@.hotmail.com> wrote in message
> news:26ee1067.0407080734.94bd55f@.posting.google.com...
> > Any one have implemented backup, recovery stored procedures which
> > takes the uments for dbname, date, time ime and restores till that
> > time?

Backup and restore scripts

Any one have implemented backup, recovery stored procedures which
takes the uments for dbname, date, time ime and restores till that
time?Look at http://www.winnetmag.com/Article/Ar...009/42009.html. If
that's not enough, I can send you my script.
Quentin
"tram" <tram_e@.hotmail.com> wrote in message
news:26ee1067.0407080734.94bd55f@.posting.google.com...
> Any one have implemented backup, recovery stored procedures which
> takes the uments for dbname, date, time ime and restores till that
> time?|||Thanks for the reply. I am looking for centralized scripts where we
should able to able to restore any database by giving arguments as DB
name, time, standby restore/normal restore. We should able to run it
from centralized server. Any ideas?
"Quentin Ran" <ab@.who.com> wrote in message news:<uulGraTZEHA.2388@.TK2MSFTNGP11.phx.gbl>...[
vbcol=seagreen]
> Look at http://www.winnetmag.com/Article/Ar...009/42009.html. If
> that's not enough, I can send you my script.
> Quentin
>
> "tram" <tram_e@.hotmail.com> wrote in message
> news:26ee1067.0407080734.94bd55f@.posting.google.com...

Sunday, February 19, 2012

Backup / Restore select SP

Hi,
Any suggestions on Backup / Restore of a select Table /
Stored Procedure etc?
RaoFor a non-data carrying object (everything except table), generate script.
To do this from code, use the DMO API.
For a table, (I assume you also want data), you can generate script and also
use BCP, DTS or some similar method for the data.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Rao" <chtvrao@.valona.com> wrote in message
news:08d901c3a44b$d8cd6df0$a501280a@.phx.gbl...
> Hi,
> Any suggestions on Backup / Restore of a select Table /
> Stored Procedure etc?
> Rao|||Thanks for the suggestions. While these give me clues
related to the topic, my requirement is somewaht specific
and it is like this.
We are in consulting and while we want to send updates to
clients, we do not want to send the source code. So to
send an encrypted Stored Procedure(s) only, I am looking
at a way.
Any more suggestions Please?
Rao
>--Original Message--
>For a non-data carrying object (everything except table),
generate script.
>To do this from code, use the DMO API.
>For a table, (I assume you also want data), you can
generate script and also
>use BCP, DTS or some similar method for the data.
>--
>Tibor Karaszi, SQL Server MVP
>Archive at:
>http://groups.google.com/groups?
oi=djq&as_ugroup=microsoft.public.sqlserver
>
>"Rao" <chtvrao@.valona.com> wrote in message
>news:08d901c3a44b$d8cd6df0$a501280a@.phx.gbl...
>> Hi,
>> Any suggestions on Backup / Restore of a select Table /
>> Stored Procedure etc?
>> Rao
>
>.
>|||> We are in consulting and while we want to send updates to
> clients, we do not want to send the source code. So to
> send an encrypted Stored Procedure(s) only, I am looking
> at a way.
There's really no way to send an encrypted stored procedure. The closes you
probably can come is to have your customers execute an exe file where the
CREATE statements are inside the EXE file. I.e., having the EXE file be the
"scrambler". Unfortunately, Profiler will show these statements, but on the
other side there are tools out there that crack this encryption, so if your
customer really wants to...
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Rao" <chtvrao@.valona.com> wrote in message
news:053901c3a4cc$aa8fa490$a401280a@.phx.gbl...
> Thanks for the suggestions. While these give me clues
> related to the topic, my requirement is somewaht specific
> and it is like this.
> We are in consulting and while we want to send updates to
> clients, we do not want to send the source code. So to
> send an encrypted Stored Procedure(s) only, I am looking
> at a way.
> Any more suggestions Please?
> Rao
> >--Original Message--
> >For a non-data carrying object (everything except table),
> generate script.
> >To do this from code, use the DMO API.
> >
> >For a table, (I assume you also want data), you can
> generate script and also
> >use BCP, DTS or some similar method for the data.
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >Archive at:
> >http://groups.google.com/groups?
> oi=djq&as_ugroup=microsoft.public.sqlserver
> >
> >
> >"Rao" <chtvrao@.valona.com> wrote in message
> >news:08d901c3a44b$d8cd6df0$a501280a@.phx.gbl...
> >> Hi,
> >> Any suggestions on Backup / Restore of a select Table /
> >> Stored Procedure etc?
> >>
> >> Rao
> >
> >
> >.
> >|||Hi Tibor,
Thanks for the details. I know the existence of these
tools to decrypt the SPs. Anyway we have to live with it.
Could you please throw me some light on how others in the
consulting field offer their work to clients and still
safeguard their IP(Intelectual Proprty)?
Rao
>--Original Message--
>> We are in consulting and while we want to send updates
to
>> clients, we do not want to send the source code. So to
>> send an encrypted Stored Procedure(s) only, I am looking
>> at a way.
>There's really no way to send an encrypted stored
procedure. The closes you
>probably can come is to have your customers execute an
exe file where the
>CREATE statements are inside the EXE file. I.e., having
the EXE file be the
>"scrambler". Unfortunately, Profiler will show these
statements, but on the
>other side there are tools out there that crack this
encryption, so if your
>customer really wants to...
>--
>Tibor Karaszi, SQL Server MVP
>Archive at:
>http://groups.google.com/groups?
oi=djq&as_ugroup=microsoft.public.sqlserver
>
>"Rao" <chtvrao@.valona.com> wrote in message
>news:053901c3a4cc$aa8fa490$a401280a@.phx.gbl...
>> Thanks for the suggestions. While these give me clues
>> related to the topic, my requirement is somewaht
specific
>> and it is like this.
>> We are in consulting and while we want to send updates
to
>> clients, we do not want to send the source code. So to
>> send an encrypted Stored Procedure(s) only, I am looking
>> at a way.
>> Any more suggestions Please?
>> Rao
>> >--Original Message--
>> >For a non-data carrying object (everything except
table),
>> generate script.
>> >To do this from code, use the DMO API.
>> >
>> >For a table, (I assume you also want data), you can
>> generate script and also
>> >use BCP, DTS or some similar method for the data.
>> >
>> >--
>> >Tibor Karaszi, SQL Server MVP
>> >Archive at:
>> >http://groups.google.com/groups?
>> oi=djq&as_ugroup=microsoft.public.sqlserver
>> >
>> >
>> >"Rao" <chtvrao@.valona.com> wrote in message
>> >news:08d901c3a44b$d8cd6df0$a501280a@.phx.gbl...
>> >> Hi,
>> >> Any suggestions on Backup / Restore of a select
Table /
>> >> Stored Procedure etc?
>> >>
>> >> Rao
>> >
>> >
>> >.
>> >
>
>.
>|||> Could you please throw me some light on how others in the
> consulting field offer their work to clients and still
> safeguard their IP(Intelectual Proprty)?
You should start a new thread on that, with proper subject. That would
probably be the best way to poll. Also, programming is probably a better
group for that. I've used encryption just to "make it harder". But even .exe
file can be "decompiled", so technical solutions only takes you so far. The
general recommendation is to do it by legal measures.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Rao" <chtvrao@.valona.com> wrote in message
news:07bf01c3a506$ee94ecb0$a401280a@.phx.gbl...
> Hi Tibor,
> Thanks for the details. I know the existence of these
> tools to decrypt the SPs. Anyway we have to live with it.
> Could you please throw me some light on how others in the
> consulting field offer their work to clients and still
> safeguard their IP(Intelectual Proprty)?
> Rao
> >--Original Message--
> >> We are in consulting and while we want to send updates
> to
> >> clients, we do not want to send the source code. So to
> >> send an encrypted Stored Procedure(s) only, I am looking
> >> at a way.
> >
> >There's really no way to send an encrypted stored
> procedure. The closes you
> >probably can come is to have your customers execute an
> exe file where the
> >CREATE statements are inside the EXE file. I.e., having
> the EXE file be the
> >"scrambler". Unfortunately, Profiler will show these
> statements, but on the
> >other side there are tools out there that crack this
> encryption, so if your
> >customer really wants to...
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >Archive at:
> >http://groups.google.com/groups?
> oi=djq&as_ugroup=microsoft.public.sqlserver
> >
> >
> >"Rao" <chtvrao@.valona.com> wrote in message
> >news:053901c3a4cc$aa8fa490$a401280a@.phx.gbl...
> >> Thanks for the suggestions. While these give me clues
> >> related to the topic, my requirement is somewaht
> specific
> >> and it is like this.
> >>
> >> We are in consulting and while we want to send updates
> to
> >> clients, we do not want to send the source code. So to
> >> send an encrypted Stored Procedure(s) only, I am looking
> >> at a way.
> >>
> >> Any more suggestions Please?
> >>
> >> Rao
> >>
> >> >--Original Message--
> >> >For a non-data carrying object (everything except
> table),
> >> generate script.
> >> >To do this from code, use the DMO API.
> >> >
> >> >For a table, (I assume you also want data), you can
> >> generate script and also
> >> >use BCP, DTS or some similar method for the data.
> >> >
> >> >--
> >> >Tibor Karaszi, SQL Server MVP
> >> >Archive at:
> >> >http://groups.google.com/groups?
> >> oi=djq&as_ugroup=microsoft.public.sqlserver
> >> >
> >> >
> >> >"Rao" <chtvrao@.valona.com> wrote in message
> >> >news:08d901c3a44b$d8cd6df0$a501280a@.phx.gbl...
> >> >> Hi,
> >> >> Any suggestions on Backup / Restore of a select
> Table /
> >> >> Stored Procedure etc?
> >> >>
> >> >> Rao
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >|||Hi Tibor,
Thanks for all the info. Let me see what I can do.
Rao
>--Original Message--
>> Could you please throw me some light on how others in
the
>> consulting field offer their work to clients and still
>> safeguard their IP(Intelectual Proprty)?
>You should start a new thread on that, with proper
subject. That would
>probably be the best way to poll. Also, programming is
probably a better
>group for that. I've used encryption just to "make it
harder". But even .exe
>file can be "decompiled", so technical solutions only
takes you so far. The
>general recommendation is to do it by legal measures.
>--
>Tibor Karaszi, SQL Server MVP
>Archive at:
>http://groups.google.com/groups?
oi=djq&as_ugroup=microsoft.public.sqlserver
>
>"Rao" <chtvrao@.valona.com> wrote in message
>news:07bf01c3a506$ee94ecb0$a401280a@.phx.gbl...
>> Hi Tibor,
>> Thanks for the details. I know the existence of these
>> tools to decrypt the SPs. Anyway we have to live with
it.
>> Could you please throw me some light on how others in
the
>> consulting field offer their work to clients and still
>> safeguard their IP(Intelectual Proprty)?
>> Rao
>> >--Original Message--
>> >> We are in consulting and while we want to send
updates
>> to
>> >> clients, we do not want to send the source code. So
to
>> >> send an encrypted Stored Procedure(s) only, I am
looking
>> >> at a way.
>> >
>> >There's really no way to send an encrypted stored
>> procedure. The closes you
>> >probably can come is to have your customers execute an
>> exe file where the
>> >CREATE statements are inside the EXE file. I.e., having
>> the EXE file be the
>> >"scrambler". Unfortunately, Profiler will show these
>> statements, but on the
>> >other side there are tools out there that crack this
>> encryption, so if your
>> >customer really wants to...
>> >
>> >--
>> >Tibor Karaszi, SQL Server MVP
>> >Archive at:
>> >http://groups.google.com/groups?
>> oi=djq&as_ugroup=microsoft.public.sqlserver
>> >
>> >
>> >"Rao" <chtvrao@.valona.com> wrote in message
>> >news:053901c3a4cc$aa8fa490$a401280a@.phx.gbl...
>> >> Thanks for the suggestions. While these give me clues
>> >> related to the topic, my requirement is somewaht
>> specific
>> >> and it is like this.
>> >>
>> >> We are in consulting and while we want to send
updates
>> to
>> >> clients, we do not want to send the source code. So
to
>> >> send an encrypted Stored Procedure(s) only, I am
looking
>> >> at a way.
>> >>
>> >> Any more suggestions Please?
>> >>
>> >> Rao
>> >>
>> >> >--Original Message--
>> >> >For a non-data carrying object (everything except
>> table),
>> >> generate script.
>> >> >To do this from code, use the DMO API.
>> >> >
>> >> >For a table, (I assume you also want data), you can
>> >> generate script and also
>> >> >use BCP, DTS or some similar method for the data.
>> >> >
>> >> >--
>> >> >Tibor Karaszi, SQL Server MVP
>> >> >Archive at:
>> >> >http://groups.google.com/groups?
>> >> oi=djq&as_ugroup=microsoft.public.sqlserver
>> >> >
>> >> >
>> >> >"Rao" <chtvrao@.valona.com> wrote in message
>> >> >news:08d901c3a44b$d8cd6df0$a501280a@.phx.gbl...
>> >> >> Hi,
>> >> >> Any suggestions on Backup / Restore of a select
>> Table /
>> >> >> Stored Procedure etc?
>> >> >>
>> >> >> Rao
>> >> >
>> >> >
>> >> >.
>> >> >
>> >
>> >
>> >.
>> >
>
>.
>