显示标签为“error”的博文。显示所有博文
显示标签为“error”的博文。显示所有博文

2012年3月25日星期日

Disk or network error

Hi

I have written an application in VB through which I can convert DBASE
IV database to MS SQL Server database. Also, the application provides
database manipulation features to the user like addition, deletion etc
of records.
I am using OPENROWSET for conversion purposes. Also the server is MS
SQL Server 2000.
Now this application workks fine when I have installed the instance of
MS SQL Server on my local machine. It converts the database and stores
it on the server perfectly and there are no isues.
However, when I try to use the application to connect with MS SQL
Server on another machine, there are a few problems. I connect to the
other MS SQL Server on other machine through named pipes. My
application successfully accesses the database and allows user to
modify it according to his needs.
For this I created the user account of that user on the machine.
But when I try to convert the database, I get the following error
message:

[Microsoft ODBC Dbase driver]Disk or Network Error

Here is the line in VB code which is causing all the trouble:

con.Execute "select * into " & UCase(X) & " from
OPENROWSET('MSDASQL','Driver={Microsoft dBASE Driver
(*.dbf)};DEFAULTDIR=" & BaseData & ";SourceType=DBF','select * from " &
UCase(X) & "')"

Here, X is the dbf file name, BaseData is the path name of file.
I gave the user full rights but i am still getting this error message.
Now, what am I doing wrong here?

Regards,
ShwetabhHi

You don't say of you can open the DBASE file from DBASE on the remote
machine? Are you using a mapped drive or UNC name? Have you checked that the
permissions are correct for the SQL Server service account?

John
"Shwetabh" <shwetabhgoel@.gmail.com> wrote in message
news:1144529567.672831.5960@.v46g2000cwv.googlegrou ps.com...
> Hi
> I have written an application in VB through which I can convert DBASE
> IV database to MS SQL Server database. Also, the application provides
> database manipulation features to the user like addition, deletion etc
> of records.
> I am using OPENROWSET for conversion purposes. Also the server is MS
> SQL Server 2000.
> Now this application workks fine when I have installed the instance of
> MS SQL Server on my local machine. It converts the database and stores
> it on the server perfectly and there are no isues.
> However, when I try to use the application to connect with MS SQL
> Server on another machine, there are a few problems. I connect to the
> other MS SQL Server on other machine through named pipes. My
> application successfully accesses the database and allows user to
> modify it according to his needs.
> For this I created the user account of that user on the machine.
> But when I try to convert the database, I get the following error
> message:
> [Microsoft ODBC Dbase driver]Disk or Network Error
> Here is the line in VB code which is causing all the trouble:
> con.Execute "select * into " & UCase(X) & " from
> OPENROWSET('MSDASQL','Driver={Microsoft dBASE Driver
> (*.dbf)};DEFAULTDIR=" & BaseData & ";SourceType=DBF','select * from " &
> UCase(X) & "')"
> Here, X is the dbf file name, BaseData is the path name of file.
> I gave the user full rights but i am still getting this error message.
> Now, what am I doing wrong here?
> Regards,
> Shwetabh|||Hi,

Actually, the DBASE files are stored in a seperate folder on the remote
machine (remote in the sense that though it is in the intranet, SQL
server 2000 isnt installed on it). I have made the drive shared. Also,
in my effort to get it to work, I gave the user all rights on the SQL
server. But it still doesnt work.
And yes, I am using UNC name.

Regards,
Shwetabh|||Hi Shwetabh

If you service account is a domain account then log onto the SQL Server
machine as this account and see if you can access the DBASE files.

John

Shwetabh wrote:
> Hi,
> Actually, the DBASE files are stored in a seperate folder on the remote
> machine (remote in the sense that though it is in the intranet, SQL
> server 2000 isnt installed on it). I have made the drive shared. Also,
> in my effort to get it to work, I gave the user all rights on the SQL
> server. But it still doesnt work.
> And yes, I am using UNC name.
> Regards,
> Shwetabh|||Hi,
Sorry for taking so long to reply.
Actually, I can access the database from my application.
But I am unable to import my DBASE database to sql server.
when I try to do so, using OPENROWSET I get the error message.
Also, since the end product will be used by many other people,
their individual accounts will be created, I dont think using domain
account will be a good idea.

Regards,
Shwetabh|||Hi

To access network resources you will need a domain account with the
appropriate privileges otherwise you will not be able to connect.

John
"Shwetabh" <shwetabhgoel@.gmail.com> wrote in message
news:1145602062.263512.306870@.e56g2000cwe.googlegr oups.com...
> Hi,
> Sorry for taking so long to reply.
> Actually, I can access the database from my application.
> But I am unable to import my DBASE database to sql server.
> when I try to do so, using OPENROWSET I get the error message.
> Also, since the end product will be used by many other people,
> their individual accounts will be created, I dont think using domain
> account will be a good idea.
> Regards,
> Shwetabh|||Hi,

