Showing posts with label includes. Show all posts
Showing posts with label includes. Show all posts

Monday, March 19, 2012

Extended Stored Procedure <-> CLR

Hi
I should write an Extended Stored Procedure for a SQL Server 2000. This
Extended Stored Procedure includes differnet function which I like to call
from applications (C++, Java) via ODBC or JDBC. I have
done that already, I mean I know how to do that.
But now I read something
about CLR and that several functions from the Extended Stored Procedure will
be not supported in coming SQL server versions.
- Is CLR available in SQL server 2000?
- Is there some example code available?
- How can I call a function written with CLR from a C++ (or Java) app via
ODBC (or JDBC)?
Thanks for the help.
Regards
HansHello Hans,

> - Is CLR available in SQL server 2000?
No, at least not SQLCLR as you talked about in the first part of the post.

> - Is there some example code available?
Plenty. Just Google on SQLCLR.

> - How can I call a function written with CLR from a C++ (or Java) app
> via ODBC (or JDBC)?
Essentially the same you call an XP. You need to catalog the assembly with
SQL Server, the catalog T-SQL objects (functions, sprocs, types, triggers,
aggregators) to the cataloged assembly. You can then call the mapped T-SQL
objects in a select or action statement, or with an exec depending on the
type of object cataloged.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/

Sunday, February 26, 2012

Express and Developer - performance counter errors

I installed Visual Studio 2005 on my machine, which includes SQL Server Express. I then installed the Developer edition of SQL Server over the top, as that's the edition I wanted. I now get four errors in my Application event log whenever I boot Windows:

    MSSQLSERVER - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQLSERVER - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    MSSQL$SQLEXPRESS - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQL$SQLEXPRESS - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

Any idea what's causing this problem and how I can fix it?

Thanks

Here is one thing you can try.

Start Regedit

For a default instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer\Performance\Library

For a named instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQL$<Instance Name>\Performance\Library

If the registry key does not exist in Registry Editor, you must rebuild the registry. For more information about how to rebuild the registry to fix these registry errors, see the "How to rebuild the registry (Setup)" topic in SQL Server Books Online.

Michelle

|||

Hi there, I've only just noticed your reply so thanks for responding. I have removed the MSSQL$SQLExpress instance via Control Panel but I am still getting the error messages for the MSSQLServer instance.

I have looked at the registry entry you mentioned and it is present and is set to 'sqlctr90.dll'. Is that correct? If so, any further ideas?

Thanks

|||

Yes what you see is correct.

Check out the following thread as it has some other suggestions to try.

Michelle

|||Sorry Michelle but I can't see a link in your reply - could you tell me the thread title?

Thanks

Neil|||

Sorry I forgot to attach the link.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=158314&SiteID=1

Michelle

Express and Developer - performance counter errors

I installed Visual Studio 2005 on my machine, which includes SQL Server Express. I then installed the Developer edition of SQL Server over the top, as that's the edition I wanted. I now get four errors in my Application event log whenever I boot Windows:

    MSSQLSERVER - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQLSERVER - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    MSSQL$SQLEXPRESS - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQL$SQLEXPRESS - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

Any idea what's causing this problem and how I can fix it?

Thanks

Here is one thing you can try.

Start Regedit

For a default instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer\Performance\Library

For a named instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQL$<Instance Name>\Performance\Library

If the registry key does not exist in Registry Editor, you must rebuild the registry. For more information about how to rebuild the registry to fix these registry errors, see the "How to rebuild the registry (Setup)" topic in SQL Server Books Online.

Michelle

|||

Hi there, I've only just noticed your reply so thanks for responding. I have removed the MSSQL$SQLExpress instance via Control Panel but I am still getting the error messages for the MSSQLServer instance.

I have looked at the registry entry you mentioned and it is present and is set to 'sqlctr90.dll'. Is that correct? If so, any further ideas?

Thanks

|||

Yes what you see is correct.

Check out the following thread as it has some other suggestions to try.

Michelle

|||Sorry Michelle but I can't see a link in your reply - could you tell me the thread title?

Thanks

Neil|||

Sorry I forgot to attach the link.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=158314&SiteID=1

Michelle

Friday, February 24, 2012

Express and Developer - performance counter errors

I installed Visual Studio 2005 on my machine, which includes SQL Server Express. I then installed the Developer edition of SQL Server over the top, as that's the edition I wanted. I now get four errors in my Application event log whenever I boot Windows:

    MSSQLSERVER - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQLSERVER - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    MSSQL$SQLEXPRESS - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQL$SQLEXPRESS - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

Any idea what's causing this problem and how I can fix it?

Thanks

Here is one thing you can try.

Start Regedit

For a default instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer\Performance\Library

For a named instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQL$<Instance Name>\Performance\Library

If the registry key does not exist in Registry Editor, you must rebuild the registry. For more information about how to rebuild the registry to fix these registry errors, see the "How to rebuild the registry (Setup)" topic in SQL Server Books Online.

Michelle

|||

Hi there, I've only just noticed your reply so thanks for responding. I have removed the MSSQL$SQLExpress instance via Control Panel but I am still getting the error messages for the MSSQLServer instance.

I have looked at the registry entry you mentioned and it is present and is set to 'sqlctr90.dll'. Is that correct? If so, any further ideas?

Thanks

|||

Yes what you see is correct.

Check out the following thread as it has some other suggestions to try.

Michelle

|||Sorry Michelle but I can't see a link in your reply - could you tell me the thread title?

Thanks

Neil|||

Sorry I forgot to attach the link.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=158314&SiteID=1

Michelle