When executing a basic query against (see below) the system object
table in a SQL 2000 database it displays the following error.
SELECT 1 FROM SYSOBJECTS
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'SYSOBJECTS'.
The table does exist and the query is being run as an account with SQL
Admin privileges. This also occurs when trying to query the SysIndexes
table. Other databases on the server are able to query these tables.
What is causing this problem on this one database and how can it be
resolved?Some ideas.
1)Try SELECT 1 FROM sysobjects
2)Try SELECT 1 FROM dbo.sysobjects
--
Jack Vamvas
___________________________________
Need an IT job? http://www.ITjobfeed.com/SQL
"Robin9876" <robin9876@.hotmail.com> wrote in message
news:1190368228.718871.96350@.57g2000hsv.googlegroups.com...
> When executing a basic query against (see below) the system object
> table in a SQL 2000 database it displays the following error.
> SELECT 1 FROM SYSOBJECTS
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'SYSOBJECTS'.
> The table does exist and the query is being run as an account with SQL
> Admin privileges. This also occurs when trying to query the SysIndexes
> table. Other databases on the server are able to query these tables.
> What is causing this problem on this one database and how can it be
> resolved?
>|||> What is causing this problem on this one database and how can it be
> resolved?
Object name case sensitivity is determined by the database collation. I
suspect the following query will return a case-sensitive collation:
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation')
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Robin9876" <robin9876@.hotmail.com> wrote in message
news:1190368228.718871.96350@.57g2000hsv.googlegroups.com...
> When executing a basic query against (see below) the system object
> table in a SQL 2000 database it displays the following error.
> SELECT 1 FROM SYSOBJECTS
> Server: Msg 208, Level 16, State 1, Line 1
> Invalid object name 'SYSOBJECTS'.
> The table does exist and the query is being run as an account with SQL
> Admin privileges. This also occurs when trying to query the SysIndexes
> table. Other databases on the server are able to query these tables.
> What is causing this problem on this one database and how can it be
> resolved?
>|||Since posting I had resolved it.
I already thought of the suggestions that Jack posted, it was what Dan
has suggested a particular 3rd party database had been setup as case
sensitive.
On 21 Sep, 12:22, "Dan Guzman" <guzma...@.nospam-online.sbcglobal.net>
wrote:
> > What is causing this problem on this one database and how can it be
> > resolved?
> Object name case sensitivity is determined by the database collation. I
> suspect the following query will return a case-sensitive collation:
> SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation')
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Robin9876" <robin9...@.hotmail.com> wrote in message
> news:1190368228.718871.96350@.57g2000hsv.googlegroups.com...
> > When executing a basic query against (see below) the system object
> > table in a SQL 2000 database it displays the following error.
> > SELECT 1 FROM SYSOBJECTS
> > Server: Msg 208, Level 16, State 1, Line 1
> > Invalid object name 'SYSOBJECTS'.
> > The table does exist and the query is being run as an account with SQL
> > Admin privileges. This also occurs when trying to query the SysIndexes
> > table. Other databases on the server are able to query these tables.
> > What is causing this problem on this one database and how can it be
> > resolved?
Showing posts with label executing. Show all posts
Showing posts with label executing. Show all posts
Friday, March 23, 2012
Saturday, February 25, 2012
Problem installing pubs db in MSDE
On executing the following command:
osql -E -i instpubs.sql
I am getting the following error:
[Shared Memory] SQL Server does not exist or access denied.
[Shared Memory] ConnectionOpen (Connect())
The environment is:
1. Windows XP Professional
2. MSDE was installed using the download file 'SQL2kDeskSP3.exe' dated
5/24/2003.
3. Sample database scripts were installed using the download file
'SQL2000SampleDb.msi' dated 4/20/2004.
4. The osql command sequence was found in the
'ReadMe_SQL2000SampleDbScripts.htm', that was installed along with Sample DB
scripts.
I have done this successfully last year at my home computer. As far as I
remember, I have not used 'osql' to install the pubs and Nortwind databases.
But unfortunately, I don't remember how I did it earlier as my notes is
missing. Now I am doing it on a office computer. I am able to access the
MSDE server through VB.NET normally without any problem.
ThanQ...
Are you running OSQL on a local machine? Against a default instance?
Try specifying the server\instance name with the -S parameter.
This error doesn't have anything to do with the script you passed with the
-i parameter, it's an indication that SQL Server cannot be found (it isn't
started, name resolution isn't working, your protocol isn't accepted, etc.)
See: 328306 INF: Potential Causes of the "SQL Server Does Not Exist or
Access
http://support.microsoft.com/?id=328306
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Thankyou for your prompt. Actually I tried -S parameter with either Computer
Name or Instance Name individually.
Now I tried with both of them separated by a back-slash. This is actually
the 3rd example in the read me doc. But I was interpreting the
'ComputerName/InstanceName' as 'Computer Name or Instance Name'.
Now it got installed. The syntax I used is:
osql -E -S <ComputerName>\<InstanceName> -i instpubs.sql
ThanQ...
"Cindy Gross (MSFT)" <cgross@.online.microsoft.com> wrote in message
news:iys4wrMKEHA.3048@.cpmsftngxa10.phx.gbl...
> Are you running OSQL on a local machine? Against a default instance?
> Try specifying the server\instance name with the -S parameter.
> This error doesn't have anything to do with the script you passed with the
> -i parameter, it's an indication that SQL Server cannot be found (it isn't
> started, name resolution isn't working, your protocol isn't accepted,
etc.)
> See: 328306 INF: Potential Causes of the "SQL Server Does Not Exist or
> Access
> http://support.microsoft.com/?id=328306
> Cindy Gross, MCDBA, MCSE
> http://cindygross.tripod.com
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
osql -E -i instpubs.sql
I am getting the following error:
[Shared Memory] SQL Server does not exist or access denied.
[Shared Memory] ConnectionOpen (Connect())
The environment is:
1. Windows XP Professional
2. MSDE was installed using the download file 'SQL2kDeskSP3.exe' dated
5/24/2003.
3. Sample database scripts were installed using the download file
'SQL2000SampleDb.msi' dated 4/20/2004.
4. The osql command sequence was found in the
'ReadMe_SQL2000SampleDbScripts.htm', that was installed along with Sample DB
scripts.
I have done this successfully last year at my home computer. As far as I
remember, I have not used 'osql' to install the pubs and Nortwind databases.
But unfortunately, I don't remember how I did it earlier as my notes is
missing. Now I am doing it on a office computer. I am able to access the
MSDE server through VB.NET normally without any problem.
ThanQ...
Are you running OSQL on a local machine? Against a default instance?
Try specifying the server\instance name with the -S parameter.
This error doesn't have anything to do with the script you passed with the
-i parameter, it's an indication that SQL Server cannot be found (it isn't
started, name resolution isn't working, your protocol isn't accepted, etc.)
See: 328306 INF: Potential Causes of the "SQL Server Does Not Exist or
Access
http://support.microsoft.com/?id=328306
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Thankyou for your prompt. Actually I tried -S parameter with either Computer
Name or Instance Name individually.
Now I tried with both of them separated by a back-slash. This is actually
the 3rd example in the read me doc. But I was interpreting the
'ComputerName/InstanceName' as 'Computer Name or Instance Name'.
Now it got installed. The syntax I used is:
osql -E -S <ComputerName>\<InstanceName> -i instpubs.sql
ThanQ...
"Cindy Gross (MSFT)" <cgross@.online.microsoft.com> wrote in message
news:iys4wrMKEHA.3048@.cpmsftngxa10.phx.gbl...
> Are you running OSQL on a local machine? Against a default instance?
> Try specifying the server\instance name with the -S parameter.
> This error doesn't have anything to do with the script you passed with the
> -i parameter, it's an indication that SQL Server cannot be found (it isn't
> started, name resolution isn't working, your protocol isn't accepted,
etc.)
> See: 328306 INF: Potential Causes of the "SQL Server Does Not Exist or
> Access
> http://support.microsoft.com/?id=328306
> Cindy Gross, MCDBA, MCSE
> http://cindygross.tripod.com
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
Monday, February 20, 2012
Problem inserting data into remote server
Hello,
I'm working on an old database that has been converted to SQL server 2000 and I am having a problem executing the DML statement below. It looks like the problem is related to column file. File seems to be a reserved keyword for sql server. How do I get around this? I already tried brackets around the column name etc.
INSERT INTO [NW_Test_MM].[NW_35].[dbo].T_LOG_STORAGE ([source], [session_id],session_index, [header_type],
[app_type],
[access],
[start] ,
[stop],
[computer],
[file],
[insert_time])
SELECT [source], [session_id],
[session_index], [header_type],
[app_type],
[access],
[start] ,
[stop],
[computer],
[file],
[insert_time] FROM T_LOG_STORAGE WHERE NOT EXISTS ( SELECT session_id FROM [NW_Test_MM].[NW_35].[dbo].T_LOG_STORAGE derived WHERE T_LOG_STORAGE.source = derived.source AND T_LOG_STORAGE.session_id = derived.session_id AND T_LOG_STORAGE.session_index = derived.session_index) AND T_LOG_STORAGE.source = @.dSource
(1 row(s) affected)
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.]
[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'file'.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow returned 0x80004005: ].Originally posted by hijinks
Hello,
I'm working on an old database that has been converted to SQL server 2000 and I am having a problem executing the DML statement below. It looks like the problem is related to column file. File seems to be a reserved keyword for sql server. How do I get around this? I already tried brackets around the column name etc.
INSERT INTO [NW_Test_MM].[NW_35].[dbo].T_LOG_STORAGE ([source], [session_id],session_index, [header_type],
[app_type],
[access],
[start] ,
[stop],
[computer],
[file],
[insert_time])
SELECT [source], [session_id],
[session_index], [header_type],
[app_type],
[access],
[start] ,
[stop],
[computer],
[file],
[insert_time] FROM T_LOG_STORAGE WHERE NOT EXISTS ( SELECT session_id FROM [NW_Test_MM].[NW_35].[dbo].T_LOG_STORAGE derived WHERE T_LOG_STORAGE.source = derived.source AND T_LOG_STORAGE.session_id = derived.session_id AND T_LOG_STORAGE.session_index = derived.session_index) AND T_LOG_STORAGE.source = @.dSource
(1 row(s) affected)
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.]
[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'file'.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow returned 0x80004005: ].
What is it: (1 row(s) affected) - looks like insert was done? Do you have triggers on remote table?
Try to do simple insert and check is it work at all.|||Actually the (1 row(s) affected) is a by product of me printing the INSERT statement, so the insert does not happen.|||Actually the (1 row(s) affected) is a by product of me printing the INSERT statement, so the insert does not happen.
I'm working on an old database that has been converted to SQL server 2000 and I am having a problem executing the DML statement below. It looks like the problem is related to column file. File seems to be a reserved keyword for sql server. How do I get around this? I already tried brackets around the column name etc.
INSERT INTO [NW_Test_MM].[NW_35].[dbo].T_LOG_STORAGE ([source], [session_id],session_index, [header_type],
[app_type],
[access],
[start] ,
[stop],
[computer],
[file],
[insert_time])
SELECT [source], [session_id],
[session_index], [header_type],
[app_type],
[access],
[start] ,
[stop],
[computer],
[file],
[insert_time] FROM T_LOG_STORAGE WHERE NOT EXISTS ( SELECT session_id FROM [NW_Test_MM].[NW_35].[dbo].T_LOG_STORAGE derived WHERE T_LOG_STORAGE.source = derived.source AND T_LOG_STORAGE.session_id = derived.session_id AND T_LOG_STORAGE.session_index = derived.session_index) AND T_LOG_STORAGE.source = @.dSource
(1 row(s) affected)
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.]
[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'file'.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow returned 0x80004005: ].Originally posted by hijinks
Hello,
I'm working on an old database that has been converted to SQL server 2000 and I am having a problem executing the DML statement below. It looks like the problem is related to column file. File seems to be a reserved keyword for sql server. How do I get around this? I already tried brackets around the column name etc.
INSERT INTO [NW_Test_MM].[NW_35].[dbo].T_LOG_STORAGE ([source], [session_id],session_index, [header_type],
[app_type],
[access],
[start] ,
[stop],
[computer],
[file],
[insert_time])
SELECT [source], [session_id],
[session_index], [header_type],
[app_type],
[access],
[start] ,
[stop],
[computer],
[file],
[insert_time] FROM T_LOG_STORAGE WHERE NOT EXISTS ( SELECT session_id FROM [NW_Test_MM].[NW_35].[dbo].T_LOG_STORAGE derived WHERE T_LOG_STORAGE.source = derived.source AND T_LOG_STORAGE.session_id = derived.session_id AND T_LOG_STORAGE.session_index = derived.session_index) AND T_LOG_STORAGE.source = @.dSource
(1 row(s) affected)
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.]
[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'file'.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow returned 0x80004005: ].
What is it: (1 row(s) affected) - looks like insert was done? Do you have triggers on remote table?
Try to do simple insert and check is it work at all.|||Actually the (1 row(s) affected) is a by product of me printing the INSERT statement, so the insert does not happen.|||Actually the (1 row(s) affected) is a by product of me printing the INSERT statement, so the insert does not happen.
Subscribe to:
Posts (Atom)