Showing posts with label management. Show all posts
Showing posts with label management. Show all posts

Friday, March 30, 2012

No Management Studio in 2005 Enterprise Edition

I have installed SQL Server 2005 Enterprise Edition Evaluation on my

machine and Management Studio or Enterprise Manager is not present. Do

i need to perform extra task or did i do sth wrong when installing this.

Thanks for your attention.

It's more likely that you did not install the client components
When you setup program, at one stage wou have choice to check the components you want to install
Client components are grouped under the name orf workstation or something similar (Sorry I don't remeber the exact name))

sql

No Items in EM

I have a SQL 2000 Server that is still functioning however within
Enterprise Manager there are "no items" listed under databases. Nothing
in management or replication either.
Hi
This is databases not being listed and not servers? If it is actually the
latter this may be occuring
http://support.microsoft.com/default.aspx?scid=kb;en-us;323280. If it is
databases have you checked what EM from a different machine is reporting?
Have you tried re-registering the server again?
John
"J1C" wrote:

> I have a SQL 2000 Server that is still functioning however within
> Enterprise Manager there are "no items" listed under databases. Nothing
> in management or replication either.
>
|||If you right-click on the databases folder and click "New Database", do
you get an arithmetic overflow error?
|||I am having this same problem, and yes i do get the arithmetic overflow
error. Any ideas?
Thanks in advance.
"JG" wrote:

> If you right-click on the databases folder and click "New Database", do
> you get an arithmetic overflow error?
>

No Items in EM

I have a SQL 2000 Server that is still functioning however within
Enterprise Manager there are "no items" listed under databases. Nothing
in management or replication either.Hi
This is databases not being listed and not servers? If it is actually the
latter this may be occuring
http://support.microsoft.com/defaul...b;en-us;323280. If it is
databases have you checked what EM from a different machine is reporting?
Have you tried re-registering the server again?
John
"J1C" wrote:

> I have a SQL 2000 Server that is still functioning however within
> Enterprise Manager there are "no items" listed under databases. Nothing
> in management or replication either.
>|||If you right-click on the databases folder and click "New Database", do
you get an arithmetic overflow error?|||I am having this same problem, and yes i do get the arithmetic overflow
error. Any ideas?
Thanks in advance.
"JG" wrote:

> If you right-click on the databases folder and click "New Database", do
> you get an arithmetic overflow error?
>

No item under Computer Management

Strange issue... I have a 2-node SQL Server 2000 Cluster with SP4
applied. Everything works fine but the Veritas BackupExec program can't
find the SQL Server. When I use Computer Management to connect to the
cluster by the cluster name (and also to the active node of the
cluster), I only found "no items" under Service and Applications -
Microsoft SQL Servers. Guess that is for the same reason that Veritas
can't see SQL Server.
Anyone has any idea what this is? Thanks a bunch!
You have to connect to the virtual SQL Server name, not the cluster name. I
prefer backing up directly to a disk share and then backing up those files
to tape for longer term archive. Veritas does not implement the full
restore functionality of SQL Server.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"maoji" <mr.maoji@.gmail.com> wrote in message
news:1136980331.777473.245220@.o13g2000cwo.googlegr oups.com...
> Strange issue... I have a 2-node SQL Server 2000 Cluster with SP4
> applied. Everything works fine but the Veritas BackupExec program can't
> find the SQL Server. When I use Computer Management to connect to the
> cluster by the cluster name (and also to the active node of the
> cluster), I only found "no items" under Service and Applications -
> Microsoft SQL Servers. Guess that is for the same reason that Veritas
> can't see SQL Server.
> Anyone has any idea what this is? Thanks a bunch!
>
|||Thanks Geoff. Maybe I didn't make myself clear. I am connecting to the
SQL Server Cluster name instead of the Windows cluster name.
I've been using Veritas to backup our databases and I found it works ok
with me. Anyway, being not able to see the SQL resource in Computer
Management is weird, isn't it? There could be other problems in the
future. I just want to make sure this key database application works
all fine along the way.
Geoff N. Hiten wrote:[vbcol=seagreen]
> You have to connect to the virtual SQL Server name, not the cluster name. I
> prefer backing up directly to a disk share and then backing up those files
> to tape for longer term archive. Veritas does not implement the full
> restore functionality of SQL Server.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "maoji" <mr.maoji@.gmail.com> wrote in message
> news:1136980331.777473.245220@.o13g2000cwo.googlegr oups.com...
|||I just tried on two of our SQL Clusters and I connected to the controlling
node just fine. I was able to see Services and Applications just fine. Great
question, since I have not tried doing this before. I wonder if you don't
have a Group Policy Object blocking you or a firewall?
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering Website
http://msmvps.com/clustering - Blog
http://www.clusterhelp.com - Cluster Training
"maoji" <mr.maoji@.gmail.com> wrote in message
news:1136991184.533925.133310@.z14g2000cwz.googlegr oups.com...
> Thanks Geoff. Maybe I didn't make myself clear. I am connecting to the
> SQL Server Cluster name instead of the Windows cluster name.
> I've been using Veritas to backup our databases and I found it works ok
> with me. Anyway, being not able to see the SQL resource in Computer
> Management is weird, isn't it? There could be other problems in the
> future. I just want to make sure this key database application works
> all fine along the way.
>
> Geoff N. Hiten wrote:
>
|||Thanks everyone. It turns out to be all my fault.
After the successful setup of the SQL Cluster, I tried to rename the
SQL Cluster to another name in order to invisiblly replace another SQL
Server in our network. During that process I changed one of the
registry entries to use the new name, besides changing the SQL cluster
name in Cluster Administration console. And later on I found it was not
so easy as I thought and I changed the SQL server cluster name back in
the CA console, but forgot to change the registry back.
After changing the registry entry back everything is OK.
Thanks everyone! My bad, my bad. Have a good day!
Rodney R. Fournier [MVP] wrote:[vbcol=seagreen]
> I just tried on two of our SQL Clusters and I connected to the controlling
> node just fine. I was able to see Services and Applications just fine. Great
> question, since I have not tried doing this before. I wonder if you don't
> have a Group Policy Object blocking you or a firewall?
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering Website
> http://msmvps.com/clustering - Blog
> http://www.clusterhelp.com - Cluster Training
> "maoji" <mr.maoji@.gmail.com> wrote in message
> news:1136991184.533925.133310@.z14g2000cwz.googlegr oups.com...
sql

Wednesday, March 28, 2012

No icon or utilities...

Does anyone know why, after an upgrade from SQL 2000 to 2K5, there would not be an icon or a path to get to Management Studio? I can register the server from other locations and the services are running on that box, but there are no options on the box itself to get to Management Studio.(i.e. Start...Programs...SQL Server 2005...Management Studio) Please advise.

Most likely, the client tools were not installed. I don't think that they are installed in a default installation on a Server OS.

Put in your installation media, and select client tools.

No Failover and client crashes ODBC DSN Setting for Failover in connection String

We have set up Mirroring with a witness server and everything works fine when we failover from the SQL Management console.

However, if we failover when our Maccola client is connected, the client blows up - clearly because it can no longer connect to the database.

The ODBC DSN used by the Maccola client shows a checkbox for the 'select a failover server' but the checkbox is grayed out.

Also the summary of settings for the DSN at the end of the wizard reveals that the failover to server (y/N) option is set to N.

The default setting for this DSN is 'populate the remaining values by querying the server' but it doesn't appear to be getting the settings for failover from the server or any other interactive DSN settings either. The server is clearly set for mirroring.

Another suspicious item is that the DSN cannot connect to the server with SA permissions, even though the server is set to mixed security and we use the correct authentication.

Is it possible that the client MACHINE is not authenticating with the domain or sql server properly. We are logged into the client with the domain account that is the SQL admin account on the sql server box.

We should be able to interact with the sql server settings through the ODBC DSN on the client shoulnd't we?

Are we missing a service pack on the client?

Thanks,

Kimball

Have you referred to Maccola vendor in this case about the compatibility, I would guess this is to with that drivers.

No Failover and client crashes ODBC DSN Setting for Failover in connection String

We have set up Mirroring with a witness server and everything works fine when we failover from the SQL Management console.

However, if we failover when our Maccola client is connected, the client blows up - clearly because it can no longer connect to the database.

The ODBC DSN used by the Maccola client shows a checkbox for the 'select a failover server' but the checkbox is grayed out.

Also the summary of settings for the DSN at the end of the wizard reveals that the failover to server (y/N) option is set to N.

The default setting for this DSN is 'populate the remaining values by querying the server' but it doesn't appear to be getting the settings for failover from the server or any other interactive DSN settings either. The server is clearly set for mirroring.

Another suspicious item is that the DSN cannot connect to the server with SA permissions, even though the server is set to mixed security and we use the correct authentication.

Is it possible that the client MACHINE is not authenticating with the domain or sql server properly. We are logged into the client with the domain account that is the SQL admin account on the sql server box.

We should be able to interact with the sql server settings through the ODBC DSN on the client shoulnd't we?

Are we missing a service pack on the client?

Thanks,

Kimball

Have you referred to Maccola vendor in this case about the compatibility, I would guess this is to with that drivers.

Wednesday, March 21, 2012

No ability to create maintanance plan in sql server 2005

Hello,
i try to create a new maintenance plan in the sql management studio.
i tried it with windows xp (x86, german), 2003 enterprise / standard (both
x64 and english), sql server developer x86/x64 (english and german),
enterprise x64 (english).
to create it i use the wizard, every time and constellation ends with the
same error:
steps:
1) select windows authentication (same with sa in sql authentication)
2) check database integrity (or any other job)
3) select database master (or any other)
4) not scheduled (no other effect if scheduled)
5) no reporting (no other effect if reported)
6) Finish
Error:
Maintenance Plan Wizard Progress
- Creating maintenance plan "MaintenancePlan" (Error)
Messages
* Create maintenance plan failed.
--
ADDITIONAL INFORMATION:
Create failed for JobStep 'Subplan'.
(Microsoft.SqlServer.MaintenancePlanTasks)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+JobStep&LinkId=20476
--
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
--
The specified '@.subsystem' is invalid (valid values are returned by
sp_enum_sqlagent_subsystems). (Microsoft SQL Server, Error: 14234)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=14234&LinkId=20476
- Adding tasks to the maintenance plan (Stopped)
- Adding scheduling options (Stopped)
- Adding reporting options (Stopped)
- Saving maintenance plan "MaintenancePlan" (Stopped)
Has anyone any idea about thies?I'm not sure but perhaps you get this error if you didn't install Integration Services...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sorcerer" <Sorcerer@.discussions.microsoft.com> wrote in message
news:D2C35CAD-1CE9-4F7F-9FB0-DDB6BABD670E@.microsoft.com...
> Hello,
> i try to create a new maintenance plan in the sql management studio.
> i tried it with windows xp (x86, german), 2003 enterprise / standard (both
> x64 and english), sql server developer x86/x64 (english and german),
> enterprise x64 (english).
> to create it i use the wizard, every time and constellation ends with the
> same error:
> steps:
> 1) select windows authentication (same with sa in sql authentication)
> 2) check database integrity (or any other job)
> 3) select database master (or any other)
> 4) not scheduled (no other effect if scheduled)
> 5) no reporting (no other effect if reported)
> 6) Finish
> Error:
> Maintenance Plan Wizard Progress
> - Creating maintenance plan "MaintenancePlan" (Error)
> Messages
> * Create maintenance plan failed.
> --
> ADDITIONAL INFORMATION:
> Create failed for JobStep 'Subplan'.
> (Microsoft.SqlServer.MaintenancePlanTasks)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+JobStep&LinkId=20476
> --
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> The specified '@.subsystem' is invalid (valid values are returned by
> sp_enum_sqlagent_subsystems). (Microsoft SQL Server, Error: 14234)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=14234&LinkId=20476
> - Adding tasks to the maintenance plan (Stopped)
> - Adding scheduling options (Stopped)
> - Adding reporting options (Stopped)
> - Saving maintenance plan "MaintenancePlan" (Stopped)
> Has anyone any idea about thies?
>|||thank you, this seems to be the solution!
"Tibor Karaszi" schrieb:
> I'm not sure but perhaps you get this error if you didn't install Integration Services...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sorcerer" <Sorcerer@.discussions.microsoft.com> wrote in message
> news:D2C35CAD-1CE9-4F7F-9FB0-DDB6BABD670E@.microsoft.com...
> > Hello,
> >
> > i try to create a new maintenance plan in the sql management studio.
> > i tried it with windows xp (x86, german), 2003 enterprise / standard (both
> > x64 and english), sql server developer x86/x64 (english and german),
> > enterprise x64 (english).
> > to create it i use the wizard, every time and constellation ends with the
> > same error:
> >
> > steps:
> > 1) select windows authentication (same with sa in sql authentication)
> > 2) check database integrity (or any other job)
> > 3) select database master (or any other)
> > 4) not scheduled (no other effect if scheduled)
> > 5) no reporting (no other effect if reported)
> > 6) Finish
> >
> > Error:
> > Maintenance Plan Wizard Progress
> > - Creating maintenance plan "MaintenancePlan" (Error)
> > Messages
> > * Create maintenance plan failed.
> > --
> > ADDITIONAL INFORMATION:
> > Create failed for JobStep 'Subplan'.
> > (Microsoft.SqlServer.MaintenancePlanTasks)
> > For help, click:
> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+JobStep&LinkId=20476
> > --
> > An exception occurred while executing a Transact-SQL statement or batch.
> > (Microsoft.SqlServer.ConnectionInfo)
> > --
> > The specified '@.subsystem' is invalid (valid values are returned by
> > sp_enum_sqlagent_subsystems). (Microsoft SQL Server, Error: 14234)
> > For help, click:
> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=14234&LinkId=20476
> > - Adding tasks to the maintenance plan (Stopped)
> > - Adding scheduling options (Stopped)
> > - Adding reporting options (Stopped)
> > - Saving maintenance plan "MaintenancePlan" (Stopped)
> >
> > Has anyone any idea about thies?
> >
>
>sql

