Showing posts with label online. Show all posts
Showing posts with label online. Show all posts

Tuesday, March 27, 2012

connecting to sql server (within windows domain) through linux?

Hi,

I'm planning to develop a small intranet to provide our organization
with documents online. I've decided to do this using jsp/servlets
using a tomcat server. For an operating system, I have chosen red hat
linux. However, I'd like to keep a small database on a sql server as
a datasource. However, this sql server is already part of our
organization's windows domain. I suspect I'll need to configure samba
so that other terminals on the windows domain will be able to reach
the intranet. What's the best manner in which to connect my linux
servlets to this sql server database? I suspect this may be
difficult, considering the sql server exists within a windows domain,
but as a beginner, what do I know. Perhaps someone could point me in
the right direction.Hi

You can use the JDBC driver to communicate with your SQL Server and use SQL
Server authentication to access the server. Samba is not needed at all this
may be a way to connect to an access database but SQL Server is a completely
different product.

John
"Dan" <danhicks333@.gmail.com> wrote in message
news:b03c5d2b.0409111105.18d75023@.posting.google.c om...
> Hi,
> I'm planning to develop a small intranet to provide our organization
> with documents online. I've decided to do this using jsp/servlets
> using a tomcat server. For an operating system, I have chosen red hat
> linux. However, I'd like to keep a small database on a sql server as
> a datasource. However, this sql server is already part of our
> organization's windows domain. I suspect I'll need to configure samba
> so that other terminals on the windows domain will be able to reach
> the intranet. What's the best manner in which to connect my linux
> servlets to this sql server database? I suspect this may be
> difficult, considering the sql server exists within a windows domain,
> but as a beginner, what do I know.Perhapssomeonecouldpointmein
> the right direction.|||Dan (danhicks333@.gmail.com) writes:
> I'm planning to develop a small intranet to provide our organization
> with documents online. I've decided to do this using jsp/servlets
> using a tomcat server. For an operating system, I have chosen red hat
> linux. However, I'd like to keep a small database on a sql server as
> a datasource. However, this sql server is already part of our
> organization's windows domain. I suspect I'll need to configure samba
> so that other terminals on the windows domain will be able to reach
> the intranet. What's the best manner in which to connect my linux
> servlets to this sql server database? I suspect this may be
> difficult, considering the sql server exists within a windows domain,
> but as a beginner, what do I know. Perhaps someone could point me in
> the right direction.

I have never connected to SQL Server from Unix myself, but I happen to
maintain a page which summarizes the various options. Look at:
http://www.sommarskog.se/mssqlperl/unix.html

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||The SQL server I want to connect to does not have a public IP address.
I connect to this server from my other web server (part of the
windows domain)using the server name (treadstonesql). My thinking was
that if samba is configured correctly, I could connect to it the same
way my web server does. Does this help?

"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:<414352bf$0$4664$afc38c87@.news.easynet.co.uk>...
> Hi
> You can use the JDBC driver to communicate with your SQL Server and use SQL
> Server authentication to access the server. Samba is not needed at all this
> may be a way to connect to an access database but SQL Server is a completely
> different product.
> John
> "Dan" <danhicks333@.gmail.com> wrote in message
> news:b03c5d2b.0409111105.18d75023@.posting.google.c om...
> > Hi,
> > I'm planning to develop a small intranet to provide our organization
> > with documents online. I've decided to do this using jsp/servlets
> > using a tomcat server. For an operating system, I have chosen red hat
> > linux. However, I'd like to keep a small database on a sql server as
> > a datasource. However, this sql server is already part of our
> > organization's windows domain. I suspect I'll need to configure samba
> > so that other terminals on the windows domain will be able to reach
> > the intranet. What's the best manner in which to connect my linux
> > servlets to this sql server database? I suspect this may be
> > difficult, considering the sql server exists within a windows domain,
> > but as a beginner, what do I know.Perhapssomeonecouldpointmein
> > the right direction.|||Hi

