Connecting SQL server using JavaScript
I found an article on connecting SQL server using JavaScript. http://www.devarticles.com/c/a/JavaScript/Combining-North-Pole-with-South-Pole-JavaScript-with-SQL-Server-2000/
Do you people think it's possible? i try out the code already but something wrong with it. I just copy and paste it to a html file but it comes out with error. Do I miss out something? Thanks.
SY Tee
Check the permissions and server authentication from the below link,
http://technet.microsoft.com/en-us/library/ms179354(v=sql.90).aspx
Regards, RSingh
Similar Messages
-
How to connect sql server using oracle Client
Hi,
I am working in oracle9i and windows os 32 bit.
I need to connect SQL server 2000 from my oracle client..
I heard about heterogeneous connectivity ...
Please expalin me the steps what to add and how to connect the sql server...
Regs....Are you trying to connect to SQL Server from your Oracle database (i.e. create a database link in Oracle to SQL Server)? Or are you trying to connect to SQL Server using your Oracle client software (i.e. SQL*Plus)?
The former just requires Heterogeneous Services with Generic Connectivity. The latter is functionality that has been depricated and probably no longer works in your environment.
Justin -
Problem to connect SQL Server using dg4msql form Linux machine
Hi All,
I have oracle 11g 11.2.0.1.0 on RHEL 4 on one machine and MS SQL Server 2000 on another Windows XP machine. I have to link the oracle database with SQL Server Database. So that we can run queries on SQL Server from Oracle 11 Database.
For this purpose I have installed Oracle Database 11g Release 2 (11.2) Gateway for SQL Server on oracle machine.
For the purpose of configuration, I have followed the instructions of Doc ID (437374.1) available from oracle metalink.
listener.ora file
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /opt/orabase/orahome11g)
(SID_NAME = orcl)
(SID_DESC=
(SID_NAME=dg4msql)
(ORACLE_HOME=/opt/orabase/orahome11g)
(ENVS="LD_LIBRARY_PATH=/opt/orabase/orahome11g/dg4msql/driver/lib:/opt/orabase/orahome11g/lib")
(PROGRAM=dg4msql)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.10.15)(PORT = 1522))
ADR_BASE_LISTENER = /opt/orabase
tnsnames.ora file
DG4MSQL =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.10.15)(PORT=1522))
(CONNECT_DATA=(SID=dg4msql))
(HS=OK)
initdg4msql.ora file
# HS init parameters
HS_FDS_CONNECT_INFO=172.16.30.51:1433//Northwind
I have created DB link using following statement:
CREATE public DATABASE LINK dg4 CONNECT TO "sa" IDENTIFIED BY "sa" USING 'dg4msql';
when I give select statement, It gives following error:
select * from "Employees"@dg4
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Driver][libssclient24]General network error. Check
your network documentation. {08001,NativeErr = 11}[Oracle][ODBC SQL Server
Driver][libssclient24]ConnectionOpen (()). {01000,NativeErr = 11}[Oracle][ODBC
SQL Server Driver]Invalid connection string attribute {01S00}
ORA-02063: preceding 2 lines from DG4
I will appreciate if anyone can help meThe general DG4MSQL configuration is correct as DG4MSQL is loaded and tries to connect to the SQL Server.
Is the IP Address and the SQl Server port (HS_FDS_CONNECT_INFO=172.16.30.51:1433//Northwind) correct?
Can you ping it from the Oracle gateway machine?
Can you telnet to it from the gateway machine to the SQl Server: "telnet 172.16.30.51 1433" -
How to connect SQL server using JRun
I am relatively dumb into Java. I am running JRun server in Unix box, and I need to connect to the SQL server (full marks for guesssing that SQL server is on the Win2K box).
Now I want to connect to the SQL server from Jrun using JSPs.
Question:
1. Is JDBC:ODBC only way to connect to the SQL server, if yes -
2. Do I have to create a DSN on the server for the JDBC:ODBC bridge to work
3. Can I write my own database connection package,
Appreciate if any body can help me with this problem, and if you have written a package to connect to the database, then would be nice if you would let me try the same.
If you have any responses, please email me at [email protected]
Thanks in Advance for the anticipated help.
Viviar PrasadHi Prasad,
There is two ways(what I have done) to connect to sql server in jRun..
1) using your jdbc - odbc connectivity using your type one jdbc driver..
2) using type 4 driver.. (type 2 and 3 are not available right now for sql server)
in 1 you have to create an dsn and use it directly in program bypassing jrun management console(I mean u don't have to configure for that)
in 2 case you need to use jrun proprietery driver for the jdbc... there is a problem here..
this driver is available in Jrun 3.0 enterprise edition only and still has got some problem so you need to apply service pack-2 to your Jrun installation and need to download the driver.. jdbc driver from following link
ftp://ftp.allaire.com/kbftp/jrun/all/jrun_drivers.jar.zip
this will suply a html doc along with the driver . which will explain you how to apply..
you can download jdbc driver specilly for sql server from this link http://www.j-netdirect.com/jsqlconnect2_26.zip
but it will expire in a month..
any way once you have obtain any of the above driver, follow these step to configure jdbc in jrun.. you need to put the driver in the classpath..
1 - open your management console
2- select the webapplication for which you want to configure from left frame of mc(management console)
3- select jdbc data source click the add button and follow the wizard..
for more info ref to jrun quick start configuring jdbc settings that came with your JRun..
or you can directly click the link there and type
the name of the
first
datasource(you have supply any name you will be using that to access db in your java prog)
second name of the the jdbc driver
for Jrun it's
allire.jrun.jdbc.JRunDriver
for net direct
com.jnetdirect.jsql.JSQLDriver
third
url for jrun driver
jdbc:jrun:sqlserver://hostname:portno/databasename = dbname; USER = uname; Password = password
where dbname is your database name
uname is your sql server user name e.g sa
password is your password for the corresponding user name
where hostname is the name of the computer where your sqlserver is running it could be an ip e.g 10.0.0.32:1433
1433 is the default port no for the sqlserver if you are using tcp protocol to connect to the sql server
url for net direct
jdbc:JSQLConnect//hostname:port/databasename=dbname; USER =uname; Password = password
for any more information on this you can mail me in this id
[email protected]
All the best..
regards
Bishwa -
Problem to connect SQL Server using dg4msql
Hi All,
Configured Oracle Database Gateway for MS SQL Server in windows 2003 server 64 bit machine.
Oracle DB Server: 10.2.0.4.0
Oracle DB Gateway: 11.2.0.1.0
I am able to get table row count but if i try to get table column values then getting errors like below
========================
SQL> select count(*) from address@dbsql;
COUNT(*)
183
SQL> select * from address@dbsql;
ERROR:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from DBSQL
no rows selected
SQL>
=======================
Any body encountered same issue, or any thoughts .
Thanks,
-ManiThanks for the clarification with respect to license.
Below sql is returning results from MS SQL perfectly
select count(*) from address@dbsql
describe address@dbsql
but below sql is returning error.
SQL> select "pkid" from address@dbsql
2 /
ERROR:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from DBSQL
-- CHARACTERSET
Oracle DB: UTF8
MSSQL DB: i don't know how to check!
-- initMSSQL.ora
HS_FDS_CONNECT_INFO=BLR2230041,1433//ADS_BI_6003
HS_FDS_TRACE_LEVEL=DEBUG
Thanks
-Mani
Edited by: Mani.. on Oct 28, 2010 3:27 PM -
Hi
I want to know how to connect SQL server using DNSless connection ?
/* 2003/02/06 eric.leung
* Source : HOME
import java.sql.*;
import java.lang.*;
public class ejdbcsel {
public static void main(String args[]) {
// eric_jsp is ODBC User DNS
// String url = "jdbc:odbc:eric_jsp";
// Using DSNless connection
String url = "";
url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)}" +
";SERVER=127.0.0.1;DBQ=c:\\example\\ERIC_JSP.mdb";
Connection con;
String query;
query = "select * from pt_mstr";
Statement stmt;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch (ClassNotFoundException e) {
System.err.print("ClassNotFoundException " );
System.err.println(e.getMessage());
try {
con = DriverManager.getConnection (url,"","");
stmt = con.createStatement();
ResultSet rec = stmt.executeQuery(query);
// Scan the Database
while(rec.next()) {
System.out.println(rec.getString("pt_part") + "\t"
+ rec.getString("pt_desc"));
stmt.close();
con.close();
} catch (SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
catch (Exception e) {
System.err.println("Error: " + e.toString() + " " + e.getMessage());Use a driver...
http://java.sun.com/products/jdbc/driverdesc.html
http://industry.java.sun.com/products/jdbc/drivers -
How do i connect to sql server using java?
hi ever body
i need to connect to sql server using java
what is the driver i will use?
thanksMicrosoft make a jdbc driver and it is readily available through MSDN. Here is a link http://msdn2.microsoft.com/en-us/data/aa937724.aspx. Whatever jdbc driver you are looking for, Google it, and if it exists you'll find it in 10 seconds.
-
Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.
http://www.w3schools.com/sql/sql_datatypes.asp
You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
How to connect Sql Server 2000 using JDBC ODBC Driver
How to connect Sql Server 2000 using JDBC ODBC Driver ?
plz Send Syntax.
thanksIn SQL Server 2000 the driver class is com.microsoft.jdbc.sqlserver.SQLServerDriver
The connection URL for the default SQL Server 2000 database is jdbc:sqlserver://localhost:1433
Class.forName(
"com.microsoft.sqlserver.jdbc.
SQLServerDriver");
String url =
"jdbc:sqlserver://localhost:1433";
Connection conn = DriverManager.
getConnection(
url, "sa", "sqlserver"); -
Connection with SQL Server using DBCO
Hi,
I want to connect to Misrosoft SQL Server using DBCO transaction. I have given the following fields.
DB Connection = test
DBMS = MSS
User Name = user02
password = test
Conn. info = MSSQL_SERVER=tcp:10.100.50.36 MSSQL_DBNAME=New_Wisdom
permanent selected
Connection Limit = 5
Optimum Conns = 2
while executing through the statement as follows,
EXEC SQL.
CONNECT :'TEST'
ENDEXEC.
I am getting the dump ' An SQL error occurred when executing Native SQL.
The error 900 occurred in the current database connection "DEFAULT".' Please suggest me what needs to be added or corrected.Hi Benito.
I'm not very familiar with MSS but maybe the following will help a little bit.
Depending on the version of your SAP system you can use the transaction DBACOCKPIT to add connections to non-SAP databases. There is an test connection button in that transaction, too. You will find some information about that transaction in some whitepapers here in the SDN. For example have a look at this one: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1062428c-f1df-2910-b08f-c322feddcd10
ADBC error 16 is just "something went wrong". Is your SAP system using MSS, too? If not you will need the matching DBSL for it on your SAP system.
If you have set up an connection you can use program ADBC_TEST_CONNECTION to check if everything is ok. If I remember it correctly in case of errors it allows you to jump into the trace file. There you should find some usefull information.
Perhaps asking in the Database&OS forum area (there is a MSS forum) might help, too.
Best regards,
Jan -
Problem when connecting sql server 2005 using SQL developer
Hi,
I installed Sql developer and I am trying to connect sql server 2005 using windows authentication. I had previously the SSO folder problem saying the path is missing in java.library.path. I copied the SSO folder into Sqldeveloper directory. I changed the settings under computer management->services and applications->sql server configuration manager->sql server 2005 network configuration ->protocols for sqlexpress->I enabled TCP/IP.
Now I am getting an error saying "Failure-can not open user default database.Login Failed. Login failed for user ...".
I am able to connect thru ODBC driver using windows authentication.
Any help on this is highly appreciated.
Thanks in advance,
LakshmiHi Martin,
Your solution has solved my problem too. Thanks for posting these workaround fixes :-)
However, there seem to be a problem with datetime fields. The query:
select getdate()
returns something like: oracle.datetimestamp.@1aed4
Is there a way to get around with this? Otherwise, using SQL Developer as a client for SQL Server doesn't serve the right purpose when we cannot access simple date fields :-) -
Get the connected users count from sql server using powershell
Hi,
I am working on SharePoint 2013,I am having SQL server 2012.
I want to get the Connected Users count from sql server using power shell.
Can any one please let me know how to implement.
Thanks in advance.
Regards,
Phani Kumar RSorry Tom, I dont like to hear "There is no way" :-(
There is always a way in computer to get what you need (at least it is good as Rule of thumb). I am not sure we will find it here (in a voluntary supporting forum).
Now we (or better the architect of their system) should think of the way :-)
Of course doing so in the forum, while we do know the system and only got a glimpse on what is needed, is not the best idea. I will point some issues which can be related to a solution. Those are not a solotions as it is but something we can use for a solution
once something look in the right way.
* A web connects counter is one of the easier thing to do. The basic idea is just to use the connect event and the disconnect event an adding 1 or removing 1 from the counter. This is best to do in the application using static variable as any way the second
the application is down the counter can be go to hell as we know there is no one connect (there for a counter do not use database usually). Using a web dot-net (or asp 3) application this is done most of the time using the global.asa/global.asax file, which
include the application and session events. for example using the method Session_Start
protected void Session_Start(object sender, EventArgs e) {
// Code that runs when a new session is started
* IIS have a build-in loging system where we can log each and every request/response or only logins users. There is lot we can do with this log files including data mining. Using small bulk insert script we can use the SQL agent to insert those logs to the
database and get the information we need.
* any web developer i want to believe know about the Fiddler application which we use to monitor traffic. A proxy is not the only way to to monitor traffic (it is not good for our case as this is in the client side), there are several option in the server
side.
* SQL trigger on logon can be use to get information on who is loging on and can be logging only specific source (like our sharepoint IP or any sharepoint application). This information (what is the application which connect to the server can be retrive
in several solution without using a trigger as well)
*** (I'll be brief ... I'm getting bored... probably the reader feel the same)
* using extended events and/or profiler we can monitor any connection and save the data or just remember it in shared (static) variable (this
blog show how to do it by the way). Again we can monitor specific application or use any filter in order to get only the sharepoint users
.... and i can continue for several days more :-) ...
"If there is a willing, then there's a way"
"If you can't do it, Then someone else probably can"
"Never say never"
I hope this help somehow :-)
[Personal Site] [Blog] [Facebook] -
Connecting DB Oracle/SQL server using the same SQL Navigator release 5.1.0
I have
SQL Navigator release 5.1.0.655 installed in my desktop
License version X-pert Edition
Licensed Options
PL/SQL Debugger
CodeXpert
Knowledge Xpert For Pl/SQL
Xper Tuning
Currently I have the access of Oracle DB using this SQL navigator and MS-SQL server using MS-Sql server Query Analyzer
My question is -- using the same SQL Navigator can I connect MS-SQL server DB/Tables and can I run sql query using this..
Thanks in advance.
MashWhy, in an Oracle forum, are you asking a question about a Quest product connecting to a Microsoft product?
How does this relate to the Oracle Database? -
Unable to connect SQL server 2005 databse with JSF applications !
Hello guys!
Help me out to connect SQL server 2005 Databse with JSF applications using JDBC-ODBC bridge. I'm working with Netbeans 6.1 IDE.
I tried for the basic applications but instead got this error:
"unable to deploy jdbc drivers to the <project>domain/lib"
Please help me out with working sample codes that connects MS SQL server 2005 DB with JSF!!
Thank you guys!1) don't use the bridge driver
2) don't do database access from JSF
3) learn how to use your application server
4) learn how to use your IDE -
How can i get data from another database SQL Server use database link from
I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?
hi,
u should see following documentation:
Oracle9i Heterogeneous Connectivity Administrator's Guide
Release 1 (9.0.1)
Part Number A88789_01
in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
regards
umar
Maybe you are looking for
-
Display USB ports blown, please please help!
Please try and offer some type of suggestion.... i got a second Apple Cinema display the other day. The white, plastic kind. so, now i have two. yay! except when i plugged in the new/ second display into my powermac G5, it immediatley put the cpu to
-
What's showing in the layer palette is different than what is on the canvas - Illustrator CS6
I am not a super user in Illustrator but I know my way around it and understand more than the basics. I downloaded this vector from Shutterstock, but what I am seeing on the layer palette is different from what is on the canvas and if I try to save
-
OIM - DOBJ.GRP.PERMISSION_ERROR
Hi OIM Experts, Happy New Year to All. I am new to OIM. I had a requirement for Auto Provisioning Based on Roles in OIM. I am getting the error "DOBJ.GRP.PERMISSION_ERROR" while i am editing the value in OIM User Form. 1. I have a User Defined Field
-
PanelView Plus 600 + 6ES7972-0CA11-0XA0 + S7-313 Siemens?
I read your document ID # 26LDUH6Q concerning this problem: Problem: I want to use Lookout or Lookout Protocol Drivers to connect to a Siemens S7 PLC. There is an object S7_HMI that uses an HMI Adapter and can connect to my PLC without requiring a Pr
-
How can i cancel my picture from my mail account?
how can i cancel my picture from my email account so that the receiver does not see it? thx g