I tried to create a sp on one of the databases on my lap top and got this: Pls help i need it bad
Msg 10314, Level 16, State 11, Procedure ap_Hello, Line 5
An error occurred in the Microsoft .NET Framework while trying to load
assembly id 65695. The server may be running out of resources, or the
assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or
UNSAFE. Run the query again, or check documentation to see how to solve
the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly
'vbtriggers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or
one of its dependencies. An error relating to security occurred.
(Exception from HRESULT: 0x8013150A)
System.IO.FileLoadException:
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
The statement has been terminated.
Please post the CLR code here. Do you use reflection or an Assembly load function within the CLR code ?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
-|||Ok what clr code?
I downloaded this db from a book website (not recomending the book at this time)
it was a rar file i unziped and ran a script to attach. I think it has to be on a network, im not sure
EXEC sp_attach_db 'Asset5',
C:\......Asset5.mdf',
C:\......Asset5.ldf'
Pls help asap i bought the book to cram for an interview and I cant tell you where i would like to cram the book now|||Please post the script you are using to create the ap_Hello SP here.|||Create proc ap_Hello
AS
Declare @.myVar char(5)
SET @.MyVar='Hello'
SELECT @.MyVar
Simple as can be, this works on all other dbs on this laptop except for the one installed from the book, im not sure but seems the book says you have to be running it on a server not locally can that be the prob?
Also i used the scripts for a few tables to recreate them in a new db on the same laptop then selected from the book db into my new db and ran the a few sp from the book and they worked, it is this Asset5 db only that i have trouble with|||
So you encounter the problem when creating the SP? It looks like that there is DDL trigger, named vbtriggers, defined in the database but failed to be loaded correctly.
Please open Management Studio and click Database -> Your database -> Programmablity -> Database Triggers, and see if there is any defined. If any, script them out so that you can re-create them if necessary and then delete all the database triggers.
After this, please try creating the SP again. What will be the result?
|||EXCELLENT!!!!!!!!!! the vbTrigger is an Assembly, i had to drop a trig that depended on it so i scripted that also, when i tried to create the assembly agian in go a huge error list, but i guess i have about a month of studying until i get there so no worries.THANK YOU VERY MUCH!!!!!!!
No comments:
Post a Comment