Lets consider this,
I have the DBASE files on the local machine.
Now I want to convert them and store them in MS SQL
Server.
Now for doing this, I use OPENROWSET.
I can access the already converted database (which I converted
manually on the server for testing purpose). I can read, write, delete
that data. I get no errors when I do that.
Now when I try to convert database from DBF (stored on local disk)
to SQL using OPENROWSET, I get the error: Disk or Network Error.

How should I resolve this?

Shwetabh|||Shwetabh (shwetabhgoel@.gmail.com) writes:
> Sorry for taking so long to reply.
> Actually, I can access the database from my application.
> But I am unable to import my DBASE database to sql server.
> when I try to do so, using OPENROWSET I get the error message.
> Also, since the end product will be used by many other people,
> their individual accounts will be created, I dont think using domain
> account will be a good idea.

When John talked about domain account, he referred to the account
under which SQL Server itself is running. To access resources on
the network, the account should be a domain account. Running SQL
Server under a domain account is a very common thing to do, even
in multi-user enviroments.

To review the service accont for SQL Server, right-click My Computer
on the server, select Manage. Find Services, and in the list of
services, find MSSQL Server. Double-click, and go the log on tab.
Make sure that the user there has access to the remote drive
where the DBASE files are located.

Or move the DBASE files to a local disk on the server.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hi,

I tried to access the database stored on a machine running Windows 2000
+ MS SQL Server 2000 and it worked fine.
Infact, it worked fine when used by any machine which would connect to
Windows 2000 server.
I was easily able to import the data on servers running Windows 2k.
But I am getting this error by connecting onto the servers running
Windows 2003.

Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC dBase Driver] The
Microsoft Jet database engine could not find the object 'ACE'. Make
sure the object exists and that you spell its name and the path name
correctly.]

How can I resolve this problem?

Regards,
Shwetabh|||Hi,

I tried to access the database stored on a machine running Windows 2000
+ MS SQL Server 2000 and it worked fine.
Infact, it worked fine when used by any machine which would connect to
Windows 2000 server.
I was easily able to import the data on servers running Windows 2k.
But I am getting this error by connecting onto the servers running
Windows 2003.

Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC dBase Driver] The
Microsoft Jet database engine could not find the object 'ACE'. Make
sure the object exists and that you spell its name and the path name
correctly.]

Windows 2003 server is also running MS SQL Server 2000. But I cant get
it to work.
How can I resolve this problem?

Regards,
Shwetabh|||Shwetabh (shwetabhgoel@.gmail.com) writes:
> I tried to access the database stored on a machine running Windows 2000
> + MS SQL Server 2000 and it worked fine.
> Infact, it worked fine when used by any machine which would connect to
> Windows 2000 server.
> I was easily able to import the data on servers running Windows 2k.
> But I am getting this error by connecting onto the servers running
> Windows 2003.
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSDASQL' reported an error.
> [OLE/DB provider returned message: [Microsoft][ODBC dBase Driver] The
> Microsoft Jet database engine could not find the object 'ACE'. Make
> sure the object exists and that you spell its name and the path name
> correctly.]
> How can I resolve this problem?

Not that I am sure that I can help anyway, but it would definitely help if
you can give full details, both when it is working and when it is not.

1) Where is the dBase file located in relation to the SQL Server? Local
disk or an a network share?

2) Under what account is SQL Server running?

3) Do you get the error when you run under any account on SQL Server,
even as administrator?

In the end this may have more to do with Windows or Active Directory that
I know very little about.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Disk I/O Errors Error Number 823

Has anyone come across this message when running SQL 2000 Failover clusters ?

I/O error 2(error not found) detected during write at offset 0x00000016d44000 in file 'K:\MSSQL\Data\Int_DB_2_Data.NDF'..

We got this message yesterday, the RAID Array was OK, the Drive could be written to using test editor directly onto the console. We restarted SQL and all came back OK. SPID 3 is the Signal Handler

Any ideas ?Have you check the SQL Error log? My guess is that you may have a torn page in that database.|||I think you should do a full backup, then use this backup version to restore it on another server and run DBCC CHECKDB or DBCC CHECKFILEGROUP to make sure there is no torn page error like joejcheng mentioned. The Error 823 most likey indicate that there is potential disk problem.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_reslsyserr_1_2a0j.asp|||I am chasing a similar problem on HP hardware. Make sure you get a disk consistency check done, as sometimes HP hardware is not good about checking for bad sectors, before writing to them.|||Originally posted by MCrowley
I am chasing a similar problem on HP hardware. Make sure you get a disk consistency check done, as sometimes HP hardware is not good about checking for bad sectors, before writing to them.
Many thanks.

