Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Tuesday, 27 March 2012

Connect to SQL 2005 in Eclipse

I am trying to connect to Microsoft SQL Server 2005 through a program I am
writing in Eclipse and am having problems getting connected. I have already
created a database in Microsoft SQL Server 2005 and am trying to access that
database without having to get open the server. I have also downloaded the
Microsoft SQL Server 2005 JDBC driver. I have looked up several suggested
methods for connection and none of them have worked so far. I have recieved
several different errors for the different methods I have tried to use to
connect. I am unsure of what to do next.
Some of these errors are:
The TCP/IP connection to the host has failed. java.net.ConnectException:
Connection refused: connect
The connection to the named instance has failed. Error:
java.net.SocketTimeoutException: Receive timed out.
The TCP/IP connection to the host has failed. java.net.UnknownHostException
I am willing to try any other suggestions.
Thank you
I have figured out where my problem was. Thanks anyway.

Connect to SQL 2005 in Eclipse

I am trying to connect to Microsoft SQL Server 2005 through a program I am
writing in Eclipse and am having problems getting connected. I have already
created a database in Microsoft SQL Server 2005 and am trying to access that
database without having to get open the server. I have also downloaded the
Microsoft SQL Server 2005 JDBC driver. I have looked up several suggested
methods for connection and none of them have worked so far. I have recieved
several different errors for the different methods I have tried to use to
connect. I am unsure of what to do next.
Some of these errors are:
The TCP/IP connection to the host has failed. java.net.ConnectException:
Connection refused: connect
The connection to the named instance has failed. Error:
java.net.SocketTimeoutException: Receive timed out.
The TCP/IP connection to the host has failed. java.net.UnknownHostException
I am willing to try any other suggestions.
Thank youI have figured out where my problem was. Thanks anyway.

Thursday, 22 March 2012

Connect to MSSQL from UNIX

Hi experts,
I am new in java programming. I am wana to write an application program to access MSSQL2000 from UNIX. But unfortunately, I am faile. (The program can access to MSSQL2000 from microsoft platform.). Anyone can help me to solve this program ? Thank you.
David Hunag
F.Y.I.
OS : HPUX 10.20
JDK : 1.1.8
..cshrc :
...
set mypath = ( . /usr/bin /usr/sbin /usr/local/bin )
set optpath = ( /opt/java/bin /usr/local/perl5/bin )
set hp93kpath = ( /opt/hp93000/soc/prod_env/bin )
set path=( $mypath $optpath $hp93kpath )
setenv classpath /opt/msSQL2000jdbc/lib/.msbase.jar: /opt/msSQL2000jdbc/lib/mssqkserver.jar:/opt/msSQL2000jdbc/lib/msutil.jar
...
?2004 Microsoft Corporation. All rights reserved. Terms of Use | Privacy Statement
Hi,
You need an ODBC driver middleware installed on the
UNIX box itself, so that it can talk to the SQL Server
Have a look into the old post for more more info,
http://groups.google.co.in/groups?q=...+unix&hl=en&lr
=&ie=UTF-8&selm=oopoaEevBHA.2288%40cpmsftngxa09&rnum=10
Thanks
Hari
MCDBA
"David Huang" <huangjuichung@.yahoo.com> wrote in message
news:6274A7C7-7C80-4D15-A46B-C6A8BC683EF5@.microsoft.com...
> Hi experts,
> I am new in java programming. I am wana to write an application program to
access MSSQL2000 from UNIX. But unfortunately, I am faile. (The program can
access to MSSQL2000 from microsoft platform.). Anyone can help me to solve
this program ? Thank you.
> David Hunag
> F.Y.I.
> OS : HPUX 10.20
> JDK : 1.1.8
> .cshrc :
> ...
> set mypath = ( . /usr/bin /usr/sbin /usr/local/bin )
> set optpath = ( /opt/java/bin /usr/local/perl5/bin )
> set hp93kpath = ( /opt/hp93000/soc/prod_env/bin )
> set path=( $mypath $optpath $hp93kpath )
> setenv classpath /opt/msSQL2000jdbc/lib/.msbase.jar:
/opt/msSQL2000jdbc/lib/mssqkserver.jar:/opt/msSQL2000jdbc/lib/msutil.jar
> ...
>
>
>
> 2004 Microsoft Corporation. All rights reserved. Terms of Use | Privacy
Statement
>

Tuesday, 20 March 2012

Connect to Analysis Manager via VB2005

Does anybody know how to use VB2005 or VB.NET to connect to analysis manager to extract the CUBE information?

Can I have a sample program? I'm very stuck.

Thanks in advance :)

Check out AMO for the cubes metadata
or ADOMD.net to query the cube

There are some examples on those pages, and there are more in the sql server samples.

C

Saturday, 25 February 2012

Confused about MSDE installation

I needed to distribute the MSDE components to the computers that use my
software so I decided to build a setup program using InstallShield that
included the MSDE files.
After I ran the installation, I noticed that the setup created a folder on
my computer using the MSDE instance name I told the setup program to used
prefixed by a "$" character. So the folder created for an instance named
such as MACHOGRANDE was "C:\Program Files\Microsoft SQL
Server\MSSQL$MACHOGRANDE"
After noticing that, I went on to explore this folder and notice that it had
a bunch of files in it, I was surprised to see that one of the files was
named sqlservr.exe! It almost looked like the installation of my MSDE
instance was like a totally independent sql server installation! Like if it
had nothing to do with the other MSDE instance I had running. I doubt this
is the case since I am pretty sure there must be a gazzilion other files
installed on the computer that are sheared by all the database that use the
MSDE engine.
So my question is,
1. Why did the instance of MSDE crated all of this extra files (such as
sqlservr.exe)? Instead of simply created the ldf and mdf files like a
regular SQL server database? Aren't the MSDE and SQL server supposed to be
the same thing?
2. Also is there a special reason for the "$" character"?
ThanksRene,
what happened is actually exactly what should happen. If you install a
new (named)instance it will always be installed in a folder like
MSSQL$Instancename. It doesn't even matter if you use MSDE or any other
SQL Server edition. A new instance includes it's own sqlserver.exe and
is basically a new installation of the SQL Server engine.
If you just wanted to add a new database you could have done so in your
existing SQLServer installation.
>2. Also is there a special reason for the "$" character"?
I have no idea why MS uses $, probably someone at MS thought this makes
it easier to see that your dealing with a named instance.
M|||Thanks Markus,
If you don't mind, could you tell me if MSDE suffers from the same security
issues as the regular SQL Server?
For example, if a security vulnerability was found in SQL Server where the
server could be exploited by a hacker from the Internet, will I also have
the same problem with the MSDE instance? Or do MSDE instances only run
locally therefore its immune to those types of attacks?
Thanks.
"MarkusB" <m.bohse@.quest-consultants.com> wrote in message
news:1126682536.660588.222940@.f14g2000cwb.googlegroups.com...
> Rene,
> what happened is actually exactly what should happen. If you install a
> new (named)instance it will always be installed in a folder like
> MSSQL$Instancename. It doesn't even matter if you use MSDE or any other
> SQL Server edition. A new instance includes it's own sqlserver.exe and
> is basically a new installation of the SQL Server engine.
> If you just wanted to add a new database you could have done so in your
> existing SQLServer installation.
> I have no idea why MS uses $, probably someone at MS thought this makes
> it easier to see that your dealing with a named instance.
> M
>|||Hi Rene,
Welcome to use MSDN Managed Newsgroup!
I have noticed you posted a duplicated post in the
microsoft.public.sqlserver.msde. To keep the integrity of newsgroup, I will
reply and follow up in that post. Thank you for your patience and
cooperation.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||"Rene" <nospam@.nospam.com> wrote in message
news:O73fJRQuFHA.3452@.TK2MSFTNGP14.phx.gbl...
> Thanks Markus,
> If you don't mind, could you tell me if MSDE suffers from the same
> security issues as the regular SQL Server?
> For example, if a security vulnerability was found in SQL Server where the
> server could be exploited by a hacker from the Internet, will I also have
> the same problem with the MSDE instance? Or do MSDE instances only run
> locally therefore its immune to those types of attacks?
>
MSDE is SQL Server, but in order to reduce the possibility that widely
dispersed MSDE machines could be vulnerable to a network attack, network
connectivity is off my default in MSDE (and its sucessor SQL 2005 Express
Edition).
See
[url]http://support.microsoft.com/? kbid=814130#XSLTH5167121121120121120120[
/url]
David

Confused about MSDE installation

