Showing posts with label point. Show all posts
Showing posts with label point. Show all posts

Tuesday, March 27, 2012

Enum datatype in SQL Server?

hi guys,

is it possible to do a enum datatype in SQL Server? if so can anyone point me to an example please?

thanks,

benny

No - there is no Enum Type is sql server.

Generally an Enum may be expressed in code as an Enum of Integers. Then in Sql Server, you would store the specific Integer that was selected. If you wish to insure that a value cannot be stored in your database unless it has been defined as allowable in sql server, then you could add a Constraint to your sql table for that particular Integer column to require specific values.

|||

thanks for your help :)

|||

I've found that it's effective enough to store the values of .NET Enums as int datatypes in SQL Server. Given that you have properties on your classes that are of type MyEnum, those int values will natively convert to their corresponding enum values (which are Integer values anyway).

Alternatively, if you store those values as varchar you can do an [Enum].Parse(GetType(MyEnum), VarcharValue) to convert it from its corresponding string.

Hope that helps.

Entry point not found...mdt2fw.dll

I am having an SQL Server problem. I installed the Standard Edition of SQL Server 7 on a new server (Windows 2000 Server). When I open the SQL Server Enterprise Manager, I get errors when trying to open a database table.
The first error: The procedure entry point ? DaVinciVShowSQLVersionWarning@.@.YXGPAUHWND_@.@.@.Z could not be located in the dynamic link library mdt2fw.dll
The second error:An unexpected error happened during this operation. [MS Design Tools] - The specified procedure could not be found.
Any assistance in this matter would be greatly appreciated.
it could be a problem with a dll not being registered proplery. Try
registering that dll again using regsrv. However, you also might want to
read your sqlstp.log to check for any error messages duirng the install.
You'll find this in your WinNT folder.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
|||Thanks!
I will give it a try on Monday. Hopefully this will fix the problem.
Ray
"Ray" wrote:

> I am having an SQL Server problem. I installed the Standard Edition of SQL Server 7 on a new server (Windows 2000 Server). When I open the SQL Server Enterprise Manager, I get errors when trying to open a database table.
> The first error: The procedure entry point ? DaVinciVShowSQLVersionWarning@.@.YXGPAUHWND_@.@.@.Z could not be located in the dynamic link library mdt2fw.dll
> The second error:An unexpected error happened during this operation. [MS Design Tools] - The specified procedure could not be found.
> Any assistance in this matter would be greatly appreciated.
sql

Entry point not found...mdt2fw.dll

I am having an SQL Server problem. I installed the Standard Edition of SQL
Server 7 on a new server (Windows 2000 Server). When I open the SQL Server
Enterprise Manager, I get errors when trying to open a database table.
The first error: The procedure entry point ? DaVinciVShowSQLVersionWarning@.@.
YXGPAUHWND_@.@.@.Z could not be located in the dynamic link library mdt2fw.dll
The second error:An unexpected error happened during this operation. [MS
Design Tools] - The specified procedure could not be found.
Any assistance in this matter would be greatly appreciated.it could be a problem with a dll not being registered proplery. Try
registering that dll again using regsrv. However, you also might want to
read your sqlstp.log to check for any error messages duirng the install.
You'll find this in your WinNT folder.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.|||Thanks!
I will give it a try on Monday. Hopefully this will fix the problem.
Ray
"Ray" wrote:

> I am having an SQL Server problem. I installed the Standard Edition of SQ
L Server 7 on a new server (Windows 2000 Server). When I open the SQL Serve
r Enterprise Manager, I get errors when trying to open a database table.
> The first error: The procedure entry point ? DaVinciVShowSQLVersionWarning
@.@.YXGPAUHWND_@.@.@.Z could not be located in the dynamic link library mdt2fw.dl
l
> The second error:An unexpected error happened during this operation. [
MS Design Tools] - The specified procedure could not be found.
> Any assistance in this matter would be greatly appreciated.

Entry point not found...mdt2fw.dll

I am having an SQL Server problem. I installed the Standard Edition of SQL Server 7 on a new server (Windows 2000 Server). When I open the SQL Server Enterprise Manager, I get errors when trying to open a database table.
The first error: The procedure entry point ? DaVinciVShowSQLVersionWarning@.@.YXGPAUHWND_@.@.@.Z could not be located in the dynamic link library mdt2fw.dll
The second error:An unexpected error happened during this operation. [MS Design Tools] - The specified procedure could not be found.
Any assistance in this matter would be greatly appreciated.it could be a problem with a dll not being registered proplery. Try
registering that dll again using regsrv. However, you also might want to
read your sqlstp.log to check for any error messages duirng the install.
You'll find this in your WinNT folder.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.|||Thanks!
I will give it a try on Monday. Hopefully this will fix the problem.
Ray
"Ray" wrote:
> I am having an SQL Server problem. I installed the Standard Edition of SQL Server 7 on a new server (Windows 2000 Server). When I open the SQL Server Enterprise Manager, I get errors when trying to open a database table.
> The first error: The procedure entry point ? DaVinciVShowSQLVersionWarning@.@.YXGPAUHWND_@.@.@.Z could not be located in the dynamic link library mdt2fw.dll
> The second error:An unexpected error happened during this operation. [MS Design Tools] - The specified procedure could not be found.
> Any assistance in this matter would be greatly appreciated.