Tuesday, March 20, 2012

No ability to create maintanance plan in sql server 2005

Hello,
i try to create a new maintenance plan in the sql management studio.
i tried it with Windows XP (x86, german), 2003 enterprise / standard (both
x64 and english), sql server developer x86/x64 (english and german),
enterprise x64 (english).
to create it i use the wizard, every time and constellation ends with the
same error:
steps:
1) select windows authentication (same with sa in sql authentication)
2) check database integrity (or any other job)
3) select database master (or any other)
4) not scheduled (no other effect if scheduled)
5) no reporting (no other effect if reported)
6) Finish
Error:
Maintenance Plan Wizard Progress
- Creating maintenance plan "MaintenancePlan" (Error)
Messages
* Create maintenance plan failed.
--
ADDITIONAL INFORMATION:
Create failed for JobStep 'Subplan'.
(Microsoft.SqlServer.MaintenancePlanTasks)
For help, click:
http://go.microsoft.com/fwlink?Prod...ep&LinkId=20476
--
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
--
The specified '@.subsystem' is invalid (valid values are returned by
sp_enum_sqlagent_subsystems). (Microsoft SQL Server, Error: 14234)
For help, click:
http://go.microsoft.com/fwlink?Prod...34&LinkId=20476
- Adding tasks to the maintenance plan (Stopped)
- Adding scheduling options (Stopped)
- Adding reporting options (Stopped)
- Saving maintenance plan "MaintenancePlan" (Stopped)
Has anyone any idea about thies?I'm not sure but perhaps you get this error if you didn't install Integratio
n Services...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sorcerer" <Sorcerer@.discussions.microsoft.com> wrote in message
news:D2C35CAD-1CE9-4F7F-9FB0-DDB6BABD670E@.microsoft.com...
> Hello,
> i try to create a new maintenance plan in the sql management studio.
> i tried it with Windows XP (x86, german), 2003 enterprise / standard (both
> x64 and english), sql server developer x86/x64 (english and german),
> enterprise x64 (english).
> to create it i use the wizard, every time and constellation ends with the
> same error:
> steps:
> 1) select windows authentication (same with sa in sql authentication)
> 2) check database integrity (or any other job)
> 3) select database master (or any other)
> 4) not scheduled (no other effect if scheduled)
> 5) no reporting (no other effect if reported)
> 6) Finish
> Error:
> Maintenance Plan Wizard Progress
> - Creating maintenance plan "MaintenancePlan" (Error)
> Messages
> * Create maintenance plan failed.
> --
> ADDITIONAL INFORMATION:
> Create failed for JobStep 'Subplan'.
> (Microsoft.SqlServer.MaintenancePlanTasks)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...ep&LinkId=20476
> --
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> The specified '@.subsystem' is invalid (valid values are returned by
> sp_enum_sqlagent_subsystems). (Microsoft SQL Server, Error: 14234)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...34&LinkId=20476
> - Adding tasks to the maintenance plan (Stopped)
> - Adding scheduling options (Stopped)
> - Adding reporting options (Stopped)
> - Saving maintenance plan "MaintenancePlan" (Stopped)
> Has anyone any idea about thies?
>|||thank you, this seems to be the solution!
"Tibor Karaszi" schrieb:

> I'm not sure but perhaps you get this error if you didn't install Integrat
ion Services...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sorcerer" <Sorcerer@.discussions.microsoft.com> wrote in message
> news:D2C35CAD-1CE9-4F7F-9FB0-DDB6BABD670E@.microsoft.com...
>
>

Friday, March 9, 2012

NEWSEQUENTIALID()

I'm trying to modify my default value for GUIDs in DB, currently using newid() for default.

In management studio, click on modify and in the table designer for the default value I entered newsequentialid() and got the following error.

Error validating the default for column "xxxx".

I would like to have my tables that are using guids, have newsequentialid as the default value. When read on this new function it says can only be used with default value, but can't get that to work. Any ideas?

thanks

This is a bug in Management Studio. There are two workarounds

1. Create the table by hand in T-SQL.

2. Use newid, then generate a script, and replace the newid with newsequential.

You can file a bug at http://lab.msdn.microsoft.com/productfeedback/

|||I can set the default value OK in management studio if it is a brand new table. I'm trying to upgrade my tables in my DB to have the default to be newsequentialId(). Is there a problem if there is already data in the tables with now changing from newid() to newsequentialid()|||

Why on earth is this not fixed yet AND there doesn't seem to be any official Microsoft posting or commment regarding this?

Seriously annoying bug.

