Showing posts with label below. Show all posts
Showing posts with label below. Show all posts

Thursday, March 22, 2012

Error Dropping Database using SMO

I use the method shown below to drop a SQL Server database using SMO. On occasion, I'll get the following error message when this method is called. I'm not sure what I can do to prevent an error like this from happening. I don't think I have any control over it. The error message is this:

Drop all active database connections failed for Server 'SDTPLCHost1\SQLServer2005'. : An exception occurred while executing a Transact-SQL statement or batch.: Process ID 57 is not an active process ID.

Here is the method I wrote that uses SMO to drop a database:

public void DropDatabase(string serverName, string databaseName)

{

Server smoServer;

try

{

smoServer = new Server(serverName);

if (!smoServer.Databases.Contains(databaseName))

return;

smoServer.KillAllProcesses(databaseName);

smoServer.KillDatabase(databaseName);

}

catch (Exception ex)

{

throw new Exception(BuildExceptionMessage(ex));

}

}

Use the KILLDatabase method, they changed it to bahave the way you would expect to:

http://www.sqlserver2005.de/SQLServer2005/Default.aspx?tabid=56&EntryID=9


Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

Jens,

I don't understand. You said to use the KillDatabase method. I am using the KillDatabase method! You then include a link to an article which seems to imply that the KillDatabase method doesn't work the way it should and then you supply some sample code to make dropping a database work the way it should.

So, am I correct that in order to drop a database, I should use the code you referenced in the link? It seems I should. I've used this technique before to drop a database (without using SMO) and it's always worked.

Amos.

|||Sorry, forgot to mentioned that they kept track on that issue with the SMO connect bug, reflecting the sources they changed it to:

collection1.Add(string.Format(SmoApplication.DefaultCulture, "ALTER DATABASE {0} SET SINGLE_USER WITH ROLLBACK IMMEDIATE", new object[] { SqlSmoObject.MakeSqlBraket(database) }));

Monday, March 19, 2012

Error Could establish connection to the database

Hi,

I encounter few errors when I try to create a login page using tool in Microsoft Visual Studio 2005, please refer to below :

'--------------------------

I create a Login screen from Toolbox.

When I try to configure the setting for Provider Configuration in the ASP.NET Website Administration Tool using Select a single provider for all site management data or Select a different provider for each feature (advanced) options, the error 'Could not establish a connection to the database' appear.

I have tried to run aspnet_regsql to configure the server and database and return to this tool to configure the Provider configuration but the same error 'Could not establish a connection to the database.' appear.

When I click the Security Configuration link in ASP.NET Configuration, the error as shown below appear :

'There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the below button to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact under the default settings SQL Server does not allow remote connections.(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)'

When I try to choose Data Store in the Security Configuration screen(Figure 4), the same error('Could not establish a connection to the database') appear.

'--------------------

I also have tried to configure the SQL Server Surface Area Configuration but the same error still appear….

Is there any other configuration I need to set before I can create this login page?

Any advices or help is much appreciate.

Thank you.

Regards,

Vicky

Hi Vickie,

Based on the errors, have you verified that you can manually connect to the data source with the connection string information you are using? You can use the information at this link to see if the 'role manager' feature is enabled,http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000013.asp. And, you can use this link to verify that your server will allow remote connections,http://support.microsoft.com/kb/265808/en-us. I hope this helps.

~des

Sunday, March 11, 2012

Error converting data type varchar to float.

Hi,
I am receiving this error when trying to pass a value from ASP to SQL,
below is the SP and a snippet from the update code from the ASP page,
any ideas on how to rectifiy this. I have used a similar syntax in an
add SP and that works fine, the supp_rent_val2 and usr_rent_val2 are the
two values im passing in:
======SP========
CREATE PROCEDURE dbo.cnms_rentals_update
@.RENT_TYPE_SUPP FLOAT= NULL,
@.RENTAL_SUPP VARCHAR(1)=NULL,
@.RENT_TYPE VARCHAR(1)= NULL,
@.RENTAL FLOAT= NULL,
@.START_DATE DATETIME= NULL,
@.END_DATE DATETIME = NULL,
@.ROW_ID INT= NULL
AS
BEGIN
UPDATE RENTAL SET
RENT_TYPE_SUPP = convert(float,@.RENT_TYPE_SUPP),
RENTAL_SUPP = @.RENTAL_SUPP,
RENT_TYPE = @.RENT_TYPE,
RENTAL = convert(float,@.RENTAL),
START_DATE= @.START_DATE,
END_DATE = @.END_DATE
WHERE
row_id = @.ROW_ID
END
GO
==========ASP=========
szSQL="EXEC dbo.cnms_rentals_update"
if request("supp_rent_val2")<> "" then
szSQL = szSQL & ", @.RENT_TYPE_SUPP = " & request("supp_rent_val2")
end if
if request("supp_rent_per2")<> "" then
szSQL = szSQL & ", @.RENTAL_SUPP = '" & request("supp_rent_per2")& "'"
end if
if request("usr_rent_val2")<> "" then
szSQL = szSQL & ", @.RENTAL = " & request("usr_rent_val2")
end if
===================================
Thanks in advance
Peter
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
You didn't include the error. But, beyond that why are you using float?
Not that it might not be appropriate, but as an approximate data type I
would have a hard time recommending its use when it comes to monetary
transactions.
"Peter Rooney" <peter@.whoba.co.uk> wrote in message
news:%23jI%23Cf6KEHA.2556@.TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I am receiving this error when trying to pass a value from ASP to SQL,
> below is the SP and a snippet from the update code from the ASP page,
> any ideas on how to rectifiy this. I have used a similar syntax in an
> add SP and that works fine, the supp_rent_val2 and usr_rent_val2 are the
> two values im passing in:
>
> ======SP========
> CREATE PROCEDURE dbo.cnms_rentals_update
> @.RENT_TYPE_SUPP FLOAT= NULL,
> @.RENTAL_SUPP VARCHAR(1)=NULL,
> @.RENT_TYPE VARCHAR(1)= NULL,
> @.RENTAL FLOAT= NULL,
> @.START_DATE DATETIME= NULL,
> @.END_DATE DATETIME = NULL,
> @.ROW_ID INT= NULL
> AS
> BEGIN
>
> UPDATE RENTAL SET
> RENT_TYPE_SUPP = convert(float,@.RENT_TYPE_SUPP),
> RENTAL_SUPP = @.RENTAL_SUPP,
> RENT_TYPE = @.RENT_TYPE,
> RENTAL = convert(float,@.RENTAL),
> START_DATE= @.START_DATE,
> END_DATE = @.END_DATE
> WHERE
> row_id = @.ROW_ID
> END
> GO
> ==========ASP=========
> szSQL="EXEC dbo.cnms_rentals_update"
> if request("supp_rent_val2")<> "" then
> szSQL = szSQL & ", @.RENT_TYPE_SUPP = " & request("supp_rent_val2")
> end if
> if request("supp_rent_per2")<> "" then
> szSQL = szSQL & ", @.RENTAL_SUPP = '" & request("supp_rent_per2")& "'"
> end if
> if request("usr_rent_val2")<> "" then
> szSQL = szSQL & ", @.RENTAL = " & request("usr_rent_val2")
> end if
> ===================================
>
> Thanks in advance
> Peter
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Error converting data type varchar to float.

