Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Friday, March 30, 2012

'Log' is not a member of 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptObjectModel'.

I have been developing a large SSIS project and it uses scripts extensively.

During development, i encountered no problems.

However, when i tried executing them on a server (windows server 2003), i was given this error for all the scripts:

Here is a brief log:

PackageStart,servername,network\login,PkgName,{A6778813-1F3A-4133-A00C-6F02AC8CC8B1},{EA6E6337-8C07-428D-9E3B-CEEB4F95A185},3/10/2006 5:24:26 PM,3/10/2006 5:24:26 PM,0,0x,Beginning of package execution.

OnError,servername,network\login,PkgName,Rename Error Files,{8d38e1b7-44e8-419e-963e-c689edd0be2c},{EA6E6337-8C07-428D-9E3B-CEEB4F95A185},3/10/2006 5:24:30 PM,3/10/2006 5:24:30 PM,7,0x,Error 30456: 'Variables' is not a member of 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptObjectModel'.
Line 26 Columns 51-63
Line Text: Dim DaysToKeepErrorFile As Integer = CInt(Dts.Variables("vDaysToKeepErrorFiles").Value.ToString)

OnError,servername,network\login,PkgName,Rename Error Files,{8d38e1b7-44e8-419e-963e-c689edd0be2c},{EA6E6337-8C07-428D-9E3B-CEEB4F95A185},3/10/2006 5:24:30 PM,3/10/2006 5:24:30 PM,7,0x,Error 30456: 'Log' is not a member of 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptObjectModel'.
Line 49 Columns 25-31
Line Text: Dts.Log(MaintenanceMsg, 0, ZeroByte)

OnError,servername,network\login,PkgName,Rename Error Files,{8d38e1b7-44e8-419e-963e-c689edd0be2c},{EA6E6337-8C07-428D-9E3B-CEEB4F95A185},3/10/2006 5:24:30 PM,3/10/2006 5:24:30 PM,7,0x,Error 30456: 'Log' is not a member of 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptObjectModel'.
Line 55 Columns 17-23
Line Text: Dts.Log("Script Error:" + ex.Message, 0, ZeroByte)

OnError,servername,network\login,PkgName,Rename Error Files,{8d38e1b7-44e8-419e-963e-c689edd0be2c},{EA6E6337-8C07-428D-9E3B-CEEB4F95A185},3/10/2006 5:24:30 PM,3/10/2006 5:24:30 PM,5,0x,The script files failed to load.
PackageEnd,servername,network\login,PkgName,{A6778813-1F3A-4133-A00C-6F02AC8CC8B1},{EA6E6337-8C07-428D-9E3B-CEEB4F95A185},3/10/2006 5:24:30 PM,3/10/2006 5:24:30 PM,1,0x,End of package execution.

I've been using the same scripts for months in development and testing. Both dev and test server has SQL 2005 and SSIS installed.

What causes this?

Seems very strange, as obvious Log is a method of the ScriptObjectModel class.

Can you logon to the server anbd built a test package on the server and try running it there an then in BIDS, obviously using a script task a Log.

Has this ever worked on the problem server, or is it a recent failure? Are the good and bad machines running the same service pack? I am not clear on what machines work and fail and if failures relate to some or all machines.

|||

If you find it strange, imagine me! haha...

Do i need VS2005 installed on the server to open the VBA window to edit the script? I got this error when trying :

--

Cannot show the editor for this task.

ADDITIONAL INFORMATION:

The operation could not be completed. (Microsoft.VisualBasic.Vsa.DT)

1. I've checked the assembly versions of Microsoft.SqlServer.ManagedDTS.dll and microsoft.sqlserver.scripttask.dll on the server and my machine, they're the same. 9.0.242.0

2. This is the first time we're trying to deploy on the server. It has worked fine on four other machines : 2 desktops and 2 laptops.

3. The server is running SP1 the good machines aren't. I figured this shouldn't be a problem as SP1 should be 'backward compatible'. I'll try to get SP1 on the good machines just to eliminate the problem, but it'll take some time, which i don't have.

Any other ideas?

|||

Things have gotten more interesting.

My package has multiple scripts and i discovered that some work, and some dont!

What makes it interesting is that each of these scripts are identitical (i copied and pasted the original script i wrote), except for name and variable values.

If the script's content is identical, and both use dts.log and dts.variables object, why is it that one works and one doesnt?

What on earth could be causing this?

Another question:

where is the reference 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptObjectModel' referenced from? its not part of the references i see in the VSA ide but i see it in the package xml. I couldn't find it in the windows\assembly folder either. Anybody knows ANYTHING about this issue?

|||

Well, i've got it solved.

I copied a working script, deleted the bad ones and pasted them in again. I think the important step is after pasting the copied script task, i opened the script in the editor and closed it. Somehow, this seemed to work. Although it still doesn't solve the mystery of why it worked on some machines but failed on others. The only difference is the server was running Windows Server 2003 and the development was winxp.

So to anyone whos reusing scripts, i suggest opening the 'design script' window and closing it after pasting, just to be safe and make sure SSIS precompiles everything properly.

Wednesday, March 21, 2012

Log file is too big

I have a database with 200 MB data file size and 120 GB transaction log file.I wonder why?This database is a part of the Data warehouse project and cubes are reffering to it.
Is there any advantage of keeping such a big log file?Are you truncating the log?

If you have the recovery plan set to full and don't baskup the log then it will just keep growing.
It will also not shrink unless you tell it to - so if you had a long running transaction in the past it would grow and stay there.

Set the recovery model to simple to keep the tr log small if you don't want to recover transactions.

Look at dbcc shrinkfile to shrink the log.
a detach, delete log file and attach single file will do the same thing.|||Recovery mode has been set to full and the back-up plan is to take the full dump every night.But doesn't that truncate the Inactive part of the Log??

Monday, March 19, 2012

Log file grows (Error 9002).

Hello Group,
We have a project where we store the state of object instances in Sql Server
tables. Primarely these tables consist of an id column and an IMAGE type
column. We use .NET binary serialization to create byte arrays and use
(ordinary) INSERT, UPDATE and SELECT statements (in conjunction with the
System.Data.SqlClient classes) to write to and read from Sql's IMAGE type.
The size of a binary array is approximately 300-350k. The database is set to
automatically grow the data en log files. The recovery model is set to
SIMPLE. Our problem is that the log file grows (huge!) until error 9002 shows
up. Backing up the log file helps, but... what is caution this error? Are we
using the wrong CRUD
statements (should we use WRITETEXT and READTEXT instead)? I'm so suprised
to see that the log file grows (why isn't Sql reclaiming the used (old)
space): am I missing the point of the SIMPLE recovery model?
(btw: I'm pretty sure there are no transactions 'hanging')
Many thanks in advance!
Kind regards,
Johan Bouwhuis.Try issuing Checkpoint through the application or whenever a heavy
transaction is applied...
"Johan Bouwhuis" wrote:
> Hello Group,
> We have a project where we store the state of object instances in Sql Server
> tables. Primarely these tables consist of an id column and an IMAGE type
> column. We use .NET binary serialization to create byte arrays and use
> (ordinary) INSERT, UPDATE and SELECT statements (in conjunction with the
> System.Data.SqlClient classes) to write to and read from Sql's IMAGE type.
> The size of a binary array is approximately 300-350k. The database is set to
> automatically grow the data en log files. The recovery model is set to
> SIMPLE. Our problem is that the log file grows (huge!) until error 9002 shows
> up. Backing up the log file helps, but... what is caution this error? Are we
> using the wrong CRUD
> statements (should we use WRITETEXT and READTEXT instead)? I'm so suprised
> to see that the log file grows (why isn't Sql reclaiming the used (old)
> space): am I missing the point of the SIMPLE recovery model?
> (btw: I'm pretty sure there are no transactions 'hanging')
> Many thanks in advance!
> Kind regards,
> Johan Bouwhuis.
>|||Hi,
Since the recover for your database is SIMPLE, the transction will be
cleared after each recovery interval. In your case looks like you
are doing a bulk DML operation. In this case the coomit will be done only
after completing the entire operation. To overcome this
instead of doing bulk DML operation do a batch by batch DML operation. THis
will ensure that your LDF will not grow to a higher
extend.
In SIMPLE recovery the log will be cleared automatically and you can not
perform a transaction log backup. If it is a production server then
it is recommened to go for FULL recovery model and schedule a Transaction
log backup. This will help you to recover the database fully/POINT IN TIME.
Thanks
Hari
SQL Server MVP
"Johan Bouwhuis" <JohanBouwhuis@.discussions.microsoft.com> wrote in message
news:E60F4B7A-430D-4E85-94AD-EC41A6187DE9@.microsoft.com...
> Hello Group,
> We have a project where we store the state of object instances in Sql
> Server
> tables. Primarely these tables consist of an id column and an IMAGE type
> column. We use .NET binary serialization to create byte arrays and use
> (ordinary) INSERT, UPDATE and SELECT statements (in conjunction with the
> System.Data.SqlClient classes) to write to and read from Sql's IMAGE type.
> The size of a binary array is approximately 300-350k. The database is set
> to
> automatically grow the data en log files. The recovery model is set to
> SIMPLE. Our problem is that the log file grows (huge!) until error 9002
> shows
> up. Backing up the log file helps, but... what is caution this error? Are
> we
> using the wrong CRUD
> statements (should we use WRITETEXT and READTEXT instead)? I'm so suprised
> to see that the log file grows (why isn't Sql reclaiming the used (old)
> space): am I missing the point of the SIMPLE recovery model?
> (btw: I'm pretty sure there are no transactions 'hanging')
> Many thanks in advance!
> Kind regards,
> Johan Bouwhuis.
>