Showing posts with label standard. Show all posts
Showing posts with label standard. Show all posts

Monday, March 12, 2012

Here is the answer FOLKS and it WORKS!!!

I am trying to deploy a Database Project with Visual Studio 2005 and SQL Server 2005 Standard.

I import “System.IO” and have therefore set the permission levels to EXTERNAL_ACCESS.

I am receiving the same error message that many folks have received.

CREATE ASSEMBLY for assembly 'Images' failed because assembly 'Images' is not authorized for PERMISSION_SET = EXTERNAL_ACCESS.

The assembly is authorized when either of the following is true: the database owner (DBO) has EXTERNAL ACCESS ASSEMBLY permission and the database has the TRUSTWORTHY database property on; or the assembly is signed with a certificate or an asymmetric key that has a corresponding login with EXTERNAL ACCESS ASSEMBLY permission. If you have restored or attached this database, make sure the database owner is mapped to the correct login on this server. If not, use sp_changedbowner to fix the problem. Images.

My CLR access is “on”

I have tried

1) From master run: GRANT EXTERNAL ACCESS ASSEMBLY to [Builtin\Administrators].

2) From master run: GRANT EXTERNAL ACCESS ASSEMBLY to “My Windows Authentication ID”.

3) Run ALTER DATABASE MYDATABASE SET TRUSTWORTHY ON

4) In Visual Studio .NET 2005 Set the permission levels to ‘external’

5) TriedBuiltin\Administrators and my SQL Server Windows Authenticated Login ID for the ASSEMBLY OWNER.

I can compile BUT NOT DEPLOY

Any help would be greatly appreciated.

Regards Steve

Who is the owner of the database ?

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Hi Thanks for the reply.