|||

If we cannot answer a question in the forums in the first month, it generally gets ignored and we do not go back and try to answer it later. Whenever there is a problem with our product, I strongly recommend filing a bug or a suggestion in Microsoft Connect.

SQL Server's portal on Microsoft Connect: http://connect.microsoft.com/SQLServer/

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

NEWSEQUENTIALID()

I'm trying to modify my default value for GUIDs in DB, currently using newid() for default.

In management studio, click on modify and in the table designer for the default value I entered newsequentialid() and got the following error.

Error validating the default for column "xxxx".

I would like to have my tables that are using guids, have newsequentialid as the default value. When read on this new function it says can only be used with default value, but can't get that to work. Any ideas?

thanks

This is a bug in Management Studio. There are two workarounds

1. Create the table by hand in T-SQL.

2. Use newid, then generate a script, and replace the newid with newsequential.

You can file a bug at http://lab.msdn.microsoft.com/productfeedback/

|||I can set the default value OK in management studio if it is a brand new table. I'm trying to upgrade my tables in my DB to have the default to be newsequentialId(). Is there a problem if there is already data in the tables with now changing from newid() to newsequentialid()|||

Why on earth is this not fixed yet AND there doesn't seem to be any official Microsoft posting or commment regarding this?

Seriously annoying bug.

