New DB from existing DB with data
Hi All,
How to create new DB from an existing DB with all the data? means what could be the sql for that. ?
i mean to say when we want create a table in db from an existing db with data then we write like
create table <table_name> as select * from <db_name>.<table_name>
so is there any sql like this for creating db from an existing db with data?
Similar Messages
-
Problem while adding a new dimension in a existing cube with data in BW3.5
Hi,
We are trying to create a new dimension with new characteristics in a existing cube. But while activating we are getting error that "InfoCube contains data; intentional changes not permitted". Can we add a new dimension in a existing cube with data in BW3.5? If it is not possible then we can take the backup and delete the data from cube and then change the cube. But my question is that, when we will transport the cube with changes to quality then will it transport successfully or same procedure needs to be done there as well.
Regards,
Saikathi,
Adding new infoobject /dimension to the cube containing data in 3.5 is not possible.
easier solution is create a new cube similar to old and add the new dimension and proceed.
else you have to drop data and transport.
Ramesh -
How to compare result from sql query with data writen in html input tag?
how to compare result
from sql query with data
writen in html input tag?
I need to compare
user and password in html form
with all user and password in database
how to do this?
or put the resulr from sql query
in array
please help me?Hi dejani
first get the user name and password enter by the user
using
String sUsername=request.getParameter("name of the textfield");
String sPassword=request.getParameter("name of the textfield");
after executeQuery() statement
int exist=0;
while(rs.next())
String sUserId= rs.getString("username");
String sPass_wd= rs.getString("password");
if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
exist=1;
if(exist==1)
out.println("user exist");
else
out.println("not exist"); -
How add primary key constraint to already existing table with data
I want apply primary key constraint to already existing table with data
is there any command or way to doAlternatively, assuming you want to ensure uniqueness in your primary key column you can do this:
alter table <table name> add constraint <cons name> primary key (col1,col2) exceptions into <exception_table>
If the altter table statement fails this will populate the EXCEPTIONS table with the rows that contain duplicate values for (col1,col2).
You will need to run (or get a DBA to run) a script called UTLEXCPT.SQL (which will be in the $ORACLE_HOME/rdbms/admin directory) if you don't already have an EXCEPTIONS table.
Cheers, APC -
Please follow the scenario:
using C#
1) current database file name is DB20122013.
when user click on new year button
2)Create backup copy of current database
3)New database should create with all table(excluding table "Dailytemp" and "DailyMain") with data and database name as DB20132014.
Musakkhir Sayyed.Hi,
I hope, below stored procedure is useful for your scenario.
CREATE PROC Create_New_Database
( @DBNAME VARCHAR(550)
)AS
Test : Exec [Create_New_Database] @DBNAME='DB20122013'
BEGIN TRY
SET NOCOUNT ON
DECLARE @sql VARCHAR(MAX), @DBNAME_NEW VARCHAR(550),@num int
IF EXISTS(SELECT 1 FROM sys.databases WHERE name=@DBNAME) AND ISNUMERIC(RIGHT(@DBNAME,4))=1
BEGIN
SELECT @num= RIGHT(@DBNAME,4)
SELECT @DBNAME_NEW='DB'+CAST(@num AS VARCHAR(10))+''+CAST(@num+1 AS VARCHAR(10))
IF EXISTS(SELECT 1 FROM sys.databases WHERE name=@DBNAME_NEW)
BEGIN
SELECT @DBNAME_NEW+' database already exists'
END
ELSE
BEGIN
SET @sql='USE '+@DBNAME+' '+' backup database '+@DBNAME+' to disk = ''C:\'+@DBNAME+'.bak'' '
+' restore database '+@DBNAME_NEW+' from disk = ''C:\'+@DBNAME+'.bak'''
+' with move '''+@DBNAME+''' to ''C:\'+@DBNAME+'_data.mdf'' ,
move '''+@DBNAME+'_log'' to ''C:\'+@DBNAME+'_log.log'''
EXEC (@sql)
SET @sql=''
SET @sql=' USE '+@DBNAME_NEW+' IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME=''Dailytemp'')
BEGIN DROP TABLE Dailytemp END IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME=''DailyMain'')
BEGIN DROP TABLE DailyMain END '
EXEC (@sql)
END
END
ELSE
BEGIN
SELECT 'Database is now found or Database name does not mach the scenario'
END
SET NOCOUNT OFF
END TRY
BEGIN CATCH
DECLARE @ErrorMessage NVARCHAR(4000)
DECLARE @ErrorSeverity INT
DECLARE @ErrorState INT
SELECT @ErrorMessage = ERROR_MESSAGE(), @ErrorSeverity = ERROR_SEVERITY(),@ErrorState = ERROR_STATE()
RAISERROR (@ErrorMessage,@ErrorSeverity,@ErrorState )
END CATCH;
GO
Regards,
RAMBHARATH -
Pdf form for data from another form with data, xml or pdf, tables not expanding
Sir,
I am using Adobe Acrobat 9 Pro and LifeCylce to do these forms. I have made several subforms for a Risk Assessment for the mission they fly. I have also made up another form with tables that would connect with each subform data. This form also will give me and others a % of the values received from the data to help us with seeing problem area towards Safety.
I am able to connect the data to the form from the Risk Forms but when I go and add another group of data it over writes the data that was already in the data collection form. The tables are dynamic and able to expand with the generated data but when I compile several Risk Forms, xml. data into one single data group, the receiving tables will not except this data. To compile the data I am in Acrobat and using the form-manage form data-merge data to spreadsheet than enter as a report that is xml. Still not working. I also tried to save the form, with data already in the tables, and then opened it again and add data to it, it will over write the existing data in the form. This form does work great with the generated data in LiveCycle.
Any suggestions???Thanks Paul
Did as you said and for each subform binding tab made sure I have "Repeat subform for each data item" checkbox and still no change when I add the data.
I even tried to combine the xml data and that file just has the main page and not the data pages. just another problem that is happening.
Any other suggestions on this expanding tables and receive single forms one at a time.
Bill -
Rename the existing table with date suffix
Hi,
I'm trying to rename a table with date suffix at the end of the table name, and drop the date suffix table which is greater than 7 days. for that I have the below sql, I have not included the drop syntax in this.
I'm not able to rename with the date suffix in the below sql, syntax error at '+'
DECLARE
@TPartitionDate date
IF EXISTS (SELECT * FROM sysobjects WHERE Name = 'IIS_4')
BEGIN
SELECT
@TPartitionDate = MAX(PartitionDate)
FROM PartitionLog (NOLOCK)
EXEC sp_rename 'IIS_4','IIS_4_'+ @TPartitionDate
ENDcreate table Test(sno int)
DECLARE
@TPartitionDate date = getdate()
declare @a varchar(200)
IF EXISTS (SELECT * FROM sysobjects WHERE Name = 'Test')
BEGIN
select @a='TEST_'+ cast(@TPartitionDate as varchar(10))
EXEC sp_rename 'TEST',@a
END
drop table [test_2015-04-23]
Hope it Helps!! -
Migration to new IMAC from old IMAC with a Backup Drive
I purchased an new IMAC and have an old IMAC and have migrated all of my stuff from old to new, except I have a external backup drive on the old IMAC and did not migrate it. I thought that I would migrate by attaching it to the new but do not have the right cables. Can I connect the backup drive to the old with the firewire that I have and connect the old IMAC to the new one with the cables that I used, or do I have to buy the right connector to connect the backup to the new IMAC.
Thankshttp://support.apple.com/en-us/HT5872 Move your data to a new Mac
Setting-up a new Mac from an old one, its Backups, or a PC -
How to create new solution from Existing solution in integration services on TFS project?
Hi,
I am working on SSIS Project and it is created in VS 2008 .I opened the solution in VS 2010 and it is upgraded and unfortynately i don't have the back up to re open it in VS 2008.I am thinking of creating new solution from the existing one and open the new
solution in VS 2008.I was struck how can we copy existing solution to new solution on TFS.
Please let me know will this process work? and also how can we create a new solution without losing any files.
Any help is appreciated.Hi moh1kumr,
As Joost said, you can try to revert the changes back for the checked in files in TFS. For more information, please see:
http://msdn.microsoft.com/en-us/library/ee371161(v=expression.40).aspx
http://stackoverflow.com/questions/2694644/how-to-revert-roll-back-a-checkin-in-tfs-2010
If it doesn’t work, I am afraid you have to design the package in VS 2008 from scratch.
Regards,
Mike Yin
TechNet Community Support -
Partitioning an Existing Table with data
Hi All,
I am few tables with data, I need to Partition the table without affecting existing table values is it possible?.
if yes then Please suggest me some ideas to archive that..
Thanks & Regards
SamiHi All,
I Need to partition for existing table with 1 million records
1. First partition should be created for 6 months
2.Second partition should created for 1 year.
3.So as of now we have 6 months Data in production + another 6 months data in First partition + another 1 year data in Second partition.
4.More than 2 year’s data’s should be moved other partition or archived.
kindly provide your valuabe suggestion.
Thanks & Regards
Sami -
I can not print from Canon IR5050 after installing Maverick. I downloaded new driver from Canon with no luck.
I'm almost completely certain that the scanning feature worked before the update. Having said that though, I don't scan a great deal and it may be the case that when I have done, the printer was directly connected to the MBP. However, since I have a laptop it's far more logical that I would have had the printer connected to Airport Express for reasons of portability so I can't really see that I would have had the printer connected directly to the laptop. Besides this, I have no memory of having this problem previously. Therefore, I don't think my memory is to blame although of course, if it were I'd have no way of knowing!
J. -
Create a new schema from existing schema
Hi, I'm wondering whether there is a way of create a schema from
existing one? Could it done through SQL statement or have to go
through some sort of tools? Please drop me a few words if you
know the answer. Thanks.Hi,
U can do that in a few steps.
First create the User.
Then Go to the Source User and grant him create any table privs.
Then write a Sql Stmt to generate the necessary scripts and run it.
The other way would be to grantr the newuser select on all the tables and then run that script from his account.
Regards,
Ganesh R -
No data found exception when calling a new page from existing page
hi i have a screen which has a delivery id and i am calling a new page with a different view object and a application module.I need to pass this delivery id in the main page to the view object query in the second page.
i have defined the second page view object with the following query
select country,address1,address2,address3,address4,city from hz_locations where location_id=
(select ultimate_dropoff_location_id from wsh_new_deliveries where delivery_id=:1)
what i want is to pass the delivery id in the main page to :1 in this query.
i have written the following CO code for the second page
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
String eventaction=pageContext.getParameter("xxsaneventname");
String paramval=pageContext.getParameter("xxsanparamvalue1");
OAApplicationModule deliverydetailam = pageContext.getApplicationModule(webBean);
Serializable personParamList[]= {eventaction,paramval};
if ( eventaction!=null && eventaction.equals("viewdelivery"))
deliverydetailam.invokeMethod("getdetailsmethod", personParamList);
i have written the getdetailsmethod in the application module impl
public void getdetailsmethod( String pAction, String pdeliveryId)
try
OAViewObjectImpl pervo = getWshDeliveryDetailsVO1();
String existingWhereClause = pervo.getWhereClause() ;
System.out.println(existingWhereClause);
pervo.setWhereClauseParams(null);
pervo.setWhereClause("delivery_id = :1");
pervo.setWhereClauseParam(0, new Number(pdeliveryId));
pervo.executeQuery();
pervo.setWhereClauseParams(null);
//pervo.setWhereClause(existingWhereClause);
catch(Exception exception1)
throw OAException.wrapperException(exception1);
can some body please help me to correct this one.
the exception i got is
oracle.apps.fnd.framework.OAException: No data found for region (/xxt/oracle/apps/AK/om/webui/deliverydetailpg).Provide the complete error stack.
From the current error line it shows that your custom region/page /xxt/oracle/apps/AK/om/webui/deliverydetailpg is not present in the MDS. Did you use xmlimport to set the page xml into MDS? If yes, use jdr_utils package to confirm it is present at the right location.
--Shiv -
Adding new field to existing CO-PA data source
Hello BW gurus,
i was asked to add a new field vv531 in COPA data source, in order to do this when i was deleting the data source it is giving message "you are not allowed to change cross-client Customizing" .our bw development has 2 clients 20 & 40 . Generally wat ever changes are done in 20 are visible in 40. But now am not able to see the particular CO-PA data source in client 20.It is visible only in client 40. when i am trying to delete it from 40 it is giving the msg. Please suggest me over this bcause my dead line to complete this is nearing.
Thanks,
praveenhello manfred,
thanks for the reply. i know for the fact tht we shud delete n recreate but when i am trying to delete it it is saying "you are not allowed to change cross client customising" . when the development was going on they have done it in development server client 20,which is also visible in client 40 with out transportation . 20 is whr changes are made ,40 is the one which is connected to BW development server. Now as per the requirement i shud make changes in 20 ,but when i am trying to do this it says "data source is defined in a different client" .pls help me out resolve this problem.
thanks®ards
praveen -
How to make new project in existing folder with applescript in Aperture?
I want to create a new project in an existing folder. I've scoured the web for answers to this but I cant find any. The closest I've come is this:
tell application "Aperture"
set imgSel to (get selection)
if imgSel is {} then
error "Please select an image."
else
set pName to name of parent of item 1 of imgSel
set pID to id of parent of item 1 of imgSel
set cID to id of parent of parent of item 1 of imgSel
set cName to name of parent of parent of item 1 of imgSel
set cLoc to folder cName
tell library "Aperture Library"
make new project at cLoc with properties {name:pName}
repeat with i from 1 to count of imgSel
move item i of imgSel to project (pName)
end repeat
end tell
end if
cLoc
end tell
Which returns:
error "Aperture got an error: AppleEvent handler failed." number -10000
Can anyone enlighten me as to what I'm doing wrong here or show me another way to achieve my goal, thanks?when you say 'new project in an existing folder'..... I assume you mean to create a new Project inside of an existing "Blue" folder...?
Easy.... Select (click) the Blue folder you wish a new Project to appear inside > At the top left corner where it says "new" click the drop down arrow and select the project icon and click it.
Easier still > select the Blue folder you wish another Project to appear inside > use 'Command & N' on the keypad and away you go...
If you dont mean the above...? and you want a blue folder inside a blue folder..?
To create a new blue folder use either the 'New' icon again at the top of the library inspector and click the blue folder icon or (Shift & Command & N ) on the keypad. Then select the new blue folder and repeat the process again...... A folder inside a folder..
Couldn't be simpler....
Aperture already provides these simple commands.... I cant imagine why you want to write an 'Applescript Action' for it.... Unless just for the heck of it...??
Regards..... Gerry...
Maybe you are looking for
-
Text edit app not working after Secupdate 007
Pismo running 10.3.9 showing issues with textedit application which worked fine prior to update. When attempting to open an existing .txt file the beach ball spins for awhile and then does nothing. Finder window stays in front. When running through t
-
HT3669 Can't scan from my HP Office Jet 6700 (Fax) to my MacBook Pro
Hi there, I can't scan from my HP Office Jet 6700 (Fax) to my MacBook Pro. I've tried all of the tips I've found online but when I try to 'Enable Scan to Computer' it says that there is a communication error. Anyone got any tips for me?
-
Very slow external sata HD (lion)
Hi everybody! It has been a while I am using a Netstor external HD (NR710C) 4x2TB WD Caviar black, RAID 10 (4TB total space, 2.71 Available, MacOS Extended Journaled). It is conntected with the MacPro (MacPro 4,1 - early 2009) via a Sonnet Tempo SATA
-
How to change the width of scroll bar
hi, is there some way to increase the width of the scroll bar or is it operationg system dependent? thanx and regards deepak saini
-
Check for New Apps. ?
Is there someplace to go to check for New Apps. or Top Apps.?