Hi,
I am receiving this error when trying to pass a value from ASP to SQL,
below is the SP and a snippet from the update code from the ASP page,
any ideas on how to rectifiy this. I have used a similar syntax in an
add SP and that works fine, the supp_rent_val2 and usr_rent_val2 are the
two values im passing in:
======SP========
CREATE PROCEDURE dbo.cnms_rentals_update
@.RENT_TYPE_SUPP FLOAT= NULL,
@.RENTAL_SUPP VARCHAR(1)=NULL,
@.RENT_TYPE VARCHAR(1)= NULL,
@.RENTAL FLOAT= NULL,
@.START_DATE DATETIME= NULL,
@.END_DATE DATETIME = NULL,
@.ROW_ID INT= NULL
AS
BEGIN
UPDATE RENTAL SET
RENT_TYPE_SUPP = convert(float,@.RENT_TYPE_SUPP),
RENTAL_SUPP = @.RENTAL_SUPP,
RENT_TYPE = @.RENT_TYPE,
RENTAL = convert(float,@.RENTAL),
START_DATE= @.START_DATE,
END_DATE = @.END_DATE
WHERE
row_id = @.ROW_ID
END
GO
==========ASP=========
szSQL="EXEC dbo.cnms_rentals_update"
if request("supp_rent_val2")<> "" then
szSQL = szSQL & ", @.RENT_TYPE_SUPP = " & request("supp_rent_val2")
end if
if request("supp_rent_per2")<> "" then
szSQL = szSQL & ", @.RENTAL_SUPP = '" & request("supp_rent_per2")& "'"
end if
if request("usr_rent_val2")<> "" then
szSQL = szSQL & ", @.RENTAL = " & request("usr_rent_val2")
end if
===================================
Thanks in advance
Peter
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!You didn't include the error. But, beyond that why are you using float?
Not that it might not be appropriate, but as an approximate data type I
would have a hard time recommending its use when it comes to monetary
transactions.
"Peter Rooney" <peter@.whoba.co.uk> wrote in message
news:%23jI%23Cf6KEHA.2556@.TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I am receiving this error when trying to pass a value from ASP to SQL,
> below is the SP and a snippet from the update code from the ASP page,
> any ideas on how to rectifiy this. I have used a similar syntax in an
> add SP and that works fine, the supp_rent_val2 and usr_rent_val2 are the
> two values im passing in:
>
> ======SP========
> CREATE PROCEDURE dbo.cnms_rentals_update
> @.RENT_TYPE_SUPP FLOAT= NULL,
> @.RENTAL_SUPP VARCHAR(1)=NULL,
> @.RENT_TYPE VARCHAR(1)= NULL,
> @.RENTAL FLOAT= NULL,
> @.START_DATE DATETIME= NULL,
> @.END_DATE DATETIME = NULL,
> @.ROW_ID INT= NULL
> AS
> BEGIN
>
> UPDATE RENTAL SET
> RENT_TYPE_SUPP = convert(float,@.RENT_TYPE_SUPP),
> RENTAL_SUPP = @.RENTAL_SUPP,
> RENT_TYPE = @.RENT_TYPE,
> RENTAL = convert(float,@.RENTAL),
> START_DATE= @.START_DATE,
> END_DATE = @.END_DATE
> WHERE
> row_id = @.ROW_ID
> END
> GO
> ==========ASP=========
> szSQL="EXEC dbo.cnms_rentals_update"
> if request("supp_rent_val2")<> "" then
> szSQL = szSQL & ", @.RENT_TYPE_SUPP = " & request("supp_rent_val2")
> end if
> if request("supp_rent_per2")<> "" then
> szSQL = szSQL & ", @.RENTAL_SUPP = '" & request("supp_rent_per2")& "'"
> end if
> if request("usr_rent_val2")<> "" then
> szSQL = szSQL & ", @.RENTAL = " & request("usr_rent_val2")
> end if
> ===================================
>
> Thanks in advance
> Peter
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Error converting data type varchar to float.