I am running DBCC CHECKDB with ALL_ERRORMSGS , PHYSICAL_ONLY first, then scheduled to run with REPAIR_REBUILD at the weekend.

We are using an HP SAN. I will forward this onto our H/W supplier for info.sql

Disk Error?

Help, I'm getting the following error that is preventing
full backups or transaction log backups of this db...
Event ID: 17052
Error:823, Severity: 24, State:3
I/O error 2(The system cannot find the file specified.)
detected during write at offset 0x000002ca6d8000 in the
file 'D:\...db.mdf'.
I ran dbcc and it did fine against this database.
However, transaction log backups continue to fail with
this error. All other databases on this server aren't
having problems. This is a standalone environment, sql
server 2000 EE. This server has been running fine for
sometime. I suspect a disk problem but would have to
present a good case for it.Are you running backups in EM? Have you tried QA.
>--Original Message--
>Help, I'm getting the following error that is preventing
>full backups or transaction log backups of this db...
>Event ID: 17052
>Error:823, Severity: 24, State:3
>I/O error 2(The system cannot find the file specified.)
>detected during write at offset 0x000002ca6d8000 in the
>file 'D:\...db.mdf'.
>I ran dbcc and it did fine against this database.
>However, transaction log backups continue to fail with
>this error. All other databases on this server aren't
>having problems. This is a standalone environment, sql
>server 2000 EE. This server has been running fine for
>sometime. I suspect a disk problem but would have to
>present a good case for it.
>.
>|||You might want to give MS PSS a call:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;sql SQL Support
http://www.mssqlserver.com/faq/general-pss.asp MS PSS
--
Andrew J. Kelly
SQL Server MVP
"Tim Bridges" <bridgt01@.hotmail.com> wrote in message
news:03c101c3ca33$ca2ac7d0$a001280a@.phx.gbl...
> Help, I'm getting the following error that is preventing
> full backups or transaction log backups of this db...
> Event ID: 17052
> Error:823, Severity: 24, State:3
> I/O error 2(The system cannot find the file specified.)
> detected during write at offset 0x000002ca6d8000 in the
> file 'D:\...db.mdf'.
> I ran dbcc and it did fine against this database.
> However, transaction log backups continue to fail with
> this error. All other databases on this server aren't
> having problems. This is a standalone environment, sql
> server 2000 EE. This server has been running fine for
> sometime. I suspect a disk problem but would have to
> present a good case for it.|||You may want to chek the disk controllers and device drivers. There is a utility available to stress the disks. http://support.microsoft.com/default.aspx?kbid=231619. The following artcile talks about a similar problem. http://support.microsoft.com/default.aspx?kbid=826433
-- Andrew J. Kelly wrote: --
You might want to give MS PSS a call:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;sql SQL Support
http://www.mssqlserver.com/faq/general-pss.asp MS PSS
--
Andrew J. Kelly
SQL Server MVP
"Tim Bridges" <bridgt01@.hotmail.com> wrote in message
news:03c101c3ca33$ca2ac7d0$a001280a@.phx.gbl...
> Help, I'm getting the following error that is preventing
> full backups or transaction log backups of this db...
>> Event ID: 17052
> Error:823, Severity: 24, State:3
> I/O error 2(The system cannot find the file specified.)
> detected during write at offset 0x000002ca6d8000 in the
> file 'D:\...db.mdf'.
>> I ran dbcc and it did fine against this database.
> However, transaction log backups continue to fail with
> this error. All other databases on this server aren't
> having problems. This is a standalone environment, sql
> server 2000 EE. This server has been running fine for
> sometime. I suspect a disk problem but would have to
> present a good case for it.|||Thanks for the link. We've used this utility before but
with the holidays here and this problem being on a test
server it may not be until next week before we dig into
it further. Thanks for the info.
>--Original Message--
>You may want to chek the disk controllers and device
drivers. There is a utility available to stress the
disks. http://support.microsoft.com/default.aspx?
kbid=231619. The following artcile talks about a similar
problem. http://support.microsoft.com/default.aspx?
kbid=826433
>
> -- Andrew J. Kelly wrote: --
> You might want to give MS PSS a call:
> http://support.microsoft.com/default.aspx?
scid=fh;EN-US;sql SQL Support
> http://www.mssqlserver.com/faq/general-pss.asp MS
PSS
> --
> Andrew J. Kelly
> SQL Server MVP
>
> "Tim Bridges" <bridgt01@.hotmail.com> wrote in
message
> news:03c101c3ca33$ca2ac7d0$a001280a@.phx.gbl...
> > Help, I'm getting the following error that is
preventing
> > full backups or transaction log backups of this
db...
> >> Event ID: 17052
> > Error:823, Severity: 24, State:3
> > I/O error 2(The system cannot find the file
specified.)
> > detected during write at offset 0x000002ca6d8000
in the
> > file 'D:\...db.mdf'.
> >> I ran dbcc and it did fine against this database.
> > However, transaction log backups continue to fail
with
> > this error. All other databases on this server
aren't
> > having problems. This is a standalone
environment, sql
> > server 2000 EE. This server has been running
fine for
> > sometime. I suspect a disk problem but would
have to
> > present a good case for it.
>
>.
>

Disk Error

I am getting this Error when i am doing a SELECT INTO Operation in a lot of
my databases on SQL SServer 2000
Pls help
Server: Msg 823, Level 24, State 2, Line 1
I/O error 1450(Insufficient system resources exist to complete the requested
service.) detected during read at offset 0x0000067c780000 in file
'K:\DCCTDG01\DCCTDG01_data2.ndf'.
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection Broken
See if these are related:
http://support.microsoft.com/default...&Product=sql2k
http://support.microsoft.com/default...&Product=sql2k
Andrew J. Kelly SQL MVP
"Sanjay" <Sanjay@.discussions.microsoft.com> wrote in message
news:CB67EA77-EE46-4872-A933-3D2874FD2CAF@.microsoft.com...
> I am getting this Error when i am doing a SELECT INTO Operation in a lot
of
> my databases on SQL SServer 2000
> Pls help
> Server: Msg 823, Level 24, State 2, Line 1
> I/O error 1450(Insufficient system resources exist to complete the
requested
> service.) detected during read at offset 0x0000067c780000 in file
> 'K:\DCCTDG01\DCCTDG01_data2.ndf'.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> Connection Broken
>

Disk Error

I am getting this Error when i am doing a SELECT INTO Operation in a lot of
my databases on SQL SServer 2000
Pls help
Server: Msg 823, Level 24, State 2, Line 1
I/O error 1450(Insufficient system resources exist to complete the requested
service.) detected during read at offset 0x0000067c780000 in file
'K:\DCCTDG01\DCCTDG01_data2.ndf'.
ODBC: Msg 0, Level 16, State 1
Communication link failure
Connection BrokenSee if these are related:
http://support.microsoft.com/default.aspx?scid=kb;en-us;828339&Product=sql2k
http://support.microsoft.com/default.aspx?scid=kb;en-us;826433&Product=sql2k
Andrew J. Kelly SQL MVP
"Sanjay" <Sanjay@.discussions.microsoft.com> wrote in message
news:CB67EA77-EE46-4872-A933-3D2874FD2CAF@.microsoft.com...
> I am getting this Error when i am doing a SELECT INTO Operation in a lot
of
> my databases on SQL SServer 2000
> Pls help
> Server: Msg 823, Level 24, State 2, Line 1
> I/O error 1450(Insufficient system resources exist to complete the
requested
> service.) detected during read at offset 0x0000067c780000 in file
> 'K:\DCCTDG01\DCCTDG01_data2.ndf'.
> ODBC: Msg 0, Level 16, State 1
> Communication link failure
> Connection Broken
>

2012年3月19日星期一

Disconnect error while running re-indexing job.

Hi,
I have a 24Gb database with half a dozen indexes against various
tables which is failing during the reindexing task (as part of the
maintenance plan) at least 80% of the time.
The error given in the logs is:
"[Microsoft SQL-DMO (ODBC SQLState: 01000)] Error 0: This server has
been disconnected. You must reconnect to perform this operation."
Now, I am aware that this means the server disconnected or became
unavailable during the re-indexing, but I cannot find any logical
reason why this should happen. There are no access violations, either
in the SQL logs or the event viewer. No-one manually stopped SQL
Server. No other part of the maintenance plan has any issues. There
are no other errors around the time of this failure.
If anyone has any suggestions as to why this might be occurring, I'd
be grateful to hear them.
Thanks in advance,
Andy.
One of the things I would check is the autogrow/autoshrink options... If
those options are enabled AND your database picks an inopportune time to
grow (or shrink) errors like that are possible.
Steve
"Andy D." <clotho42@.yahoo.com> wrote in message
news:279509a6.0404260826.2b769d01@.posting.google.c om...
> Hi,
> I have a 24Gb database with half a dozen indexes against various
> tables which is failing during the reindexing task (as part of the
> maintenance plan) at least 80% of the time.
> The error given in the logs is:
> "[Microsoft SQL-DMO (ODBC SQLState: 01000)] Error 0: This server has
> been disconnected. You must reconnect to perform this operation."
> Now, I am aware that this means the server disconnected or became
> unavailable during the re-indexing, but I cannot find any logical
> reason why this should happen. There are no access violations, either
> in the SQL logs or the event viewer. No-one manually stopped SQL
> Server. No other part of the maintenance plan has any issues. There
> are no other errors around the time of this failure.
> If anyone has any suggestions as to why this might be occurring, I'd
> be grateful to hear them.
> Thanks in advance,
> Andy.

