ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » connecting broker to a database on sql server 2008

Post new topic  Reply to topic
 connecting broker to a database on sql server 2008 « View previous topic :: View next topic » 
Author Message
praj1740
PostPosted: Thu May 16, 2013 1:42 am    Post subject: connecting broker to a database on sql server 2008 Reply with quote

Apprentice

Joined: 05 Feb 2013
Posts: 29
Location: INDIA

Hi everyone i created a database named sample under dbo schema, and added a system DSN for that database and i have run the mqsisetbdparms command with specific user id.In the Esql code im trying to insert data into table.When im debugging the flow it is throwing the exception .
[Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name 'dbo.employeedetails'.
I tried to resolve the error but cant find why exactly it is not identifying the table.
Can anyone help me resolving this.Thank you
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu May 16, 2013 2:04 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Perhaps you don't need the 'dbo'?

Perhaps the user you are connecting to the DB with has no rights on this table?

Why not try connecting to the DB with SQL Studio using that user and seeing if the command you are trying to use actually works?

etc etc etc etc
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
praj1740
PostPosted: Thu May 16, 2013 2:16 am    Post subject: Reply with quote

Apprentice

Joined: 05 Feb 2013
Posts: 29
Location: INDIA

hi smdavies i executed the command in the database and i has inserted the values in the table and the user has all necessary permissions.Is the anything wrong with my mqsisetbdparms in it i specified the user name as my system user name instead of schema name dbo
Back to top
View user's profile Send private message
mapa
PostPosted: Thu May 16, 2013 2:21 am    Post subject: Reply with quote

Master

Joined: 09 Aug 2001
Posts: 257
Location: Malmö, Sweden

To verify your datasoure use mqsicvp

As in:
Code:

mqsicvp <broker> -n <DSN>


I think as hinted by previous answer that you don't have the name/syntax right...

Please post the ESQL for the insert (and put it in code-tags).

I have inserts that look like (trying to translate it to your example)
Code:
Database.sample.dbo.employeedetails
Back to top
View user's profile Send private message Visit poster's website
praj1740
PostPosted: Thu May 16, 2013 2:28 am    Post subject: Reply with quote

Apprentice

Joined: 05 Feb 2013
Posts: 29
Location: INDIA

I verified with mqsicvp and the connection is successfully established
Code:
INSERT INTO Database.dbo.employeedetails(employeeno,empname ) VALUES (144,'ravi' );
.
This is my insert statement
Back to top
View user's profile Send private message
dogorsy
PostPosted: Thu May 16, 2013 3:15 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

you need to look in the database and see which is the default schema name for the user you used in the mqsisetdbparms. if not dbo, then either remove the .dbo from you esql or change the database userid to use dbo as schema
Back to top
View user's profile Send private message
praj1740
PostPosted: Thu May 16, 2013 7:25 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Feb 2013
Posts: 29
Location: INDIA

I have checked in the database and the default schema is dbo.Even i have removed the dbo in the insert statement and still it is not identifying the table object
Back to top
View user's profile Send private message
dogorsy
PostPosted: Thu May 16, 2013 9:28 pm    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

what system are you trying to connect from ?
if from windows, review your odbc definition, make sure that is pointing to your database ( sample ) and not the default.
if from a unix, please post your odbc definition, as I suspect you are pointing to the wrong data source and that is why the table cannot be found
Back to top
View user's profile Send private message
praj1740
PostPosted: Fri May 17, 2013 1:40 am    Post subject: Reply with quote

Apprentice

Joined: 05 Feb 2013
Posts: 29
Location: INDIA

I just checked the odbc definition in the system dsn and it is pointing to a default database.I am new to this configuration and made a mistake.Thanks all for your help.
Back to top
View user's profile Send private message
new2z
PostPosted: Fri May 17, 2013 12:12 pm    Post subject: Reply with quote

Novice

Joined: 16 May 2013
Posts: 15

Quote:
[Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name 'dbo.employeedetails'


This is happening because your broker user is trying to call the table from its own schema.

If your broker user is brkrusr, then your broker may be looking at something like Database.brkrusr.employeedetails

The easiest way is to try to recreate your tables with brkrusr, and try again
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri May 17, 2013 12:24 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

new2z wrote:


The easiest way is to try to recreate your tables with brkrusr, and try again


What about authorizing the user you are logging onto the DB with to access these tables?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
praj1740
PostPosted: Fri May 17, 2013 6:32 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Feb 2013
Posts: 29
Location: INDIA

Hi new2z now it is working earlier i made a mistake in the odbc definition thats points to a default database and i modified it to sample database and now its working fine.Thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » connecting broker to a database on sql server 2008
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.