Tuesday, March 27, 2012

Can not install - workstation components on Longhorn x86 or x64

Is Katmai supported on Longhorn? I tried both x64 and x86 (development edition) on Longhorn x64 and x86 versions respectively. The workstation components get errors and rolled back. Any fix?

I want to try Lognhorn, Katmai, Orcas, Biztalk R2 (on 32-bit platform first) and then x64. Can someone recommend what stacks are tried/supported ?

(Pingala@.discussions.microsoft.com) writes: > Is Katmai supported on Longhorn? I tried both x64 and x86 (development > edition) on Longhorn x64 and x86 versions respectively. The workstation > components get errors and rolled back. Any fix? The Readme says that Katmai runs on Win2003 SP1 x86/x64 and WinXP SP2 x86/x64. It's silent on Vista, Longhorn and Windows 2000. But I can answer the latter: it does not run on Win2000. I've tried. I guess that if you want to run Katmai on Longhorn, that you will have to wait for a later CTP. -- 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|||

Actually, I postponed x64 tests.

On x86 Longhorn (w2k8), I was successful with Katmai when I installed a) .NET Framework 3.5 and b) windows update.

I also installed Orcas CTP and BizTalk 2006 R2 CTP. However, I did not see the Biztalk projects in VS. I am wondering why. I have to check with Biztalk forum.

|||

Has anyone been able to get reporting services for Katmai running on Longhorn?

Thanks,

Can not INSERT to the second table

Hi, everyone, I write a SP and the first table can be inserted succesfully, but the second fails.
However there are not any error message to occur, just passes it. Anyone can give me a tip?
I am a begineer of SQL.

CREATE PROCEDURE sp_FinalizePurchase
@.Inv_shipAddress as varchar(50),
@.Inv_shipCity as VarChar(50),
@.Inv_shipProvince as VarChar(20),
@.Inv_shipPostalCode as Char(6),
@.Inv_shipPhone as VarChar(10),
@.INV_billAddress as VarChar(50),
@.INV_billCity as VarChar(50),
@.INV_billProvince as VarChar(20),
@.INV_billPostalCode as Char(6),
@.INV_billPhone as Char(10),
@.CUS_customerID as Int,
@.Inv_invoiceID as Int Output

AS
-- STEP 1
--Do the Insert

INSERT tblInvoice
(Inv_date,
Inv_shipAddress,
Inv_shipCity,
Inv_shipProvince,
Inv_shipPostalCode,
Inv_shipPhone,
INV_billAddress,
INV_billCity,
INV_billProvince,
INV_billPostalCode,
INV_billPhone,
INV_status,
CUS_customerID
)
VALUES
(getdate(),
@.Inv_shipAddress,
@.Inv_shipCity,
@.Inv_shipProvince,
@.Inv_shipPostalCode,
@.Inv_shipPhone,
@.INV_billAddress,
@.INV_billCity,
@.INV_billProvince,
@.INV_billPostalCode,
@.INV_billPhone,
1,
@.CUS_customerid)

--FIND OUT WHAT THEIR NEW ID IS
SELECT @.Inv_invoiceid = @.@.identity

-- STEP 2:
--Do the Insert
INSERT Into tblInvoiceLine
(INV_invoiceID,
PRD_productID,
ILN_description,
ILN_quantity,
ILN_unitprice
)
SELECT DISTINCT
@.Inv_invoiceid,
tblBasket.productID,
tblMovie.mov_description,
tblBasket.quantity,
tblProduct.PRD_Price
FROM tblBasket, tblProduct, tblMovie
WHERE tblBasket.productID=tblProduct.PRD_ProductID

I suspect it's this:

SELECT DISTINCT
@.Inv_invoiceid,
tblBasket.productID,
tblMovie.mov_description,
tblBasket.quantity,
tblProduct.PRD_Price
FROM tblBasket, tblProduct, tblMovie
WHERE tblBasket.productID=tblProduct.PRD_ProductID

You're not giving it any join criteria.|||Thank your hints, I have added another join criteria as follows but it still does not work correctly,just skips it.