Disconnect error while running re-indexing job.

Hi,
I have a 24Gb database with half a dozen indexes against various
tables which is failing during the reindexing task (as part of the
maintenance plan) at least 80% of the time.
The error given in the logs is:
"[Microsoft SQL-DMO (ODBC SQLState: 01000)] Error 0: This server has
been disconnected. You must reconnect to perform this operation."
Now, I am aware that this means the server disconnected or became
unavailable during the re-indexing, but I cannot find any logical
reason why this should happen. There are no access violations, either
in the SQL logs or the event viewer. No-one manually stopped SQL
Server. No other part of the maintenance plan has any issues. There
are no other errors around the time of this failure.
If anyone has any suggestions as to why this might be occurring, I'd
be grateful to hear them.
Thanks in advance,
Andy.One of the things I would check is the autogrow/autoshrink options... If
those options are enabled AND your database picks an inopportune time to
grow (or shrink) errors like that are possible.
Steve
"Andy D." <clotho42@.yahoo.com> wrote in message
news:279509a6.0404260826.2b769d01@.posting.google.com...
> Hi,
> I have a 24Gb database with half a dozen indexes against various
> tables which is failing during the reindexing task (as part of the
> maintenance plan) at least 80% of the time.
> The error given in the logs is:
> "[Microsoft SQL-DMO (ODBC SQLState: 01000)] Error 0: This server has
> been disconnected. You must reconnect to perform this operation."
> Now, I am aware that this means the server disconnected or became
> unavailable during the re-indexing, but I cannot find any logical
> reason why this should happen. There are no access violations, either
> in the SQL logs or the event viewer. No-one manually stopped SQL
> Server. No other part of the maintenance plan has any issues. There
> are no other errors around the time of this failure.
> If anyone has any suggestions as to why this might be occurring, I'd
> be grateful to hear them.
> Thanks in advance,
> Andy.

2012年3月11日星期日

Disaster recovery through log file alone?

A collegue (really not me ;) has accidentally emptied a table in one of his
databases by making a simple typing error in a query, only to notice after
it happened that he had forgotten to create a backup schedule for that
database.
He has full recovery enabled the log has never been shrunk, so all his data
should still be present there.
Is there any way to use that log file to get his data back up to the point
where he emptied the table?
Automatic recovery would restore everything including the deletion, so what
we need is something like the 'STOPAT' option from RESTORE LOG, except that
there's no backup so RESTORE LOG is out of the question.
Or isn't it?
hi,
"Lucvdv" <replace_name@.null.net> ha scritto nel messaggio
news:v8ads0pkece7kjeelaalribkgt6dtec1b2@.4ax.com
> A collegue (really not me ;) has accidentally emptied a table in one
> of his databases by making a simple typing error in a query, only to
> notice after it happened that he had forgotten to create a backup
> schedule for that database.
> He has full recovery enabled the log has never been shrunk, so all
> his data should still be present there.
> Is there any way to use that log file to get his data back up to the
> point where he emptied the table?
> Automatic recovery would restore everything including the deletion,
> so what we need is something like the 'STOPAT' option from RESTORE
> LOG, except that there's no backup so RESTORE LOG is out of the
> question.
> Or isn't it?
as you do not have a backup to restore from, you are aout of luck with
standard SQL Server tools... but..
but Lumigent has a tool, Log Explorer,
http://www.lumigent.com/products/le_sql.html, which can be of interest..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||On Mon, 20 Dec 2004 13:23:50 +0100, "Andrea Montanari"
<andrea.sqlDMO@.virgilio.it> wrote:

> as you do not have a backup to restore from, you are aout of luck with
> standard SQL Server tools... but..
> but Lumigent has a tool, Log Explorer,
> http://www.lumigent.com/products/le_sql.html, which can be of interest..
Thanks.
I passed it on, but I wonder if his data are going to be worth the $1850
price tag of the product ;)
|||"Lucvdv" <replace_name@.null.net> ha scritto nel messaggio
news:bsnds0to23e1rm8p2lndi1nepcq97idvej@.4ax.com
> On Mon, 20 Dec 2004 13:23:50 +0100, "Andrea Montanari"
> <andrea.sqlDMO@.virgilio.it> wrote:
>
> Thanks.
> I passed it on, but I wonder if his data are going to be worth the
> $1850 price tag of the product ;)
:D
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

2012年2月25日星期六

