Jump to content


Photo

Ajuda Para Converter Um Script, Mssql/mysql Para Firebird


  • Faça o login para participar
7 replies to this topic

#1 lobo008

lobo008

    Novato no fórum

  • Usuários
  • 1 posts
  • Sexo:Não informado

Posted 29/04/2009, 20:42

Seguinte pessoal, tenho uma aplicação rodando aqui na minha empresa que é está rodando em Firebird, precizo fazer algumas modificações e inserts no banco de dados para instalar uma modificação só que só tenho os scripts em mssql e mysql. alguém poderia me da uma ajuda para converter isso em Firebird pois sou meio leigo em banco de dados.


SCRIPT EM MSSQL...........


INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('a_calendar', 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('m_calendar_edit_other_users_events', 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('m_calendar_delete_other_users_events', 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_calendar_view_events', 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_calendar_create_events', 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_calendar_edit_events', 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('u_calendar_delete_events', 1, 0, 0);

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[phpbb_calendar_config]') AND type in (N'U'))
DROP TABLE [dbo].[phpbb_calendar_config]

CREATE TABLE dbo.phpbb_calendar_config (config_name varchar(255) NOT NULL, config_value varchar(255) NOT NULL);

INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('first_day_of_week', 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('index_display_week', 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('index_display_next_events', 5);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('hour_mode', 12);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('display_truncated_name', 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('prune_frequency', 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('last_prune', 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('prune_limit', 2592000);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES ('display_hidden_groups', 0);


IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[phpbb_calendar_event_types]') AND type in (N'U'))
DROP TABLE [dbo].[phpbb_calendar_event_types]

CREATE TABLE dbo.phpbb_calendar_event_types (
etype_id tinyint identity NOT NULL PRIMARY KEY,
etype_index tinyint NOT NULL default '0',
etype_full_name varchar(255) DEFAULT ('') NOT NULL,
etype_display_name varchar(255) DEFAULT ('') NOT NULL,
etype_color varchar(6) DEFAULT ('') NOT NULL,
etype_image varchar(255) NOT NULL,
);

SET IDENTITY_INSERT dbo.phpbb_calendar_event_types ON

INSERT INTO dbo.phpbb_calendar_event_types (etype_id,etype_index,etype_full_name,etype_display_name,etype_color,etype_image
) VALUES
(1,1,'Generic Event','','','');

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[phpbb_calendar_events]') AND type in (N'U'))
DROP TABLE [dbo].[phpbb_calendar_events]

CREATE TABLE dbo.phpbb_calendar_events (
event_id int identity NOT NULL PRIMARY KEY,
etype_id tinyint NOT NULL,
sort_timestamp bigint NOT NULL,
event_start_time bigint NOT NULL,
event_end_time bigint NOT NULL,
event_all_day tinyint NOT NULL default '0',
event_day varchar(10) DEFAULT ('') NOT NULL,
event_subject varchar(255) DEFAULT ('') NOT NULL,
event_body Text NOT NULL,
poster_id int DEFAULT '0' NOT NULL,
event_access_level tinyint NOT NULL default '0',
group_id int DEFAULT '0' NOT NULL,
enable_bbcode tinyint NOT NULL default '1',
enable_smilies tinyint NOT NULL default '1',
enable_magic_url tinyint NOT NULL default '1',
bbcode_bitfield varchar(255) DEFAULT ('') NOT NULL,
bbcode_uid varchar(8) DEFAULT ('') NOT NULL,
);







O MESMO SCRIPT EM MySQL40 .............................





INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('a_calendar', 1, 0, 0),
('m_calendar_edit_other_users_events', 1, 0, 0),
('m_calendar_delete_other_users_events', 1, 0, 0),
('u_calendar_view_events', 1, 0, 0),
('u_calendar_create_events', 1, 0, 0),
('u_calendar_edit_events', 1, 0, 0),
('u_calendar_delete_events', 1, 0, 0);

DROP TABLE IF EXISTS `phpbb_calendar_config`;
CREATE TABLE IF NOT EXISTS `phpbb_calendar_config` (
`config_name` varchar(255) NOT NULL,
`config_value` varchar(255) NOT NULL
);

INSERT INTO `phpbb_calendar_config` (`config_name`, `config_value`) VALUES
('first_day_of_week', '0'),
('index_display_week', '0'),
('index_display_next_events', '5'),
('hour_mode', '12'),
('display_truncated_name', '0'),
('prune_frequency', '0'),
('last_prune', '0'),
('prune_limit', '2592000'),
('display_hidden_groups', '0');


DROP TABLE IF EXISTS `phpbb_calendar_event_types`;
CREATE TABLE IF NOT EXISTS `phpbb_calendar_event_types` (
`etype_id` tinyint(3) unsigned NOT NULL auto_increment,
`etype_index` tinyint(3) unsigned NOT NULL default '0',
`etype_full_name` blob NOT NULL,
`etype_display_name` blob NOT NULL,
`etype_color` blob NOT NULL,
`etype_image` varchar(255) NOT NULL,
PRIMARY KEY (`etype_id`)
);

INSERT INTO `phpbb_calendar_event_types` (`etype_id`,`etype_index`,`etype_full_name`,`etype_display_name`,`etype_color`,`etype_image`) VALUES
(1,1,'Generic Event','','','');

DROP TABLE IF EXISTS `phpbb_calendar_events`;
CREATE TABLE IF NOT EXISTS `phpbb_calendar_events` (
`event_id` int(10) unsigned NOT NULL auto_increment,
`etype_id` tinyint(4) NOT NULL,
`sort_timestamp` bigint(20) unsigned NOT NULL,
`event_start_time` bigint(20) unsigned NOT NULL,
`event_end_time` bigint(20) unsigned NOT NULL,
`event_all_day` tinyint(2) NOT NULL default '0',
`event_day` blob NOT NULL,
`event_subject` blob NOT NULL,
`event_body` longblob NOT NULL,
`poster_id` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
`event_access_level` tinyint(1) NOT NULL default '0',
`group_id` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
`enable_bbcode` tinyint(1) unsigned NOT NULL default '1',
`enable_smilies` tinyint(1) unsigned NOT NULL default '1',
`enable_magic_url` tinyint(1) unsigned NOT NULL default '1',
`bbcode_bitfield` blob NOT NULL,
`bbcode_uid` blob NOT NULL,
PRIMARY KEY (`event_id`)
);

#2 ggiovanii

ggiovanii

    Normal

  • Usuários
  • 60 posts
  • Sexo:Masculino
  • Localidade:PIRA
  • Interesses:HTML, Hardware, Software, Sites, PHP, ASP, Banco de Dados...

Posted 30/04/2009, 08:05

Bom dia,

Faz o seguinte já que vc é meio leigo.... utilize o Full_Convert_Enterprise_v2.12 é um software que faz esse tipo de conversão , de um banco de dados para outro.

Agora se vc quiser fazer a conversão na unha é só consultar o manual do firebird para ver quais as diferenças entre ele e o mysql.

Os inserts em FBD são simples
INSERT INTO ESTOQUE (CODIGO, NOME) VALUES (1,'Nome teste');

Primeiro vc declara INSERT INTO NOME_DA_TABELA depois os campos entre () separados por virgula

O segundo passo é declarar os valores "VALUES" também entre () só que os campos em TEXTO devem estar entre aspas simples 'VALOR' também separando os campos com virgula

O final da linha deve conter um ; ponto e virgula para que o script pule para próxima linha do começo.

A parte de CREATE TABLE é basicamente igual (Consulte o manual para ver as diferenças)

Para trabalhar com o BD do Firebird sugiro que utilize o IBExpert


Espero ter ajudado,

Um abraço

#3 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 14/09/2017, 16:54

Kamagra 50mg Side Effects cialis Birth Control Pill Online Usa Nuovo Cialis Buy Azithromycin Tablets Usp Buy Effexor No Prescription free shipping isotretinoin for sale legally cialis Cialis 5 Mlg
Can You Order Valtrex Online generic cialis Propecia Kaytto
Ventolin Hfa Aer Glaxosmith Buy 500 Mg Lasix Achat Cialis
Propecia Venta <a href=http://cialtobuy.com>cialis</a> Acquistare Kamagra Thailandia

#4 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 02/10/2017, 12:17

Levitra Foglio Illustrativo viagra Buspirone Viagra Oficial Viagra Vente Quebec
Comparison Rate Application Fees Monthly Repayment Go to Site Get Set Loan.Yes these are lenders that can give you a loan to pay bills even if you have bad credit and no collateral to secure the loan. The fees tend to drive up the cost of online loans even though the operators dont have to maintain branches the report said. quick loan Bank Statements Its worth talking to experts in bad credit financeas you may be concerned about something thats not really a problem or that can be fixed up easily.If you pay off your balance in advance youll only be charged interest for the days the loan was outstanding.

#5 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 10/10/2017, 13:18

Cialis Suisse Vente Cialis 20mg 12st Preis viagra online prescription Progesterone For Sale Keflex For Spider Bites
Viagra Cheap Usa generic levitra shipped from usa Price Viagra Amoxicillin 500 Mg Capsule Tev
Healthy Men Prescriptions Amoxil Sale generic levitra 40 mg no prescription Antabuse For Sale Amoxicillin And Creatine Interactions

#6 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 27/10/2017, 15:46

Bentyl In Internet By Money Order No Script Needed 100 mg levitra Rayh Health Care Pvt.Ltd Viagra Vimedic Amoxicillin Dosage Bladder Infection
Propecia Ferritina Dog Amoxicillin buy viagra Keflex Insomnia My Canadian Pharmacy Corp

#7 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 12/11/2017, 18:29

Amoxicillin Clavulanic Acid Dose Staph Coverage With Cephalexin buy viagra Cheep Viagra Viagra Ohne Rezept De Provera Discount Usa Over Night Shop
Priligy En Generico Viagra En Suisse Sans Ordonnance Misoprostol En Ligne online pharmacy Formation Of Cephalexin Salts Le Cialis 10mg Cialis Acheter Suisse

#8 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 08/02/2023, 19:09

His current knowledge is comparable to that of Mo Linzi, but diabetic nephropathy medication furosemide Herbs Diabetes his experience is far inferior to that of Mo Linzi can male viagra work on females
1 and to report a higher frequency of douching before receptive anal sex 65 tamoxifen without prescription
buy generic lasix online Jesse wKMOwqYarENLR 6 17 2022
Flaxseed reduces plasma cholesterol levels in hypercholesterolemic mouse models best place to buy cialis online forum Data on dispensed medications prior to the event were extracted from the nation wide registration of dispensed drugs in Norway and Sweden, respectively




0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq