cancel
Showing results for 
Search instead for 
Did you mean: 

How to backup of Development to different machine for Production use

Former Member
0 Kudos

I have several client specific databases on my server which is being used for development. I wish to transport only one client specific database to another server for production use.

The problem is when we backup the respective company database along with SBO_Common, all data visible to other clients eg:

DB1 -


> for Client A

DB2 -


> for Client B

DB3 -


> for Client C

I backup only DB2 from development server (included UDO, UDT, stored procedures).

When I restored this backup on production server, data of other database i.e. DB1, DB3 also visible.

Can anybody put light on steps to transition on production server of client.

Regards

OP Sharma

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi OP Sharma,

> The problem is when we backup the respective company

> database along with SBO_Common, all data visible to

> I backup only DB2 from development server (included

> UDO, UDT, stored procedures).

> When I restored this backup on production server,

> data of other database i.e. DB1, DB3 also visible.

You said that all data are visible...Where ? How ?

Are you talking about the company list in the logon screen ?

Have you tried the button : refresh ?

Regards

Quentin

Former Member
0 Kudos

Hi Quentin,

Critical data is visible on Production server eg. all company visible when client choose company/user.

I wish to export only one company from development environment to production environment. (all settings etc including master data)

Hope you understand my requirement.

Regards,

OPS

Former Member
0 Kudos

Just try the refresh button in the logon screen.

Hth

Quentin

Former Member
0 Kudos

Yes I tried with all posible options but fails. I shutdown production server also but same data is appearing.

What I suspect is that when we backup SBO_Common database, it backup all of its contents i.e. If we have configured 20 companies on development server (for 20 clients) then all of 20 companies's master record also copied. But if we would like to backup only one company's data then how to do it?

Any clue?

OPS

Former Member
0 Kudos

You just have to backup and restore SBO-COMMON and your COMPANYDB.

Then open sbo client, click choose company, click change server, set your server and click refresh.

It will launch the stored procedure named : TmSp_GetCompList

Here is the code of that procedure :

CREATE proc TmSp_GetCompList
 --With Encryption 
as
begin
  set nocount on
  declare @comps int
  set @comps = 0

  select @comps = count(1) from SRGC
  if (@comps <= 0)
  begin
	exec TmSp_RefreshCompList
  end

  select * from SRGC
	 where dbUser =   convert(varchar(50), CURRENT_USER)
end
GO

You can see that it launch the TmSp_RefreshCompList stored procedure and then select records from table SRGC (the table where all valid company db names are stored). Here is the code of TmSp_RefreshCompList :

CREATE proc TmSp_RefreshCompList
 --With Encryption 
as
begin
  set nocount on

  create table #ValidateDB (DbName nvarchar(100), compName nvarchar(100) NULL, cmpVers int NULL, cmpUser nvarchar(50))
  declare @db nvarchar(100)
  declare db cursor for 
  		       select name from master..sysdatabases  where has_dbaccess(name)=1
  open db
  fetch next from db into @db
  while @@fetch_status = 0
  begin
    set @db = ltrim (rtrim(@db))
    exec ('if exists (select 1 from ['+@db+']..sysobjects where name = ''CINF'')
	begin
	declare @cmpN nvarchar(200)
	declare @cmpVers int
		
	select @cmpVers = Version, @cmpN = CompnyName from ['+@db+']..CINF
	set @cmpN = ltrim (rtrim(@cmpN))
	insert into #ValidateDB (DbName, compName, cmpVers, cmpUser) 
				values('''+@db+''', @cmpN, @cmpVers, convert(nvarchar(50), CURRENT_USER))
	end')
    fetch next from db into @db
  end
  close db
  deallocate db
	
  declare @dbUser  nvarchar (50)
  set @dbUser =  convert(nvarchar(50), CURRENT_USER)
  delete from SRGC where dbUser = @dbUser
  insert into SRGC select * from  #ValidateDB
end
GO

You can see that the table SRGC is updated runtime with all the names of valid DBs on the server. So don't have to do nothing more. When you click refresh, company list is updated.

Hope it helps

Quentin