FitNesse is a software development collaboration tool
http://fitnesse.org/
Thursday, 4 June 2009
Tuesday, 26 May 2009
[MS-sql] Error
Error message when you try import database from backup file
=======Error Message===========
Restore failed Server 'your-computer' (Micorsoft.SqlServer.Smo)
Additional information:
->An exception occurred while executing a Transact-SQL statement or batch
(microsoft.SqlServer.ConnectionInfo)
--> The file or filegroup 'yourfileName_log' cannot be selected for this operation.
RESTORE DATABASE is terminating abnormally.(Microsoft SQL Server, Error: 3219)
==================================
--- Solution ----- (progress as manual way)
create database that you want (ex: test)
right button click from test db
Tasks - > Restore -> Files and Filegroups...
select From device and select backup file location
---> Select "Script" from top location
Type this script on page
RESTORE DATABASE [ct3] FROM DISK = N'D:\temp\test.bak' WITH FILE = 1, MOVE N'test' TO N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test.mdf', MOVE N'test_log' TO N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test_log.LDF', NOUNLOAD, REPLACE, STATS = 10
GO
=======Error Message===========
Restore failed Server 'your-computer' (Micorsoft.SqlServer.Smo)
Additional information:
->An exception occurred while executing a Transact-SQL statement or batch
(microsoft.SqlServer.ConnectionInfo)
--> The file or filegroup 'yourfileName_log' cannot be selected for this operation.
RESTORE DATABASE is terminating abnormally.(Microsoft SQL Server, Error: 3219)
==================================
--- Solution ----- (progress as manual way)
create database that you want (ex: test)
right button click from test db
Tasks - > Restore -> Files and Filegroups...
select From device and select backup file location
---> Select "Script" from top location
Type this script on page
RESTORE DATABASE [ct3] FROM DISK = N'D:\temp\test.bak' WITH FILE = 1, MOVE N'test' TO N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test.mdf', MOVE N'test_log' TO N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test_log.LDF', NOUNLOAD, REPLACE, STATS = 10
GO
Thursday, 21 May 2009
Thursday, 9 April 2009
[Hibernate] native SQL example- One return column case
String gSql = "select sYear from VIEW_REPORT_BillingRegion group by sYear";
// Query query = sessionFactory.getCurrentSession().createQuery(gSql);
SQLQuery query = this.sessionFactory.getCurrentSession().createSQLQuery(gSql).addScalar("sYear", Hibernate.STRING);
List[Object] list = query.list();
System.out.println("======="+list.size());
for( Object objArr : list){
System.out.println(objArr );
}
System.out.println("============"+list.size());
// Query query = sessionFactory.getCurrentSession().createQuery(gSql);
SQLQuery query = this.sessionFactory.getCurrentSession().createSQLQuery(gSql).addScalar("sYear", Hibernate.STRING);
List[Object] list = query.list();
System.out.println("======="+list.size());
for( Object objArr : list){
System.out.println(objArr );
}
System.out.println("============"+list.size());
Wednesday, 8 April 2009
[Hibernate] native SQL example
@SuppressWarnings("unchecked")
@Transactional
public void getTest(IUiListCfg uiListCfg) throws ReportException {
try {
String sSql = "select sGroupId, sGroupName from tRmCo_Group";
SQLQuery query = this.sessionFactory.getCurrentSession().createSQLQuery(sSql).addScalar("sGroupId", Hibernate.STRING).addScalar("sGroupName", Hibernate.STRING);
List
@Transactional
public void getTest(IUiListCfg uiListCfg) throws ReportException {
try {
String sSql = "select sGroupId, sGroupName from tRmCo_Group";
SQLQuery query = this.sessionFactory.getCurrentSession().createSQLQuery(sSql).addScalar("sGroupId", Hibernate.STRING).addScalar("sGroupName", Hibernate.STRING);
List
Saturday, 28 March 2009
[SQL] compaire data type
DB NAME : testDB
column's NAME : createDate
real data : 2009-02-07 15:15:43.000
compare
select * from testDB where cast(convert(char(10),createDate,101)as datetime) >= cast(convert(char(10),'2009-02-05',101) as datetime)
column's NAME : createDate
real data : 2009-02-07 15:15:43.000
compare
select * from testDB where cast(convert(char(10),createDate,101)as datetime) >= cast(convert(char(10),'2009-02-05',101) as datetime)
Tuesday, 17 March 2009
[Eclipse] Auto line change
== 3.3 version ==
이클립스에서
1. help
2. software updates
3. find and Install
4. Search for new features to install
5. New Remote site
Name: Virtual Word Wrap
URL: http://ahtik.com/eclipse-update/
=== 3.4 version ===
http://ahtik.com/eclipse-update/
이클립스에서
1. help
2. software updates
3. find and Install
4. Search for new features to install
5. New Remote site
Name: Virtual Word Wrap
URL: http://ahtik.com/eclipse-update/
=== 3.4 version ===
http://ahtik.com/eclipse-update/
Subscribe to:
Posts (Atom)