|||

If we cannot answer a question in the forums in the first month, it generally gets ignored and we do not go back and try to answer it later. Whenever there is a problem with our product, I strongly recommend filing a bug or a suggestion in Microsoft Connect.

SQL Server's portal on Microsoft Connect: http://connect.microsoft.com/SQLServer/

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

NEWSEQUENTIALID()

I'm trying to modify my default value for GUIDs in DB, currently using newid() for default.

In management studio, click on modify and in the table designer for the default value I entered newsequentialid() and got the following error.

Error validating the default for column "xxxx".

I would like to have my tables that are using guids, have newsequentialid as the default value. When read on this new function it says can only be used with default value, but can't get that to work. Any ideas?

thanks

This is a bug in Management Studio. There are two workarounds

1. Create the table by hand in T-SQL.

2. Use newid, then generate a script, and replace the newid with newsequential.

You can file a bug at http://lab.msdn.microsoft.com/productfeedback/

|||I can set the default value OK in management studio if it is a brand new table. I'm trying to upgrade my tables in my DB to have the default to be newsequentialId(). Is there a problem if there is already data in the tables with now changing from newid() to newsequentialid()|||

Why on earth is this not fixed yet AND there doesn't seem to be any official Microsoft posting or commment regarding this?

Seriously annoying bug.