Hi,
I am receiving this error when trying to pass a value from ASP to SQL,
below is the SP and a snippet from the update code from the ASP page,
any ideas on how to rectifiy this. I have used a similar syntax in an
add SP and that works fine, the supp_rent_val2 and usr_rent_val2 are the
two values im passing in:
======SP======== CREATE PROCEDURE dbo.cnms_rentals_update
@.RENT_TYPE_SUPP FLOAT= NULL,
@.RENTAL_SUPP VARCHAR(1)=NULL,
@.RENT_TYPE VARCHAR(1)= NULL,
@.RENTAL FLOAT= NULL,
@.START_DATE DATETIME= NULL,
@.END_DATE DATETIME = NULL,
@.ROW_ID INT= NULL
AS
BEGIN
UPDATE RENTAL SET
RENT_TYPE_SUPP = convert(float,@.RENT_TYPE_SUPP),
RENTAL_SUPP = @.RENTAL_SUPP,
RENT_TYPE = @.RENT_TYPE,
RENTAL = convert(float,@.RENTAL),
START_DATE= @.START_DATE,
END_DATE = @.END_DATE
WHERE
row_id = @.ROW_ID
END
GO
==========ASP========= szSQL="EXEC dbo.cnms_rentals_update"
if request("supp_rent_val2")<> "" then
szSQL = szSQL & ", @.RENT_TYPE_SUPP = " & request("supp_rent_val2")
end if
if request("supp_rent_per2")<> "" then
szSQL = szSQL & ", @.RENTAL_SUPP = '" & request("supp_rent_per2")& "'"
end if
if request("usr_rent_val2")<> "" then
szSQL = szSQL & ", @.RENTAL = " & request("usr_rent_val2")
end if
===================================
Thanks in advance
Peter
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!You didn't include the error. But, beyond that why are you using float?
Not that it might not be appropriate, but as an approximate data type I
would have a hard time recommending its use when it comes to monetary
transactions.
"Peter Rooney" <peter@.whoba.co.uk> wrote in message
news:%23jI%23Cf6KEHA.2556@.TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I am receiving this error when trying to pass a value from ASP to SQL,
> below is the SP and a snippet from the update code from the ASP page,
> any ideas on how to rectifiy this. I have used a similar syntax in an
> add SP and that works fine, the supp_rent_val2 and usr_rent_val2 are the
> two values im passing in:
>
> ======SP========> CREATE PROCEDURE dbo.cnms_rentals_update
> @.RENT_TYPE_SUPP FLOAT= NULL,
> @.RENTAL_SUPP VARCHAR(1)=NULL,
> @.RENT_TYPE VARCHAR(1)= NULL,
> @.RENTAL FLOAT= NULL,
> @.START_DATE DATETIME= NULL,
> @.END_DATE DATETIME = NULL,
> @.ROW_ID INT= NULL
> AS
> BEGIN
>
> UPDATE RENTAL SET
> RENT_TYPE_SUPP = convert(float,@.RENT_TYPE_SUPP),
> RENTAL_SUPP = @.RENTAL_SUPP,
> RENT_TYPE = @.RENT_TYPE,
> RENTAL = convert(float,@.RENTAL),
> START_DATE= @.START_DATE,
> END_DATE = @.END_DATE
> WHERE
> row_id = @.ROW_ID
> END
> GO
> ==========ASP=========> szSQL="EXEC dbo.cnms_rentals_update"
> if request("supp_rent_val2")<> "" then
> szSQL = szSQL & ", @.RENT_TYPE_SUPP = " & request("supp_rent_val2")
> end if
> if request("supp_rent_per2")<> "" then
> szSQL = szSQL & ", @.RENTAL_SUPP = '" & request("supp_rent_per2")& "'"
> end if
> if request("usr_rent_val2")<> "" then
> szSQL = szSQL & ", @.RENTAL = " & request("usr_rent_val2")
> end if
> ===================================>
> Thanks in advance
> Peter
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Error converting data type nvarchar to int.

With the stored procedure below if i do
DECLARE @.ProductName nvarchar(40),@.ProductID int
EXEC updateProduct
@.ProductName = ProductName,
@.ProductID = ProductID
why do i get error:- Error converting data type nvarchar to int.
---
ALTER PROCEDURE updateProduct
@.ProductID int,
@.ProductName nvarchar(40),
@.LastUpdate datetime
AS
UPDATE
Products
SET
ProductName = @.ProductName
WHERE
ProductID = @.ProductID AND
LastUpdate = @.LastUpdate
IF @.@.ROWCOUNT > 0
-- This statement is used to update the DataSet if changes are done on the
updated record (identities, timestamps or triggers )
SELECT ProductID, ProductName, QuantityPerUnit, UnitPrice
FROM Products
WHERE ProductID = @.ProductID
GOHi Patrick,
The order in which you pass the parameters looks wrong.
Just try it this way:
EXEC updateProduct
@.ProductID = ProductID,
@.ProductName = ProductName,
@.LastUpdate = LastUpdate
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.examnotes.net/gurus/default.asp?p=4223
---
"Patrick.O.Ige" wrote:

> With the stored procedure below if i do
> DECLARE @.ProductName nvarchar(40),@.ProductID int
> EXEC updateProduct
> @.ProductName = ProductName,
> @.ProductID = ProductID
> why do i get error:- Error converting data type nvarchar to int.
>
> ---
> ALTER PROCEDURE updateProduct
> @.ProductID int,
> @.ProductName nvarchar(40),
> @.LastUpdate datetime
> AS
> UPDATE
> Products
> SET
> ProductName = @.ProductName
> WHERE
> ProductID = @.ProductID AND
> LastUpdate = @.LastUpdate
> IF @.@.ROWCOUNT > 0
> -- This statement is used to update the DataSet if changes are done on t
he
> updated record (identities, timestamps or triggers )
> SELECT ProductID, ProductName, QuantityPerUnit, UnitPrice
> FROM Products
> WHERE ProductID = @.ProductID
> GO|||Thx but if i do :-
DECLARE @.ProductID int,
@.ProductName nvarchar(40),
@.LastUpdate datetime
EXEC updateProduct
@.ProductID = ProductID,
@.ProductName = ProductName,
@.LastUpdate = LastUpdate
It still gives the error...
I want results in the Query Analyzer!
"Chandra" wrote:
> Hi Patrick,
> The order in which you pass the parameters looks wrong.
> Just try it this way:
> EXEC updateProduct
> @.ProductID = ProductID,
> @.ProductName = ProductName,
> @.LastUpdate = LastUpdate
>
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://www.examnotes.net/gurus/default.asp?p=4223
> ---
>
> "Patrick.O.Ige" wrote:
>|||Then try this way
EXEC updateProduct
@.ProductID = CAST(ProductID AS INTEGER),
@.ProductName = ProductName,
@.LastUpdate = LastUpdate
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.examnotes.net/gurus/default.asp?p=4223
---
"Patrick.O.Ige" wrote:
> Thx but if i do :-
> DECLARE @.ProductID int,
> @.ProductName nvarchar(40),
> @.LastUpdate datetime
> EXEC updateProduct
> @.ProductID = ProductID,
> @.ProductName = ProductName,
> @.LastUpdate = LastUpdate
> It still gives the error...
> I want results in the Query Analyzer!
> "Chandra" wrote:
>|||There are a number of problems with your script. The primary problem is
that you are about how to declare and use local variables as the
arguments for a stored procedure, as well as the correct syntax to use for
executing a stored procedure. The second
problem is that you must supply values for all stored procedure arguments
that do not have defaults. Try the script below.
set nocount on
go
use Northwind
go
create PROCEDURE mytest
@.ProductID int,
@.ProductName nvarchar(40),
@.LastUpdate datetime
AS
if @.ProductID is not null
select * from Products where ProductID = @.ProductID
else
select * from Products where ProductName = @.ProductName
go
DECLARE @.ProductName nvarchar(40),@.ProductID int
EXEC mytest
@.ProductName = ProductName,
@.ProductID = ProductID
EXEC mytest
@.ProductName = @.ProductName,
@.ProductID = @.ProductID
EXEC mytest
@.ProductName = @.ProductName,
@.ProductID = @.ProductID ,
@.LastUpdate = null
set @.ProductID = 2
EXEC mytest
@.ProductName = @.ProductName,
@.ProductID = @.ProductID ,
@.LastUpdate = null
go
drop PROCEDURE mytest
go|||This is not only pointless, it also will not work. Both you and OP have
failed to declare the variables ProductID, ProductName, and LastUpdate; all
three of these names are not valid variable names. Assuming the variables
were declared and used correctly, both @.ProductIDs (the variable and the
argument) are already defined as integer - the cast is pointless.
Lastly, the order of the arguments in the execute statement is **only**
important when the argument names are not used.
"Chandra" <Chandra@.discussions.microsoft.com> wrote in message
news:B7FD86EC-8A71-473A-A817-1CBB7B351EAA@.microsoft.com...
> Then try this way
> EXEC updateProduct
> @.ProductID = CAST(ProductID AS INTEGER),
> @.ProductName = ProductName,
> @.LastUpdate = LastUpdate
>
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://www.examnotes.net/gurus/default.asp?p=4223
> ---
>
> "Patrick.O.Ige" wrote:
>
done on the|||On Thu, 12 May 2005 20:33:02 -0700, Patrick.O.Ige wrote:

>With the stored procedure below if i do
>DECLARE @.ProductName nvarchar(40),@.ProductID int
>EXEC updateProduct
>@.ProductName = ProductName,
>@.ProductID = ProductID
>why do i get error:- Error converting data type nvarchar to int.
(snip)
Hi Patrick,
In most cases, things like ProductID and ProdcutName (without preceding
@. and not enclosed in quotation marks) would refer to either table or
column names. But since you can't use either in an EXEC command, SQL
Server simply assumes that you omitted the quotation marks, but wanted
to write a string constant nonetheless. Run the following code to prove
this:
create proc test (@.a varchar(20))
as
select @.a
go
-- With quotes
exec test 'This is a test'
go
-- No quotes - but they are "assumed"
exec test SecondTest
go
-- It only works for single words
exec test Third try
go
drop proc test
go
So obviously, the value 'ProductID' is passed as value for the
@.ProductID parameter to your proc - and since @.ProductID is declared as
integer, SQL Server will attempt to conert it, and fail.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thx guys for the replies
*** Sent via Developersdex http://www.examnotes.net ***

Wednesday, March 7, 2012

Error connecting to remote server

Hi
I am trying to cerate a System DSN (in ODBC Data Source Administrator) for a
remote SQL Server. I am getting the below error message;
Connection failed:
SQL State: '01000'
SQL Server Error: 14
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
Instance())
Connection failed:
SQL State: '08001'
SQL Server Error: 14
[Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
What is the problem and how can I fix it?
Thanks
RegardsOn Sep 14, 4:57 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
> Hi
> I am trying to cerate a System DSN (in ODBC Data Source Administrator) for a
> remote SQL Server. I am getting the below error message;
> Connection failed:
> SQL State: '01000'
> SQL Server Error: 14
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
> Instance())
> Connection failed:
> SQL State: '08001'
> SQL Server Error: 14
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
> What is the problem and how can I fix it?
> Thanks
> Regards
the remote server isn't running sql as a named instance is it?|||Not sure. It is our web hosts which is an outside company. What should I ask
them to do?
Many Thanks
Regards
"densial" <densial@.gmail.com> wrote in message
news:1189754261.882976.147900@.r34g2000hsd.googlegroups.com...
> On Sep 14, 4:57 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
>> Hi
>> I am trying to cerate a System DSN (in ODBC Data Source Administrator)
>> for a
>> remote SQL Server. I am getting the below error message;
>> Connection failed:
>> SQL State: '01000'
>> SQL Server Error: 14
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
>> Instance())
>> Connection failed:
>> SQL State: '08001'
>> SQL Server Error: 14
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
>> What is the problem and how can I fix it?
>> Thanks
>> Regards
> the remote server isn't running sql as a named instance is it?
>|||We are trying to access the SQL Server from behind an ISA 2004 firewall.
Even though I have created a rule for port 1433 on ISA 2004, I wonder if
there is something still missing at the ISA 2004 that I need to do.
Many Thanks
Regards
"densial" <densial@.gmail.com> wrote in message
news:1189754261.882976.147900@.r34g2000hsd.googlegroups.com...
> On Sep 14, 4:57 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
>> Hi
>> I am trying to cerate a System DSN (in ODBC Data Source Administrator)
>> for a
>> remote SQL Server. I am getting the below error message;
>> Connection failed:
>> SQL State: '01000'
>> SQL Server Error: 14
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
>> Instance())
>> Connection failed:
>> SQL State: '08001'
>> SQL Server Error: 14
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
>> What is the problem and how can I fix it?
>> Thanks
>> Regards
> the remote server isn't running sql as a named instance is it?
>|||On Sep 14, 8:49 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
> We are trying to access the SQL Server from behind an ISA 2004 firewall.
> Even though I have created a rule for port 1433 on ISA 2004, I wonder if
> there is something still missing at the ISA 2004 that I need to do.
> Many Thanks
> Regards
> "densial" <dens...@.gmail.com> wrote in message
> news:1189754261.882976.147900@.r34g2000hsd.googlegroups.com...
> > On Sep 14, 4:57 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
> >> Hi
> >> I am trying to cerate a System DSN (in ODBC Data Source Administrator)
> >> for a
> >> remote SQL Server. I am getting the below error message;
> >> Connection failed:
> >> SQL State: '01000'
> >> SQL Server Error: 14
> >> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
> >> Instance())
> >> Connection failed:
> >> SQL State: '08001'
> >> SQL Server Error: 14
> >> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
> >> What is the problem and how can I fix it?
> >> Thanks
> >> Regards
> > the remote server isn't running sql as a named instance is it?
that error msg <snip>Invalid Instance()</snip> makes me think your
providor is using a named instance, just ask them if they are, then
reference your server as "servername\instancename" (check the slash
direction, can't remember off hand if it's forward or backward).
Another issue could be the port number, try either "servername,1433"
or "servername\instancename,1433" as your server address. this is
often a problem if your using load balanced sql server. also there's
somestuff about the server knowing which port to reply on (for
sql2005), but this is a bit more complex and sometimes requires some
server side config in awkward situations, anyways if it's 2k5 your
connecting to read up about sqlbrowser replying to the client on port
1434 instead of 1433.

