BLOB and SQL server
BLOB
suppose i want to insert image into SQL server table.....what would be table design ?
should i write
IMAGE varchar(50); // its wrong ..so whats right to put a blob in a column ?
Blobs are a pain. First off there's nothing about
them in the SQL99 standard, so every database handles
them differently.
Worse, whoever wrote JDBC specification doesn't seem
to have understood how they work.
A BLOB/CLOB is functionally very different from a
varable text/binary field, because all that goes into
the database record itself is some kind of reference
number. BLOBs are stored outside the tables
structure, and not normally through SQL. There can be
several references to the same BLOB from different
records and databases don't seem to keep track of use
counts, so you have to delete them explicitly.
For example in the database I'm using at the moment,
Postgresql, The reference is declared as an "OID" and
it's set in a preparedStatement with a setBlob
method. Saddly there's no legitimate way to create a
new Blob object. I've known people create an record
with an empty blob first, then read and update it in
order to get a Blob object.
Some JDBC drivers, you can use a setOutputStream
method, but the specification is pretty vague.Sir,
While an excellent rant I'm not sure what this has to do with the topic at hand which is how to create a table with a BLOB like column in it in MS-SQL. The OP question really has nothing to with Java at all but we try not let such trivialities stop us.
Good rant though. Have thought the same things myself many a time.
Sincerely,
Slappy
Similar Messages
-
Reading BLOB from SQL Server 2005 using DB Link from Oracle 10g
Hi All,
I am trying to read a table's data from SQL Server 2005 using ODBC DB Link created in Oracle 10g (10.2.0.3/4) database. I am not using oracle gateway.
I am able read all data except for the BLOB data from SQL server 2005. It gives error given below when I try to execute query SELECT * from T_TRANSACTION_DATA@sdeslink inside a stored procedure:
ORA-22992: cannot use LOB locators selected from remote tables
Kindly help how to read BLOB from SQL server 2005 inside Oracle 10g.
Best Regards!
IrfanIrfan,
If you can read the blob data using 10.2 HSODBC then there should be no problem using the 11g gateway.
I recommend you download the latest version which is 11.2.0.3 available from My oracle Support as -
Patch 10404530: 11.2.0.3.0 PATCH SET FOR ORACLE DATABASE SERVER
This is a full version and does not need a previous version to have bene installed. When installing it needs to be in a completlely separate ORACLE_HOME from the existing 11.2 install.
For the Ora-22992 problem have a look at this note in My Oracle Support -
Ora-22992 has a workaround in 10gR2 (Doc ID 436707.1)
Regards,
Mike -
What is the different between Sharepoint fast search service and Sql server fulltext search?
HI ,
I want to kow what is the different between Sharepoint fast search service and Sql server fulltext search?
Or Can I abstract the Sharepoint fast search from the Sharepoint platform as a isolate component?
Thank you.
JamesThey are very, very different beasts.
Firstly FAST Search for SharePoint is the old name for the product and is only relevant for SharePoint 2010 not 2013. It got merged into the standard SharePoint search for the 2013 release.
SharePoint search is aimed at providing a Bing or Google like experience for your intranet content, as well as providing some nifty features that are purely SharePoint releated along the way. That means it can crawl SharePoint content, file shares,
outlook mailboxes, internal and external websites and probably fifty other different things if you really tried. Whilst i'm not an expert on SQL full text search I believe it's intended to provide a search feature for content held within SQL databases
and tables.
Can you run SharePoint purely for Search? Yes, definitely. -
Matching data types b/w oracle and sql server
anyone here knows if there is a list of data types supported by both oracle and sql server (regardless of releases & versions?
an immediate response would be highly appreciated.
thanks.Hi,
The following post might be of assistance to you:
http://msdn.microsoft.com/en-us/library/ms151817.aspx
If this is what you're looking for, then mark the question as answered and closed.
Regards,
Naveed. -
Hi:
According to all the Reporting Services logs my Reporting Point was setup correctly. When I try and run any report I see the entries below in the srsrp.log on the SQL Server. The report names show up in the Console but when I right any of the
listed reports I get errors and no report runs.
I am running SQL Server 2008 R2 SP2 on a remote server. SQL is installed on its own server. There is no firewall between the Configuration Manager server and SQL Server.
Thanks.
Mark
(!) Error retrieving folders - [A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance
name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because
connected host has failed to respond.)]. SMS_SRS_REPORTING_POINT
1/25/2013 9:15:07 AM 4532 (0x11B4)
No folder configuration information found.
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
Next security configuration at [1/25/2013 9:22:42 AM]
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
Root Folder exists
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
Successfully checked that the SRS web service is healthy on server DBSCCM.LOCAL
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
Waiting for changes for 1 minutes
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
SRSRP registry key change notification triggered.
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:16 AM
4532 (0x11B4)
Waiting for changes for 1 minutes
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:16 AM
4532 (0x11B4)
Timed Out...
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Reporting Services URL from Registry [http://dbsccm/ReportServer/ReportService2005.asmx]
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Reporting Services is running
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Retrieved datasource definition from the server.
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Retrieved datasource definition from the server.
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Updating data source {5C6358F2-4BB6-4a1b-A16E-8D96795D8602} at ManagedDesktops_MD1
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
(!) Error retrieving folders - [A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance
name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because
connected host has failed to respond.)]. SMS_SRS_REPORTING_POINT
1/25/2013 9:17:40 AM 4532 (0x11B4)
No folder configuration information found.
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Next security configuration at [1/25/2013 9:22:42 AM]
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Root Folder exists
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Successfully checked that the SRS web service is healthy on server DBSCCM.LOCAL
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Waiting for changes for 1 minutes
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Timed Out...
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Reporting Services URL from Registry [http://dbsccm/ReportServer/ReportService2005.asmx]
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Reporting Services is running
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Retrieved datasource definition from the server.
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Retrieved datasource definition from the server.
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Updating data source {5C6358F2-4BB6-4a1b-A16E-8D96795D8602} at ManagedDesktops_MD1
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)Hi:
Windows Firewall is off on both systems.
I can ping the Configuration Manager server from the SQL Server by netbios name, ip address and fully qualified domain name. I can ping the SQL Server from the Configuration Manager server by netbios name, ip address and fully qualified domain
name.
I have uninstalled and installed the Reporting Point Service a couple of times and everything looks fine according to the logs after the install finishes but these errors only appear each time I try and Run a report.
Mark -
Unable to connect to report server - on Win 8.1 and SQL Server 2014
unable to connect to report server on Win 8.1 and SQL Server 2014 version
Microsoft SQL Server 2014 - 12.0.2000.8 (Intel X86)
Feb 20 2014 19:20:46
Copyright (c) Microsoft Corporation
Express Edition on Windows NT 6.3 <X64> (Build 9600: ) (WOW64)
ThanksHi,
I suggest you check out the following article for the steps of installing
Database Engine Services and SQL Server Reporting Service.
http://msdn.microsoft.com/en-us/library/ms143711.aspx
Best Regards,
Tracy
Tracy Cai
TechNet Community Support -
How can I connect to Oracle and SQL server at the same time?
I have been trying to find a way to connect to Oracle Database through the developer 2000 and SQL server at the same time. I need to return some data from Oracle Database and some from the Sql Server Database. And update both through SQL. I find there is such a thing as the Oracle Transparent Gateway for SQL server. I can't find it on any of my CD's or through OTN downloadable files. If anyone can point me where to get this. Or tell of another way this can be accomplished I would appreciate it. TIA.
[email protected]I have been trying to find a way to connect to Oracle Database through the developer 2000 and SQL server at the same time. I need to return some data from Oracle Database and some from the Sql Server Database. And update both through SQL. I find there is such a thing as the Oracle Transparent Gateway for SQL server. I can't find it on any of my CD's or through OTN downloadable files. If anyone can point me where to get this. Or tell of another way this can be accomplished I would appreciate it. TIA.
[email protected]
As far as I know you have 3 options depending on your specifications. I don't think option #3 will work if you need to actually join a
SQL Server table to an Oracle table.
1. Oracle Transparent Gateway. I haven't used the Oracle Transparent Gateway but my understanding is that Oracle gateways are
separate purchased products from Oracle. I've never seen any free/development versions of it anywhere. You'll need to contact
your Oracle sales rep about it.
2. Heterogeneous Connectivity. There's something called Heterogeneous Connectivity that could work for you - depends on what
version of Oracle you're on and what OS. You basically set up an ODBC data source on the Oracle server and modify the listener.ora
and tnsnames.ora files. You can then create a database link to SQL Server just like you would to any other Oracle database. You can
check your Oracle documentation for how this works. There's also some very good documents on Metalink that tell you how to do this
as well as a Heterogeneous Connectivity forum on this site.
3. Use the exec_sql package available in Developer 2000. This allows you to open and execute cursors to remote databases within
Developer. We have an account validation process that uses this - when a person enters an account number in a form while logged
into Oracle it validates the account is valid in our main accounting DB2 database. We also pull HR information from DB2 into Oracle
this way. If you're using Forms 6i exec_sql is a built-in command, in Forms 5.0 and 5.5 you have to add it as an attached library to
the form. I think you also need the OCA options installed from the Developer software to have access to the library in Forms 5.0 and
5.5. The library will be in the $ORACLE_HOME\oca20\plsqllib directory for these versions. The Developer documentation should have
additional information.
HTH -
Hi All,
Here the linked server is created between sql server 2012 64 bit and sql server 2005 32 bit. I am getting the below error when i try to access linked server from third server. I have created linked from Instance 1 to Instance 2. When i access it from
instance 3 i am getting the below error. SPN setting has been done between these 2 servers. Also the option 'Trust the delegate' is enabled for the both the service account.
'Login Failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
Appreciate your quick response.
Vikas.M.SHello,
Please read the following resources:
http://www.databasejournal.com/features/mssql/article.php/3696506/Setting-Up-Delegation-for-Linked-Servers.htm
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ea26de43-4c6b-4991-86d7-e1578f107c92/linked-server-login-failed-for-user-nt-authorityanonymous-logon?forum=sqldataaccess
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Compatability: CR 2008, VS 2005 and SQL Server 2008 on WINDOWS 7
Crystal Reports 2008, Visual Studio 2005 and SQL Server 2008 all play nice together on a VISTA or XP box. But we cannot get a connection when we switch the OS to WIN 7. I tried to get a connection via the report designer. Is this combination of technologies currently supported?
Thanks.Hi, Jeff;
See the [Platforms|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/00225757-ab5c-2c10-c1a8-fb9f9f0f4ac2] document for CR 2008. You need Service Pack 2 to run on Windows 7.
If you already have SP 2, then what happens when you try to make a connection?
Regards,
Jonathan
Follow us on Twitter u2013 http://twitter.com/SAPCRNetSup -
I want to use the SQL Toolkit of NI and SQL Server as my databasis on a server. Do I need to install a client in each computer I want to handle the data into SQL tables or I need only a ODBC driver?
You only need the ODBC driver on each computer. If you are distributing the SQL Toolkit app as an executable and do not install the whole toolkit on each computer, you'll need the SQL Toolkit support files. This is about a dozen files. You can get the list at http://digital.ni.com/public.nsf/websearch/b814be005f9da9258625658700550c75?OpenDocument.
-
SharePoint 2013 and SQL Server AlwaysOn - HA
Hi guys,
Please help!
I need to setup SP13 server on SQL 2012 AlwaysOn (on sql01 and sql02). The HA AlwaysOn group already configured by DB team on these 2 replica with and called SP_AOAG alias
My question is can I use this alias to setup SharePoint or I need to configure the HA AlwaysOn group for SgharePoint as suggested in the article below:
http://blogs.msdn.com/b/sambetts/archive/2013/04/24/sharepoint-2013-and-sql-server-alwayson-high-availability-sharepoint.aspx
Any advice greatly appreciated .
BalaiPYou do not want to use a SQL Alias with an AG Listener. Just point SharePoint straight at the AG Listener. You will need to manually add any accounts to non-primary instances. You do not need to add them to individual databases, of course. You will also
need to manually set MAXDOP to 1 on non-primary instances.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Introduction
There is the scenario that users configured hundreds of subscriptions for reports. Now they want to disable all the subscriptions, but Reporting Services and SQL Server Agent service should be enable, so the subscriptions will not delivery reports to users
and users could run the reports and create jobs on the server.
Solution
To achieve this requirement, we need to list all subscriptions and their schedules by running query, then use loop statement to disable all the subscription schedules by Job name.
On the Start menu, point to All Programs, point to Microsoft SQL Server instance, and then click SQL Server Management Studio.
Type Server name and select Authentication, click Connect.
Click New Query in menu to open a new Query Editor window.
List all subscriptions and their schedules by running the following query:
Use ReportServer
go
SELECT c.[Name] ReportName,
s.ScheduleID JobName,
ss.[Description] SubscriptionDescription,
ss.DeliveryExtension SubscriptionType,
c.[Path] ReportFolderPath,
row_number() over(order by s.ScheduleID) as rn
into
#Temp
FROM
ReportSchedule rs
INNER JOIN Schedule s ON rs.ScheduleID = s.ScheduleID
INNER JOIN Subscriptions ss ON rs.SubscriptionID = ss.SubscriptionID
INNER JOIN [Catalog] c ON rs.ReportID = c.ItemID AND ss.Report_OID = c.ItemID
select * from #temp
Use the loop statement to disable all the subscription schedules by Job name:
DECLARE
@count INT,
@maxCount INT
SET @COUNT=1
SELECT @maxCount=MAX(RN)
FROM
#temp
DECLARE
@job_name VARCHAR(MAX)
WHILE @COUNT <=@maxCount
BEGIN
SELECT @job_name=jobname FROM #temp WHERE RN=@COUNT
exec msdb..sp_update_job @job_name = @job_name,@enabled = 0
SET @COUNT=@COUNT+1 P
RINT @job_name
END
PRINT @COUNT
Reference
SQL Agent – Disable All Jobs
Applies to
Reporting Services 2008
Reporting Services 2008 R2
Reporting Services 2012
Reporting Services 2014
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Thanks,
Is this a supported scenario, or does it use unsupported features?
For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
in a supported way?
Thanks! Josh -
Java for PI 7.1 EHP1 in Windows and SQL Server 2008
Hi Gurus
I try to install PI 7.1 EHP1 in Windows and SQL Server 2008. The questions is :
What version of java is the correct for this installation???
And where i can download it??
Thanks and advance!!!Hi Aaron,
The version for PI 7.1 is 1.5, instead of the 1.4.2 of 7.0/3.0.
Anyway, for VM settings, you should refer to SAP JVM, which
is used for the PI 7.11.
Hope it helps!
Regards,
Caio Cagnani -
Insert into blob(image) sql server 2000
hello
i want enter one image for example fish.jpg into blob into
sql server 2000 plz help me...http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/LOBSample.zip
this contains samples for using blob with oracle. use the idea for your code. -
JPA and SQL Server 2005's Identity Don't Play Nice
I am hoping someone with a little more senior knowledge of JPASQL Server 2005 can point me in the right direction involving SQL Server 2005.
What I am discovering is JPA and SQL Server 2005 do not playing nice together when you use the IDENTITY capability for
a primary key. Let me explain. "...when using the IDENTITY as the generator type, the value for the identity field MAY NOT be
available BEFORE the entity data is saved in the database because typically it is generated when a record is committed."
My problem is this.
I have two separate entities using another entity, for example a car has a wheel and a truck has a wheel. I can go through the steps
of persisting the car and the wheel with no problem. My problem begins when I try to
find the wheel (by wheel description) for the truck. The query finds the wheel, but does not return the primary key for wheel.
Therefore, using the PK inside a query generates this error:
java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation. What has been my appraoch to get the entity to commit to the database is to use the following sequence for the Entity Manager.
entityManager.persist(wheel);
entityManager.flush(); I have assumed to this point this action would persist my data because I have been able to retrieve the PK immidately after these steps.
However, multiple actions taking place within the same transaction, appears to render the persist and flush steps useless. My initial thought
is to wrap the wheel creation within a new transaction so when the method/transaction completes, the data would be in the database. This
has not worked.
I hope I have explained this clear for others to follow. I apologize in advance if I have not. Any suggestions are greatly appreciated.I am hoping someone with a little more senior knowledge of JPASQL Server 2005 can point me in the right direction involving SQL Server 2005.
What I am discovering is JPA and SQL Server 2005 do not playing nice together when you use the IDENTITY capability for
a primary key. Let me explain. "...when using the IDENTITY as the generator type, the value for the identity field MAY NOT be
available BEFORE the entity data is saved in the database because typically it is generated when a record is committed."
My problem is this.
I have two separate entities using another entity, for example a car has a wheel and a truck has a wheel. I can go through the steps
of persisting the car and the wheel with no problem. My problem begins when I try to
find the wheel (by wheel description) for the truck. The query finds the wheel, but does not return the primary key for wheel.
Therefore, using the PK inside a query generates this error:
java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation. What has been my appraoch to get the entity to commit to the database is to use the following sequence for the Entity Manager.
entityManager.persist(wheel);
entityManager.flush(); I have assumed to this point this action would persist my data because I have been able to retrieve the PK immidately after these steps.
However, multiple actions taking place within the same transaction, appears to render the persist and flush steps useless. My initial thought
is to wrap the wheel creation within a new transaction so when the method/transaction completes, the data would be in the database. This
has not worked.
I hope I have explained this clear for others to follow. I apologize in advance if I have not. Any suggestions are greatly appreciated.
Maybe you are looking for
-
Ipod touch 5g battery life problem?
Hi everyone, i just got thenew ipod touch 5g 32gb blue about 3 weeks ago and it runs ios 7.0.4. Now i have been thinking that i might have a bad battery because when i play games the battery runs out in labout 2 hours. i play games like wipeout and c
-
Urgent!!!. Need Help with @@identity
Hi, I am migrating T-SQL queries to PL/SQL. I have some queries in SQL Server like "Insert into tble(col2, col3, col4) values(val2, val3, val4);select col1, col2, col3 from tble where col1=@@identity" When I use Sql developer @@identity is replaced w
-
Table name that stores infopackage,DTP and BW table names
Hi, I want to create a program to populate the fields with the BW table name(/BIC,/BI0 etc.),Infopackage name and DTP name(Process Variant).May I know from which table I can get the infopackage name using the BW table name? Hope my question is clear
-
Getting started: Splitting video, simple titles/credits
I'm a brand-new owner of Adobe Premiere Elements. I'm a huge fan of Adobe products, though, and am an experienced Photoshop user. What I need to do is very simple: 1) Split approx. 30 minutes videos into 2-3 parts (10-15 minutes in length, depending
-
What is wrong in this program?? I keep getting a mismatch error.
import java.util.Scanner; public class Exercise2_11 { public static void main(String []args){ Scanner input = new Scanner(System.in); System.out.println("Enter employee's name:"); int employee = input.nextInt(); System.out.println("Enter number of ho