SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
DB import/export

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
DB import/export
Author Message
thuan



Joined: 29 Aug 2002
Posts: 22

Post DB import/export Reply with quote

I'm looking to do some mass changes across the board
in the database. But I'm running into an error exporting,
and importing to/from Microsoft SQL.

To make sure the errors aren't due to my changes, I'm
just exporting the 24x7 Database, and then import it
back. The export is successful, but I get an import error.

I'm running into this error:

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'run_id'.

Fri Mar 19, 2004 1:16 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: DB import/export Reply with quote

I don't know what is causing this error. Try upgrading to a more recent version.

Also, for mass-changes there is an easy solution using a script type job. For ideas take a look at examples for the JobList topic.
If you tell me what you want to change I can show you how to do that.

: I'm looking to do some mass changes across the board
: in the database. But I'm running into an error exporting,
: and importing to/from Microsoft SQL.

: To make sure the errors aren't due to my changes, I'm
: just exporting the 24x7 Database, and then import it
: back. The export is successful, but I get an import error.

: I'm running into this error: [Microsoft][ODBC SQL Server Driver][SQL
: Server]Invalid column name 'run_id'.

Fri Mar 19, 2004 2:05 pm View user's profile Send private message
thuan



Joined: 29 Aug 2002
Posts: 22

Post Re: DB import/export Reply with quote

We are running an older version. But we're not ready to upgrade yet, so I'd
like get it working with the version we're running if possible. (v3.4.6)

I would assume there's an inconsistency between import and export commands.
Either the export is renaming or missing an attribute to export, or the import
is trying to import a new/non-existent/unknown attribute. A newer version
may have fixed this.

Can you describe your "script type job"?

We have a 4-500 jobs that are similar in most ways, but vary in
command lines, arguments, script notification, trigger file watches and
creation, etc. It would be more convenient to access the raw table and
then import the database, rather than editing each job through dialog boxes.

: I don't know what is causing this error. Try upgrading to a more recent
: version.

: Also, for mass-changes there is an easy solution using a script type job. For
: ideas take a look at examples for the JobList topic.
: If you tell me what you want to change I can show you how to do that.

Fri Mar 19, 2004 3:05 pm View user's profile Send private message
thuan



Joined: 29 Aug 2002
Posts: 22

Post Re: DB import/export Reply with quote

I inserted a column named 'run_id' with NULL values, into the exported database
and imported it back in, and the operation succeeded. Does 24x7's import have
data validation?

I would expect the import to fail if I placed an 'X' character for a value for a
column that usually expects only a 'Y' or 'N'?

Do you know of any caveats of editing the raw table in this way?

Thanks.

: We are running an older version. But we're not ready to upgrade yet, so I'd
: like get it working with the version we're running if possible. (v3.4.6)

: I would assume there's an inconsistency between import and export commands.
: Either the export is renaming or missing an attribute to export, or the
: import
: is trying to import a new/non-existent/unknown attribute. A newer version
: may have fixed this.

: Can you describe your "script type job"?

: We have a 4-500 jobs that are similar in most ways, but vary in
: command lines, arguments, script notification, trigger file watches and
: creation, etc. It would be more convenient to access the raw table and
: then import the database, rather than editing each job through dialog boxes.

Fri Mar 19, 2004 3:32 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: DB import/export Reply with quote

Perhaps, you want to change command line of every job running "MyProgram.exe /myswitch" to "MyNewProgram.exe /myswitch". This can done as the following

1. Create new script job, let's call mass update
2. Here is the job script (mostly copy and paste fro mthe help)

// declare script variables

Dim( job_list, string )
Dim( no_more, boolean )
Dim( job_id, string )
Dim( command_line, string )
Dim( pos, number )

// get job list
JobList( "", job_list )
// parse the list
isEqual( job_list, "", no_more )

LoopUntil( no_more, END_LOOP )

// get next job ID

GetToken(",", job_list, job_id )

// get command line

JobDescribe( job_id, "COMMAND", command_line )

// check comamnd line

InStr( command_line, "MyProgram.exe", 1, pos )

If( pos, CHANGE_IT, DO_NEXT )
CHANGE_IT:

JobModify( job_id, "COMMAND", "MyNewProgram.exe /myswitch" )
DO_NEXT:

isEqual( job_list, "", no_more )
END_LOOP:

: We are running an older version. But we're not ready to upgrade yet, so I'd
: like get it working with the version we're running if possible. (v3.4.6)

: I would assume there's an inconsistency between import and export commands.
: Either the export is renaming or missing an attribute to export, or the
: import
: is trying to import a new/non-existent/unknown attribute. A newer version
: may have fixed this.

: Can you describe your "script type job"?

: We have a 4-500 jobs that are similar in most ways, but vary in
: command lines, arguments, script notification, trigger file watches and
: creation, etc. It would be more convenient to access the raw table and
: then import the database, rather than editing each job through dialog boxes.

Fri Mar 19, 2004 3:53 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: DB import/export Reply with quote

The import doesn't validate the data while JobModify and matching functions in COM and Java and APIs do.

: I inserted a column named 'run_id' with NULL values, into the exported
: database
: and imported it back in, and the operation succeeded. Does 24x7's import have
: data validation?

: I would expect the import to fail if I placed an 'X' character for a value
: for a
: column that usually expects only a 'Y' or 'N'?

: Do you know of any caveats of editing the raw table in this way?

: Thanks.

Fri Mar 19, 2004 3:55 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.