I am getting an error trying to create a new database diagram. I assume that
some underlying COM component is not registered properly, but I am not sure
which one, as there is no Event Log entry, only the error in SQL Management
Studio.
===================================
Invalid class string
(MS Visual Database Tools)
Program Location:
at
System.Runtime.InteropServices.Marshal.ThrowExcept ionForHRInternal(Int32
errorCode, IntPtr errorInfo)
at
Microsoft.SqlServer.Management.UI.VSIntegration.Ed itors.VirtualProject.Microsoft.SqlServer.Managemen t.UI.VSIntegration.Editors.ISqlVirtualProject.Crea teDesigner(Urn
origUrn, DocumentType editorType, DocumentOptions aeOptions,
IManagedConnection con)
at
Microsoft.SqlServer.Management.UI.VSIntegration.Ed itors.ISqlVirtualProject.CreateDesigner(Urn
origUrn, DocumentType editorType, DocumentOptions aeOptions,
IManagedConnection con)
at
Microsoft.SqlServer.Management.UI.VSIntegration.Ed itors.VsDocumentMenuItem.CreateDesignerWindow(IMan agedConnection
mc, DocumentOptions options)
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
Solved by uninstalling and reinstalling the tools.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@.comcast.netNoSpamM> wrote in
message news:%23BR6sXg2HHA.5884@.TK2MSFTNGP02.phx.gbl...
>I am getting an error trying to create a new database diagram. I assume
>that some underlying COM component is not registered properly, but I am not
>sure which one, as there is no Event Log entry, only the error in SQL
>Management Studio.
>
> ===================================
> Invalid class string
> (MS Visual Database Tools)
> --
> Program Location:
> at
> System.Runtime.InteropServices.Marshal.ThrowExcept ionForHRInternal(Int32
> errorCode, IntPtr errorInfo)
> at
> Microsoft.SqlServer.Management.UI.VSIntegration.Ed itors.VirtualProject.Microsoft.SqlServer.Managemen t.UI.VSIntegration.Editors.ISqlVirtualProject.Crea teDesigner(Urn
> origUrn, DocumentType editorType, DocumentOptions aeOptions,
> IManagedConnection con)
> at
> Microsoft.SqlServer.Management.UI.VSIntegration.Ed itors.ISqlVirtualProject.CreateDesigner(Urn
> origUrn, DocumentType editorType, DocumentOptions aeOptions,
> IManagedConnection con)
> at
> Microsoft.SqlServer.Management.UI.VSIntegration.Ed itors.VsDocumentMenuItem.CreateDesignerWindow(IMan agedConnection
> mc, DocumentOptions options)
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> http://gregorybeamer.spaces.live.com
> Co-author: Microsoft Expression Web Bible (upcoming)
> ************************************************
> Think outside the box!
> ************************************************
>
Showing posts with label assume. Show all posts
Showing posts with label assume. Show all posts
Friday, March 9, 2012
Wednesday, March 7, 2012
Introduce Hebrew collation to a shelf application
Here are 2 questions:
1. Can I install MSDE2000 with Hebrew collation (Hebrew_CI_AI) and how exactly it is done
2. Can I assume that a new application which creates it's database on the MSDE2000 take the Hebrew collation by inheritance
Thanks
Moshe
*****************************************
* This message was posted via http://www.sqlmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.sqlmonster.com/Uwe/Abuse...eaa9bc9c4d8d44
*****************************************
1. Yes. You would pass COLLATION="Hebrew_CI_AI" on the MSDE setup command
line. See
http://msdn.microsoft.com/library/de...us/distsql/dis
tsql_84xl.asp for details.
2. It depends on the application. If (a) the app's setup routine creates
its own database by running scripts instead of attaching an already
existing database, and (b) if the scripts don't hard-code a collation in
the CREATE TABLE statements, then yes, the app's database will use the
instance-level collation. But if the app's setup scripts hard-code a
particular collation, the hard-coded collation will be used for the newly
created tables. If the app simply attaches an pre-created database, the
instance-level collation won't apply, either.
Bart
Bart Duncan
Microsoft SQL Server Support
Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: "moshe shenker via SQLMonster.com" <forum@.SQLMonster.com>
| Subject: Introduce Hebrew collation to a shelf application
| Date: Thu, 04 Nov 2004 10:19:00 GMT
| Message-ID: <a56e46f74adc433ca5eaa9bc9c4d8d44@.SQLMonster.com >
| Organization: http://www.SQLMonster.com
| Newsgroups: microsoft.public.sqlserver.msde
| NNTP-Posting-Host: 178.67-18-207.reverse.theplanet.com 67.18.207.178
| Lines: 1
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.msde:17520
| X-Tomcat-NG: microsoft.public.sqlserver.msde
|
| Here are 2 questions:
| 1. Can I install MSDE2000 with Hebrew collation (Hebrew_CI_AI) and how
exactly it is done
| 2. Can I assume that a new application which creates it's database on the
MSDE2000 take the Hebrew collation by inheritance
| Thanks
| Moshe
|
| *****************************************
| * This message was posted via http://www.sqlmonster.com
| *
| * Report spam or abuse by clicking the following URL:
| *
http://www.sqlmonster.com/Uwe/Abuse...5eaa9bc9c4d8d4
4
| *****************************************
|
1. Can I install MSDE2000 with Hebrew collation (Hebrew_CI_AI) and how exactly it is done
2. Can I assume that a new application which creates it's database on the MSDE2000 take the Hebrew collation by inheritance
Thanks
Moshe
*****************************************
* This message was posted via http://www.sqlmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.sqlmonster.com/Uwe/Abuse...eaa9bc9c4d8d44
*****************************************
1. Yes. You would pass COLLATION="Hebrew_CI_AI" on the MSDE setup command
line. See
http://msdn.microsoft.com/library/de...us/distsql/dis
tsql_84xl.asp for details.
2. It depends on the application. If (a) the app's setup routine creates
its own database by running scripts instead of attaching an already
existing database, and (b) if the scripts don't hard-code a collation in
the CREATE TABLE statements, then yes, the app's database will use the
instance-level collation. But if the app's setup scripts hard-code a
particular collation, the hard-coded collation will be used for the newly
created tables. If the app simply attaches an pre-created database, the
instance-level collation won't apply, either.
Bart
Bart Duncan
Microsoft SQL Server Support
Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: "moshe shenker via SQLMonster.com" <forum@.SQLMonster.com>
| Subject: Introduce Hebrew collation to a shelf application
| Date: Thu, 04 Nov 2004 10:19:00 GMT
| Message-ID: <a56e46f74adc433ca5eaa9bc9c4d8d44@.SQLMonster.com >
| Organization: http://www.SQLMonster.com
| Newsgroups: microsoft.public.sqlserver.msde
| NNTP-Posting-Host: 178.67-18-207.reverse.theplanet.com 67.18.207.178
| Lines: 1
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.msde:17520
| X-Tomcat-NG: microsoft.public.sqlserver.msde
|
| Here are 2 questions:
| 1. Can I install MSDE2000 with Hebrew collation (Hebrew_CI_AI) and how
exactly it is done
| 2. Can I assume that a new application which creates it's database on the
MSDE2000 take the Hebrew collation by inheritance
| Thanks
| Moshe
|
| *****************************************
| * This message was posted via http://www.sqlmonster.com
| *
| * Report spam or abuse by clicking the following URL:
| *
http://www.sqlmonster.com/Uwe/Abuse...5eaa9bc9c4d8d4
4
| *****************************************
|
Friday, February 24, 2012
Interview question
I was asked in an interview what was the fastest way to count the rows in a
table?
I assume that: Select count(*) from Tablename - is or is not the fastest way
.
Is there another way that is faster or did I miss something.
thanksYour query would result in a full table scan. You can
also do this:
SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid < 2
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net
"brian" <brian@.discussions.microsoft.com> wrote in message
news:585DEB83-4414-4FD6-BDEA-2CF49C47FAB3@.microsoft.com...
>I was asked in an interview what was the fastest way to count the rows in a
> table?
> I assume that: Select count(*) from Tablename - is or is not the fastest
> way.
> Is there another way that is faster or did I miss something.
> thanks|||The count returned by this method can be used as an approximation but might
not be accurate. The SELECT COUNT(*) method should be used in normal
production code.
Hope this helps.
Dan Guzman
SQL Server MVP
"Robbe Morris [C# MVP]" <info@.eggheadcafe.com> wrote in message
news:e1WlYqQ2FHA.3228@.TK2MSFTNGP15.phx.gbl...
> Your query would result in a full table scan. You can
> also do this:
> SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid <
> 2
>
> --
> Robbe Morris - 2004/2005 Microsoft MVP C#
> http://www.masterado.net
>
>
> "brian" <brian@.discussions.microsoft.com> wrote in message
> news:585DEB83-4414-4FD6-BDEA-2CF49C47FAB3@.microsoft.com...
>|||> Your query would result in a full table scan.
Not necessarily. SELECT COUNT(*) FROM tblname can use (scan) any index on th
e table. Preferably
there is an index on a narrow column, and SQL Server can scan that index (le
ss pages to read).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Robbe Morris [C# MVP]" <info@.eggheadcafe.com> wrote in message
news:e1WlYqQ2FHA.3228@.TK2MSFTNGP15.phx.gbl...
> Your query would result in a full table scan. You can
> also do this:
> SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid <
2
>
> --
> Robbe Morris - 2004/2005 Microsoft MVP C#
> http://www.masterado.net
>
>
> "brian" <brian@.discussions.microsoft.com> wrote in message
> news:585DEB83-4414-4FD6-BDEA-2CF49C47FAB3@.microsoft.com...
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote in message news:uT63vfT2FHA.892@.TK2MSFTNGP12.phx.gbl
> Not necessarily. SELECT COUNT(*) FROM tblname can use (scan) any
> index on the table. Preferably there is an index on a narrow column,
> and SQL Server can scan that index (less pages to read).
Wouldn't a clustered index be the fastest possible, so that the rows are lin
ed
up for a quickie?
I doubt, therefore I might be.|||> Wouldn't a clustered index be the fastest possible, so that the rows are
> lined up for a quickie?
Not sure what you mean by 'lined up' but the issue with the clustered index
is that the clustered index leaf nodes are the data rows. Consequently, the
scan of a 10GB table with 100M rows will require scanning 10GB of data. A
scan of a non-clustered index on an int column of that table will only scan
about 400MB data (plus overhead) in the non-clustered leaf nodes. This is
why the optimizer chooses the narrowest available index for the COUNT(*)
operation.
Hope this helps.
Dan Guzman
SQL Server MVP
"Kim Noer" <kn@.nospam.dk> wrote in message
news:uDKVnIW2FHA.1148@.tk2msftngp13.phx.gbl...
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> wrote in message news:uT63vfT2FHA.892@.TK2MSFTNGP12.phx.gbl
>
> Wouldn't a clustered index be the fastest possible, so that the rows are
> lined up for a quickie?
> --
> I doubt, therefore I might be.|||"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:Ooe7gxW2FHA.2216@.TK2MSFTNGP15.phx.gbl
> in the non-clustered leaf nodes. This is why the optimizer chooses
> the narrowest available index for the COUNT(*) operation.
Thanks for the clarification!
I doubt, therefore I might be.|||"Robbe Morris [C# MVP]" <info@.eggheadcafe.com> wrote in message
news:e1WlYqQ2FHA.3228@.TK2MSFTNGP15.phx.gbl...
> Your query would result in a full table scan. You can
> also do this:
> SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid <
> 2
>
You don't have to do a table scan. A scan of a secondary index will work
too. Moreover the value in sysindexes is not guaranteed to be correct. So
"Select count(*)" is correct, although the "right" answer probably touches
on all these issues.
David|||No, this will not always need to do a full table scan. Since every
nonclustered index has a pointer to every row, a leaf scan of any nc index
will also give an accurate result.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Robbe Morris [C# MVP]" <info@.eggheadcafe.com> wrote in message
news:e1WlYqQ2FHA.3228@.TK2MSFTNGP15.phx.gbl...
> Your query would result in a full table scan. You can
> also do this:
> SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid <
> 2
>
> --
> Robbe Morris - 2004/2005 Microsoft MVP C#
> http://www.masterado.net
>
>
> "brian" <brian@.discussions.microsoft.com> wrote in message
> news:585DEB83-4414-4FD6-BDEA-2CF49C47FAB3@.microsoft.com...
>
>
table?
I assume that: Select count(*) from Tablename - is or is not the fastest way
.
Is there another way that is faster or did I miss something.
thanksYour query would result in a full table scan. You can
also do this:
SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid < 2
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net
"brian" <brian@.discussions.microsoft.com> wrote in message
news:585DEB83-4414-4FD6-BDEA-2CF49C47FAB3@.microsoft.com...
>I was asked in an interview what was the fastest way to count the rows in a
> table?
> I assume that: Select count(*) from Tablename - is or is not the fastest
> way.
> Is there another way that is faster or did I miss something.
> thanks|||The count returned by this method can be used as an approximation but might
not be accurate. The SELECT COUNT(*) method should be used in normal
production code.
Hope this helps.
Dan Guzman
SQL Server MVP
"Robbe Morris [C# MVP]" <info@.eggheadcafe.com> wrote in message
news:e1WlYqQ2FHA.3228@.TK2MSFTNGP15.phx.gbl...
> Your query would result in a full table scan. You can
> also do this:
> SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid <
> 2
>
> --
> Robbe Morris - 2004/2005 Microsoft MVP C#
> http://www.masterado.net
>
>
> "brian" <brian@.discussions.microsoft.com> wrote in message
> news:585DEB83-4414-4FD6-BDEA-2CF49C47FAB3@.microsoft.com...
>|||> Your query would result in a full table scan.
Not necessarily. SELECT COUNT(*) FROM tblname can use (scan) any index on th
e table. Preferably
there is an index on a narrow column, and SQL Server can scan that index (le
ss pages to read).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Robbe Morris [C# MVP]" <info@.eggheadcafe.com> wrote in message
news:e1WlYqQ2FHA.3228@.TK2MSFTNGP15.phx.gbl...
> Your query would result in a full table scan. You can
> also do this:
> SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid <
2
>
> --
> Robbe Morris - 2004/2005 Microsoft MVP C#
> http://www.masterado.net
>
>
> "brian" <brian@.discussions.microsoft.com> wrote in message
> news:585DEB83-4414-4FD6-BDEA-2CF49C47FAB3@.microsoft.com...
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote in message news:uT63vfT2FHA.892@.TK2MSFTNGP12.phx.gbl
> Not necessarily. SELECT COUNT(*) FROM tblname can use (scan) any
> index on the table. Preferably there is an index on a narrow column,
> and SQL Server can scan that index (less pages to read).
Wouldn't a clustered index be the fastest possible, so that the rows are lin
ed
up for a quickie?
I doubt, therefore I might be.|||> Wouldn't a clustered index be the fastest possible, so that the rows are
> lined up for a quickie?
Not sure what you mean by 'lined up' but the issue with the clustered index
is that the clustered index leaf nodes are the data rows. Consequently, the
scan of a 10GB table with 100M rows will require scanning 10GB of data. A
scan of a non-clustered index on an int column of that table will only scan
about 400MB data (plus overhead) in the non-clustered leaf nodes. This is
why the optimizer chooses the narrowest available index for the COUNT(*)
operation.
Hope this helps.
Dan Guzman
SQL Server MVP
"Kim Noer" <kn@.nospam.dk> wrote in message
news:uDKVnIW2FHA.1148@.tk2msftngp13.phx.gbl...
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> wrote in message news:uT63vfT2FHA.892@.TK2MSFTNGP12.phx.gbl
>
> Wouldn't a clustered index be the fastest possible, so that the rows are
> lined up for a quickie?
> --
> I doubt, therefore I might be.|||"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:Ooe7gxW2FHA.2216@.TK2MSFTNGP15.phx.gbl
> in the non-clustered leaf nodes. This is why the optimizer chooses
> the narrowest available index for the COUNT(*) operation.
Thanks for the clarification!
I doubt, therefore I might be.|||"Robbe Morris [C# MVP]" <info@.eggheadcafe.com> wrote in message
news:e1WlYqQ2FHA.3228@.TK2MSFTNGP15.phx.gbl...
> Your query would result in a full table scan. You can
> also do this:
> SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid <
> 2
>
You don't have to do a table scan. A scan of a secondary index will work
too. Moreover the value in sysindexes is not guaranteed to be correct. So
"Select count(*)" is correct, although the "right" answer probably touches
on all these issues.
David|||No, this will not always need to do a full table scan. Since every
nonclustered index has a pointer to every row, a leaf scan of any nc index
will also give an accurate result.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Robbe Morris [C# MVP]" <info@.eggheadcafe.com> wrote in message
news:e1WlYqQ2FHA.3228@.TK2MSFTNGP15.phx.gbl...
> Your query would result in a full table scan. You can
> also do this:
> SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid <
> 2
>
> --
> Robbe Morris - 2004/2005 Microsoft MVP C#
> http://www.masterado.net
>
>
> "brian" <brian@.discussions.microsoft.com> wrote in message
> news:585DEB83-4414-4FD6-BDEA-2CF49C47FAB3@.microsoft.com...
>
>
Subscribe to:
Posts (Atom)