Entry point not found with MS SQL Server

Hi All!

Has anyone has seen this error before?

Event Type:Information
Event Source:Application Popup
Event Category:None
Event ID:26
Date:5/14/2004
Time:10:06:45 AM
User:N/A
Description:
Application popup: sqlmangr.exe - Entry Point Not Found : The
procedure entry point TraceMessage could not be located in the dynamic
link library ADVAPI32.dll.

This computer is running MS SQL Server STD Edition 2000 W/ Service
Pack 1.

Thanks!Eric wrote:

> Hi All!
> Has anyone has seen this error before?
> Event Type:Information
> Event Source:Application Popup
> Event Category:None
> Event ID:26
> Date:5/14/2004
> Time:10:06:45 AM
> User:N/A
> Description:
> Application popup: sqlmangr.exe - Entry Point Not Found : The
> procedure entry point TraceMessage could not be located in the dynamic
> link library ADVAPI32.dll.
>
> This computer is running MS SQL Server STD Edition 2000 W/ Service
> Pack 1.
> Thanks!

Usually that means some DLL was updated or not updated while others were
(or were not)...if you can makes sense of that. ;) Basicaly, you likely
have an outdated DLL. That's just a guess.

Zach

Monday, March 26, 2012

Enterprise SQL Projects (1000+ Stored Procedures)

Enterprise SQL Projects
--------
When Design is replaced with an Architectural Plan

The following post is intended as a starting point of some main concepts to consider when dealing with ent. sql projects. While it is not a direct question of any kind, it would interest people that are/or was involved in ent. projects and therefore have been troubled with similar problems.

Here is a quick overview of a couple main concepts when you have to deal with a Ent. Projects with 1000+ stored procedures.

DOCUMENTATION:
It is an absolute must to include 100% explanatory code on top of the sps.

FUNCTIONS:
Use functions to the maximum extent to reduce overal stored procedure complexity
a rule of thumb is to have 1 to 10, functions to sps ratio or simmilar.

TRIGGERS:
A lot to say about them that cannot be covered in this context

NAMING CONVENSION:
Your naming convension should be 100% pre-thought and designed, no mistakes allowed in this context as it will cause all stored procedures to be extremely difficult/impossible to browse.

a quick template could look as this:

sp
module name
underscore(_)
action (lower case)
noun (proper case)

For example:
spOrders_putOrderDetail
spMaintainUsers_deactivateUser
spReports_getZeroInventory

(quoted by: tmorton)

my addition to this would be something like:
sp< as a prefix is surtently an overkill when dealing with 1000+ sps and is not needed.

however a lot more complex naming strategies can be used, that will cause the project to be a lot more easy to maintain.Just a note on your last comment - I would also like to submit that I have thought for several years now that prefacing stored procedure names with "sp" and / or table names with "tbl" is completely unnecessary. Back in "the day" this might have been necessary but I don't think I've seen a compelling enough reason in years to continue this practice.

Of course, this is just my opinion.|||Russem:

Personally, it's all about readability and how the programmer feels which coding paradigm is easier for them to read. I personally love the Hungarian naming convention. For example, once you get into huge projects, i.e. > 1M lines of code, it gets more difficult to read the code, so by utilizing these prefixes, it sure helps the eyes (and brain)!|||::Just a note on your last comment - I would also like to submit that I have thought for
::several years now that prefacing stored procedure names with "sp" and / or table names
::with "tbl" is completely unnecessary. Back in "the day" this might have been necessary but
::I don't think I've seen a compelling enough reason in years to continue this practice.

Naturally, though, this "compelling reason" some people seem to see has NOT included going to the documentation.

There you would find out that the official documentation says that whatever you name a stored procedure, you do NOT start it with "sp_".

Because contrary to what people that have not read the documentation do think, this means "System Procedure" (not Stored Procedure).

And it DOES make a difference. Let me quote:

::It is strongly recommended that you do not create any stored procedures using sp_ as a
::prefix. SQL Server always looks for a stored procedure beginning with sp_ in this order:
::
::The stored procedure in the master database.
::
::The stored procedure based on any qualifiers provided (database name or owner).
::
::The stored procedure using dbo as the owner, if one is not specified.
::
::Therefore, although the user-created stored procedure prefixed with sp_ may exist in the
::current database, the master database is always checked first, even if the stored
::procedure is qualified with the database name.
::
::Important If any user-created stored procedure has the same name as a system stored
::procedure, the user-created stored procedure will never be executed.

Prefx if you want, but people following this should have the dignitiy to read the documentation.

Funnily, a lot of "sql gurus" in companies just prefix all "stored procedures" with "sp_" as this is "how ms does it, too".|||I'll prefix variables, sure. But I won't do it with stored procedures (and a standard prefix for all of them) and especially not with tables. I definitely agree with adding a prefix to variable names, though :)

Wednesday, March 21, 2012

Enterprise Manager Tools

Can someone point me to the licensing requirements of the
admin tools. I have a number of db's that I admin. I am
wondering about the use of the admin tools on these
databases.
TIA
meh
"MEH" <mehogberg@.cox.net> wrote in message
news:20af01c53eaf$03fb58d0$a601280a@.phx.gbl...
> Can someone point me to the licensing requirements of the
> admin tools. I have a number of db's that I admin. I am
> wondering about the use of the admin tools on these
> databases.
As long as you have a licensed copy of SQL Server, you are authorized to use
the SQL Server tools, like Enterprise Manager, on multiple databases. If I
didn't answer your question, provide more detail?
Steve
|||Steve;
Thanks for the reply. I work for a company that not only
has its own database's (and copies of SQL Enterprise) but
we have customers that we sell, create and maintain SQL
enterprise (and some MSDE) databases. I loaded the tools
on my laptop so that I can go to different sites and work
on said databases. We were talking the other day about
weather or not it was within the licensing agreement if
I ...i.e load the tools from one of my companys
enterprise CD's and then go to a site and connect to
other databases. Or should I be using the tools from
their CD's?
TIA
Thanks for any info in this matter
meh
[vbcol=seagreen]
>--Original Message--
>"MEH" <mehogberg@.cox.net> wrote in message
>news:20af01c53eaf$03fb58d0$a601280a@.phx.gbl...
the[vbcol=seagreen]
am
>As long as you have a licensed copy of SQL Server, you
are authorized to use
>the SQL Server tools, like Enterprise Manager, on
multiple databases. If I
>didn't answer your question, provide more detail?
>Steve
>
>.
>
|||hi,
MEH wrote:
> Can someone point me to the licensing requirements of the
> admin tools. I have a number of db's that I admin. I am
> wondering about the use of the admin tools on these
> databases.
please have a look at
http://www.google.it/groups?q=group:...phx.gbl&rnum=1
... according to this pst, due to a Microosft representative, you are not
entitled at all to use the SQL Server Client Tools on production MSDE
instance...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Try SQL Admin Studio from www.simego.com it's only $40 yet far faster than
Enterprise Manager.
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:3c26v1F6jpo62U1@.individual.net...
> hi,
> MEH wrote:
> please have a look at
> http://www.google.it/groups?q=group:...phx.gbl&rnum=1
> ... according to this pst, due to a Microosft representative, you are not
> entitled at all to use the SQL Server Client Tools on production MSDE
> instance...
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>

Friday, February 17, 2012

Enterprise Manager - create table/column

I'm sorry, I've been searching for information that I need but I was in the
middle of the sea. Please point me to the right direction of where should I
post my question. Sorry.....
We are using SQL Server 2000. At design table view at SQL Server Enterprise
Manager, it has "Description", "Identity", "Identity Seed", "Formula" etc
fields at the bottom of the screen, and I would like to know what those are
for and their funtionalities.
Vanessa
Vanessa,
You might find it helpful to read the CREATE TABLE and CREATE VIEW articles
in the BOL, since the GUI is just creating these statements. Also, look up
"identity columns", "computed columns", and "extended properties".
RLF
"Vanessa" <Vanessa@.discussions.microsoft.com> wrote in message
news:073D607F-3087-47E4-ACE8-1BA0EA4ADD3B@.microsoft.com...
> I'm sorry, I've been searching for information that I need but I was in
> the
> middle of the sea. Please point me to the right direction of where should
> I
> post my question. Sorry.....
> We are using SQL Server 2000. At design table view at SQL Server
> Enterprise
> Manager, it has "Description", "Identity", "Identity Seed", "Formula" etc
> fields at the bottom of the screen, and I would like to know what those
> are
> for and their funtionalities.
> Vanessa
>