|||

If we cannot answer a question in the forums in the first month, it generally gets ignored and we do not go back and try to answer it later. Whenever there is a problem with our product, I strongly recommend filing a bug or a suggestion in Microsoft Connect.

SQL Server's portal on Microsoft Connect: http://connect.microsoft.com/SQLServer/

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

NEWSEQUENTIALID sample code

We're currently converting the database of our asset management system to a SQL2005-database. The SQL2000 database uses an INT32 as the primary key with a clustered index on that column on most tables. Needless to say that the current environment is not ideal for replication, so we're investigating the use of GUIDs as primary keys.

We know the usual recommendations as far as GUIDs are concerned (4 times bigger, slower, not good for clustered indexes, yet better for replication). However, on one of the ascend-program training days one of my colleagues talked to one of the instructors and that person suggested that the use and performance of GUIDs is significantely improved in SQL2005 and that they have become the preferred datatype for primary keys if the database is used in replication.

I have tried to find some information about how GUIDs are improved in SQL2005 but I don't find any documents containing anything relevant. The only thing I've found is the documentation of the NEWSEQUENTIALID function which doesn't really tell me much. It just looks like this function improves the performance during an insert if a GUID is used on a clustered index. I have noticed for example that SharePoint only uses GUIDs for most tables; so the performance should be all that bad.

So I was wondering:

1. has the performance of GUIDs improved?

2. are there new suggestions concerning the datatype of the primary key column if the database might be used in a merge replication environment (all sites can do modifications) on SQL2005?

3. what about the performance of NEWSEQUENTIALID? Is there a bigger chance of running into duplicates using NEWSEQUENTIALID?

Regards,

Michael

NEWSEQUENTIALID is derived based on several hashes, one of which is the network card. Since no two network cards are identical, duplicates should not occur. However should you remove your network card, there's a slight chance you can get the same value as another machine whose network card has been removed, but this is highly unlikely.

Since NEWSEQUENTIALID values are incrementing as they're created, clustered index performance should improve as they'll be inserted ascending and in sort order. You also have less page splits, thus less fragmentation.

So, is NEWSEQUENTIALID a good candidate for a primary key? NEWSEQUENTIALID can only be used as a default constraint. that means if this is your primary key, and you have to update it, you can only use NEWID as the new value. Or, you can do delete/insert. If you do a lot of updates to your primary key, you'll be doing a lot of page splits introducing fragmentation.

|||How does the program get the NEWSEQUENTIALID value? In other words, the code has:
sqlCmd = "insert ..."
ExecuteNonQuery
If you have foreign key references, you'll need to retrieve your NEWSEQUENTIALID value and pass it as the foreign key value into the child table(s).|||Just use the OUTPUT clause of the INSERT statement.|||

For a parent child relationship, you can do this:

CREATE TABLE Employee(
EmployeeID uniqueidentifier NOT NULL DEFAULT NEWSEQUENTIALID(),
EmployeeName nchar(10) NOT NULL
)

insert Employee (EmployeeName)
output Inserted.EmployeeID
values ('Ima Person')

The OUTPUT clause essentially works like a SELECT statement. You can retrieve multiple values with an OUTPUT clause.

Alternatively, you may wish to use this syntax for CREATE TABLE:

CREATE TABLE Employee(
EmployeeID uniqueidentifier NOT NULL DEFAULT NEWSEQUENTIALID() ROWGUIDCOL,
EmployeeName nchar(10) NOT NULL
)