Sunday, February 26, 2012

Error Connecting SQL Server 2005

Hi There,
Any one can help me suggest what to do with below problem?
while install SQL Server 2005, there is no Authentication Mode Option
prompted out for users to select The Mixed Mode. This is installed using the
correct Copyright from Ms SQL Server 2005 CD with Standard Version, where it
having CD1 and CD2. After complete setup without any error message, when
trying to open the Ms SQL Server Management Studio and connect to the server,
there are error prompted out can not be connected. error message like below:
"an error has occurred while establishing a connection to the server. when
connecting to sql server 2005, this failure may be caused by the fact that
under the default settings sql server does not allow remote connections.
(provider: named pipes provider, error: 40 - could not open a connection to
sql server) (microsoft sql server, error: 2) "
Kindly advice
Thank you
Regards,
Carmen
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200711/1
As the error says, the default installation of SQL 2005 does not
allow remote connections.
You will have to enable remote connections and [optionally] start
the SQL Server Browser service.
Detailed information:
914277 - How to configure SQL Server 2005 to allow remote
connections
http://support.microsoft.com/?kbid=914277
__________________________________________________ _______
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
SQL troubleshooting: http://sql.veranoest.net
___ please respond in newsgroup, NOT by private email ___
"carmen413 via droptable.com" <u21749@.uwe> wrote on 23 nov 2007
in microsoft.public.sqlserver.server:

> Hi There,
> Any one can help me suggest what to do with below problem?
> while install SQL Server 2005, there is no Authentication Mode
> Option prompted out for users to select The Mixed Mode. This is
> installed using the correct Copyright from Ms SQL Server 2005 CD
> with Standard Version, where it having CD1 and CD2. After
> complete setup without any error message, when trying to open
> the Ms SQL Server Management Studio and connect to the server,
> there are error prompted out can not be connected. error message
> like below: "an error has occurred while establishing a
> connection to the server. when connecting to sql server 2005,
> this failure may be caused by the fact that under the default
> settings sql server does not allow remote connections.
> (provider: named pipes provider, error: 40 - could not open a
> connection to sql server) (microsoft sql server, error: 2) "
> Kindly advice
> Thank you
> Regards,
> Carmen
|||Hello Carmen,
SQL Server 2005' s authentication mode is Windows Authentication by default
and the "sa" account will be disabled by default.
So, you can change your authentication mode by connecting your SQL Server
instance using SSMS after the setup. Go to Server Properties and Security.
You'll see the authentication modes there. I want to stress that "sa"
account is disabled by default. You can enable it (if you really need that)
from the Security\Logins nodes.
To be able to connect to your SQL Server instance, you must ensure that your
SQL Server service is running. You can check it using SQL Server
Configuration Manager or Services MMC.
This is not about remote connections at all because Remote Connections is
enabled by default for Standard and Enterprise Editions of SQL Server 2005.
It's disabled for Express and Developer Editions of SQL Server 2005 by
default.
Ekrem ?nsoy
"carmen413 via droptable.com" <u21749@.uwe> wrote in message
news:7ba5d81d07de2@.uwe...
> Hi There,
> Any one can help me suggest what to do with below problem?
> while install SQL Server 2005, there is no Authentication Mode Option
> prompted out for users to select The Mixed Mode. This is installed using
> the
> correct Copyright from Ms SQL Server 2005 CD with Standard Version, where
> it
> having CD1 and CD2. After complete setup without any error message, when
> trying to open the Ms SQL Server Management Studio and connect to the
> server,
> there are error prompted out can not be connected. error message like
> below:
> "an error has occurred while establishing a connection to the server. when
> connecting to sql server 2005, this failure may be caused by the fact that
> under the default settings sql server does not allow remote connections.
> (provider: named pipes provider, error: 40 - could not open a connection
> to
> sql server) (microsoft sql server, error: 2) "
> Kindly advice
> Thank you
> Regards,
> Carmen
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200711/1
>

Error Connecting SQL Server 2005

Hi There,
Any one can help me suggest what to do with below problem?
while install SQL Server 2005, there is no Authentication Mode Option
prompted out for users to select The Mixed Mode. This is installed using the
correct Copyright from Ms SQL Server 2005 CD with Standard Version, where it
having CD1 and CD2. After complete setup without any error message, when
trying to open the Ms SQL Server Management Studio and connect to the server,
there are error prompted out can not be connected. error message like below:
"an error has occurred while establishing a connection to the server. when
connecting to sql server 2005, this failure may be caused by the fact that
under the default settings sql server does not allow remote connections.
(provider: named pipes provider, error: 40 - could not open a connection to
sql server) (microsoft sql server, error: 2) "
Kindly advice
Thank you
Regards,
Carmen
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200711/1As the error says, the default installation of SQL 2005 does not
allow remote connections.
You will have to enable remote connections and [optionally] start
the SQL Server Browser service.
Detailed information:
914277 - How to configure SQL Server 2005 to allow remote
connections
http://support.microsoft.com/?kbid=914277
_________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
SQL troubleshooting: http://sql.veranoest.net
___ please respond in newsgroup, NOT by private email ___
"carmen413 via SQLMonster.com" <u21749@.uwe> wrote on 23 nov 2007
in microsoft.public.sqlserver.server:
> Hi There,
> Any one can help me suggest what to do with below problem?
> while install SQL Server 2005, there is no Authentication Mode
> Option prompted out for users to select The Mixed Mode. This is
> installed using the correct Copyright from Ms SQL Server 2005 CD
> with Standard Version, where it having CD1 and CD2. After
> complete setup without any error message, when trying to open
> the Ms SQL Server Management Studio and connect to the server,
> there are error prompted out can not be connected. error message
> like below: "an error has occurred while establishing a
> connection to the server. when connecting to sql server 2005,
> this failure may be caused by the fact that under the default
> settings sql server does not allow remote connections.
> (provider: named pipes provider, error: 40 - could not open a
> connection to sql server) (microsoft sql server, error: 2) "
> Kindly advice
> Thank you
> Regards,
> Carmen|||Hello Carmen,
SQL Server 2005' s authentication mode is Windows Authentication by default
and the "sa" account will be disabled by default.
So, you can change your authentication mode by connecting your SQL Server
instance using SSMS after the setup. Go to Server Properties and Security.
You'll see the authentication modes there. I want to stress that "sa"
account is disabled by default. You can enable it (if you really need that)
from the Security\Logins nodes.
To be able to connect to your SQL Server instance, you must ensure that your
SQL Server service is running. You can check it using SQL Server
Configuration Manager or Services MMC.
This is not about remote connections at all because Remote Connections is
enabled by default for Standard and Enterprise Editions of SQL Server 2005.
It's disabled for Express and Developer Editions of SQL Server 2005 by
default.
--
Ekrem Ã?nsoy
"carmen413 via SQLMonster.com" <u21749@.uwe> wrote in message
news:7ba5d81d07de2@.uwe...
> Hi There,
> Any one can help me suggest what to do with below problem?
> while install SQL Server 2005, there is no Authentication Mode Option
> prompted out for users to select The Mixed Mode. This is installed using
> the
> correct Copyright from Ms SQL Server 2005 CD with Standard Version, where
> it
> having CD1 and CD2. After complete setup without any error message, when
> trying to open the Ms SQL Server Management Studio and connect to the
> server,
> there are error prompted out can not be connected. error message like
> below:
> "an error has occurred while establishing a connection to the server. when
> connecting to sql server 2005, this failure may be caused by the fact that
> under the default settings sql server does not allow remote connections.
> (provider: named pipes provider, error: 40 - could not open a connection
> to
> sql server) (microsoft sql server, error: 2) "
> Kindly advice
> Thank you
> Regards,
> Carmen
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200711/1
>