The IPaddress does not have to be a public one (in fact it would be better
if it wasn't) The IP Address can be used when connecting instead of using a
lookup, you will need to set up the firewall rules so that you can talk on
the right ports (not necessarily the default ones!) between the two
machines.

I would not expect your second web server to be part of the internal domain,
this may mean that your whole domain is compromised if the web server is
compromised.

John

"Dan" <danhicks333@.gmail.com> wrote in message
news:b03c5d2b.0409120659.618cc1ae@.posting.google.c om...
> The SQL server I want to connect to does not have a public IP address.
> I connect to this server from my other web server (part of the
> windows domain)using the server name (treadstonesql). My thinking was
> that if samba is configured correctly, I could connect to it the same
> way my web server does. Does this help?
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:<414352bf$0$4664$afc38c87@.news.easynet.co.uk>...
> > Hi
> > You can use the JDBC driver to communicate with your SQL Server and use
SQL
> > Server authentication to access the server. Samba is not needed at all
this
> > may be a way to connect to an access database but SQL Server is a
completely
> > different product.
> > John
> > "Dan" <danhicks333@.gmail.com> wrote in message
> > news:b03c5d2b.0409111105.18d75023@.posting.google.c om...
> > > Hi,
> > > > I'm planning to develop a small intranet to provide our organization
> > > with documents online. I've decided to do this using jsp/servlets
> > > using a tomcat server. For an operating system, I have chosen red hat
> > > linux. However, I'd like to keep a small database on a sql server as
> > > a datasource. However, this sql server is already part of our
> > > organization's windows domain. I suspect I'll need to configure samba
> > > so that other terminals on the windows domain will be able to reach
> > > the intranet. What's the best manner in which to connect my linux
> > > servlets to this sql server database? I suspect this may be
> > > difficult, considering the sql server exists within a windows domain,
> > > but as a beginner, what do I know.Perhapssomeonecouldpointmein
> > > the right direction.

Sunday, March 25, 2012

Connecting to SQL database

Hi all,

Please help me with the following problem because I am running around in circles.

I have this problem getting a forum online.

Since it is a database related problem which I have been trying to solve at the ClubSite forum I am taking the liberty to come to this forum with this problem.

This is the story:

I have this separate SQL databasedotForum2004.mdf in App_data.

After trial and error got it working locally.

But when I put it online at my webserver (On a Stand-alone PC at my jobsite) I get an application error.(From the Club Site application)

This is the connection key which works fine locally. Is there something obvious you can point me at?

<addkey="forumDSN"value="Provider=SQLOLEDB; Server=.\SQLExpress;AttachDbFilename=|DataDirectory|dotForum2004.mdf;Trusted_Connection=Yes;" />

Thanks in advance,

Lex

Hi Lexy,

From you connection string I notice you use Windows Authentication (Trusted_Connection=Yes) to connect to database. And as I know when the project is deployed to website, it will run under an account (maybe called 'NT AUTHROTY\NETWORK SERVICE' or something like this, sorry I'm not sure) rather then under current Windows Login account. So you can check the connection error message, is it something like this?

Login failed for 'XXXXXXX'

Where 'XXXXXX' stands for an account. Then check the logins in you SQL Server instace (it is '.\SQLExpress' in your application). Add the account to SQL logins and give it proper permission to access database objects; or you can add it to 'sysadmin' role so that it can access all database objects.

|||

Hi lori_Jay,

Thanks for your response,

I put <customErrors mode="Off"/> in my web.config and now at least I see the error. (see below on this post)

But I'm afraid you lost me with the part:

Then check the logins in you SQL Server instace (it is '.\SQLExpress' in your application). Add the account to SQL logins and give it proper permission to access database objects; or you can add it to 'sysadmin' role so that it can access all database objects.

Got no idea where in the application i can check the logins like you suggest. Let alone the rest of your advice.Embarrassed [:$]

Lex

CREATE DATABASE permission denied in database 'master'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.OleDb.OleDbException: CREATE DATABASE permission denied in database 'master'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[OleDbException (0x80004005): CREATE DATABASE permission denied in database 'master'.] System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +1054817 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +53 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.OleDb.OleDbConnection.Open() +37 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86 dotForumClientTopic.viewAllRecords.bindData() +169 dotForumClientTopic.viewAllRecords.Page_Load(Object sender, EventArgs e) +32 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

|||

Sorry for misunderstanding^_^

Anyways we got closer to the cause. From the error message we can see the problem is the Login used in applcation connection did not have sufficient permission to CREATE DATABASE; whileCREATE DATABASE permission defaults to members of thesysadmin anddbcreator fixed server roles. So let's try to add the 'NT AUTHORITY\NETWORK SERVICE' (or 'ASPNET', something like these which used by IIS when connecting to SQL with Windows Authentication) to sysadmin role. You can do this simply in Management Studio->MyInstance->Security->Logins; or if you do not have Management Studio, just try to run this T-SQL command:

EXEC sp_addsrvrolemember 'NT AUTHORITY\NETWORK SERVICE' ,'sysadmin'

|||

Hi,

You just made me a happy man!

If you new how long this has been bugging me.

Adding Sysadmin role to <Servername>\ASPNET did the trick.

Now at last I can get on with all the other Forum problems.

Thanks again,

Lex

|||

Hi again,

Now the Forum is finally online I am trying to evaluate a number of things so I get the optimal result in learning from the problem you solved.

Is there a preferred way for Authentication.to SQLserver /express. Would it be better to go for SQL Server Authentication?

--------

I also had to addDatabase=dbname

Old:<addkey="forumDSN"value="Provider=SQLOLEDB; Server=.\SQLExpress;AttachDbFilename=|DataDirectory|dotForum2004.mdf;Trusted_Connection=Yes;" />

New: <

addkey="forumDSN"value="Provider=SQLOLEDB; Server=.\SQLExpress;AttachDbFilename=|DataDirectory|dotForum2004.mdf;Database=dbname;Trusted_Connection=Yes;Language=Dutch" />

Somehow during my various attempts (of trial and error) I must have created this database.

I tried to change that part of the key in Database=Forum

Locally a database with the name Forum appears in Management Studio, but I get an error when I try it on the webserver. I thought again this could be solved with security, so I checked.

All roles (including the ones you advised have dbcreator rights) Was this Database dbname then created manuelly at some time, or am i overlooking something else?

Thanks in advance,

Lex

Tuesday, March 20, 2012

Connecting to online database using local Enterprise Manager

I have Enterprise Manager on my local machine. For the last twelve
months it has been connecting without problem to my online SQL Server
database provided by my ISP.

Three weeks ago the ISP applied some sort of extra security
arrangements to their SQL Server to allow access only through port
1433. they have told me to configure an alias using Network Client and
to register this alias in the usual way using my Enterprise Manager.

My problem is that despite creating the alias in exactly the way
instructed I just cannot connect to online database. I keep getting
the SQL Server does not exist or access denied when I try to connect.

As a result of advice obtained I have tried using the lite version of
the 'littleADmin' tool available from
http://www.mylittletools.net/scripts/en/mla_sql/

Using this useful looking software I find I cannot connect to the
online SQL database when it is installed on my own local machine but
if I install it on my website it does connect without problem to my
online SQL. Server database

However I need to use my more powerful Enterprise Manager to connect,
my question (at last!) is:

1. Is there likely to be a problem trying to connect to my online
database from Enterprise Manager on my local machine as a result of
the new security arrangements. In other words, is there something
analagous to what is happening with the 'littleAdmin tool' whereby
using Enterprise Manager I cannot connect from my local machine for
some reason obvious to everyone except myself??
or
2. Is it possible that there is some problem arising from Net Client?
(the aliases appear in Enterprise Manager OK)

I know my ISP should be answering this sort of question but they just
don't seem to know. I need to connect even if only to download my
database and take it to another ISP,

Best wishes, John MorganJohn Morgan (jfm@.XXwoodlander.co.uk) writes:
> I have Enterprise Manager on my local machine. For the last twelve
> months it has been connecting without problem to my online SQL Server
> database provided by my ISP.
> Three weeks ago the ISP applied some sort of extra security
> arrangements to their SQL Server to allow access only through port
> 1433. they have told me to configure an alias using Network Client and
> to register this alias in the usual way using my Enterprise Manager.
> My problem is that despite creating the alias in exactly the way
> instructed I just cannot connect to online database. I keep getting
> the SQL Server does not exist or access denied when I try to connect.
>...
> I know my ISP should be answering this sort of question but they just
> don't seem to know. I need to connect even if only to download my
> database and take it to another ISP,

And we don't even know their configuration. Or yours.

Can you connect with the IP address?

In the alias you have set up in Client Network Utility, have you checked
TCP/IP, entered the IP address, and unchecked "Dynamically determine port"
and specified 1433?

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi John

Check out the information regarding port 1434 and MSDE.
http://msdn.microsoft.com/library/d...asp?frame=true

John

"John Morgan" <jfm@.XXwoodlander.co.uk> wrote in message
news:uhu3s09t8k7ngckgm5tjvq53bh1h76a3v0@.4ax.com...
>I have Enterprise Manager on my local machine. For the last twelve
> months it has been connecting without problem to my online SQL Server
> database provided by my ISP.
> Three weeks ago the ISP applied some sort of extra security
> arrangements to their SQL Server to allow access only through port
> 1433. they have told me to configure an alias using Network Client and
> to register this alias in the usual way using my Enterprise Manager.
> My problem is that despite creating the alias in exactly the way
> instructed I just cannot connect to online database. I keep getting
> the SQL Server does not exist or access denied when I try to connect.
> As a result of advice obtained I have tried using the lite version of
> the 'littleADmin' tool available from
> http://www.mylittletools.net/scripts/en/mla_sql/
> Using this useful looking software I find I cannot connect to the
> online SQL database when it is installed on my own local machine but
> if I install it on my website it does connect without problem to my
> online SQL. Server database
> However I need to use my more powerful Enterprise Manager to connect,
> my question (at last!) is:
> 1. Is there likely to be a problem trying to connect to my online
> database from Enterprise Manager on my local machine as a result of
> the new security arrangements. In other words, is there something
> analagous to what is happening with the 'littleAdmin tool' whereby
> using Enterprise Manager I cannot connect from my local machine for
> some reason obvious to everyone except myself??
> or
> 2. Is it possible that there is some problem arising from Net Client?
> (the aliases appear in Enterprise Manager OK)
> I know my ISP should be answering this sort of question but they just
> don't seem to know. I need to connect even if only to download my
> database and take it to another ISP,
> Best wishes, John Morgan|||Thank you Erland and JOhn

Re fixed IP address: my ISP tells me that as I do not have a fixed IP
address it means I cannot allow me access based on my IP address.

Yes, I have checked and rechecked that the Client Network Utility is
showing TCP/IP and that the 1433 port is specified.

I have looked at the Microsoft article suggested by John. This appears
to indicate that unless everything on the computer is upgraded then
port 1434 will be used when connecting online.

I have now uninstalled my current version of MSDE and attempted to
install a new default instance using the SP3a disk. this has brought
its own problem in that the apparently successfully installed new
version still reads 'Build 2600 Service Pack 1'

I have asked for advice on this on the MSDE News group but if you had
an insight into this it would be welcome,

Best wishes, John Morgan

On Thu, 16 Dec 2004 22:24:55 -0000, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:

>Hi John
>Check out the information regarding port 1434 and MSDE.
>http://msdn.microsoft.com/library/d...asp?frame=true
>John
>"John Morgan" <jfm@.XXwoodlander.co.uk> wrote in message
>news:uhu3s09t8k7ngckgm5tjvq53bh1h76a3v0@.4ax.com...
>>I have Enterprise Manager on my local machine. For the last twelve
>> months it has been connecting without problem to my online SQL Server
>> database provided by my ISP.
>>
>> Three weeks ago the ISP applied some sort of extra security
>> arrangements to their SQL Server to allow access only through port
>> 1433. they have told me to configure an alias using Network Client and
>> to register this alias in the usual way using my Enterprise Manager.
>>
>> My problem is that despite creating the alias in exactly the way
>> instructed I just cannot connect to online database. I keep getting
>> the SQL Server does not exist or access denied when I try to connect.
>>
>> As a result of advice obtained I have tried using the lite version of
>> the 'littleADmin' tool available from
>> http://www.mylittletools.net/scripts/en/mla_sql/
>>
>> Using this useful looking software I find I cannot connect to the
>> online SQL database when it is installed on my own local machine but
>> if I install it on my website it does connect without problem to my
>> online SQL. Server database
>>
>> However I need to use my more powerful Enterprise Manager to connect,
>> my question (at last!) is:
>>
>> 1. Is there likely to be a problem trying to connect to my online
>> database from Enterprise Manager on my local machine as a result of
>> the new security arrangements. In other words, is there something
>> analagous to what is happening with the 'littleAdmin tool' whereby
>> using Enterprise Manager I cannot connect from my local machine for
>> some reason obvious to everyone except myself??
>> or
>> 2. Is it possible that there is some problem arising from Net Client?
>> (the aliases appear in Enterprise Manager OK)
>>
>> I know my ISP should be answering this sort of question but they just
>> don't seem to know. I need to connect even if only to download my
>> database and take it to another ISP,
>>
>> Best wishes, John Morgan|||Hi

Before 'Build 2600 Service Pack 1' it probably says "on Windows NT 5.1" i.e.
you are on Windows XP service pack 1. What does the first (few) line of
@.@.Version return?

I am not sure if I have already posted
http://support.microsoft.com/defaul...kb;en-us;287932, but what
does netstat -an return?

John

"John Morgan" <jfm@.XXwoodlander.co.uk> wrote in message
news:3hj6s0hcgim5b3u00uan9mfbqpvrk71537@.4ax.com...
> Thank you Erland and JOhn
> Re fixed IP address: my ISP tells me that as I do not have a fixed IP
> address it means I cannot allow me access based on my IP address.
> Yes, I have checked and rechecked that the Client Network Utility is
> showing TCP/IP and that the 1433 port is specified.
> I have looked at the Microsoft article suggested by John. This appears
> to indicate that unless everything on the computer is upgraded then
> port 1434 will be used when connecting online.
> I have now uninstalled my current version of MSDE and attempted to
> install a new default instance using the SP3a disk. this has brought
> its own problem in that the apparently successfully installed new
> version still reads 'Build 2600 Service Pack 1'
> I have asked for advice on this on the MSDE News group but if you had
> an insight into this it would be welcome,
> Best wishes, John Morgan
>
> On Thu, 16 Dec 2004 22:24:55 -0000, "John Bell"
> <jbellnewsposts@.hotmail.com> wrote:
>>Hi John
>>
>>Check out the information regarding port 1434 and MSDE.
>>http://msdn.microsoft.com/library/d...asp?frame=true
>>
>>John
>>
>>"John Morgan" <jfm@.XXwoodlander.co.uk> wrote in message
>>news:uhu3s09t8k7ngckgm5tjvq53bh1h76a3v0@.4ax.com...
>>>I have Enterprise Manager on my local machine. For the last twelve
>>> months it has been connecting without problem to my online SQL Server
>>> database provided by my ISP.
>>>
>>> Three weeks ago the ISP applied some sort of extra security
>>> arrangements to their SQL Server to allow access only through port
>>> 1433. they have told me to configure an alias using Network Client and
>>> to register this alias in the usual way using my Enterprise Manager.
>>>
>>> My problem is that despite creating the alias in exactly the way
>>> instructed I just cannot connect to online database. I keep getting
>>> the SQL Server does not exist or access denied when I try to connect.
>>>
>>> As a result of advice obtained I have tried using the lite version of
>>> the 'littleADmin' tool available from
>>> http://www.mylittletools.net/scripts/en/mla_sql/
>>>
>>> Using this useful looking software I find I cannot connect to the
>>> online SQL database when it is installed on my own local machine but
>>> if I install it on my website it does connect without problem to my
>>> online SQL. Server database
>>>
>>> However I need to use my more powerful Enterprise Manager to connect,
>>> my question (at last!) is:
>>>
>>> 1. Is there likely to be a problem trying to connect to my online
>>> database from Enterprise Manager on my local machine as a result of
>>> the new security arrangements. In other words, is there something
>>> analagous to what is happening with the 'littleAdmin tool' whereby
>>> using Enterprise Manager I cannot connect from my local machine for
>>> some reason obvious to everyone except myself??
>>> or
>>> 2. Is it possible that there is some problem arising from Net Client?
>>> (the aliases appear in Enterprise Manager OK)
>>>
>>> I know my ISP should be answering this sort of question but they just
>>> don't seem to know. I need to connect even if only to download my
>>> database and take it to another ISP,
>>>
>>> Best wishes, John Morgan
>sqlsql

Sunday, February 19, 2012

Connecting crdb_p2bbde.dll to Crystal Rpts v10

Our company just upgraded to Crystal Rpts v10 and I need to connect to a Paradox database. Crystal's online help saids to connect BDE paradox driver crdb_p2bbde.dll using a 3rd party software. Has anyone done this, thanks in advance.I'm having a similar issue. Back in March I upgraded some obscure CR8.5 reports that utilize both dBase and Paradox tables to CR10. No problem.

Yesterday I revisit these reports, and I repeatedly encounter "cannot load crdb_p2bbde.dll" errors. The dll is right where its supposed to be, in \Program Files\Common Files\Crystal Decisions\2.5\bin, where it has always been.

Where on Crystal's site did you see something that recommended a "third party software"?|||Hi,
I don't know if this will help but we had a similar problem with the advantage database and crdb_p2sads.dll, the problem was there was a file missing in the windows/system32 folder (Msvcp60.dll). Depending on your operating system this one may not get installed.

Hope this helps..
Daryl..