SELECT DISTINCT
@.Inv_invoiceid,
tblBasket.productID,
tblMovie.mov_description,
tblBasket.quantity,
tblProduct.PRD_Price
FROM tblBasket, tblProduct, tblMovie
WHERE tblBasket.productID=tblProduct.PRD_ProductID
AND tblProduct.MOV_movieID=tblMovie.MOV_MovieID

Any suggestions I can get from your guys?|||remove the@. sign at the second line.

hth|||Does the Select query work in Query Analyzer? If the select query works, then add the insert to the beginning of it and see if that works. If that doesn't, it's either because the select query returns no records, there is a syntax error, or some constraint has been violated. QA will give you a hint in any of those cases. Try that.

Also, a more standard syntax for joins is:


SELECT DISTINCT
@.Inv_invoiceid,
tblBasket.productID,
tblMovie.mov_description,
tblBasket.quantity,
tblProduct.PRD_Price
FROM tblBasket b
join tblProduct p
on b.productID = p.PRD_ProductID
join tblMovie m
on p.MOV_movieID = m.MOV_MovieID
|||First, I would like to say I have solved the problem. Thank your guys's hints.
Second, I want to share my experience with your guys.

To upstairs 2 friends:

ndinakar says should "remove the @. sign at the second line.", I have to say this is wrong. Because the parameter @.Inv_invoiceid come from the the first table and it is a variable.

As I have told, the SP runs properly in QA, but it does not insert the data into the table. Paraigh analyse the reasons, "it's either because the select query returns no records, there is a syntax error, or some constraint has been violated." what you said is partly correct. This is really a "syntax error" but QA skips it. I look into it carefully and eventually I find the reason occurs in the tblMovie.mov_description field. In tblmovie, I claim the varchar length 255, but in tblinvoiceline I claim the varchar length is 50. It passes the QA but occurs error in runtime.

I think this is syntax error but QA seems no regard it as an error and skips it. In my opinion, this is a needed improvement aspects in SQL Server.

Can not insert into table that have IDENTITY

Hi All,
I have 2 table. Table one is CREATE TABLE [coba] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[desc] [char] (10) ).
Table two is CREATE TABLE [coba2] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[desc] [char] (10) ).
In table coba i insert data such as :
insert into coba (desc) values ('a')
insert into coba (desc) values ('b')
insert into coba (desc) values ('c')
And if i try to show with select * from coba. It will show
1 a
2 b
3 c
The problem is that i want to transfer all of the record in table coba
into coba2. I used this query "insert into coba2 select * from coba".
It show error like this "An explicit value for the identity column in
table 'coba2' can only be specified when a column list is used and
IDENTITY_INSERT is ON."
So, does anyone know how to insert all records in table coba into
coba2?
Thank you very much for your help.I have tried this out and the following will work:
INSERT INTO coba2
SELECT [desc] from coba|||Name the columns for both the INSERT statement as well as the SELECT:
INSERT INTO tbl (col1, col2)
SELECT col1, col2
FROM ...
And consider whether you want to carry over the same idenity values in the t
arget table as you have
in the source table. If so, read about SET IDENTITY_INSERT.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"afang" <khokimfang@.gmail.com> wrote in message
news:1146643380.200925.54580@.e56g2000cwe.googlegroups.com...
> Hi All,
> I have 2 table. Table one is CREATE TABLE [coba] (
> [id] [int] IDENTITY (1, 1) NOT NULL ,
> [desc] [char] (10) ).
> Table two is CREATE TABLE [coba2] (
> [id] [int] IDENTITY (1, 1) NOT NULL ,
> [desc] [char] (10) ).
> In table coba i insert data such as :
> insert into coba (desc) values ('a')
> insert into coba (desc) values ('b')
> insert into coba (desc) values ('c')
> And if i try to show with select * from coba. It will show
> 1 a
> 2 b
> 3 c
> The problem is that i want to transfer all of the record in table coba
> into coba2. I used this query "insert into coba2 select * from coba".
> It show error like this "An explicit value for the identity column in
> table 'coba2' can only be specified when a column list is used and
> IDENTITY_INSERT is ON."
> So, does anyone know how to insert all records in table coba into
> coba2?
> Thank you very much for your help.
>|||Thanks Tibor for your help. It works.
Rgds,
Afang

