Regarding sqlserver
Hi,
what is the difference between stored procedure and function in performance wise?
One major difference is stored procedure can be used for prforming DML operations on tables whereas functions can only return data either as table resultset or as a scalar value. Mostly any common functionality you need to replicate at several places you
implement as UDFs. Procedures on the otherhand are precompiled code which can be invoked from applications etc to perform required DML activities as well as return resultant values back to calling code.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Similar Messages
-
Regarding sqlserver user defined functions
Hi,
How to write user defined functions dynamically?
Please help me in any situationHi Bellam,
You post same question 2 times. Please avoid this practice on Forum, I
have merged the same thread into this thread.
As other post, dynamic SQL is not allowed in user defined functions (UDF), however, you can execute dynamic SQL store procedure with parameter. A user-defined function takes zero or more input parameters and returns either a scalar value or a table. There
is different between user-defined stored procedures and
user-defined function. User-defined functions do not support output parameters.
For more information, you can review the article about User-Defined Functions(UDF).
http://technet.microsoft.com/en-us/library/ms191007.aspx
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Hi,
Client wants to run 4.6B on new server with Windows 2003. Will this mix work?
Regards-> sqlserver 7 is not supported on win2k3...i'm not sure if it runs...never tried (usually i don't have a testing lab trying to get all possible combinations running...i'll rather stick to the supported portions...)
have a look at sapnotes 209.596 & 139.945...
are you really willing to implement a sap solution using software that is not supported after all? even if it's worth the money you should be honest and advise your customer to use a combination which is supported...sqlsrv2k on win2k3 with at least r/3 4.7 (or 4.6csr2 with extended maintenance)....but: it's your choice! even if it gets running you will have definitely no new content (support packs)...so this will be a testing system only?
GreetZ, AH -
Anyone using ms sqlserver standard edition with XI 3.0
wondering if anyone is successfully using ms sqlserver standard edition (not enterprise edition) with XI 3.0. I would like to set up a dev/test XI system and the standard sqlserver edition is less expensive than enterprise edition. I would like to confirm that it works ok first.
thanks-Henry,
I haven't tried but I think it will be successful with mssql server standard edition also. The following link gives the key difference between standard and enterprise edition.
http://www.databasejournal.com/img/RS_servereditions_code.html
Best of luck!
regards,
Felix -
How to pivot using pivot clause of sqlserver 2005 for three values
Dear all
Is it possible to formulate the query using pivote clause of sqlserver 2005.
( Table name is) BridgeHawra
ReportDate, , Pole, DiameterCost,Flag,OuterDiaCost
01 jan 2014, ,1 , 4.5 ,yes,6
01 jan 2014, ,2 , 4.5 ,no,6
01 jan 2014, ,3 , 5.5 ,no,6
02 jan 2014, ,4 , 5.5 ,no,5.9
02 jan 2014, ,5 , 5.5 ,no,6
1)Pole Col will have unique value.
o2)One pole will have one DiameterCost, but n number of DiameterCost can be there.
I have to show a report which should show , count of poles and cost(DiameterCost* pole count of the day of each DiameterCost) for each date and DiameterCost.
as following
DateOfReport , PoleCountofDiameterCost4.5, DiameterCost4.5, PoleCountOfDiameterCost5.5,DiameterCost5.5
01 jan 2014 , 2
,(2*4.5) ,1
,(1*5.5)
02 jan 2014 , 0/null ,0/null
,2
,(2*5.5)
yours sincerelyYes it is possible though you need to use dynamic pivot technique. Dynamic pivot allow you to select/display column names dynamically.
Below example does not use dynamic pivot,
--create table #temp(ReportDate datetime,Pole int, DiameterCost decimal(5,2),Flag varchar(3),OuterDiaCost decimal(5,2))
--insert into #temp values('01 jan 2014',1,4.5,'yes',6)
--insert into #temp values('01 jan 2014',2,4.5,'no',6)
--insert into #temp values('01 jan 2014',3,5.5,'no',6)
--insert into #temp values('02 jan 2014',4,5.5,'no',5.9)
--insert into #temp values('02 jan 2014',5,5.5,'no',6)
;with cte as (
select ReportDate,
DiameterCost * PoleCount as DiameterCost,
PoleCount ,
'PoleCountofDiameterCost'+cast(DiameterCost as varchar) column1,
'DiameterCost'+cast(DiameterCost as varchar) column2
from (
select ReportDate,DiameterCost,Count(Pole) as PoleCount from #temp
group by ReportDate,DiameterCost
) x
),cte1 as (
select * from cte
pivot( max(PoleCount) for column1 in ([PoleCountofDiameterCost4.50],[PoleCountofDiameterCost5.50])
) pvt
pivot( max(DiameterCost) for column2 in ([DiameterCost4.50],[DiameterCost5.50])
) pvt1
select ReportDate,
Max([PoleCountofDiameterCost4.50]) [PoleCountofDiameterCost4.50],
Max([DiameterCost4.50]) [DiameterCost4.50],
Max([PoleCountofDiameterCost5.50]) [PoleCountofDiameterCost5.50],
Max([DiameterCost5.50]) [DiameterCost5.50] from cte1
group by ReportDate
Regards, RSingh -
SharePoint 2010 Excel Services with SQLserver 2012 cubes
I have two tier sharepoint 2010 enterprise setup
1)wfe and app server
2) sqlserver
I also have a sqlserver 2012 which hosts all our BI cubes .
is it possible to connect excel (office 2010) to sql 2012 BI and save that in my sharepoint 2010 server under shared documents and expect it to refresh when aall authenticated users hit " refresh all connections"
It is not able to hit refresh . I get a " unable to refresh data for a data connection in this notebook" the following connections fail to refresh.
Interesting when I do the same this using sql server 2008 r2 BI , everything works fineHi,
According to your description, my understanding is that the SharePoint 2010 Excel Service cannot work with SQL Server 2012.
Did you install Service Pack 1 for SharePoint 2010?
SharePoint 2010 Service Pack 1 is required for SQL Server 2012 PowerPivot for SharePoint features.
Please check if the Service Pack 1 is installed for SharePoint 2010. If not, please download it from the link below and install it:
http://www.microsoft.com/en-hk/download/details.aspx?id=26623
More references:
http://msdn.microsoft.com/en-us/library/ee210708(v=sql.110).aspx
http://msdn.microsoft.com/en-us/library/6d61be91-0396-443c-a7f4-02dcf973775e(v=sql.110)
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
Jcaps6 repository sqlserver eway error
Hello,
After deploying a repository with a sqlserver eway I get this error.
Caused by: java.sql.SQLException: SQLSERVERADPTR-0042: Failed opening a database session: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.SeeBeyond.sqlserver.jdbcx.sqlserver.SQLServerDataSource
The eway is installed. Any idea why I am getting this?
RupertHi Nyanga,
The migration tools can be used to migrate to Oracle 9i.
But we try and keep the conversion compatible with Oracle XE / Oracle 10g and up.
So you may have issues migrating to Oracle 9i like you said, with he sqlserver_utilities package and using 10g syntax.
Creating the repository on Oracle 9i is not supported.
But even if you did succeed , it would not change how the conversion was done. You would still end up with an identical sqlserver_utilities package which was generated using the migration repository on an Oracle 10g database. sqlserver_utilities package definition itself is fixed within a file so regardless of the repository used the same one will be generated.
Oracle XE can be used of course as the repository and its free to download and use.
Regards,
Dermot. -
Hey guy,
I have a problem with my SQL Express Server.
If I try to backup a database I'm getting the following error:
(Microsoft.SqlServer.SmoExtended)
System.Data.SqlClient.SqlError: Das Sicherungsmedium 'D:\my-database.bak' kann nicht geöffnet werden. Betriebssystemfehler 5(Access denied). (Microsoft.SqlServer.Smo)
I have done this a month ago and it worked.
Can someone help me please?
I am logged in as sa, the OS is Windows Server 2012 Essentials.
Thanks
Regards,
Alex'D:\my-database.bak' kann nicht geöffnet werden. Betriebssystemfehler 5(Access denied). (Microsoft.SqlServer.Smo)
Hi,
Since error is access denied it means SQL server service account ,the account with which SQL Server service is running, does not have read/write privilege on folder where you are taking backup. It does not matters whether you login with SA.
Now I see you are backing database to root(D:) drive. This should not be practiced its a bad practice and has lots of drawbacks. Instead create a folder BACKUP in D rive and give SQL Server service account read write privileges on that folder and start backup
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Articles -
Hi All,
I have started receiving this error in the logs for the last 10 days and the Schedules Jobs for the database have stopped running. My MS CRM application is working fine.
Can anyone guide me what could be the problem.
Date 17/4/2014 2:04:20 PM
Log SQL Server Agent (Current - 17/4/2014 2:01:00 PM)
Message
[298] SQLServer Error: 10061,
A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct
and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [SQLSTATE 08001]
Date 17/4/2014 2:11:55 PM
Log SQL Server Agent (Current - 17/4/2014 2:01:00 PM)
Message
[298] SQLServer Error: 10061,
A network-related or instance-specific error
has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information
see SQL Server Books Online. [SQLSTATE 08001]
Date 7/4/2014 11:00:31 AM
Log SQL Server Agent (Current - 17/4/2014 2:01:00 PM)
Message
[298] SQLServer Error: 10061,
A network-related or instance-specific error
has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information
see SQL Server Books Online. [SQLSTATE 08001]Check this link
http://social.msdn.microsoft.com/Forums/en-US/906da9b5-2482-468c-a424-ae099da2d96b/sql-server-agent-service-account-error?forum=sqlsetupandupgrade
Regards, RSingh -
SQLServer Reporting Services 2005 Prompts for Credentials for a trusted domain user
Currently the report is running in the domain AAA. Users in the domain AAA are using the report.
Another new domain BBB and an user XXX is now created and BBB\XXX has been given Browser access. Domain AAA and BBB are trusted domains.
After this when the user BBB\XXX logs in and access the report, before loading the report, credentials dialog is prompted, once credentials of BBB\XXX is entered, the report is loaded.
Why the report prompts for this additional credential dialog for the trusted domain user?Hello,
Did you have get two textboxes in the report parameter panel (in the left side of the "View Report" button)? The issue is occurred when the credential of the datasource is configured with “Prompt for credentials”. Please check if you configured the credential
with "Stored Credential" of the datasource.
Please refer to the following thread to configure the credential.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/1564cd7a-6b7a-40f1-9f98-5c766ebfc63e/datasource-userid-and-password-being-asked-eachtime-when-report-is-generated?forum=sqlreportingservices
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Error when connect to sqlserver
I encounter the following error,any 1 can tell me reason?
com.solarmetric.kodo.runtime.FatalDataStoreException: java.sql.SQLException:
[Microsoft][SQLServer JDBC Driver]Error establishing socket.
[code=0;state=08001]
NestedThrowables:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing
socket.
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Connection timed
out: connect
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLException
s.java:58)
at
com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
ctionaryFactory.java:212)
at
com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
pleConfiguration.java:377)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
oreManager.java:710)
at
com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
y.java:112)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
..java:1516)
at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1351)
at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
at
com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
1)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
at com.ipacs.als.test.Test.main(Test.java:125)
NestedThrowablesStackTrace:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing
socket.
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.createConnection(Data
SourceImpl.java:932)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.findConnection(DataSo
urceImpl.java:844)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.getConnection(DataSou
rceImpl.java:563)
at
com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
321)
at
com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
314)
at
com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
aSourceConnector.java:63)
at
com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
ctionaryFactory.java:179)
at
com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
pleConfiguration.java:377)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
oreManager.java:710)
at
com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
y.java:112)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
..java:1516)
at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1351)
at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
at
com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
1)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
at com.ipacs.als.test.Test.main(Test.java:125)
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Connection timed
out: connect
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.createConnection(Data
SourceImpl.java:932)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.findConnection(DataSo
urceImpl.java:844)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.getConnection(DataSou
rceImpl.java:563)
at
com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
321)
at
com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
314)
at
com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
aSourceConnector.java:63)
at
com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
ctionaryFactory.java:179)
at
com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
pleConfiguration.java:377)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
oreManager.java:710)
at
com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
y.java:112)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
..java:1516)
at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1351)
at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
at
com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
1)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
at com.ipacs.als.test.Test.main(Test.java:125)
com.solarmetric.kodo.runtime.UserException: This operation cannot be
performed while a Transaction is active.
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.close(PersistenceManager
Impl.java:1058)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.close(PersistenceManager
Impl.java:1042)
at com.ipacs.als.test.Test.main(Test.java:183)
Exception in thread "main" Process terminated with exit code 1
Regards,
geduoGeduo-
It sounds like your ConnectionURL is not correct. Can you post the
properties you are trying to use?
In article <[email protected]>, geduo wrote:
I encounter the following error,any 1 can tell me reason?
com.solarmetric.kodo.runtime.FatalDataStoreException: java.sql.SQLException:
[Microsoft][SQLServer JDBC Driver]Error establishing socket.
[code=0;state=08001]
NestedThrowables:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing
socket.
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Connection timed
out: connect
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLException
s.java:58)
at
com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
ctionaryFactory.java:212)
at
com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
pleConfiguration.java:377)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
oreManager.java:710)
at
com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
y.java:112)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
.java:1516)
at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1351)
at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
at
com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
1)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
at com.ipacs.als.test.Test.main(Test.java:125)
NestedThrowablesStackTrace:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing
socket.
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.createConnection(Data
SourceImpl.java:932)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.findConnection(DataSo
urceImpl.java:844)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.getConnection(DataSou
rceImpl.java:563)
at
com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
321)
at
com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
314)
at
com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
aSourceConnector.java:63)
at
com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
ctionaryFactory.java:179)
at
com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
pleConfiguration.java:377)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
oreManager.java:710)
at
com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
y.java:112)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
.java:1516)
at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1351)
at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
at
com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
1)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
at com.ipacs.als.test.Test.main(Test.java:125)
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Connection timed
out: connect
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.createConnection(Data
SourceImpl.java:932)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.findConnection(DataSo
urceImpl.java:844)
at
com.solarmetric.datasource.DataSourceImpl$AbstractPool.getConnection(DataSou
rceImpl.java:563)
at
com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
321)
at
com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
314)
at
com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
aSourceConnector.java:63)
at
com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
ctionaryFactory.java:179)
at
com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
pleConfiguration.java:377)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
oreManager.java:710)
at
com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
y.java:112)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
.java:1516)
at
com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
QueryImpl.java:1351)
at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
at
com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
1)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
at com.ipacs.als.test.Test.main(Test.java:125)
com.solarmetric.kodo.runtime.UserException: This operation cannot be
performed while a Transaction is active.
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.close(PersistenceManager
Impl.java:1058)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.close(PersistenceManager
Impl.java:1042)
at com.ipacs.als.test.Test.main(Test.java:183)
Exception in thread "main" Process terminated with exit code 1
Regards,
geduo
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com -
11gR2 mappings to SQLServer via gateway
Hi all,
we are evaluating the dataloading from SQLServer 2005 either via code template or via gateway (both cost a fortune in licences). The code template runs well but I don't know how to pass a dynamic filter criterion (e.g. a date) derived from the Oracle database. So there is a preference for the gateway but when validating a traditional mapping with a source table from a gateway module I'm getting the following message:
VLD-1151: Operator CALLDETAIL is bound to an object contained in native heterogeneous module SQLSERVER_LOCATION.
The detailed explanation (unfortunately it's not possible to copy it here) says that Oracle objects cannot directly access objects residing in native HS modules. I should use a template mapping. What does this mean? Does OWB enforce the use of code templates although there is a more efficient way which worked well until now? Or do I miss a configuration step?
I need a simple "insert into <locale table> select ... from <sqlserver table>@<gateway DB link>". How to achieve this via OWB.
regards
ThomasHi David,
the source tables are stored in a module under the Database/SQL-Server node which can have a location either of type "Native Database Connection" or "SQL Server Gateway". I created both types in order to test the CT implementation with the native location and the gateway implementation with the gateway location. Both cannot be accessed by Oracle. But the native location works for the CT implementation. But when using the tables from the gateway location (with whichever LCT) I get on validation:
VLD-1339: The source location of execution unit SQL_SERVER_GATEWAY_LOC_EU cannot be determined.
The source operator(s) in this execution unit may not have a valid location (such as a constant operator), or the source operator(s) are not bound to location(s) that can be accessed using JDBC (such as a table operator bound to a SAP system).
What do you mean with "+if you are building a traditional mapping that uses gateways, the module must be Oracle accessed/typed (Oracle or Oracle Database Gateway+"? This is an insolvable requirement for the source module as I described below.
1. We don't want to use a CT mapping for a gateway access. My client want to pay just one of the expensive licenses. And it worked in former releases without CT.
2. Effectively, I don't get it running neither in the traditional mapping nor in the CT mapping.
3. I want an ordinary INSERT statement generated. If OWB cannot do the job I must workaround it with a hardcoded procedure. It seems that OWB wants to force the users to implement CT's where it wasn't necessary until now.
some more ideas?
best regards
Thomas -
Com.microsoft.jdbc.sqlserver.SQLServerDriver
Hi all,
i'm trying jsp and ms sql 200 connection...
here is the code i use:
<html>
<head>
<%@ page
import = "java.io.*"
import = "java.lang.*"
import = "java.sql.*"
%>
<title>ma quanto so bravo</title>
</head>
<body>
<%
String place;
Connection dbconn;
ResultSet results;
PreparedStatement sql;
//SQL server 2000
String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String sourceURL = "jdbc:microsoft:sqlserver://192.168.0.14:31000;databasename=prova";
String username = "sa";
String password = "riccio72";
try
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
try
int latitude,longitude,easting,northing;
boolean doneheading = false;
//dbconn = DriverManager.getConnection("jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=E:\\ATTENTATO\\Pubblicazione\\vecchia pubblicazione\\jsp\\collegamento a db\\prova.mdb");
dbconn = DriverManager.getConnection(sourceURL, username, password);
place = request.getParameter("place");
sql = dbconn.prepareStatement("SELECT * FROM info WHERE name = '" + place + "'");
results = sql.executeQuery();
while(results.next())
if(! doneheading)
doneheading = true;
latitude = results.getInt("latitude");
longitude = results.getInt("longitude");
easting = results.getInt("easting");
northing = results.getInt("northing");
out.println("<table border=2>");
out.println("<tr><td>" + latitude);
out.println("<td>" + longitude);
out.println("<td>" + easting);
out.println("<td>" + northing);
out.println("</tr></table> <br>");
//if(doneheading)
results.close();
dbconn.close();
if(! doneheading)
out.println("No matches for " + place);
catch (SQLException s)
out.println("SQL Error<br>");
out.print(s);
catch (ClassNotFoundException err)
out.println("Class loading error");
%>
</body>
</html>
Place is a variable from anothe page
i have this error Class loading error
How can i set this problem'?
i have installed jrun4 sql 2000 and jdbc driver from microsoft
i have read that i have to set the classpath and register the driver but i need particular description on how to do it
thxHi all,
I am facing some serious problem regarding the same,
I have done the SQL server connectivity successfully.
But when I create the executable file of the class file, it gives me error.
I am sending the code,
*************** DBInterface.java ***********************
import java.*;
import java.sql.*;
import javax.swing.*;
import java.util.*;
import com.microsoft.jdbc.sqlserver.SQLServerDriver;
public class DbInterface
//Connection Parameters
protected static java.sql.Connection con = null;
protected final String url = "jdbc:microsoft:sqlserver";
protected final String serverName= "localhost";
protected final String portNumber = "1433";
protected final String databaseName= "DBCONNECT";
protected final String userName = "sa";
protected final String password = "PASSWORD";
// constructor
protected DbInterface()
try
con= this.getConnection();
if(con!=null)
System.out.println("Successfully connected!");
else
System.out.println("Error: No active Connection");
catch(Exception e)
e.printStackTrace();
// returns url string
protected String getConnectionUrl()
{ return url+"://"+serverName+":"+portNumber+";databaseName="+databaseName;
// function which connects to database
protected java.sql.Connection getConnection()
try{
Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = DriverManager.getConnection(getConnectionUrl(),userName,password);
if(con!=null) System.out.println("Connection Successful!");
}catch(Exception e){
JOptionPane.showMessageDialog(new JFrame(), e.getMessage(), "Error Message", JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
return con;
protected void closeConnection()
try{
if(con!=null)
con.close();
con=null;
System.out.println("Close Connection");
catch(Exception e)
e.printStackTrace();
********* TestConnection.java************************
import java.sql.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class TestConnection
public static void main(String[] args)
DbInterface getlive = new DbInterface();
if(DbInterface.con != null)
JOptionPane.showMessageDialog(new JFrame(), "Successfully Connected!", "Error Message", JOptionPane.ERROR_MESSAGE);
getlive.closeConnection();
else
JOptionPane.showMessageDialog(new JFrame(), "Not Connected!", "Error Message", JOptionPane.ERROR_MESSAGE);
System.exit(0);
}Both this files are compiled well.
Now when I create an excutable file for this, it unable to connect sql server.
(Note : I have created executable file using JSmooth & also tried with manually jar executable.)
Can somebody focus on this issues?
Thanx & Regards,
Mahesh -
Com.microsoft.jdbc.sqlserver.SQLServerDriver and ntext,text
I'm using the com.microsoft.jdbc.sqlserver.SQLServerDriver driver with SQL2000. In my table I have one ntext(i dont mind changing this to text datatype) column and to retrieve the data I'm using getAsciiStream(colname). I also tried getCharacterStream(colname).
Even though I have data in the table, the method restult.getAsciiStream() brings nothing. I need some help in knowing how to retrieve the data when using ntext or text datatype in SQL server.
Also I need some smaple code of how to write the data back to the table.Have you tried getString() ?
I remember using this method once to read an ntext field from a MSSQL2K db. If you explicitly need a stream I recomend you to try a binary stream, binary streams works most of the time, then wrap it in a Reader.
Regards,
Rivas. -
APEX 4.1 - accessing MS-SqlServer with Access
I'd like to access MS-SqlServer data along with Oracle data using Apex. After doing some research , it appears that the preferred method is
by using the Oracle Database Gateway for SQL server and setting dblinks.
Can anyone confirm or suggest a better method.
Thanks,
steveHi,
We are using Oracle Gateway for acessing SQL Server, HS. Its the best way that i know.
Regards,
Just one note, make sure you install the free version, unless you have payed.
Edited by: neoon on 8/Set/2011 7:09
Maybe you are looking for
-
Can I use a kingston 120 gb in my early 2009 macbook
I need to get a new hard drive for my computerm and I was going to go shopping this weekend for one. I was going to buy a Kingston Technology - SSDNow V300 120GB Internal Serial ATA III Solid State Drive for Laptops from best buy (my mind is made up
-
Need help in module pool program
help me to create dialog program for upload data into DDIC table.FOR EXAMPLE IN CREATING MATERIAL THROUGH MM01 DATA WHIH YOU ARE ENTRING INTO THE FIELD WILL BE STORED IN MARA TABLE. Message was edited by: neela renganathan
-
ASA 5510 running out of 1550 byte blocks
Hi, I am having trouble with our ASA5510. After upgrading the internal memory from 256 MB to 1 GB and upgrading the firmware to 8.4.2 we are experiencing that the ASA is running out of 1550 byte blocks. When that happens it is not possible to connect
-
WRVS4400N - Logging and Email Alerts when I use a VPN client - Firmware bug?
Hi folks - I've got a problem with my WRVS4400N that has been dogging me for a long time now, and I'm finally fed up with the email alerts. My wife has a VPN client for her work, on her laptop. It is nothing fancy, normal IPSec VPN, details on it I
-
Need a proxy but no other vpn settings.
I've tried everything I can try - I need a proxy setting at school for web browsing, but no other vpn settings. I can't seem to get the proxy settings to "stick". Wireless network access painless otherwise - airport base stations or Trapeze. Rick Hei