dbTalk Databases Forums  

isql error message

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss isql error message in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
anuu
 
Posts: n/a

Default isql error message - 04-04-2005 , 09:40 PM






Hi,

I have created a database as pubs.qa and wrote a command utility to
query a table.

isql -S server -E -d pubs.qa -i qry.sql -b -n


contents of qry.sql

select * from users
go

when i run this command, error message
Msg 911, Level 16, State 1, Server XXXXXXX, Line 1
Could not locate entry in sysdatabases for database 'pubs'. No entry
found with that name. Make sure that the name is entered correctly.

However, I am able to use this database in Query Analyzer and execute
the query.

I am just wondering if the database name with '.' is the problem...

Any pointers to proceed further.

Thanks in advance
-Anu


Reply With Quote
  #2  
Old   
Simon Hayes
 
Posts: n/a

Default Re: isql error message - 04-05-2005 , 01:52 AM






Probably - try using delimiters, ie [pubs.qa] Since the dot/period
character is used to separate parts of an object name in MSSQL
(server.database.owner.object), it is usually a bad idea to use it
within an object name. pubs_qa would probably be a better choice in
this case.

See "Delimited Identifiers" and "Using Identifiers as Object Names" in
Books Online.

Simon


Reply With Quote
  #3  
Old   
sqlmatt
 
Posts: n/a

Default Re: isql error message - 04-05-2005 , 08:29 AM



Right, try:


isql -S server -E -d [pubs.qa] -i qry.sql -b -n


Reply With Quote
  #4  
Old   
anuu
 
Posts: n/a

Default Re: isql error message - 04-05-2005 , 07:15 PM




sqlmatt wrote:
Quote:
Right, try:


isql -S server -E -d [pubs.qa] -i qry.sql -b -n


Thanks, it worked.

-Anu



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.