Can not insert into table that have IDENTITY

Hi All,
I have 2 table. Table one is CREATE TABLE [coba] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[desc] [char] (10) ).
Table two is CREATE TABLE [coba2] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[desc] [char] (10) ).
In table coba i insert data such as :
insert into coba (desc) values ('a')
insert into coba (desc) values ('b')
insert into coba (desc) values ('c')
And if i try to show with select * from coba. It will show
1 a
2 b
3 c
The problem is that i want to transfer all of the record in table coba
into coba2. I used this query "insert into coba2 select * from coba".
It show error like this "An explicit value for the identity column in
table 'coba2' can only be specified when a column list is used and
IDENTITY_INSERT is ON."
So, does anyone know how to insert all records in table coba into
coba2?
Thank you very much for your help.I have tried this out and the following will work:
INSERT INTO coba2
SELECT [desc] from coba|||Name the columns for both the INSERT statement as well as the SELECT:
INSERT INTO tbl (col1, col2)
SELECT col1, col2
FROM ...
And consider whether you want to carry over the same idenity values in the target table as you have
in the source table. If so, read about SET IDENTITY_INSERT.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"afang" <khokimfang@.gmail.com> wrote in message
news:1146643380.200925.54580@.e56g2000cwe.googlegroups.com...
> Hi All,
> I have 2 table. Table one is CREATE TABLE [coba] (
> [id] [int] IDENTITY (1, 1) NOT NULL ,
> [desc] [char] (10) ).
> Table two is CREATE TABLE [coba2] (
> [id] [int] IDENTITY (1, 1) NOT NULL ,
> [desc] [char] (10) ).
> In table coba i insert data such as :
> insert into coba (desc) values ('a')
> insert into coba (desc) values ('b')
> insert into coba (desc) values ('c')
> And if i try to show with select * from coba. It will show
> 1 a
> 2 b
> 3 c
> The problem is that i want to transfer all of the record in table coba
> into coba2. I used this query "insert into coba2 select * from coba".
> It show error like this "An explicit value for the identity column in
> table 'coba2' can only be specified when a column list is used and
> IDENTITY_INSERT is ON."
> So, does anyone know how to insert all records in table coba into
> coba2?
> Thank you very much for your help.
>|||Thanks Tibor for your help. It works.
Rgds,
Afangsql

Can not insert input field with length gt 128