Error Connecting SQL Server 2005

Hi There,
Any one can help me suggest what to do with below problem?
while install SQL Server 2005, there is no Authentication Mode Option
prompted out for users to select The Mixed Mode. This is installed using the
correct Copyright from Ms SQL Server 2005 CD with Standard Version, where it
having CD1 and CD2. After complete setup without any error message, when
trying to open the Ms SQL Server Management Studio and connect to the server
,
there are error prompted out can not be connected. error message like below:
"an error has occurred while establishing a connection to the server. when
connecting to sql server 2005, this failure may be caused by the fact that
under the default settings sql server does not allow remote connections.
(provider: named pipes provider, error: 40 - could not open a connection to
sql server) (microsoft sql server, error: 2) "
Kindly advice
Thank you
Regards,
Carmen
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200711/1As the error says, the default installation of SQL 2005 does not
allow remote connections.
You will have to enable remote connections and [optionally] start
the SQL Server Browser service.
Detailed information:
914277 - How to configure SQL Server 2005 to allow remote
connections
http://support.microsoft.com/?kbid=914277
________________________________________
_________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
SQL troubleshooting: http://sql.veranoest.net
___ please respond in newsgroup, NOT by private email ___
"carmen413 via droptable.com" <u21749@.uwe> wrote on 23 nov 2007
in microsoft.public.sqlserver.server:

> Hi There,
> Any one can help me suggest what to do with below problem?
> while install SQL Server 2005, there is no Authentication Mode
> Option prompted out for users to select The Mixed Mode. This is
> installed using the correct Copyright from Ms SQL Server 2005 CD
> with Standard Version, where it having CD1 and CD2. After
> complete setup without any error message, when trying to open
> the Ms SQL Server Management Studio and connect to the server,
> there are error prompted out can not be connected. error message
> like below: "an error has occurred while establishing a
> connection to the server. when connecting to sql server 2005,
> this failure may be caused by the fact that under the default
> settings sql server does not allow remote connections.
> (provider: named pipes provider, error: 40 - could not open a
> connection to sql server) (microsoft sql server, error: 2) "
> Kindly advice
> Thank you
> Regards,
> Carmen|||Hello Carmen,
SQL Server 2005' s authentication mode is Windows Authentication by default
and the "sa" account will be disabled by default.
So, you can change your authentication mode by connecting your SQL Server
instance using SSMS after the setup. Go to Server Properties and Security.
You'll see the authentication modes there. I want to stress that "sa"
account is disabled by default. You can enable it (if you really need that)
from the Security\Logins nodes.
To be able to connect to your SQL Server instance, you must ensure that your
SQL Server service is running. You can check it using SQL Server
Configuration Manager or Services MMC.
This is not about remote connections at all because Remote Connections is
enabled by default for Standard and Enterprise Editions of SQL Server 2005.
It's disabled for Express and Developer Editions of SQL Server 2005 by
default.
Ekrem ?nsoy
"carmen413 via droptable.com" <u21749@.uwe> wrote in message
news:7ba5d81d07de2@.uwe...
> Hi There,
> Any one can help me suggest what to do with below problem?
> while install SQL Server 2005, there is no Authentication Mode Option
> prompted out for users to select The Mixed Mode. This is installed using
> the
> correct Copyright from Ms SQL Server 2005 CD with Standard Version, where
> it
> having CD1 and CD2. After complete setup without any error message, when
> trying to open the Ms SQL Server Management Studio and connect to the
> server,
> there are error prompted out can not be connected. error message like
> below:
> "an error has occurred while establishing a connection to the server. when
> connecting to sql server 2005, this failure may be caused by the fact that
> under the default settings sql server does not allow remote connections.
> (provider: named pipes provider, error: 40 - could not open a connection
> to
> sql server) (microsoft sql server, error: 2) "
> Kindly advice
> Thank you
> Regards,
> Carmen
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200711/1
>

Sunday, February 19, 2012

Error Bad data

I have been working fine with no problems and just finished my first report
and deployed it with no errors. The next day I get the message below whenever
I try to run the report thru the report server or try to delploy from inside
VS.net. I have no encrypted data and only one user on this pc. Please help!
The report server cannot decrypt the symmetric key used to access sensitive
or encrypted data in a report server database. You must either restore a
backup key or delete all encrypted content and then restart the service.Just try this
rsactivate -r -c <config file>
>--Original Message--
>I have been working fine with no problems and just
finished my first report
>and deployed it with no errors. The next day I get the
message below whenever
>I try to run the report thru the report server or try to
delploy from inside
>VS.net. I have no encrypted data and only one user on
this pc. Please help!
>The report server cannot decrypt the symmetric key used
to access sensitive
>or encrypted data in a report server database. You must
either restore a
>backup key or delete all encrypted content and then
restart the service.
>.
>|||Did a password that RS uses change? Did you change a user that RS runs as?
All of these can cause this error. To fix it you will need to run
rskeymgmt.exe. If you backed up your symmetric key you can just import it.
If not, run it with -d to delete the encrypted content.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ravi" <ravikantkv@.rediffmail.com> wrote in message
news:8dc301c4966d$8a5d79c0$a301280a@.phx.gbl...
> Just try this
> rsactivate -r -c <config file>
> >--Original Message--
> >I have been working fine with no problems and just
> finished my first report
> >and deployed it with no errors. The next day I get the
> message below whenever
> >I try to run the report thru the report server or try to
> delploy from inside
> >VS.net. I have no encrypted data and only one user on
> this pc. Please help!
> >The report server cannot decrypt the symmetric key used
> to access sensitive
> >or encrypted data in a report server database. You must
> either restore a
> >backup key or delete all encrypted content and then
> restart the service.
> >.
> >