Disabling Repl error (22538)

Posted - 02/01/2007 : 22:35:02


one week ago, for testing purpose, I set up trans repl, trans repl with updateable, snapshot repl using the same instance.

configuration is like this,

publisher and distributor are on the same server, 2 remote subscribers, one is 2000, the other is 2005.

It works OK, today I am trying to disable the replicaiton, clean up the machine. keep getting the errors:

an exception occurred while executing a T-SQL statement or batch
only replicaiton jobs,or job schedules can be added, modified,dropped or viewed through replicaiton SPs
could not update the distribution database subscription table, the subscription status could not be changed.
changed database context to 'master',(MSSQL SERVER error 22538)

Please help

publisher: 2005 Standard SP2 CTP

Try dropping the subscriptions before trying to disable publishing and distribution. If you still have issues cleaning up, try using sp_removedbreplication at the subscriber and publisher. You can get more information on sp_removedbreplication from http://msdn2.microsoft.com/en-us/library/ms188734.aspx

Hope this helps,

Tom

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Tom, thanks,

Could not be able to drop subscriptions, getting the same error.

Trying to use sp_removedbreplication, it works at subscribers side, while does not work at publisher side, getting the error:

Msg 22538, Level 16, State 1, Procedure sp_MSrepl_check_job_access, Line 155

Only replication jobs or job schedules can be added, modified, dropped or viewed through replication stored procedures.

2012年2月19日星期日

Disable Server Error Messages to Client App (VB)