I am running with Windows Authentication at the present moment , under the ID Administrator1 (running under windows Vista.(still would like to get reporting services to run Smile ) . I did read the article on "Opening up the Administrator ID in Vista and installing SQL Server 2005 under that ID."

Re my current problem....

I managed to get it to deploy. I assigned Administrator1 as an "owner" of the database and gave the ID security administrator rights. I did the same with Builtin/Administrator.

I found something very interesting. I am able to deploy CLR stored precedures from the Visual Studio environment but not CLR functions. (EXTERNAL ACCESS) In order to deply functions I must compile the Dll and create SQL to CREATE the ASSEMBLYfrom within the SQL Server Environment. Any ideas why.?

Once again thanks for the help? Very much appreciated.

Steve

|||

OK Folks this took me about 3 hours to do BUT I have resolved the problem and it WORKS!!!

BTW I am using SQL Server 2005 Standard and Visual Studio.NET Enterprise

First create a Strong key as described in“The secret of strong naming”

DO NOTDODELAY SIGNING !!!!!!

http://www.ondotnet.com/pub/a/dotnet/2003/04/28/strongnaming.html

Sn – k MyKeyFile.snk

FIND OUT WHERE THE SNK FILE WAS COMPILED.

Go into VS2005 .NET and under project / properties in the signing page click the Sign the Assembly check box and browse to find MyKeyFile.snk

The database page

Mark the assembly for external access and leave the owner blank

Now we must go to the article

http://sqljunkies.com/WebLog/ktegels/archive/2006/08/14/safetydancelite.aspx

The text below comes from this article....Smile

A kinder, lighter Safety Dance for the SQLCLR

A few months ago, I published a step-by-step procedure for using certificate to sign an assembly so an external access or unsafe assembly could be run without having to set the hosting database to trustworthy. The major problem with that process was its weight: a lot of steps and some still requirements in terms of certificate management. Turns out that yes, there is an easier way to make it work.

Part one -- preparing the master database

1. As needed, start a series of queries against the MASTER database.

2. Create the target database (meaning execute a CREATE DATABASE query).

3. Code and compile the assembly you want to deploy. Make sure you sign the assembly with a strong name key file. This can be done with a PFX file generated by Visual Studio.

4. Create an asymmetric key from from the compiled assembly using a statement like this: create asymmetric key <key_name> from executable file = '<path_to_dll_file>'

USE Master

GO

create asymmetric key imageskeyFile from executable file = 'C:\YEAR 2007\Images\Images\bin\Debug\Images.dll'

5. Create a login based on that asymmetric key using a statement like this: create login <login_name> from asymmetric key <key_name>

Use Master

Go

create login ImageMaker from asymmetric key imageskeyFile

6. Grant that login the right to create either or both an unsafe or external access assembly (as needed) using: grant unsafe assembly to <login_name>

Use Master

Go

grant EXTERNAL ACCESS assembly to ImageMaker

Part two -- preparing the hosting database

1. As needed, start a series of queries against the desired user database.

2. Create a user in that database mapped to the login created in part, step 5. (e.g. create user <db_user> from login <login_name>)

3. Give that user the right to catalog an assembly, e.g.: grant create assembly to <db_user>

4. Catalog the desired assembly using the now trusted asymmetric key with a statement like: create assembly <assembly_name> authorization <db_user> from '<path_to_dll_file>' with permission_set = unsafe or external access as shown below

SET QUOTED_IDENTIFIER OFF

USE YEAR2007

GO

CREATE ASSEMBLY Images

AUTHORIZATION ImageMaker

FROM "C:\YEAR 2007\Images\Images\bin\Debug\Images.dll"

WITH PERMISSION_SET = EXTERNAL_ACCESS

GO

Friday, March 9, 2012

Help-Can I use 4 GB memory by SQL Server2000?

There is a Server with 4G Memory. I installed a SQL Server 2000 standard
version on it.
I heard that SQLServer2000 could use only up to 2GB memory. Is it true?
How can I use those 4GB memory? I can not upgrade to SQL Server 2005 or
other version because i don't want to take this risk.
Thank you very much.True. Standard edition is limited to 2GB
--
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
Real-world stuff I run across with SQL Server:
http://kevin3nf.blogspot.com
"Damon" <Damon@.china.com> wrote in message
news:3YChh.69507$YV4.69275@.edtnps89...
> There is a Server with 4G Memory. I installed a SQL Server 2000 standard
> version on it.
> I heard that SQLServer2000 could use only up to 2GB memory. Is it true?
> How can I use those 4GB memory? I can not upgrade to SQL Server 2005 or
> other version because i don't want to take this risk.
> Thank you very much.
>|||Thank you Kevin.
Is there any solution to use 4 GB memory by sql2000?
"Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
news:uL6CwcuIHHA.4760@.TK2MSFTNGP03.phx.gbl...
> True. Standard edition is limited to 2GB
> --
> Kevin Hill
> 3NF Consulting
> http://www.3nf-inc.com/NewsGroups.htm
> Real-world stuff I run across with SQL Server:
> http://kevin3nf.blogspot.com
>
> "Damon" <Damon@.china.com> wrote in message
> news:3YChh.69507$YV4.69275@.edtnps89...
>> There is a Server with 4G Memory. I installed a SQL Server 2000 standard
>> version on it.
>> I heard that SQLServer2000 could use only up to 2GB memory. Is it true?
>> How can I use those 4GB memory? I can not upgrade to SQL Server 2005 or
>> other version because i don't want to take this risk.
>> Thank you very much.
>|||Upgrade to Enterprise Edition.
Configuration -Maximum Capacity Specifications
2000
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_ts_8dbn.asp
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Damon" <Damon@.china.com> wrote in message
news:cuDhh.69523$YV4.18832@.edtnps89...
> Thank you Kevin.
> Is there any solution to use 4 GB memory by sql2000?
> "Kevin3NF" <kevin@.SPAMTRAP.3nf-inc.com> wrote in message
> news:uL6CwcuIHHA.4760@.TK2MSFTNGP03.phx.gbl...
>> True. Standard edition is limited to 2GB
>> --
>> Kevin Hill
>> 3NF Consulting
>> http://www.3nf-inc.com/NewsGroups.htm
>> Real-world stuff I run across with SQL Server:
>> http://kevin3nf.blogspot.com
>>
>> "Damon" <Damon@.china.com> wrote in message
>> news:3YChh.69507$YV4.69275@.edtnps89...
>> There is a Server with 4G Memory. I installed a SQL Server 2000 standard
>> version on it.
>> I heard that SQLServer2000 could use only up to 2GB memory. Is it true?
>> How can I use those 4GB memory? I can not upgrade to SQL Server 2005 or
>> other version because i don't want to take this risk.
>> Thank you very much.
>>
>|||Damon (Damon@.china.com) writes:
> Thank you Kevin.
> Is there any solution to use 4 GB memory by sql2000?
Upgrade to Enterprise Edition of SQL 2000.
Which is quite more expensive than moving to SQL 2005 Standard, I believe.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns989DEE520DF4DYazorman@.127.0.0.1...
> Damon (Damon@.china.com) writes:
>> Thank you Kevin.
>> Is there any solution to use 4 GB memory by sql2000?
> Upgrade to Enterprise Edition of SQL 2000.
> Which is quite more expensive than moving to SQL 2005 Standard, I believe.
Would a "Named Instance" on SQL 2000 Standard be able to use most of the
remaining half of the 4GB? When I expirimented with named instances back in
2001 - and decided not to use them in a production environment - I only had
2GB in the server.
Even if possible I'm not sure this would be a good solution, just wondering
what the behavior is.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||The OS will require some memory I leave 512 MB as a minimum. The remaining
memory could be divided between the various instances of SQL Server,
equally, or one instance getting 2GB and the other only 1.5GB, etc.
You would need to use the Server setting for MAX Server Memory on each
instance.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Russ Rose" <russrose@.hotmail.com> wrote in message
news:5_-dnWp8N8-s1BrYnZ2dnUVZ_u63nZ2d@.comcast.com...
> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
> news:Xns989DEE520DF4DYazorman@.127.0.0.1...
>> Damon (Damon@.china.com) writes:
>> Thank you Kevin.
>> Is there any solution to use 4 GB memory by sql2000?
>> Upgrade to Enterprise Edition of SQL 2000.
>> Which is quite more expensive than moving to SQL 2005 Standard, I
>> believe.
> Would a "Named Instance" on SQL 2000 Standard be able to use most of the
> remaining half of the 4GB? When I expirimented with named instances back
> in 2001 - and decided not to use them in a production environment - I only
> had 2GB in the server.
> Even if possible I'm not sure this would be a good solution, just
> wondering what the behavior is.
>> --
>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>> Books Online for SQL Server 2005 at
>> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
>> Books Online for SQL Server 2000 at
>> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>|||"Russ Rose" <russrose@.hotmail.com> wrote in message
news:5_-dnWp8N8-s1BrYnZ2dnUVZ_u63nZ2d@.comcast.com...
> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
> news:Xns989DEE520DF4DYazorman@.127.0.0.1...
>> Damon (Damon@.china.com) writes:
>> Thank you Kevin.
>> Is there any solution to use 4 GB memory by sql2000?
>> Upgrade to Enterprise Edition of SQL 2000.
>> Which is quite more expensive than moving to SQL 2005 Standard, I
>> believe.
> Would a "Named Instance" on SQL 2000 Standard be able to use most of the
> remaining half of the 4GB? When I expirimented with named instances back
> in 2001 - and decided not to use them in a production environment - I only
> had 2GB in the server.
Note for say a website, as I recall, you need a CPU license for each
physical CPU in the machine for each instance (in Standard).
However, this probably won't necessarily help. It depends on the OS.
If you're running Windows 2000 Standard, you're limited to 4 GB of physical
RAM anyway.
Now, 2 gig of physical RAM can be given to a process (3 gig if compiled with
the right options, but that raises other issues here.)
So, if you have 5 gig of physical RAM and an OS that can address all of
that, in theory this could support 2 processes each using 2 gig of physical
RAM with 1 gig reserved for the OS.
If you have less memory, obviously this won't work as well.
Quite honestly, I think your best bet if you really need the memory (and
while I'm always a fan of more memory, sometimes it's just not worth it) is
to move to SQL 2005.
> Even if possible I'm not sure this would be a good solution, just
> wondering what the behavior is.
>> --
>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>> Books Online for SQL Server 2005 at
>> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
>> Books Online for SQL Server 2000 at
>> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>|||Thank you every body!
Now, I am going to move to SQL 2005.
Merry Christmas.
"Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
news:MdRhh.917$yx6.284@.newsread2.news.pas.earthlink.net...
> "Russ Rose" <russrose@.hotmail.com> wrote in message
> news:5_-dnWp8N8-s1BrYnZ2dnUVZ_u63nZ2d@.comcast.com...
>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>> news:Xns989DEE520DF4DYazorman@.127.0.0.1...
>> Damon (Damon@.china.com) writes:
>> Thank you Kevin.
>> Is there any solution to use 4 GB memory by sql2000?
>> Upgrade to Enterprise Edition of SQL 2000.
>> Which is quite more expensive than moving to SQL 2005 Standard, I
>> believe.
>> Would a "Named Instance" on SQL 2000 Standard be able to use most of the
>> remaining half of the 4GB? When I expirimented with named instances back
>> in 2001 - and decided not to use them in a production environment - I
>> only had 2GB in the server.
>
> Note for say a website, as I recall, you need a CPU license for each
> physical CPU in the machine for each instance (in Standard).
> However, this probably won't necessarily help. It depends on the OS.
> If you're running Windows 2000 Standard, you're limited to 4 GB of
> physical RAM anyway.
> Now, 2 gig of physical RAM can be given to a process (3 gig if compiled
> with the right options, but that raises other issues here.)
> So, if you have 5 gig of physical RAM and an OS that can address all of
> that, in theory this could support 2 processes each using 2 gig of
> physical RAM with 1 gig reserved for the OS.
> If you have less memory, obviously this won't work as well.
> Quite honestly, I think your best bet if you really need the memory (and
> while I'm always a fan of more memory, sometimes it's just not worth it)
> is to move to SQL 2005.
>
>> Even if possible I'm not sure this would be a good solution, just
>> wondering what the behavior is.
>>
>> --
>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>> Books Online for SQL Server 2005 at
>> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
>> Books Online for SQL Server 2000 at
>> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>>
>