Sunday, March 11, 2012
[Shared Memory]ConnectionCheckForData error on delete command.
I ave a strange error with SQLServer 2000 SP3.
I made a table that contains over 62'000 records. When I delete over
300 records, I have this error:
[Microsoft][ODBC SQL Server Driver][Shared
Memory]ConnectionCheckForData (CheckforData()).
Serveur : Msg 11, Niveau 16, État 1, Ligne 0
Structure of my table:
create table ActiveTimeForProcessing (
ACTIVETIMEFORPROCESSING_PK int identity,
InstanciedClassName int not null,
ActiveTime int not null,
DateFrom datetime not null,
DateTo datetime not null,
constraint PK_ACTIVETIMEFORPROCESSING primary key
(ACTIVETIMEFORPROCESSING_PK)
)
go
alter table ActiveTimeForProcessing
add constraint ActiveTimeForProcessingHasActiveTime foreign key
(ActiveTime)
references ActiveTime (ACTIVETIME_PK)
go
CREATE INDEX [IX_ActiveTimeForProcessing_DateFrom] ON
[dbo].[ActiveTimeForProcessing]([DateFrom]) ON [PRIMARY]
GO
CREATE INDEX [IX_ActiveTimeForProcessing_DateTo] ON
[dbo].[ActiveTimeForProcessing]([DateTo]) ON [PRIMARY]
GO
Something very strange is that on an other server, it work fine...
Thanks to help me.
PascalHi,
Try
1. Run DBCC CHECKDB against the database to make sure it is clean.
2. Check the errorlog for any error that match the time that you get the
error.
Sincerely,
Yih-Yoon Lee
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.|||Thanks a lot, but I tryed you purpose...
Finally I found sollution... Service Pack 3a......... ... ...
Thanks one more.
Pascal
""Jinxin"" <yihyoonl@.online.microsoft.com> a écrit dans le message de news:
ZRYO4j$PDHA.2696@.cpmsftngxa09.phx.gbl...
> Hi,
> Try
> 1. Run DBCC CHECKDB against the database to make sure it is clean.
> 2. Check the errorlog for any error that match the time that you get the
> error.
> Sincerely,
> Yih-Yoon Lee
> Microsoft, SQL Server
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
>
Thursday, March 8, 2012
[Q]Problems related to the MySQL linked Server.
I have two questions about the linked server for the MySQL.
I need to connect to the mysql DB from the my SQLServer 2000 SP4 on the
Windows 2000 standard Edition(MDAC 2.8)
So, I made a linked server at the SQLServer. I worked well, but I faced with
some problem.
1. Query method
I need to query some data in the mysql with dynamic parameter.
ex) select @.v_intUserNo = uno
from tb_test
where userid = 'testid'
*input of the userid is changed everytime by the user.
so, I cannot use the OPENQUERY or OPENROWSET.
I want to query above like this,
select @.v_intUserNo = uno
from [linked server name].[catalog name].[schema name].[ta
ble name]
where userid = 'testid'
When I used above syntax at the linked server of the SQLServer, it worked
well.
But, it did not worked with the mysql DB.
(unfortunately, I cannot remember the exact error message.T.T)
2. Not killable SPID.
After #1 step, I tried many method to solve the problem.
As one trial, I set the catalog at the linked server's property.
After that, I tried query as followings
---
select @.v_intUserNo = uno
from [linked server name].[catalog name].[schema name].[ta
ble name]
where userid = 'testid'
or select @.v_intUserNo = uno
from OPENQUERY('TEST_DB', 'select * from test_tbl where userid =
''testid''')
---
It doesn't returned any error or result, so, I killed the session.
but it was not cleared promptly, only return the following message.
SPID 70: transaction rollback in progress. Estimated rollback completion:
100%. Estimated time remaining: 0 seconds.
After restarting the SQLServer, they were cleared.
I wish to know the all the experiencies for managing the linked server to
the mysql DB at the SQLServer.
Thank you in advanceFurther information of my environment.
1. I used the mysql ODBC Ver 3.51
2. The error messge when I query data with following SQL.
select @.v_intUserNo = uno
from [linked server name].[catalog name].[schema name].[ta
ble name]
where userid = 'testid'
Server: Msg 7313, Level 16, State 1, Line 1
Invalid schema or catalog specified for provider 'MSDASQL'.
OLE DB error trace [Non-interface error: Invalid schema or catalog
specified for the provider.].
**Following query also doesn't work.
select @.v_intUserNo = uno
from [linked server name].[catalog name].[table name]
where userid = 'testid'
select @.v_intUserNo = uno
from [linked server name].[schema name].[table name]
where userid = 'testid'
select @.v_intUserNo = uno
from [linked server name].[table name]
where userid = 'testid'
Thank you.
"?" <dialup@.nownuri.net> wrote in message
news:ObJWtpObGHA.3992@.TK2MSFTNGP05.phx.gbl...
> Dear everyone.
> I have two questions about the linked server for the MySQL.
> I need to connect to the mysql DB from the my SQLServer 2000 SP4 on the
> Windows 2000 standard Edition(MDAC 2.8)
> So, I made a linked server at the SQLServer. I worked well, but I faced
with
> some problem.
> 1. Query method
> I need to query some data in the mysql with dynamic parameter.
> ex) select @.v_intUserNo = uno
> from tb_test
> where userid = 'testid'
> *input of the userid is changed everytime by the user.
> so, I cannot use the OPENQUERY or OPENROWSET.
> I want to query above like this,
> select @.v_intUserNo = uno
> from [linked server name].[catalog name].[schema name].[
table name]
> where userid = 'testid'
> When I used above syntax at the linked server of the SQLServer, it worked
> well.
> But, it did not worked with the mysql DB.
> (unfortunately, I cannot remember the exact error message.T.T)
> 2. Not killable SPID.
> After #1 step, I tried many method to solve the problem.
> As one trial, I set the catalog at the linked server's property.
> After that, I tried query as followings
> ---
> select @.v_intUserNo = uno
> from [linked server name].[catalog name].[schema name].[
table name]
> where userid = 'testid'
> or select @.v_intUserNo = uno
> from OPENQUERY('TEST_DB', 'select * from test_tbl where userid =
> ''testid''')
> ---
> It doesn't returned any error or result, so, I killed the session.
> but it was not cleared promptly, only return the following message.
> SPID 70: transaction rollback in progress. Estimated rollback completion:
> 100%. Estimated time remaining: 0 seconds.
> After restarting the SQLServer, they were cleared.
> I wish to know the all the experiencies for managing the linked server to
> the mysql DB at the SQLServer.
> Thank you in advance
>
>
Tuesday, March 6, 2012
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for us
One use with a laptop keeps getting the error when connecting to the sql
server.
SQL 2000 latest, mixed mode.
Laptop xp pro latest, mdac is latest.
I looked up sql server 26000 and 18452. I was not able to resolve the
problem. Still an untrusted connection.
I do know it is in the user profile but what?
Hi Brian,
Just to be sure, you have some machines working and one particular machine
(the laptop) is not working, right? Are you using Named Pipes or TCP-IP? Is
the laptop using a trusted connection or SQL Server security mode? What was
the exact text of the error message? What things have you tried that did not
resolve the problem?
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"BrianMultiLanguage" <BrianMultiLanguage@.discussions.microsoft.com> wrote in
message news:3D81F886-58B5-4C09-AA8A-1529B54CE72B@.microsoft.com...
> We changed from sql 7 to 2000, crissis mode.
> One use with a laptop keeps getting the error when connecting to the sql
> server.
> SQL 2000 latest, mixed mode.
> Laptop xp pro latest, mdac is latest.
> I looked up sql server 26000 and 18452. I was not able to resolve the
> problem. Still an untrusted connection.
> I do know it is in the user profile but what?
Saturday, February 25, 2012
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
I want to access this database from a java program using JDBC - ODBC
Here are the relavent lines of code from my java source code file.
Note : I am attempting to access the sample database "Northwind Traders" that came with the installation.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
datasource = "NORTHDS";
url = "jdbc:odbc:" + datasource;
con = DriverManager.getConnection(url,username,password) ;
query = "SELECT * from " + datasource + "." + username + "." + tablename;
ResultSet rs = stmt.executeQuery(query);
The connection succeeds but the query fails with :
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'NORTHDS.username.Customers'.
Using the program "Microsoft Access" I was able to verify that the "Customers" table is intact.
Any ideas ?Take a look at the following:
In your select statement there are a couple of potential problems that you need to verify.
select * from datasource.username.table ... which is returning 'NORTHDS.username.Customers'
should be
select * from Northwind.dbo.Customers ... (unless you renamed the database ...)
In other words, check to make sure your are referencing the correct database/owner/table in your select statement. It appears that the variables you are using are incorrect. tablename appears to be ok, but the username variable is returning username. Also, the datasource variable may not be your database name.
Friday, February 24, 2012
[help]:SQLServer 2000 setup fails!
I receive the error with _INS5576._MP.exe when i installed sqlserver 2000
pls help me to solve this problem
ThanksWhat is the version of MSSQL server you tried to install?
What is your operating system?
Can you post the error message you got?|||Originally posted by gyuan
What is the version of MSSQL server you tried to install?
What is your operating system?
Can you post the error message you got?
i wanna to install STANDARD version in my windows 2000 server
I receive the error with "application error in _INS5576._MP "
pls help me ,thanks|||In which step did you get the error message?|||Originally posted by gyuan
In which step did you get the error message?
The first step,i click the SETUPSQL.EXE|||What is the Service Pack on your windows 2000 server? When you tried to install the MSSQL server did you close any other applications?|||Did you log on windows using Administrator account?|||Originally posted by gyuan
What is the Service Pack on your windows 2000 server? When you tried to install the MSSQL server did you close any other applications?
I've installed sp3 ,i have closed any other applictions when i install the sqlserver and i use administrator installed it|||Is is solved ? If not, read the following link:
link (http://dbforums.com/arch/175/2002/3/331731)
Also, check your installation log files for more information- sqlstp.log, sqlsp.log, and setup.iss.|||Originally posted by rnealejr
Is is solved ? If not, read the following link:
link (http://dbforums.com/arch/175/2002/3/331731)
Also, check your installation log files for more information- sqlstp.log, sqlsp.log, and setup.iss.
but i didn't find ActiveSync in my computer
can you tell me where is the sqlstp.log ,sqlsp.log,and setup.iss?|||Originally posted by board
but i didn't find ActiveSync in my computer
can you tell me where is the sqlstp.log ,sqlsp.log,and setup.iss?
here is the sqlstp.log
15:23:58 Begin Setup
15:24:28 ?ɡ
15:24:28 End Action: Locked Connectivity Files Check
15:24:28 ??? Microsoft ? (MDAC) ...
15:24:28 D:\NET\SQLSER~1\ENTERP~1\x86\Other\sqlredis.exe /q:a /C:"setupre.exe WARN=1 -s -SMS"
15:24:43 ExitCode: 0
15:24:43 ??? Microsoft ??_ (MSDTC) ...
15:24:43 C:\WINNT\TEMP\SqlSetup\Bin\cldtcstp.exe -SupportDir "C:\WINNT\TEMP\SqlSetup\Bin" -DTCPkg "D:\NET\SQLSER~1\ENTERP~1\x86\Other\dtcsetup.exe" -LogFile "C:\WINNT\sqlstp.log"
15:24:43 Process Exit Code: (0)
15:24:43 InstallMSSearch instance: MSSQLSERVER
15:24:43 Software\Microsoft\Search\Install:Version : 9.107.5512
15:24:43 MSSearch 2.0 or greater version check returned 1
15:24:43 ??? Microsoft ??...
15:24:43 "D:\NET\SQLSER~1\ENTERP~1\x86\FullText\MSSearch\Sea rch\SearchStp.exe" /s /a:SQLServer
15:24:52 Process Exit Code: (0)
15:24:52 /Q:A /T:C:\WINNT\TEMP\ixp001.tmp
15:24:52 ??? HTML
15:24:52 HTML Help installer exit code: 0
15:25:14 End Action InstallPkgs
15:25:14 Begin Action MoveFileData:
15:25:14 Enabled SELFREGISTERBATCH
15:25:14 Enabled CORECOMPONENTHANDLING
15:25:47 Begin Action: MoveFileDataSpecial
15:25:47 End Action: MoveFileDataSpecial
15:25:47 End Action MoveFileData
15:25:47 Begin Action ProcessAfterDataMove:
15:25:47 D:\NET\SQLSER~1\ENTERP~1\x86\Binn\hhcol.exe C:\Program Files\Microsoft SQL Server\80\Tools\Books
15:25:49 End Action ProcessAfterDataMove
15:25:49 Begin Action BuildServer:
15:25:49 C:\WINNT\TEMP\SqlSetup\Bin\scm.exe -Silent 1 -Action 5 -ExePath "C:\Program Files\Microsoft SQL Server\MSSQL\binn\sqlservr.exe" -Service "MSSQLSERVER"
15:25:49 Process Exit Code: (0)
15:25:49 Begin Action: CreateRegistrySetSQL
15:25:49 End Action: CreateRegistrySetSQL
15:25:49 Begin Action: RegWriteSetupEntry
15:25:49 End Action: RegWriteSetupEntry
15:25:49 Begin Action: CreateSer
15:25:49 End Action: CreateSer
15:25:49 Begin Action: SkuIt
15:25:50 End Action: SkuIt
15:25:50 SetFileSecuritySQLAndAdmin for d:\Program Files\Microsoft SQL Server\MSSQL returned: 1350, 1350
15:25:50 SetFileSecuritySQLAndAdmin for C:\Program Files\Microsoft SQL Server\MSSQL returned: 1350, 1350
15:25:50 SetRegSecuritySQLAndAdmin for Software\Microsoft\MSSQLServer\MSSQLServer returned: 0, 0
15:25:50 Begin Action: UpdateSystemPath
15:25:50 Path successfully updated.
15:25:50 %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
15:25:50 End Action: UpdateSystemPath
15:25:51 C:\Program Files\Microsoft SQL Server\80\Tools\Binn\cnfgsvr.exe -F "C:\WINNT\sqlstp.log" -I MSSQLSERVER -V 1 -M 0 -Q "Chinese_PRC_CI_AS" -H 1179808 -U sa -P
################################################## #############################
?
Chinese_PRC_CI_AS
-m -Q -T4022 -T3659
?
driver={sql server};server=google15;UID=sa;PWD=;database=maste r
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server ??
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
driver={sql server};server=google15;UID=sa;PWD=;database=maste r
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server ??
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
driver={sql server};server=google15;UID=sa;PWD=;database=maste r
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server ??
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
SQL Server ?
################################################## #############################
15:28:02 Process Exit Code: (-1)|||It looks like it is failing when configuring the server. Please post the output from cnfgsvr.out.|||Also, what is the translation on these 2 lines:
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server ??
SQL Server ?|||Originally posted by rnealejr
Also, what is the translation on these 2 lines:
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server ??
SQL Server ?
The problem had solved , I installed the sp4 for my windows 2000 server
It's ok now!
Thanks
Thursday, February 16, 2012
[ask] trigger in sqlserver not working, HELPP!
i have this trigger in my database :
ALTER TRIGGER dbo.AddVoucher
ON dbo.User_AddVoucher
AFTER INSERT
AS
SET NOCOUNT ON;DECLARE @.UserId int,
@.Add_id int,
@.voucher_id char,
@.Kredit money,
@.date smalldatetime,
@.last_balance money,
@.voucher_status charSELECT @.UserId = UserId,
@.voucher_id = Voucher_ID,
@.Add_id = Add_id,
@.date = Deposit_Date
FROM InsertedSELECT @.Kredit= Voucher_Value,
@.voucher_status = Voucher_Status
FROM Voucher
WHERE Voucher_ID = @.voucher_idINSERT INTO User_Balance(AddVoucher_ID, UserId, Update_Type, Update_Date)
VALUES (@.Add_id,@.UserId, 'Kredit',@.date)select @.last_balance = Balance
from User_Balance
WHERE UserId = @.UserId and Balance = (select TOP 1 Balance User_Balance where UserId = @.UserId order by Update_Id DESC)if (@.voucher_status = 'active')
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.-- Insert statements for trigger here
BEGIN
update User_Balance
set Balance = @.last_balance + @.Kredit
where AddVoucher_ID = @.Add_idupdate Voucher
set Sold_Date = @.date
where Voucher_ID = @.voucher_idEND
ELSE
BEGIN
raiserror ('Voucher is not valid',0,1)
rollback transaction
END
go
the problem is the update function is not working and the if statement always put to 'FALSE'
do you think anything wrong with the code
Thats perhaps because of the way you have declared the @.voucher_status parameter. char by default is same as char(1). So your @.voucher_status will only have an "a" if the status was "active". So change your datatype to @.varchar(10).
|||
oh my god...i didn't notice it...just a little mistake there, thanks bro for your help....
it runs smoothly now...
[ask] sqlserver getdate() function doesnt return seconds value
i have a quite strange condition...
when i add some value in database with getdate() function it only returns date and minute not the seconds...
does somebody have an experience about this
What is the data type of the variable or column that you are using? If it is smaldatetime, the accuracy is only of minutes. If you want seconds, you'll need to use datetime.
If you're doing something else, post your code to see if we can help you figure it out.
Don
|||getdate() actually returns current date & time. Just try to select getdate() and you will see. You must have assign the value of getdate() to smalldatetime.|||
I've changed to datetime and it works :)
weew... i never thought about it... just a little mistake there :)
thx anyway
Monday, February 13, 2012
[298] SQLServer Error: 4060, Cannot open database requested
[298] SQLServer Error: 4060, Cannot open database requested in login
'database1. Login fails. [SQLSTATE 42000]
[298] SQLServer Error: 4060, Cannot open database requested in login
'database2'. Login fails. [SQLSTATE 42000]
In reviewing technical articles, the messages appear to be related to an
expired subscription cleanup process for replication. The two databases in
questions were deleted because they were no longer needed. The messages
appear to have started then.
I have only been with the company for 5 months, the databases were deleted 3
months ago. Replication is not used now, nor was it when I first started. I
have spoken with several other people, who say replication was not used.
My only guess that maybe my predecessor was experimenting with it. My
question now is, what can I do to correct the issue to eliminate the SQL
Agent error messages. The reference articles discuss things to try in the
"Replication Monitor" folder. Since we are not using replication, this
folder doesn't exist.
We are running SQLServer 2000 SP4.
Any assistance would greatly be appreciated. Thanks!!!
Tom
Tom Roth wrote:
> I get the same messages every morning at 0700:
> [298] SQLServer Error: 4060, Cannot open database requested in login
> 'database1. Login fails. [SQLSTATE 42000]
> [298] SQLServer Error: 4060, Cannot open database requested in login
> 'database2'. Login fails. [SQLSTATE 42000]
>
> In reviewing technical articles, the messages appear to be related to an
> expired subscription cleanup process for replication. The two databases in
> questions were deleted because they were no longer needed. The messages
> appear to have started then.
> I have only been with the company for 5 months, the databases were deleted 3
> months ago. Replication is not used now, nor was it when I first started. I
> have spoken with several other people, who say replication was not used.
> My only guess that maybe my predecessor was experimenting with it. My
> question now is, what can I do to correct the issue to eliminate the SQL
> Agent error messages. The reference articles discuss things to try in the
> "Replication Monitor" folder. Since we are not using replication, this
> folder doesn't exist.
> We are running SQLServer 2000 SP4.
> Any assistance would greatly be appreciated. Thanks!!!
Start by figuring out what logins are generating these errors. Maybe
that will give you a clue where to look. To find those logins:
SELECT * FROM master.dbo.syslogins WHERE dbname IN ('database1',
'database2')
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||The two databases in quesstion were deleted (removed). There is nothing in
'syslogins.'
Tom
"Tracy McKibben" wrote:
> Tom Roth wrote:
> Start by figuring out what logins are generating these errors. Maybe
> that will give you a clue where to look. To find those logins:
> SELECT * FROM master.dbo.syslogins WHERE dbname IN ('database1',
> 'database2')
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
|||Tom Roth wrote:
> The two databases in quesstion were deleted (removed). There is nothing in
> 'syslogins.'
I understand that the databases were deleted. The error message that
you're getting indicates that something is attempting to login to SQL
Server, and the login being used specifies one of those deleted
databases as the "default" database. Each SQL login has a "default"
database, and in SQL 2000, that info is stored in syslogins. The query
I gave you will find any logins that are defaulted to those deleted
databases.
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||I ran the query, and the answer is none. Neither of the databases are
referenced. The MS article (296792) mentions that If the first database that
is published is then unpublished and dropped, and there are databases that
are published, the Expired Subscription Cleanup Agent fails.
The issue is that we are not currently using publisher. Soemthing must not
have been properly cleaned up whenever replication was turned off. It
appears as though a sp named sp_expired_subscription_cleanup is the cause. I
just can't figure out how to get around it.
Tom
"Tracy McKibben" wrote:
> Tom Roth wrote:
> I understand that the databases were deleted. The error message that
> you're getting indicates that something is attempting to login to SQL
> Server, and the login being used specifies one of those deleted
> databases as the "default" database. Each SQL login has a "default"
> database, and in SQL 2000, that info is stored in syslogins. The query
> I gave you will find any logins that are defaulted to those deleted
> databases.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
|||It may be possible some job for replication try to do this which is not
disabled or dropped after replication.
Second try to run profiler during the time when this error occurs to
find out the issue.
Thanks and Regards
Amish shah
http://shahamishm.tripod.com
Tom Roth wrote:[vbcol=seagreen]
> I ran the query, and the answer is none. Neither of the databases are
> referenced. The MS article (296792) mentions that If the first database that
> is published is then unpublished and dropped, and there are databases that
> are published, the Expired Subscription Cleanup Agent fails.
> The issue is that we are not currently using publisher. Soemthing must not
> have been properly cleaned up whenever replication was turned off. It
> appears as though a sp named sp_expired_subscription_cleanup is the cause. I
> just can't figure out how to get around it.
> --
> Tom
>
> "Tracy McKibben" wrote:
|||It may be possible some job related to replication is not disabled or
dropped and cause this issue. find out any if job is running this.
Second you can run profile at the time when error happens to find
details
Regards
Amish shah
http://shahamishm.tripod.com
Run profiler during time period when you are getting this error to
Tom Roth wrote:[vbcol=seagreen]
> I ran the query, and the answer is none. Neither of the databases are
> referenced. The MS article (296792) mentions that If the first database that
> is published is then unpublished and dropped, and there are databases that
> are published, the Expired Subscription Cleanup Agent fails.
> The issue is that we are not currently using publisher. Soemthing must not
> have been properly cleaned up whenever replication was turned off. It
> appears as though a sp named sp_expired_subscription_cleanup is the cause. I
> just can't figure out how to get around it.
> --
> Tom
>
> "Tracy McKibben" wrote:
[298] SQLServer Error: 4060, Cannot open database requested
[298] SQLServer Error: 4060, Cannot open database requested in login
'database1. Login fails. [SQLSTATE 42000]
[298] SQLServer Error: 4060, Cannot open database requested in login
'database2'. Login fails. [SQLSTATE 42000]
In reviewing technical articles, the messages appear to be related to an
expired subscription cleanup process for replication. The two databases in
questions were deleted because they were no longer needed. The messages
appear to have started then.
I have only been with the company for 5 months, the databases were deleted 3
months ago. Replication is not used now, nor was it when I first started.
I
have spoken with several other people, who say replication was not used.
My only guess that maybe my predecessor was experimenting with it. My
question now is, what can I do to correct the issue to eliminate the SQL
Agent error messages. The reference articles discuss things to try in the
"Replication Monitor" folder. Since we are not using replication, this
folder doesn't exist.
We are running SQLServer 2000 SP4.
Any assistance would greatly be appreciated. Thanks!!!
--
TomTom Roth wrote:
> I get the same messages every morning at 0700:
> [298] SQLServer Error: 4060, Cannot open database requested in login
> 'database1. Login fails. [SQLSTATE 42000]
> [298] SQLServer Error: 4060, Cannot open database requested in login
> 'database2'. Login fails. [SQLSTATE 42000]
>
> In reviewing technical articles, the messages appear to be related to an
> expired subscription cleanup process for replication. The two databases i
n
> questions were deleted because they were no longer needed. The messages
> appear to have started then.
> I have only been with the company for 5 months, the databases were deleted
3
> months ago. Replication is not used now, nor was it when I first started.
I
> have spoken with several other people, who say replication was not used.
> My only guess that maybe my predecessor was experimenting with it. My
> question now is, what can I do to correct the issue to eliminate the SQL
> Agent error messages. The reference articles discuss things to try in the
> "Replication Monitor" folder. Since we are not using replication, this
> folder doesn't exist.
> We are running SQLServer 2000 SP4.
> Any assistance would greatly be appreciated. Thanks!!!
Start by figuring out what logins are generating these errors. Maybe
that will give you a clue where to look. To find those logins:
SELECT * FROM master.dbo.syslogins WHERE dbname IN ('database1',
'database2')
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||The two databases in quesstion were deleted (removed). There is nothing in
'syslogins.'
--
Tom
"Tracy McKibben" wrote:
> Tom Roth wrote:
> Start by figuring out what logins are generating these errors. Maybe
> that will give you a clue where to look. To find those logins:
> SELECT * FROM master.dbo.syslogins WHERE dbname IN ('database1',
> 'database2')
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Tom Roth wrote:
> The two databases in quesstion were deleted (removed). There is nothing i
n
> 'syslogins.'
I understand that the databases were deleted. The error message that
you're getting indicates that something is attempting to login to SQL
Server, and the login being used specifies one of those deleted
databases as the "default" database. Each SQL login has a "default"
database, and in SQL 2000, that info is stored in syslogins. The query
I gave you will find any logins that are defaulted to those deleted
databases.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||I ran the query, and the answer is none. Neither of the databases are
referenced. The MS article (296792) mentions that If the first database tha
t
is published is then unpublished and dropped, and there are databases that
are published, the Expired Subscription Cleanup Agent fails.
The issue is that we are not currently using publisher. Soemthing must not
have been properly cleaned up whenever replication was turned off. It
appears as though a sp named sp_expired_subscription_cleanup is the cause.
I
just can't figure out how to get around it.
--
Tom
"Tracy McKibben" wrote:
> Tom Roth wrote:
> I understand that the databases were deleted. The error message that
> you're getting indicates that something is attempting to login to SQL
> Server, and the login being used specifies one of those deleted
> databases as the "default" database. Each SQL login has a "default"
> database, and in SQL 2000, that info is stored in syslogins. The query
> I gave you will find any logins that are defaulted to those deleted
> databases.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||It may be possible some job for replication try to do this which is not
disabled or dropped after replication.
Second try to run profiler during the time when this error occurs to
find out the issue.
Thanks and Regards
Amish shah
http://shahamishm.tripod.com
Tom Roth wrote:[vbcol=seagreen]
> I ran the query, and the answer is none. Neither of the databases are
> referenced. The MS article (296792) mentions that If the first database t
hat
> is published is then unpublished and dropped, and there are databases that
> are published, the Expired Subscription Cleanup Agent fails.
> The issue is that we are not currently using publisher. Soemthing must no
t
> have been properly cleaned up whenever replication was turned off. It
> appears as though a sp named sp_expired_subscription_cleanup is the cause.
I
> just can't figure out how to get around it.
> --
> Tom
>
> "Tracy McKibben" wrote:
>|||It may be possible some job related to replication is not disabled or
dropped and cause this issue. find out any if job is running this.
Second you can run profile at the time when error happens to find
details
Regards
Amish shah
http://shahamishm.tripod.com
Run profiler during time period when you are getting this error to
Tom Roth wrote:[vbcol=seagreen]
> I ran the query, and the answer is none. Neither of the databases are
> referenced. The MS article (296792) mentions that If the first database t
hat
> is published is then unpublished and dropped, and there are databases that
> are published, the Expired Subscription Cleanup Agent fails.
> The issue is that we are not currently using publisher. Soemthing must no
t
> have been properly cleaned up whenever replication was turned off. It
> appears as though a sp named sp_expired_subscription_cleanup is the cause.
I
> just can't figure out how to get around it.
> --
> Tom
>
> "Tracy McKibben" wrote:
>
[165]ODBC Error 0 Timeout expired[SQLSTATE HYT00]
Microsoft Windows 2000 Service Pack 2
I looked into my sqlserver agent log and found the following
ODBC Error 0 Timeout expired[SQLSTATE HYT00]
logon to server local '( failed)' (Job manager)
I have no idea what that means but it did keep out users for a minute or more.
The threads found on this forum almost all point to reccuring situations
mine is a sporadic one time issue.
Is it Ok to conclude it is a network error as I did?
TIA
VinceVincento Harris (wumutek@.yahoo.com) writes:
> sql server 2000 8.00.194
That's an SQL Server with no service pack. I strongly encouarge you to
download and install Service Pack 3.
> I looked into my sqlserver agent log and found the following
> ODBC Error 0 Timeout expired[SQLSTATE HYT00]
> logon to server local '( failed)' (Job manager)
> I have no idea what that means but it did keep out users for a minute or
> more. The threads found on this forum almost all point to reccuring
> situations mine is a sporadic one time issue.
> Is it Ok to conclude it is a network error as I did?
This may be a correct conclusion in the end, but it is not the most likely.
The ODBC error "Timeout expired" means that a query did not start to
return rows with the timeout period, which by default is 30 seconds.
The reason for this could be that the query itself needed longer time
to execute, because of large amounts of data to search and/or poor
indexing. It could also be that the query was blocked by another query,
and that query was long-running. In fact it does not have to be a query
as such that was blocking, but a process holding locks because of
an earlier abandoned query, which was not properly handled.
All this could have been started by some abnormal event like a
network glitch. However, it is much more likely that there was
some inappropriate SQL statement somewhere.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
[?]Restore and Backup problem
I have a Central Station with the program runnin with full prvileges and
that can perform all the actions on the DB.
There are also some clients that cannot be connected via LAN or internet
that need to use the same DB.
The way I solved this with Aces was to copy the Access file from the Central
Station ot the disconnected clients.
Then to update the central Staton I used to save the recordset of new data
entered from there onto files and then copy them into the Central Station.
Now I'm upgrading the program to run with SQLServer.
I can do everything but the Backup and restore of the DB.
Actually I perform the DB Backup to file with the command line
BACKUP DATABASE myDB TO DISK = 'TempFileName.bak'
This way I can save the file on a USB key or send it via email
Then I restore it on the disconnected clients using the command line
RESTORE DATABASE myDB FROM DISK ='TempFileName.bak' WITH REPLACE
Everything looks fine and seems to work, but on my testing machine I'm
having this strange behavior:
I create new datas into the DataBase, then I execute the backup and quit the
application.
I open EM and delete the just entered datas
I open the application simulating the disconnected clinet (just a string
option, the program is the same)
I execute the RESTORE
I expect hte cancelled datas to be back online, but...... the cancelled
datas is not restored.
I then open EM and execute a backup from the file I created with Backup and
..... the data goes in.
Why?
Is the problem raised only becouse the SQLServer is the same in both cases?
What I need is just to copy one DB and inserting it into a different Server.
Any idea why this is appening?
Any idea on how to do this operation?
I tryed already the RECOVERY, NORECOVERY and quite everything, but ......
Thanks in advance for your helpPerhaps you are inadvertently appending to the backup file instead of
overwriting. Try
BACKUP DATABASE myDB TO DISK = 'TempFileName.bak' WITH INIT
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Spieg" <spiegator@.tiscali.it> wrote in message
news:WgQUc.120173$OR2.6141961@.news3.tin.it...
> I've a program with VB6 working with SQLServer 2000.
> I have a Central Station with the program runnin with full prvileges and
> that can perform all the actions on the DB.
> There are also some clients that cannot be connected via LAN or internet
> that need to use the same DB.
> The way I solved this with Aces was to copy the Access file from the
Central
> Station ot the disconnected clients.
> Then to update the central Staton I used to save the recordset of new data
> entered from there onto files and then copy them into the Central Station.
> Now I'm upgrading the program to run with SQLServer.
> I can do everything but the Backup and restore of the DB.
> Actually I perform the DB Backup to file with the command line
> BACKUP DATABASE myDB TO DISK = 'TempFileName.bak'
> This way I can save the file on a USB key or send it via email
> Then I restore it on the disconnected clients using the command line
> RESTORE DATABASE myDB FROM DISK ='TempFileName.bak' WITH REPLACE
> Everything looks fine and seems to work, but on my testing machine I'm
> having this strange behavior:
> I create new datas into the DataBase, then I execute the backup and quit
the
> application.
> I open EM and delete the just entered datas
> I open the application simulating the disconnected clinet (just a string
> option, the program is the same)
> I execute the RESTORE
> I expect hte cancelled datas to be back online, but...... the cancelled
> datas is not restored.
> I then open EM and execute a backup from the file I created with Backup
and
> .... the data goes in.
> Why?
> Is the problem raised only becouse the SQLServer is the same in both
cases?
> What I need is just to copy one DB and inserting it into a different
Server.
> Any idea why this is appening?
> Any idea on how to do this operation?
> I tryed already the RECOVERY, NORECOVERY and quite everything, but ......
> Thanks in advance for your help|||Right, the WITH INIT Worked, damn I read it, but ...
Thanks
"Dan Guzman" <danguzman@.nospam-earthlink.net> ha scritto nel messaggio
news:c3UUc.6485$3O3.6087@.newsread2.news.pas.earthl ink.net...
> Perhaps you are inadvertently appending to the backup file instead of
> overwriting. Try
> BACKUP DATABASE myDB TO DISK = 'TempFileName.bak' WITH INIT
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP