How to empty XE database and re-create tables/fields from scratch?
Hi,
I've installed XE database to port my VB6/Access application to it, and I know that XE is limited to one single database, so far so good. But I want to erase everything from inside this default database to create my own tables/fields from scratch. How can I do that?
I just want to have one single database file with some tables/fields inside it, and nothing else. The rest will be done through VB straight.
And what is the name of the default XE database file? Where is it stored? If I make a backup of this file, can I restore it after a crash in the future by overwriting the corrupted file? Is that this simple as Access is?
Sorry about those many questions and thanks for reading!
Roger.
If you want to erase everything, one solution is to uninstall Oracle XE and just to reinstall it.
Under Windows to avoid any issue, see http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm#CIHDDHJD.
If your application is owned by a single Oracle user account, you can also run (where <schema> is the Oracle user account name):
drop user <schema> cascade;To reinstall your application you would need to recreate the user account <schema> with the right privileges (CREATE USER ... and GRANT ...).
Similar Messages
-
Hi all,
In my SQL Server 2012 Management Studio (SSMS2012), I tried to create a Database (MacLochainnsDB) and a dbo Table (marvel). then I wanted insert 8 VALUES into the Table by using the following code:
USE master
IF EXISTS
(SELECT 1
FROM sys.databases
WHERE name = 'MacLochlainnsDB')
DROP DATABASE MacLochlainnsDB
GO
CREATE DATABASE MacLochlainnsDB
GO
CREATE TABLE [dbo].[marvel] (
[avenger_name] [char] (30) NULL)
INSERT INTO marvel
(avenger_name)
VALUES
('Hulk', 1),
('Iron Man', 2),
('Black Widow', 3),
('Thor', 4),
('Captain America', 5),
('Hawkeye', 6),
('Winter Soldier', 7),
('Iron Patriot', 8)
I got the following error Message:
Msg 110, Level 15, State 1, Line 5
There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
How can I correct this problem?
Please kindly help and advise.
Thanks in advance,
Scott Chang
P. S.
The reason I tried to create the Database, dbo Table, and then to insert the VALUES is to learn the following thing:
You can query the entire node tree with the following xquery statement because it looks for the occurrence of any node with the /* search string:
DECLARE @x xml;
SET @x = N'<marvel>
<avenger_name>Captain America</avenger_name>
</marvel>';
SELECT @x.query('/*');
You can query the avenger_name elements from the marvel_xml table with the following syntax:
SELECT xml_table.query('/marvel/avenger_name')
FROM marvel_xml;
It returns the following set of avenger_name elements:
<avenger_name>Hulk</avenger_name>
<avenger_name>Iron Man</avenger_name>
<avenger_name>Black Widow</avenger_name>
<avenger_name>Thor</avenger_name>
<avenger_name>Captain America</avenger_name>
<avenger_name>Hawkeye</avenger_name>
<avenger_name>Winter Soldier</avenger_name>
<avenger_name>Iron Patriot</avenger_name>
You can query the fourth avenger_name element from the marvel_xml table with the following xquery statement:
SELECT xml_table.query('/marvel[4]/avenger_name')
FROM marvel_xml;
It returns the following avenger_name element:
<avenger_name>Thor</avenger_name>Hi Scott,
The master database records all the system-level information for a SQL Server system, so best practise would be not to create any user-defined
object within it.
To change your default database(master by default) of your login to another, follow the next steps so that next time when connected you don't have to use "USE dbname" to switch database.
Open SQL Server Management Studio
--> Go to Object explorer(the left panel by default layout)
--> Extend "Security"
--> Extend "Logins"
--> Right click on your login, click "propertites"
--> Choose the "Default database" at the bottom of the pop-up window.
--or simply by T-SQL
Exec sp_defaultdb @loginame='yourLogin', @defdb='youDB'
Regarding your question, you can reference the below.
SELECT * FROM master.sys.all_objects where name ='Marvel'
--OR
SELECT OBJECT_ID('master.dbo.Marvel') --if non empty result returns, the object exists
--usually the OBJECT_ID is used if a if statement as below
IF OBJECT_ID('master.dbo.Marvel') IS NOT NULL
PRINT ('TABLE EXISTS') --Or some other logic
What is the sys.all_objects? See
here.
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
How can I prevent deleted mail from ending up in "All Mail" and "Archives"?
To my horror, I emptied these boxes and lost all my mail from all my boxes .
All mail also disappeared from my iPad, I suppose because they are "synched"
(Also, no offense, but why do I need to enter this question multiple times?)
Thanks for any thoughts.I'm having a similar but slightly different problem. My company just migrated to Gmail, and it's saving mail drafts every 30 seconds into my Trash folder.
I unchecked the "Show in IMAP" preference in the Gmail settings, but my Drafts folder completely disappeared. I went back and checked it and the folder reappeared (with my drafts still in there).
I like the idea if starting an email on my laptop and having the option of finishing it on my iPhone or iPad, so only saving Drafts locally would not be ideal. -
How to reset All users and delete their table?
Hi,
i want to know How to reset All users and delete their tables with username- system and password-manager.
thanksHi
Here delete means truncate or drop?????
If drop use the following statement to generate the script:
select 'drop table ' || Owner || '.' || Table_Name || ';' from Dba_tables
where owner in (<All_the_users_you_want_to_reset>);
But before firing the above statement extract the DDL's to create all the users and put it in a file and just run that file to re-create the users.
if its truncate then:
select 'truncate table ' || Owner || '.' || Table_Name || ';' from Dba_tables
where owner in (<All_the_users_you_want_to_reset>);
Hope this Helps
Regards -
Create a report from scratch, add Table and Datasource Problem
Hi,
I'm using the latest Crystal Reports Runtime supplied for eclipse.
I want to create a report from scratch, add a Table and then add a ArrayList of Pojos as the Datasource.
But unfortunately depending on the ConnectionInfo I supply to the Table I get different errors.
I looked through the samples and see that I have to supply properties
like
"Database DLL", "crdb_javabeans.dll" and ConnectionInfo.setUserName("");
ConnectionInfo.setPassword(null)
I looked through the forums and find different set of properties.
Actually because I am just working with Pojos I would have thougth that something like the following
would be sufficient:
ReportClientDocument doc = new ReportClientDocument();
doc.setReportAppServer(ReportClientDocument.inprocConnectionString);
doc.newDocument();
Table table = new Table();
table.setAlias("reportTable");
table.setName("reportTable");
doc.getDatabaseController().addTable(oTable, null);
doc.getDatabaseController().setDataSource(myCoolection, myClass, "reportTable", "reportTable");
So could someone tell me the right/minimum Set of Properties to make a Table get connected to Pojos?
Edited by: jack mann on Aug 31, 2010 3:25 PMWith XI Release 2, you can come quite close to creating from scratch:
http://technicalsupport.businessobjects.com/KanisaSupportSite
/search.do?cmd=displayKC&docType=kc&externalId=5074668
You need Service Pack 2:
http://support.businessobjects.com/downloads
/service_packs/crystal_reports_en.asp
Sincerely,
Ted Ueda -
I was using ios 5.1 and i created an id from india, nw am in qatar n i updated to ios 6.0.1 nw i cant able to purchase from the store.when i tried to do it says " your account is not valid in the qatari store. you must switch to the indian store before purchasing" please help me with this issue.. hw i can switch to indian store..?
How to Change Your App Store Account Location | eHow.com
-
how do i play pandora and hulu on apple tv from my new mac book pro?
Welcome to the Apple Community.
Unfortunately that's not possible. -
How do I get games and music on my phone from iTunes
How do I get games and music on my phone from iTunes
See here > http://support.apple.com/kb/HT1386
From Here > http://www.apple.com/support/iphone/syncing/ -
How to change Syntax group and physical path in SARA from unix to windows.
Our customer migrate current current archiving server from Unix to windows
How to change Syntax group and physical path in SARA from unix to windows.http://help.sap.com/saphelp_nw70/helpdata/EN/8d/3e4ec2462a11d189000000e8323d3a/frameset.htm
you have to change
Logical Path Names
Logical file Names
Note 35992 - File name/directory for application archiving
hope this will help you
cheers
dEE -
Hello,
How to find and remove obsolete table entries from below tables in EWM System.
/SAPAPO/MATKEY
/SAPAPO/MATMAP
/SAPAPO/MARM
/SAPAPO/MATLOC
/SAPAPO/MATMOD
/SAPAPO/MATRQ
/SAPAPO/MATLOTSZ
Thank you,
PravinPravin,
First, tell me how you determine that these entries are 'obsolete'.
Removing master data from SCM can usually be done using transaction WUF; however, you have to ensure that it is not re-sent to the SCM system, or you are just wasting your time.
Best Regards,
DB49 -
Creating a new connection when creating a report from scratch
I've searched all around but I haven't managed to find any samples or forum posts that show how to create a connection when creating a report from scratch via RCAPI. All of the code that I've found has been aimed at replacing the ConnectionInfo for an existing connection. I figured that it would work something like this:
m_crystalReport.setReportAppServer(ReportClientDocument.inprocConnectionString);
m_crystalReport.newDocument();
IConnectionInfo ci = new ConnectionInfo();
PropertyBag propertyBag = new PropertyBag();
propertyBag.put("Use JDBC", true);
propertyBag.put("Connection URL", "jdbc:jtds:sqlserver://localhost:1433;databaseName=" + DB_NAME);
propertyBag.put("Database Class Name", "net.sourceforge.jtds.jdbc.Driver");
propertyBag.put("Database DLL", "crdb_jdbc.dll");
ci.setAttributes(propertyBag);
m_connection = new Connection();
m_connection.setConnectionInfo(ci);
m_connection.open();
but this produces a NullPointerException within Connection.open(). If I leave the connection closed but add it to the report via DatabaseController.addConnection() then I just get the exception later on when I try to add tables using the connection.
Can anyone give me any pointers please?
Thanks,
Rich.Just in case anyone else runs into this, I managed to fix it by leaving the connection closed and then using the connection info instead of the connection when creating tables, eg:
ITable t = new Table();
t.setAlias(v.getAlias());
t.setName(v.getView().getName());
t.setConnectionInfo(m_connectionInfo);
getDatabaseController().addTable(t, null); -
Create a Form from Scratch: Possible or Not
So, I have Acrobat X.
I want to create a form from scratch. I have Word doc, but it wasn't created to look like a form, and I didn't like the way it imported.
So, can I create a form from scratch. Or Not?
If you try to start from scratch, it suggests a template on formscentral - and after signing up for free and spending an hour making the form, I find that I can not save or save as PDF the form that I created without forking over my credit card information - for a free trial that bills in a few weeks. (As much as I like the form data collection tools available, I cannot have my data collected by Adobe.)
I can open an empty MS Word doc to start from - as my import choice - but can you make it any harder to mave the text around or enter new text? I never did figure out how to edit text. Is the answer going to be to edit my text in Word or in the plain PDF tool?
I just found the form creation to be completely counter intuitive.Acrobat is not a Word processor, really. "Adding a carriage return" makes sense in a word processor, where the layout is still fluid. In a PDF the layout is finished, everything is a graphic. So, absolutely, it's designed to work with pre-made forms. To me, that's a strenghth - you can use the tools you already know to make the form background, then you add the fields in Acrobat. With work, you can preserve the fields over remaking the PDF, then just adjust the field positions.
-
Unable to access the data and table fields from handheld
Hi,
I've created a Testing.sdf file on the local pc using SQL Server Management Studio, creating table, fields and insert some data. in local pc i can access the the data as normal. the problem is after i moved the file to handheld device i
cannot access the data within the table, it shown error 'Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)' . I tried to google it, but still got no solution.
Thanks,'Name Space
Imports System.Data.SqlServerCe
'String Connection
'Data Source = D:\SKUDWN3 .sdf'
Public Sub CreateDB(ByVal StrConn As String)
'Declaration
Dim cn As SqlCeConnection = Nothing
Dim cm As SqlCeCommand = Nothing
Dim SQLEngine As SqlCeEngine = Nothing
Dim rs As SqlCeResultSet = Nothing
Dim rec As SqlServerCe.SqlCeUpdatableRecord = Nothing
'Tables -
Const TB_SKUDWN3 As String = "SKUDWN3"
'Fields TB_SKUDWN3
Const FL_SKUDWN3_UPC As String = "UPC"
Const FL_SKUDWN3_SKU As String = "SKU"
Const FL_SKUDWN3_LD As String = "LD"
Const FL_SKUDWN3_SD As String = "SD"
Const FL_SKUDWN3_AN As String = "AN"
Const FL_SKUDWN3_Price As String = "Price"
Const FL_SKUDWN3_GST_FLAG As String = "GSTFLAG"
'Create Database
SQLEngine = New SqlCeEngine(StrConn)
SQLEngine.CreateDatabase()
SQLEngine.Dispose()
'Open Connection
If IsNothing(cn) Then cn = New SqlCeConnection(StrConn)
If cn.State = Data.ConnectionState.Closed Then cn.Open()
cm = cn.CreateCommand
'Create Table, Fields
cm.CommandText = "CREATE TABLE " & TB_SKUDWN3 & " (" & FL_SKUDWN3_UPC & " NVARCHAR (13)," & _
" " & FL_SKUDWN3_SKU & " NVARCHAR (9), " & FL_SKUDWN3_LD & " NVARCHAR(30)," & _
" " & FL_SKUDWN3_SD & " NVARCHAR (18), " & FL_SKUDWN3_AN & " NVARCHAR(15), " & _
" " & FL_SKUDWN3_Price & " NVARCHAR (10), " & FL_SKUDWN3_GST_FLAG & " BIT)"
cm.ExecuteNonQuery()
'Close Connection
cm = Nothing
If Not IsNothing(cn) Then
If cn.State = ConnectionState.Open Then cn.Close()
cn.Close()
cn.Dispose()
End If
End Sub
'The DB was successfully created, but after moving to Handheld the fields of table can't be accessed -
I have just bought a new mac book, and I want to start from scratch by syncing the content of my iPhone, but each time I try it wants to delete everything on the iPhone and replace by what's on the new iTunes library, i.e. nothing! can I do the reverse, i.e. importing all my iphone's stuff on the new computer?
You need to copy some files and your iTunes folder to the new computer. Do you have a backup of your old computer (or still have the old computer?) Was the old computer a Mac or PC?
MacWorld - Move an iTunes library from a Windows PC to a Mac
Back up your iTunes library by copying to an external hard drive
iTunes- How to move your music to a new computer -
Girl needs help here!
My Iphone4 is registered to my itunes in my PC. My PC then got virus and had to be rebooted from scratch and so lost a lot of data. I reinstalled my itunes and registered my account and it looks like the musics bought through Itunes is reinstalled. NOw Im afraid that if I hook back my Iphone4 to the reinstalled itunes, I will lose all the numbers and data in my iphone . Please help! cant imagine writing down to pen and paper all data i have in my phoneEvery backup replaces the old one, so, unless you included the backup folder in your computer backup routine, you can't get back your calendar info.
The only time iTunes will not replace a backup is, when you use it to restore from, this one will stay in the backup list in iTunes.
More info on backups here: http://support.apple.com/kb/HT1766
Maybe you are looking for
-
How to reteive '+' from request object.
I have a JSP page there I enter A+**** in a field. Then I entered the data it is coming to a servlet and there the value is reading as req.getParameter(nodeName); where nodename is the field where I enter the data(i.e. A+****). My problem is the '+'
-
I have not updated my iPhone 3G since 2010 as I do not have a computer and have to use my daughters pc. She plugged in my phone to update through iTunes (which took all night) and in the morning it was completed. We backedup to the icloud but now mu
-
I am running window 7 64-bit and the version of photoshop that CC installed is 32-bit. I want to install a 64-bit version of photoshop so that I can access all of my RAM (I keep getting error messages). Apparently CC should install the correct versio
-
LegacyExchangeDN in e-mail address
I am having a tough time with a very specific behavior of Dynamics CRM 2013 and Exchange 2010. My configuration: - Machine 1: Windows 2008 R2 SP1 running Exchange 2010 SP3 - Machine 2: Windows 2012 Standard running Dynamics CRM 2012 (6.0.2.51, DB 6.0
-
IVI driver not working with my DPO4054B scope
So I got two new DPO4054B scopes. I have tried both IVI drivers from Tektronix and NI's websites. They are: NI -> tkdpo4k_setup.exe Tektronixs ->Tkdpo2k3k4kIVIDriver1.3.exe Both have issue. I started with the textronixs one and the issue it has is