I needed to distribute the MSDE components to the computers that use my
software so I decided to build a setup program using InstallShield that
included the MSDE files.
After I ran the installation, I noticed that the setup created a folder on
my computer using the MSDE instance name I told the setup program to used
prefixed by a "$" character. So the folder created for an instance named
such as MACHOGRANDE was "C:\Program Files\Microsoft SQL
Server\MSSQL$MACHOGRANDE"
After noticing that, I went on to explore this folder and notice that it had
a bunch of files in it, I was surprised to see that one of the files was
named sqlservr.exe! It almost looked like the installation of my MSDE
instance was like a totally independent sql server installation! Like if it
had nothing to do with the other MSDE instance I had running. I doubt this
is the case since I am pretty sure there must be a gazzilion other files
installed on the computer that are sheared by all the database that use the
MSDE engine.
So my question is,
1. Why did the instance of MSDE crated all of this extra files (such as
sqlservr.exe)? Instead of simply created the ldf and mdf files like a
regular SQL server database? Aren't the MSDE and SQL server supposed to be
the same thing?
2. Also is there a special reason for the "$" character"?
Thanks
Rene,
what happened is actually exactly what should happen. If you install a
new (named)instance it will always be installed in a folder like
MSSQL$Instancename. It doesn't even matter if you use MSDE or any other
SQL Server edition. A new instance includes it's own sqlserver.exe and
is basically a new installation of the SQL Server engine.
If you just wanted to add a new database you could have done so in your
existing SQLServer installation.
>2. Also is there a special reason for the "$" character"?
I have no idea why MS uses $, probably someone at MS thought this makes
it easier to see that your dealing with a named instance.
M
|||Thanks Markus,
If you don't mind, could you tell me if MSDE suffers from the same security
issues as the regular SQL Server?
For example, if a security vulnerability was found in SQL Server where the
server could be exploited by a hacker from the Internet, will I also have
the same problem with the MSDE instance? Or do MSDE instances only run
locally therefore its immune to those types of attacks?
Thanks.
"MarkusB" <m.bohse@.quest-consultants.com> wrote in message
news:1126682536.660588.222940@.f14g2000cwb.googlegr oups.com...
> Rene,
> what happened is actually exactly what should happen. If you install a
> new (named)instance it will always be installed in a folder like
> MSSQL$Instancename. It doesn't even matter if you use MSDE or any other
> SQL Server edition. A new instance includes it's own sqlserver.exe and
> is basically a new installation of the SQL Server engine.
> If you just wanted to add a new database you could have done so in your
> existing SQLServer installation.
> I have no idea why MS uses $, probably someone at MS thought this makes
> it easier to see that your dealing with a named instance.
> M
>
|||Hi Rene,
Welcome to use MSDN Managed Newsgroup!
I have noticed you posted a duplicated post in the
microsoft.public.sqlserver.msde. To keep the integrity of newsgroup, I will
reply and follow up in that post. Thank you for your patience and
cooperation.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
|||"Rene" <nospam@.nospam.com> wrote in message
news:O73fJRQuFHA.3452@.TK2MSFTNGP14.phx.gbl...
> Thanks Markus,
> If you don't mind, could you tell me if MSDE suffers from the same
> security issues as the regular SQL Server?
> For example, if a security vulnerability was found in SQL Server where the
> server could be exploited by a hacker from the Internet, will I also have
> the same problem with the MSDE instance? Or do MSDE instances only run
> locally therefore its immune to those types of attacks?
>
MSDE is SQL Server, but in order to reduce the possibility that widely
dispersed MSDE machines could be vulnerable to a network attack, network
connectivity is off my default in MSDE (and its sucessor SQL 2005 Express
Edition).
See
http://support.microsoft.com/?kbid=8...21120121120120
David

Confused about MSDE installation

I needed to distribute the MSDE components to the computers that use my
software so I decided to build a setup program using InstallShield that
included the MSDE files.
After I ran the installation, I noticed that the setup created a folder on
my computer using the MSDE instance name I told the setup program to used
prefixed by a "$" character. So the folder created for an instance named
such as MACHOGRANDE was "C:\Program Files\Microsoft SQL
Server\MSSQL$MACHOGRANDE"
After noticing that, I went on to explore this folder and notice that it had
a bunch of files in it, I was surprised to see that one of the files was
named sqlservr.exe! It almost looked like the installation of my MSDE
instance was like a totally independent sql server installation! Like if it
had nothing to do with the other MSDE instance I had running. I doubt this
is the case since I am pretty sure there must be a gazzilion other files
installed on the computer that are sheared by all the database that use the
MSDE engine.
So my question is,
1. Why did the instance of MSDE crated all of this extra files (such as
sqlservr.exe)? Instead of simply created the ldf and mdf files like a
regular SQL server database? Aren't the MSDE and SQL server supposed to be
the same thing?
2. Also is there a special reason for the "$" character"?
ThanksRene,
what happened is actually exactly what should happen. If you install a
new (named)instance it will always be installed in a folder like
MSSQL$Instancename. It doesn't even matter if you use MSDE or any other
SQL Server edition. A new instance includes it's own sqlserver.exe and
is basically a new installation of the SQL Server engine.
If you just wanted to add a new database you could have done so in your
existing SQLServer installation.
>2. Also is there a special reason for the "$" character"?
I have no idea why MS uses $, probably someone at MS thought this makes
it easier to see that your dealing with a named instance.
M|||Thanks Markus,
If you don't mind, could you tell me if MSDE suffers from the same security
issues as the regular SQL Server?
For example, if a security vulnerability was found in SQL Server where the
server could be exploited by a hacker from the Internet, will I also have
the same problem with the MSDE instance? Or do MSDE instances only run
locally therefore its immune to those types of attacks?
Thanks.
"MarkusB" <m.bohse@.quest-consultants.com> wrote in message
news:1126682536.660588.222940@.f14g2000cwb.googlegroups.com...
> Rene,
> what happened is actually exactly what should happen. If you install a
> new (named)instance it will always be installed in a folder like
> MSSQL$Instancename. It doesn't even matter if you use MSDE or any other
> SQL Server edition. A new instance includes it's own sqlserver.exe and
> is basically a new installation of the SQL Server engine.
> If you just wanted to add a new database you could have done so in your
> existing SQLServer installation.
>>2. Also is there a special reason for the "$" character"?
> I have no idea why MS uses $, probably someone at MS thought this makes
> it easier to see that your dealing with a named instance.
> M
>|||Hi Rene,
Welcome to use MSDN Managed Newsgroup!
I have noticed you posted a duplicated post in the
microsoft.public.sqlserver.msde. To keep the integrity of newsgroup, I will
reply and follow up in that post. Thank you for your patience and
cooperation.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||"Rene" <nospam@.nospam.com> wrote in message
news:O73fJRQuFHA.3452@.TK2MSFTNGP14.phx.gbl...
> Thanks Markus,
> If you don't mind, could you tell me if MSDE suffers from the same
> security issues as the regular SQL Server?
> For example, if a security vulnerability was found in SQL Server where the
> server could be exploited by a hacker from the Internet, will I also have
> the same problem with the MSDE instance? Or do MSDE instances only run
> locally therefore its immune to those types of attacks?
>
MSDE is SQL Server, but in order to reduce the possibility that widely
dispersed MSDE machines could be vulnerable to a network attack, network
connectivity is off my default in MSDE (and its sucessor SQL 2005 Express
Edition).
See
http://support.microsoft.com/?kbid=814130#XSLTH5167121121120121120120
David

Confliction between SQL Server 2005 and SQL Server 2005 Express Edition

Hi,

My objective is using a single DB file (mdf file) + SQL Server Express 2005 to run my program

I got two softwares here, Visual Studio 2005 and SQL Server 2005. Firstly, I installed Visual Studio 2005, normally the SQL Server 2005 Express Edition will be installed with this software. After finishing the installation. I opened a new project and try to open a DB file (.mdf) from Visual Studio 2005, it works. The problem is that I can't restore the mdf file from an old database file since it lose a lot of functions that appear in SQL Server 2000 / SQL Server 2005. And it is too troublesome and inconvenient to edit a DB file in Visual Stuio 2005.

Therefore, I have to install SQL Server 2005 for me to edit the mdf file, so that I can modify, backup, or even restore the mdf file with another DB file. After the installation of SQL Server 2005, I got a tool, SQL Server Managment Studio, to edit the mdf file. I can open the mdf file but when I double-clicked on the mdf file in Visual Studio 2005, it gives me the following error message:

Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL:http://go.microsoft.com/fwlink/?LinkId=49251

It seems the SQL Server 2005 modify some of the files in SQL Server 2005 Express Edition. Is that SQL Server 2005 and SQL Server 2005 Express Edition cannot be exist at the same time?

The issue is I'm working on my computer, but I dun want to install SQL Server 2005 in the server that I will transfer to. It will be much like using Access DB file, without the Microsoft Access software, the program can still work well. However, when I'm still in programming stage, I do hope to have a DB file as the source file for my program, but I can do some editing works with SQL Server 2005.

Does anyone can give me a suggestion? Thanks for your kindly reply.

Calvin

On my machine I have SQL2005 and SQL Express installed at the same time, and both of them work fine. I guess the problem lays in connection string of the database. You can check as following:

Go to database explorer-data connections.
Right click your mdf database and click "modify connection"...
Click the advanced button
Search for the "data source" string
Set the string to refer to your SQL Server2005 instance.

You can take a look at this link:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124596&SiteId=1.

BTW, if you just want to operate on the database file more directly, you do not need to install SQL Server2005. You can intall "SQL Server Management Studio Express " from here:

http://msdn.microsoft.com/vstudio/express/sql/download/

.