Hi people!
Can anyone help me with this one? Using SQL Server 2000 and VB5,
calling a stored procedure from VB code. When a message occurs like:
Server: Msg 515, Level 16, State 2, Procedure Ve_KarticeIsplate, Line
235
Cannot insert the value NULL into column 'konto', table
'ibis.dbo.promkred'; column does not allow nulls. INSERT fails.
The statement has been terminated.
VB freaks out, looses the connection to server and stops the execution.
I want to be either be able to disable this message or to ignore it
from client app (using ADO for connection)...
(Simply to ignore the error)Hi VesnaSA,
Here are two excellent articles on error handling in SQL server:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
A lot of reading but it's worth it.
"VesnaSA" <VesnaVujovicSA@.gmail.com> wrote in message
news:1132235726.691296.264240@.g14g2000cwa.googlegroups.com...
> Hi people!
> Can anyone help me with this one? Using SQL Server 2000 and VB5,
> calling a stored procedure from VB code. When a message occurs like:
> Server: Msg 515, Level 16, State 2, Procedure Ve_KarticeIsplate, Line
> 235
> Cannot insert the value NULL into column 'konto', table
> 'ibis.dbo.promkred'; column does not allow nulls. INSERT fails.
> The statement has been terminated.
> VB freaks out, looses the connection to server and stops the execution.
> I want to be either be able to disable this message or to ignore it
> from client app (using ADO for connection)...
> (Simply to ignore the error)
>|||> Cannot insert the value NULL into column 'konto', table
> 'ibis.dbo.promkred'; column does not allow nulls. INSERT fails.
> The statement has been terminated.
> VB freaks out, looses the connection to server and stops the execution.
> I want to be either be able to disable this message or to ignore it
> from client app (using ADO for connection)...
> (Simply to ignore the error)
>
it would be better though not to pass NULL value to this column? or drop the
constraint from database, though i assume that having nulls in konto column
might be somewhat confusing for people working with account related
application
peter|||Thanx but i handle those transactions with errors in another way, by
placing them in another table,
the point is not to prevent it but to disable the message so that the
procedure can go on for the correct
ones and just skip the ones with errors... To prevent VB to loose the
connection when error happens...
But thanx anyway...|||Thanx Reymond, I'll dig into it, it seams that there is no way to
prevent server from sending the message, thw question is now if the
recordset in ADO can be adjusted so it doesn't report the message?|||I'm not a VB programmer but maybe this will help:
(this is script but you can probably adapt it to VB)
ON ERROR RESUME NEXT
--execute your stored procedure Ve_KarticeIsplate here
If you wish, you can view the errors:
If objConn.errors.count > 0 then
Response.write(objConn.errors.count) & " = " &
objConn.errors(0).description
For counter= 0 to objConn.errors.count
Response.write(objConn.errors(counter).number)
Response.write(objConn.errors(counter).description)
Next
end if
If you're still having problems, post in one of the VB newsgroups.
"VesnaSA" <VesnaVujovicSA@.gmail.com> wrote in message
news:1132238362.365549.85690@.z14g2000cwz.googlegroups.com...
> Thanx Reymond, I'll dig into it, it seams that there is no way to
> prevent server from sending the message, thw question is now if the
> recordset in ADO can be adjusted so it doesn't report the message?
>|||shouldn't you do it in the stored procedure then? using db to handle and
send errors might be expensive, and ADO is not best on handling errors.
also, I assume that account number shouldn't be empty and this is a business
rule, so why don't you check it before you call db? this would save you the
problem. exceptions should not be the way you control flow of your program.
Peter
"VesnaSA" <VesnaVujovicSA@.gmail.com> wrote in message
news:1132237902.217152.65360@.g14g2000cwa.googlegroups.com...
> Thanx but i handle those transactions with errors in another way, by
> placing them in another table,
> the point is not to prevent it but to disable the message so that the
> procedure can go on for the correct
> ones and just skip the ones with errors... To prevent VB to loose the
> connection when error happens...
> But thanx anyway...
>|||"Rogas69" <rogas69@.no_spamers.o2.ie> wrote in message
news:%23GEb9u46FHA.2716@.TK2MSFTNGP11.phx.gbl...
> shouldn't you do it in the stored procedure then? using db to handle and
> send errors might be expensive, and ADO is not best on handling errors.
> also, I assume that account number shouldn't be empty and this is a
> business rule, so why don't you check it before you call db? this would
> save you the problem. exceptions should not be the way you control flow of
> your program.
> Peter
I agree with you on this one.
Error handling has to be done in the database.
The parameters must be validated client side.
But (I'm sure that you saw the BUT coming) error handling also has to be
done in VB.
Imagine these cases:
-the connexion to the database is lost
-someone changed something in the database
-some unforseen error occors in the SP|||First, resolve the bug in the stored procedure which is trying to insert a
NULL into a non-nullable column.
There are techniques for implementing error handling in T-SQL, but this is
only useful for basic things like rolling back transactions and process
flow. The last line of defense is error handling at the application level,
and based on your description of the "VB freaks out", it sounds like perhaps
there no module or function level handling in the application, and the error
is being escalated up the call stack until becomes unrecoverable.
Handling Errors in Visual Basic
Error Handling Hierarchy
http://msdn.microsoft.com/library/d...nghierarchy.asp
Handling Errors and Messages in ADO
http://msdn.microsoft.com/library/d...
9pr.asp
http://msdn.microsoft.com/library/d...rorhandling.asp
"VesnaSA" <VesnaVujovicSA@.gmail.com> wrote in message
news:1132235726.691296.264240@.g14g2000cwa.googlegroups.com...
> Hi people!
> Can anyone help me with this one? Using SQL Server 2000 and VB5,
> calling a stored procedure from VB code. When a message occurs like:
> Server: Msg 515, Level 16, State 2, Procedure Ve_KarticeIsplate, Line
> 235
> Cannot insert the value NULL into column 'konto', table
> 'ibis.dbo.promkred'; column does not allow nulls. INSERT fails.
> The statement has been terminated.
> VB freaks out, looses the connection to server and stops the execution.
> I want to be either be able to disable this message or to ignore it
> from client app (using ADO for connection)...
> (Simply to ignore the error)
>|||True, it is important to implement T-SQL error handling so that the
transaction is rolled back, but any advanced error handling like retry logic
or logging errors is best implemented at the application level.
"Raymond D'Anjou" <rdanjou@.canatradeNOSPAM.com> wrote in message
news:e2XAz%2346FHA.3660@.TK2MSFTNGP09.phx.gbl...
> "Rogas69" <rogas69@.no_spamers.o2.ie> wrote in message
> news:%23GEb9u46FHA.2716@.TK2MSFTNGP11.phx.gbl...
> I agree with you on this one.
> Error handling has to be done in the database.
> The parameters must be validated client side.
> But (I'm sure that you saw the BUT coming) error handling also has to be
> done in VB.
> Imagine these cases:
> -the connexion to the database is lost
> -someone changed something in the database
> -some unforseen error occors in the SP
>

disable publishing and distribution error

Ok, which database are you creating sysmergepublications and
sysmergesubscriptions in ?
I've created sysmergesubscriptions in distribution , master , msdb ...
I still receive an error when I run
use master
exec sp_dropdistributor @.no_checks = 1
go
I receive :
Msg 208, Level 16, State 1, Procedure sp_MSmergepublishdb, Line 103
Invalid object name 'dbo.sysmergesubscriptions'.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%233PUslE$GHA.896@.TK2MSFTNGP03.phx.gbl...
> create table sysmergepublications
> (
> publisher sysname,
> publisher_db sysname,
> name sysname,
> description nvarchar(510),
> retention int,
> publication_type tinyint,
> pubid uniqueidentifier,
> designmasterid uniqueidentifier,
> parentid uniqueidentifier,
> sync_mode tinyint,
> allow_push int,
> allow_pull int,
> allow_anonymous int,
> centralized_conflicts int,
> status tinyint,
> snapshot_ready tinyint,
> enabled_for_internet bit,
> dynamic_filters bit,
> snapshot_in_defaultfolder bit,
> alt_snapshot_folder nvarchar(510),
> pre_snapshot_script nvarchar(510),
> post_snapshot_script nvarchar(510),
> compress_snapshot bit,
> ftp_address sysname,
> ftp_port int,
> ftp_subdirectory nvarchar(510),
> ftp_login sysname,
> ftp_password nvarchar(1048),
> conflict_retention int,
> keep_before_values int,
> allow_subscription_copy bit,
> allow_synctoalternate bit,
> validate_subscriber_info nvarchar(1000),
> ad_guidname sysname,
> backward_comp_level int,
> max_concurrent_merge int,
> max_concurrent_dynamic_snapshots int,
> use_partition_groups smallint,
> dynamic_filters_function_list nvarchar(1000),
> partition_id_eval_proc sysname,
> publication_number smallint,
> replicate_ddl int,
> allow_subscriber_initiated_snapshot bit,
> distributor sysname,
> snapshot_jobid binary(16),
> allow_web_synchronization bit,
> web_synchronization_url nvarchar(1000),
> allow_partition_realignment bit,
> retention_period_unit tinyint,
> decentralized_conflicts int,
> generation_leveling_threshold int,
> automatic_reinitialization_policy bit
> )
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
> news:%23exvteE$GHA.4196@.TK2MSFTNGP03.phx.gbl...
>
Publication database. Check which databases are published for merge
replication and put it there.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:uyEq9AQBHHA.4672@.TK2MSFTNGP02.phx.gbl...
> Ok, which database are you creating sysmergepublications and
> sysmergesubscriptions in ?
> I've created sysmergesubscriptions in distribution , master , msdb ...
> I still receive an error when I run
> use master
> exec sp_dropdistributor @.no_checks = 1
> go
> I receive :
> Msg 208, Level 16, State 1, Procedure sp_MSmergepublishdb, Line 103
> Invalid object name 'dbo.sysmergesubscriptions'.
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:%233PUslE$GHA.896@.TK2MSFTNGP03.phx.gbl...
>
|||My database is no longer being published for replication because I used
exec sp_replicationdboption 'databasename','merge publish',false
Nonetheless, I added a dbo.sysmergesubscriptions table to this database and
ran
use master
exec sp_dropdistributor @.no_checks = 1
go
but I still receive the error :
Msg 208, Level 16, State 1, Procedure sp_MSmergepublishdb, Line 103
Invalid object name 'dbo.sysmergesubscriptions'.
Could it be because I need to add dbo.sysmergesubscriptions as a system
object ? How do I do this ?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eZifFJQBHHA.2304@.TK2MSFTNGP02.phx.gbl...
> Publication database. Check which databases are published for merge
> replication and put it there.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
> news:uyEq9AQBHHA.4672@.TK2MSFTNGP02.phx.gbl...
>
|||these are the lines around 103
if not exists (select * from dbo.sysmergesubscriptions
where UPPER(subscriber_server) =
UPPER(publishingservername()) and db_name = db_name() and subid <> pubid)
begin
select @.ignore_merge_metadata = 1
end
It is complaining about the database you are running the command in. Is the
table there? Does it have the owner dbo?
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:ePkGbNQBHHA.1220@.TK2MSFTNGP04.phx.gbl...
> My database is no longer being published for replication because I used
> exec sp_replicationdboption 'databasename','merge publish',false
> Nonetheless, I added a dbo.sysmergesubscriptions table to this database
> and ran
> use master
> exec sp_dropdistributor @.no_checks = 1
> go
> but I still receive the error :
> Msg 208, Level 16, State 1, Procedure sp_MSmergepublishdb, Line 103
> Invalid object name 'dbo.sysmergesubscriptions'.
> Could it be because I need to add dbo.sysmergesubscriptions as a system
> object ? How do I do this ?
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:eZifFJQBHHA.2304@.TK2MSFTNGP02.phx.gbl...
>

2012年2月17日星期五

disable job

I'm using SQL server 2000
when i disable or delete a job, it returns
"Error 14274: Cannot add, update, or delete a job (or its steps or
schedules) that originated from an MSX server."Win
Examine MSDB..sysjobs system table. Probably there is ni match a server name
in originating_server column
"Win" <aaa@.aaa.com> wrote in message
news:%23Br9haUUGHA.5148@.TK2MSFTNGP12.phx.gbl...
> I'm using SQL server 2000
> when i disable or delete a job, it returns
> "Error 14274: Cannot add, update, or delete a job (or its steps or
> schedules) that originated from an MSX server."
>
>
>