I got this problem that really puzzled me. I used a stored procedure to
insert records into SQL. When the field of input string contained more than
128 characters, it gave me this message:
The identifier that starts with 'Today is a nice day..........Good bye'
is too long. Maximum length is 128.
But here I am not sending in an identifier name, I am sending in the actual
input which is more than 128 characters long. The input field in the data
base is defined as varchar(1000).
Any ideas?What is the size on the parameter declaration in the stored procedure? I'll
bet you a shiny new nickel it's VARCHAR(128) or CHAR(128).
"pelican" <pelican@.discussions.microsoft.com> wrote in message
news:D4B955D4-C318-4E38-BB9F-77B439561881@.microsoft.com...
>I got this problem that really puzzled me. I used a stored procedure to
> insert records into SQL. When the field of input string contained more
> than
> 128 characters, it gave me this message:
> The identifier that starts with 'Today is a nice day..........Good bye'
> is too long. Maximum length is 128.
> But here I am not sending in an identifier name, I am sending in the
> actual
> input which is more than 128 characters long. The input field in the data
> base is defined as varchar(1000).
> Any ideas?|||> What is the size on the parameter declaration in the stored procedure?
> I'll bet you a shiny new nickel it's VARCHAR(128) or CHAR(128).
Actually, it sounds like the call he is making to the database doesn't
properly encapsulate this string. It seems SQL Server has mistaken the
string for an identifier (otherwise the error would be "string or binary
data would be truncated"). This usually happens when someone uses " instead
of ' for delimiting a string, but there are other possibilities as well.
"pelican", how about showing us the actual code you are using, instead of
vaguely describing it -- then we don't have to guess. I suppose DDL for the
table you are trying to INSERT into wouldn't hurt either (see
http://www.aspfaq.com/5006).|||Good point, probably an embedded ' in the input somewhere that wasn't
properly escaped by the app. Interesting that it would pick 128 as the
cut-off size, however. I would definitely need to see the code for the SP
and the input string.
"AB - MVP" <ten.xoc@.dnartreb.noraa> wrote in message
news:u6KSE6AUFHA.2712@.TK2MSFTNGP09.phx.gbl...
> Actually, it sounds like the call he is making to the database doesn't
> properly encapsulate this string. It seems SQL Server has mistaken the
> string for an identifier (otherwise the error would be "string or binary
> data would be truncated"). This usually happens when someone uses "
> instead of ' for delimiting a string, but there are other possibilities as
> well.
> "pelican", how about showing us the actual code you are using, instead of
> vaguely describing it -- then we don't have to guess. I suppose DDL for
> the table you are trying to INSERT into wouldn't hurt either (see
> http://www.aspfaq.com/5006).
>|||> Good point, probably an embedded ' in the input somewhere that wasn't
> properly escaped by the app. Interesting that it would pick 128 as the
> cut-off size, however.
That is the maximum size for an identifier. I don't think it is an errant
', it just received this string that it thinks is supposed to be a column,
and is saying, WHOA, this column name is bigger than 128, hold on. It could
be 129 or 8000 characters... the same error will get kicked out.|||Thank you all so much! "AB - MVP" is right, once I changed the double quote
(") to single ('), it worked fine! In the stored procedure, the size on the
parameter is varchar(1000). I did not realize that the "" sign will make SQ
L
believe I was passing an identifier instead of the actually content.
You are my life saver...
"AB - MVP" wrote:

> Actually, it sounds like the call he is making to the database doesn't
> properly encapsulate this string. It seems SQL Server has mistaken the
> string for an identifier (otherwise the error would be "string or binary
> data would be truncated"). This usually happens when someone uses " inste
ad
> of ' for delimiting a string, but there are other possibilities as well.
> "pelican", how about showing us the actual code you are using, instead of
> vaguely describing it -- then we don't have to guess. I suppose DDL for th
e
> table you are trying to INSERT into wouldn't hurt either (see
> http://www.aspfaq.com/5006).
>
>|||I read about the identifier length in the help section. It said the same
thing as AB-MVP pointed out, that 128 is the maximum length per row for an
identifier. I just never dreamed that a " will do it.
Thanks a lot!|||Yeah it's called a "quoted identifier" and can be circumvented by using
"parameterized queries".
"pelican" <pelican@.discussions.microsoft.com> wrote in message
news:6F3F8CAB-1EBD-45A6-BF74-4DC272EA1804@.microsoft.com...
> Thank you all so much! "AB - MVP" is right, once I changed the double
> quote
> (") to single ('), it worked fine! In the stored procedure, the size on
> the
> parameter is varchar(1000). I did not realize that the "" sign will make
> SQL
> believe I was passing an identifier instead of the actually content.
> You are my life saver...
> "AB - MVP" wrote:
>|||Yep that's what they get for slapping a SQL statement together with +'s
instead of using parameterized queries.
"AB - MVP" <ten.xoc@.dnartreb.noraa> wrote in message
news:uGWbvCBUFHA.1896@.TK2MSFTNGP14.phx.gbl...
> That is the maximum size for an identifier. I don't think it is an errant
> ', it just received this string that it thinks is supposed to be a column,
> and is saying, WHOA, this column name is bigger than 128, hold on. It
> could be 129 or 8000 characters... the same error will get kicked out.
>

Can not initialize report server or run rsactivate

I get the following error when running the RSActivate utility:
"Unable to find Reporting Services WMI namespace = on <machinename>. Reporting Services may not be installed"
This is an urgent problem so any suggestions would be welcomed.
*****************************************
* This message was posted via http://www.sqlmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.sqlmonster.com/Uwe/Abuse.aspx?aid=d737907db3624cb18a4c69da471c4572
*****************************************Double-check that that WMI Service is started in the Services Manager/MMC.
Edgar,
"Jared Smith via SQLMonster.com" wrote:
> I get the following error when running the RSActivate utility:
> "Unable to find Reporting Services WMI namespace => on <machinename>. Reporting Services may not be installed"
> This is an urgent problem so any suggestions would be welcomed.
> *****************************************
> * This message was posted via http://www.sqlmonster.com
> *
> * Report spam or abuse by clicking the following URL:
> * http://www.sqlmonster.com/Uwe/Abuse.aspx?aid=d737907db3624cb18a4c69da471c4572
> *****************************************
>

Can not get sqlcmd and unable to create peer-to-peer replication.

Hi, Pros,

I am new to SQL server 2005. We have installed SQL server 2005 cluster. I tried to setup peer-to-peer replication with another standard server. Unfortunately, when I creating publication, I got error message : SQL server cound not configure "MyServer" as a Distributor [New publication Wizard] Additional information: An exception occurred whild executing a Transact_SQL statement or batch.

The Server "Myserveris already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the exisitingDistributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to 'master'. [Microsoft SQL Server, Error: 14099]

I tried to use sqlcmd and I got another error message:

C:\>sqlcmd

HResult 0x2, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [2].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi

shing a connection to the server. When connecting to SQL Server 2005, this failu

re may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

Does anyone have any idea how to get the sqlcmd work?

Thank you in advance.

Hi Vicent,

You should use "sqlcmd -S %VirtualInstanceName%" (replace %VirtualInstanceName% with the virtual server name of your cluster.

For the issue of setting up distributor, have you follow the instruction in your error message?

Peng

|||

Hi, Peng,

Thanks for your kind reply. I am so glad your command works. I got another error when I tried to drop distributor from my cluster because when I setup replication the message shows the cluster has been setup as distributor.

I use sqlcmd to drop distributor and get the error message below. Do you have any idea?

C:\>sqlcmd -S myvirtualname
1> sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Thanks for your help.

|||

Hi Vincent,

The first parameter of sp_dropdistributor is not server name. Please see this page (http://msdn2.microsoft.com/en-us/library/ms173516.aspx) for the document. For example, you should say "EXEC sp_dropdistributor" or "EXEC sp_dropdistributor 1".

Peng

|||

Hi, Peng,

I tried the command EXEC, it does not work either.

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\HCLLCLUS>sqlcmd -S myvirtualname
1> EXEC sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Do you know how to fix? Do I need to log on machine instead of virtual name? I wonder how did this distributor setup. Is there any way I can check this?

Thanks,

|||

I need to mention one more thing. I did follow the error message and tried to find Disable Publication and Distributor Wizard. It was not there. It seems the only way left for me is the command line.

Thanks.

|||

It is really my bad. I use the command to drop off distributor.

1> EXEC sp_dropdistributor
2> GO
Msg 21043, Level 16, State 1, Server virtualserver, Procedure sp_dropdistributor,
Line 50
The Distributor is not installed.
1>

It is looks like the ditributor did not installed on the server. However if I tried to configure replication via wizard, the error message shows the distributor was installed.

SQL Server could not configure ‘virtualname’ as a Distributor.

Additional information.

An exception occurred while executing a Transact-SQL statement or batch.

[Microsoft.SqlServer.ConnectionInfo]

The server ‘Virtualname’ is already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the existing Distributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to ‘master’. [Microsoft SQL Server Error: 14099]

|||

Could you run the following command against your cluster instance and report the result back?

SELECT srvname FROM master.dbo.sysservers WHERE srvstatus & 8 <> 0

If you get any row back, it means that your server is already defined as distributor.

Peng

|||

Hi, Peng,

I am glad to tell you. I have resolved this problem. Actually, there was a security problem when I set up replication. I went to Local Security Settings >User Rights Assignment >Lock pages in memory, I put adminstrator user in it and I was able to setup replication. Thanks for your instruction.

I have an another problem. I did not realize that it need SQL Server 2005 Enterprise edition to setup P2P replication. I had bought upraged license. However, I do not know how to upgrade SQL server 2005 standard to Enterprise edition. Does anyone know how? Thank you.

|||Run setup from the command prompt. Here are instructions on how to do this.

http://msdn2.microsoft.com/en-us/library/ms144259.aspx#skuupgrade