Friday, February 17, 2012

Error attaching a database

Hello:
When attaching a database that was detached from another SQL Server instance
and copied over to this machine, I got the error message below:
Error 602: Could not find row in sysindexes for database ID 7, object ID 1,
index ID 1. Run DBCC CHECKTABLE on sysindexes.
Can somebody guide me on the steps I have to follow to resolve this issue?
Thanks.
VenkiHi
On the original server, run DBCC CHECKDB as during the attach, SQL Server is
finding possible corruption in the DB.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"vvenk" <vvenk@.discussions.microsoft.com> wrote in message
news:8F0E56C4-F250-465A-A86E-D9DB92BFF9A7@.microsoft.com...
> Hello:
> When attaching a database that was detached from another SQL Server
> instance
> and copied over to this machine, I got the error message below:
> Error 602: Could not find row in sysindexes for database ID 7, object ID
> 1,
> index ID 1. Run DBCC CHECKTABLE on sysindexes.
> Can somebody guide me on the steps I have to follow to resolve this issue?
> Thanks.
> Venki|||Mike:
The source DB Server has been retired and not available.
Is there any other option available to get the database back online?
Please say yes!
venki
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> On the original server, run DBCC CHECKDB as during the attach, SQL Server is
> finding possible corruption in the DB.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "vvenk" <vvenk@.discussions.microsoft.com> wrote in message
> news:8F0E56C4-F250-465A-A86E-D9DB92BFF9A7@.microsoft.com...
> > Hello:
> >
> > When attaching a database that was detached from another SQL Server
> > instance
> > and copied over to this machine, I got the error message below:
> >
> > Error 602: Could not find row in sysindexes for database ID 7, object ID
> > 1,
> > index ID 1. Run DBCC CHECKTABLE on sysindexes.
> >
> > Can somebody guide me on the steps I have to follow to resolve this issue?
> >
> > Thanks.
> >
> > Venki
>
>|||>> Error 602: Could not find row in sysindexes for database ID 7, object
>> ID 1,
>> index ID 1. Run DBCC CHECKTABLE on sysindexes.
>> Can somebody guide me on the steps I have to follow to resolve this
>> issue?
>> Thanks.
>> Venki
>
What are the results of DBCC CHECKTABLE sysindexes?
--
Regards
JTC ^..^|||As I said, I don't have access to the source DB instance anymore. Since my
understanding was that DBCC should be run on the source DB instance, I have
not done it.
"JTC ^..^" wrote:
> >> Error 602: Could not find row in sysindexes for database ID 7, object
> >> ID 1,
> >> index ID 1. Run DBCC CHECKTABLE on sysindexes.
> >>
> >> Can somebody guide me on the steps I have to follow to resolve this
> >> issue?
> >>
> >> Thanks.
> >>
> >> Venki
> >
> >
> What are the results of DBCC CHECKTABLE sysindexes?
> --
> Regards
> JTC ^..^
>|||Hi,
Try the below steps. If it fails restore from a good database backup.
Steps:
1. Create a new database with the same name and same MDF and LDF files
2. Stop sql server and rename the existing MDF to a new one and copy the
original MDF to this location and delete the LDF files.
3. Start SQL Server
4. Now your database will be marked suspect
5. Update the sysdatabases to update to Emergency mode. This will not use
LOG files in start up
Sp_configure "allow updates", 1
go
Reconfigure with override
GO
Update sysdatabases set status = 32768 where name = "BadDbName"
go
Sp_configure "allow updates", 0
go
Reconfigure with override
GO
6. Restart sql server. now the database will be in emergency mode
7. Create a new database and use DTS to copy the objects and data to new
database. You can use this new database.
Note:
If you have the backup file, it is always recommended to use the backup file
to restore the database. SO that data integrity will be maintained.
.
Thanks
Hari
SQL Server MVP
"vvenk" <vvenk@.discussions.microsoft.com> wrote in message
news:4EE00CBA-DB2F-4177-A5C2-B78DA315F97A@.microsoft.com...
> As I said, I don't have access to the source DB instance anymore. Since my
> understanding was that DBCC should be run on the source DB instance, I
> have
> not done it.
> "JTC ^..^" wrote:
>> >> Error 602: Could not find row in sysindexes for database ID 7, object
>> >> ID 1,
>> >> index ID 1. Run DBCC CHECKTABLE on sysindexes.
>> >>
>> >> Can somebody guide me on the steps I have to follow to resolve this
>> >> issue?
>> >>
>> >> Thanks.
>> >>
>> >> Venki
>> >
>> >
>> What are the results of DBCC CHECKTABLE sysindexes?
>> --
>> Regards
>> JTC ^..^|||Hari:
Thank you. When following the steps, when I tried to execute the statement,
Update sysdatabases set status = 32768 where name = "BadDbName"
I got an error, "Invalid column nam". However, I found what the dbid was for
that particular row and updated the row with that column in the Where clause.
I will now try to see if the data is accessible.
"Hari Prasad" wrote:
> Hi,
> Try the below steps. If it fails restore from a good database backup.
>
> Steps:
> 1. Create a new database with the same name and same MDF and LDF files
> 2. Stop sql server and rename the existing MDF to a new one and copy the
> original MDF to this location and delete the LDF files.
> 3. Start SQL Server
> 4. Now your database will be marked suspect
> 5. Update the sysdatabases to update to Emergency mode. This will not use
> LOG files in start up
>
> Sp_configure "allow updates", 1
> go
> Reconfigure with override
> GO
> Update sysdatabases set status = 32768 where name = "BadDbName"
> go
> Sp_configure "allow updates", 0
> go
> Reconfigure with override
> GO
> 6. Restart sql server. now the database will be in emergency mode
>
> 7. Create a new database and use DTS to copy the objects and data to new
> database. You can use this new database.
>
> Note:
> If you have the backup file, it is always recommended to use the backup file
> to restore the database. SO that data integrity will be maintained.
> ..
>
> --
> Thanks
> Hari
> SQL Server MVP
>
>
> "vvenk" <vvenk@.discussions.microsoft.com> wrote in message
> news:4EE00CBA-DB2F-4177-A5C2-B78DA315F97A@.microsoft.com...
> > As I said, I don't have access to the source DB instance anymore. Since my
> > understanding was that DBCC should be run on the source DB instance, I
> > have
> > not done it.
> >
> > "JTC ^..^" wrote:
> >
> >>
> >> >> Error 602: Could not find row in sysindexes for database ID 7, object
> >> >> ID 1,
> >> >> index ID 1. Run DBCC CHECKTABLE on sysindexes.
> >> >>
> >> >> Can somebody guide me on the steps I have to follow to resolve this
> >> >> issue?
> >> >>
> >> >> Thanks.
> >> >>
> >> >> Venki
> >> >
> >> >
> >>
> >> What are the results of DBCC CHECKTABLE sysindexes?
> >>
> >> --
> >> Regards
> >> JTC ^..^
> >>
>
>|||Hari:
Also, I executed the statements after I was logged into master database; I
could not log onto the badDBName.
I hope that was fine.
Venki
"Hari Prasad" wrote:
> Hi,
> Try the below steps. If it fails restore from a good database backup.
>
> Steps:
> 1. Create a new database with the same name and same MDF and LDF files
> 2. Stop sql server and rename the existing MDF to a new one and copy the
> original MDF to this location and delete the LDF files.
> 3. Start SQL Server
> 4. Now your database will be marked suspect
> 5. Update the sysdatabases to update to Emergency mode. This will not use
> LOG files in start up
>
> Sp_configure "allow updates", 1
> go
> Reconfigure with override
> GO
> Update sysdatabases set status = 32768 where name = "BadDbName"
> go
> Sp_configure "allow updates", 0
> go
> Reconfigure with override
> GO
> 6. Restart sql server. now the database will be in emergency mode
>
> 7. Create a new database and use DTS to copy the objects and data to new
> database. You can use this new database.
>
> Note:
> If you have the backup file, it is always recommended to use the backup file
> to restore the database. SO that data integrity will be maintained.
> ..
>
> --
> Thanks
> Hari
> SQL Server MVP
>
>
> "vvenk" <vvenk@.discussions.microsoft.com> wrote in message
> news:4EE00CBA-DB2F-4177-A5C2-B78DA315F97A@.microsoft.com...
> > As I said, I don't have access to the source DB instance anymore. Since my
> > understanding was that DBCC should be run on the source DB instance, I
> > have
> > not done it.
> >
> > "JTC ^..^" wrote:
> >
> >>
> >> >> Error 602: Could not find row in sysindexes for database ID 7, object
> >> >> ID 1,
> >> >> index ID 1. Run DBCC CHECKTABLE on sysindexes.
> >> >>
> >> >> Can somebody guide me on the steps I have to follow to resolve this
> >> >> issue?
> >> >>
> >> >> Thanks.
> >> >>
> >> >> Venki
> >> >
> >> >
> >>
> >> What are the results of DBCC CHECKTABLE sysindexes?
> >>
> >> --
> >> Regards
> >> JTC ^..^
> >>
>
>|||Hari:
Yes, the database is in emergency mode.
When I tried to create a DTS job to import, it does not show up in the list
of databases available as a source.
Any ideas?
venki
"Hari Prasad" wrote:
> Hi,
> Try the below steps. If it fails restore from a good database backup.
>
> Steps:
> 1. Create a new database with the same name and same MDF and LDF files
> 2. Stop sql server and rename the existing MDF to a new one and copy the
> original MDF to this location and delete the LDF files.
> 3. Start SQL Server
> 4. Now your database will be marked suspect
> 5. Update the sysdatabases to update to Emergency mode. This will not use
> LOG files in start up
>
> Sp_configure "allow updates", 1
> go
> Reconfigure with override
> GO
> Update sysdatabases set status = 32768 where name = "BadDbName"
> go
> Sp_configure "allow updates", 0
> go
> Reconfigure with override
> GO
> 6. Restart sql server. now the database will be in emergency mode
>
> 7. Create a new database and use DTS to copy the objects and data to new
> database. You can use this new database.
>
> Note:
> If you have the backup file, it is always recommended to use the backup file
> to restore the database. SO that data integrity will be maintained.
> ..
>
> --
> Thanks
> Hari
> SQL Server MVP
>
>
> "vvenk" <vvenk@.discussions.microsoft.com> wrote in message
> news:4EE00CBA-DB2F-4177-A5C2-B78DA315F97A@.microsoft.com...
> > As I said, I don't have access to the source DB instance anymore. Since my
> > understanding was that DBCC should be run on the source DB instance, I
> > have
> > not done it.
> >
> > "JTC ^..^" wrote:
> >
> >>
> >> >> Error 602: Could not find row in sysindexes for database ID 7, object
> >> >> ID 1,
> >> >> index ID 1. Run DBCC CHECKTABLE on sysindexes.
> >> >>
> >> >> Can somebody guide me on the steps I have to follow to resolve this
> >> >> issue?
> >> >>
> >> >> Thanks.
> >> >>
> >> >> Venki
> >> >
> >> >
> >>
> >> What are the results of DBCC CHECKTABLE sysindexes?
> >>
> >> --
> >> Regards
> >> JTC ^..^
> >>
>
>

Wednesday, February 15, 2012

Error adding existing SSIS Package to new Project

Hi, All:

I am relatively new to SQL Server 2005 SSIS. I encountered the below error while trying to add an existing package to a newly created Project:

Failed to save package file <path_filename> with error 0x80029C4A "Error loading type library/DLL.".

If someone has encountered this error, please reply with a solution or suggestions.

Thanks.

Looks like installation error. What SQL components and Service Packs have you installed, and in which order? Is it 64-bit or 32-bit OS?|||

Actually, all of the SQL components are installed; however, there are no Service Packs installed. The OS is 32-bit.

Thanks for your reply.

|||

I have resolved this issue.

Thanks everyone.