AW: 2 Mandanten, gleicher Artikelstamm
OK, alle Versuche auf eigenes Risiko und mit DB-Backup davor (und evtl. die Abfrage per Einzelschritt durchgehen)
Wir haben zwei Mandanten und also zwei Datenbanken: eazybusiness und Mandant_3.
Um die
Synonyme zu erstellen benutzt man:
USE [Mandant_3];
GO
SP_RENAME 'dbo.tArtikel', 'zm_tArtikel';
GO
CREATE SYNONYM [dbo].[tartikel] FOR [eazybusiness].[dbo].[tartikel];
GO
SP_RENAME 'dbo.tartikelbild', 'zm_tartikelbild';
GO
CREATE SYNONYM [dbo].[tartikelbild] FOR [eazybusiness].[dbo].[tartikelbild];
GO
SP_RENAME 'dbo.tArtikeltext', 'zm_tArtikeltext';
GO
CREATE SYNONYM [dbo].[tArtikeltext] FOR [eazybusiness].[dbo].[tArtikeltext];
GO
SP_RENAME 'dbo.tlagerartikel', 'zm_tlagerartikel';
GO
CREATE SYNONYM [dbo].[tlagerartikel] FOR [eazybusiness].[dbo].[tlagerartikel];
GO
SP_RENAME 'dbo.tliefartikel', 'zm_tliefartikel';
GO
CREATE SYNONYM [dbo].[tliefartikel] FOR [eazybusiness].[dbo].[tliefartikel];
GO
SP_RENAME 'dbo.tArtikelShop', 'zm_tArtikelShop';
GO
CREATE SYNONYM [dbo].[tArtikelShop] FOR [eazybusiness].[dbo].[tArtikelShop];
GO
SP_RENAME 'dbo.tArtikelsichtbarkeit', 'zm_tArtikelsichtbarkeit';
GO
CREATE SYNONYM [dbo].[tArtikelsichtbarkeit] FOR [eazybusiness].[dbo].[tArtikelsichtbarkeit];
GO
SP_RENAME 'dbo.tArtikelSonderpreis', 'zm_tArtikelSonderpreis';
GO
CREATE SYNONYM [dbo].[tArtikelSonderpreis] FOR [eazybusiness].[dbo].[tArtikelSonderpreis];
GO
SP_RENAME 'dbo.tArtikelSprache', 'zm_tArtikelSprache';
GO
CREATE SYNONYM [dbo].[tArtikelSprache] FOR [eazybusiness].[dbo].[tArtikelSprache];
GO
SP_RENAME 'dbo.tattribut', 'zm_tattribut';
GO
CREATE SYNONYM [dbo].[tattribut] FOR [eazybusiness].[dbo].[tattribut];
GO
SP_RENAME 'dbo.tEigenschaft', 'zm_tEigenschaft';
GO
CREATE SYNONYM [dbo].[tEigenschaft] FOR [eazybusiness].[dbo].[tEigenschaft];
GO
SP_RENAME 'dbo.teigenschaftwert', 'zm_teigenschaftwert';
GO
CREATE SYNONYM [dbo].[teigenschaftwert] FOR [eazybusiness].[dbo].[teigenschaftwert];
GO
SP_RENAME 'dbo.tEigenschaftSichtbarkeit', 'zm_tEigenschaftSichtbarkeit';
GO
CREATE SYNONYM [dbo].[tEigenschaftSichtbarkeit] FOR [eazybusiness].[dbo].[tEigenschaftSichtbarkeit];
GO
SP_RENAME 'dbo.tEigenschaftSprache', 'zm_tEigenschaftSprache';
GO
CREATE SYNONYM [dbo].[tEigenschaftSprache] FOR [eazybusiness].[dbo].[tEigenschaftSprache];
GO
SP_RENAME 'dbo.tEigenschaftWertAbhaengigkeit', 'zm_tEigenschaftWertAbhaengigkeit';
GO
CREATE SYNONYM [dbo].[tEigenschaftWertAbhaengigkeit] FOR [eazybusiness].[dbo].[tEigenschaftWertAbhaengigkeit];
GO
SP_RENAME 'dbo.tEigenschaftWertAufpreis', 'zm_tEigenschaftWertAufpreis';
GO
CREATE SYNONYM [dbo].[tEigenschaftWertAufpreis] FOR [eazybusiness].[dbo].[tEigenschaftWertAufpreis];
GO
SP_RENAME 'dbo.tEigenschaftWertPict', 'zm_tEigenschaftWertPict';
GO
CREATE SYNONYM [dbo].[tEigenschaftWertPict] FOR [eazybusiness].[dbo].[tEigenschaftWertPict];
GO
SP_RENAME 'dbo.tEigenschaftWertSichtbarkeit', 'zm_tEigenschaftWertSichtbarkeit';
GO
CREATE SYNONYM [dbo].[tEigenschaftWertSichtbarkeit] FOR [eazybusiness].[dbo].[tEigenschaftWertSichtbarkeit];
GO
SP_RENAME 'dbo.tEigenschaftWertSprache', 'zm_tEigenschaftWertSprache';
GO
CREATE SYNONYM [dbo].[tEigenschaftWertSprache] FOR [eazybusiness].[dbo].[tEigenschaftWertSprache];
GO
SP_RENAME 'dbo.tfloat', 'zm_tfloat';
GO
CREATE SYNONYM [dbo].[tfloat] FOR [eazybusiness].[dbo].[tfloat];
GO
SP_RENAME 'dbo.tint', 'zm_tint';
GO
CREATE SYNONYM [dbo].[tint] FOR [eazybusiness].[dbo].[tint];
GO
SP_RENAME 'dbo.tkategorie', 'zm_tkategorie';
GO
CREATE SYNONYM [dbo].[tkategorie] FOR [eazybusiness].[dbo].[tkategorie];
GO
SP_RENAME 'dbo.tkategorieartikel', 'zm_tkategorieartikel';
GO
CREATE SYNONYM [dbo].[tkategorieartikel] FOR [eazybusiness].[dbo].[tkategorieartikel];
GO
SP_RENAME 'dbo.tKategorieShop', 'zm_tKategorieShop';
GO
CREATE SYNONYM [dbo].[tKategorieShop] FOR [eazybusiness].[dbo].[tKategorieShop];
GO
SP_RENAME 'dbo.tKategoriepict', 'zm_tKategoriepict';
GO
CREATE SYNONYM [dbo].[tKategoriepict] FOR [eazybusiness].[dbo].[tKategoriepict];
GO
SP_RENAME 'dbo.tKategorieRabatt', 'zm_tKategorieRabatt';
GO
CREATE SYNONYM [dbo].[tKategorieRabatt] FOR [eazybusiness].[dbo].[tKategorieRabatt];
GO
SP_RENAME 'dbo.tkategorieSichtbarkeit', 'zm_tkategorieSichtbarkeit';
GO
CREATE SYNONYM [dbo].[tkategorieSichtbarkeit] FOR [eazybusiness].[dbo].[tkategorieSichtbarkeit];
GO
SP_RENAME 'dbo.tKategoriesprache', 'zm_tKategoriesprache';
GO
CREATE SYNONYM [dbo].[tKategoriesprache] FOR [eazybusiness].[dbo].[tKategoriesprache];
GO
--
shop
SP_RENAME 'dbo.tinetbestellung', 'zm_tinetbestellung';
GO
CREATE SYNONYM [dbo].[tinetbestellung] FOR [eazybusiness].[dbo].[tinetbestellung];
GO
SP_RENAME 'dbo.tinetbestellpos', 'zm_tinetbestellpos';
GO
CREATE SYNONYM [dbo].[tinetbestellpos] FOR [eazybusiness].[dbo].[tinetbestellpos];
GO
SP_RENAME 'dbo.tinetbestellposeigenschaft', 'zm_tinetbestellposeigenschaft';
GO
CREATE SYNONYM [dbo].[tinetbestellposeigenschaft] FOR [eazybusiness].[dbo].[tinetbestellposeigenschaft];
GO
SP_RENAME 'dbo.tinetadress', 'zm_tinetadress';
GO
CREATE SYNONYM [dbo].[tinetadress] FOR [eazybusiness].[dbo].[tinetadress];
GO
SP_RENAME 'dbo.tInetAdresseShop', 'zm_tInetAdresseShop';
GO
CREATE SYNONYM [dbo].[tInetAdresseShop] FOR [eazybusiness].[dbo].[tInetAdresseShop];
GO
SP_RENAME 'dbo.tinetkunde', 'zm_tinetkunde';
GO
CREATE SYNONYM [dbo].[tinetkunde] FOR [eazybusiness].[dbo].[tinetkunde];
GO
SP_RENAME 'dbo.tInetKundenAttribute', 'zm_tInetKundenAttribute';
GO
CREATE SYNONYM [dbo].[tInetKundenAttribute] FOR [eazybusiness].[dbo].[tInetKundenAttribute];
GO
SP_RENAME 'dbo.tInetKundeShop', 'zm_tInetKundeShop';
GO
CREATE SYNONYM [dbo].[tInetKundeShop] FOR [eazybusiness].[dbo].[tInetKundeShop];
GO
SP_RENAME 'dbo.tInetShopZahlung', 'zm_tInetShopZahlung';
GO
CREATE SYNONYM [dbo].[tInetShopZahlung] FOR [eazybusiness].[dbo].[tInetShopZahlung];
GO
SP_RENAME 'dbo.tinetzahlungsinfo', 'zm_tinetzahlungsinfo';
GO
CREATE SYNONYM [dbo].[tinetzahlungsinfo] FOR [eazybusiness].[dbo].[tinetzahlungsinfo];
GO
Um die
Synonyme zu entfernen (z.B. um
JTL-Wawi-Version upzudaten ):
USE [Mandant_3];
GO
DROP SYNONYM [dbo].[tartikel];
GO
SP_RENAME 'dbo.zm_tArtikel', 'tArtikel';
GO
DROP SYNONYM [dbo].[tartikelbild];
GO
SP_RENAME 'dbo.zm_tartikelbild', 'tartikelbild';
GO
DROP SYNONYM [dbo].[tArtikeltext];
GO
SP_RENAME 'dbo.zm_tArtikeltext', 'tArtikeltext';
GO
DROP SYNONYM [dbo].[tlagerartikel];
GO
SP_RENAME 'dbo.zm_tlagerartikel', 'tlagerartikel';
GO
DROP SYNONYM [dbo].[tliefartikel];
GO
SP_RENAME 'dbo.zm_tliefartikel', 'tliefartikel';
GO
DROP SYNONYM [dbo].[tArtikelShop] ;
GO
SP_RENAME 'dbo.zm_tArtikelShop', 'tArtikelShop';
GO
DROP SYNONYM [dbo].[tArtikelsichtbarkeit];
GO
SP_RENAME 'dbo.zm_tArtikelsichtbarkeit', 'tArtikelsichtbarkeit';
GO
DROP SYNONYM [dbo].[tArtikelSonderpreis];
GO
SP_RENAME 'dbo.zm_tArtikelSonderpreis', 'tArtikelSonderpreis';
GO
DROP SYNONYM [dbo].[tArtikelSprache];
GO
SP_RENAME 'dbo.zm_tArtikelSprache', 'tArtikelSprache';
GO
DROP SYNONYM [dbo].[tattribut];
GO
SP_RENAME 'dbo.zm_tattribut', 'tattribut';
GO
DROP SYNONYM [dbo].[tEigenschaft];
GO
SP_RENAME 'dbo.zm_tEigenschaft', 'tEigenschaft';
GO
DROP SYNONYM [dbo].[teigenschaftwert];
GO
SP_RENAME 'dbo.zm_teigenschaftwert', 'teigenschaftwert';
GO
DROP SYNONYM [dbo].[tEigenschaftSichtbarkeit];
GO
SP_RENAME 'dbo.zm_tEigenschaftSichtbarkeit', 'tEigenschaftSichtbarkeit';
GO
DROP SYNONYM [dbo].[tEigenschaftSprache];
GO
SP_RENAME 'dbo.zm_tEigenschaftSprache', 'tEigenschaftSprache';
GO
DROP SYNONYM [dbo].[tEigenschaftWertAbhaengigkeit];
GO
SP_RENAME 'dbo.zm_tEigenschaftWertAbhaengigkeit', 'tEigenschaftWertAbhaengigkeit';
GO
DROP SYNONYM [dbo].[tEigenschaftWertAufpreis];
GO
SP_RENAME 'dbo.zm_tEigenschaftWertAufpreis', 'tEigenschaftWertAufpreis';
GO
DROP SYNONYM [dbo].[tEigenschaftWertPict];
GO
SP_RENAME 'dbo.zm_tEigenschaftWertPict', 'tEigenschaftWertPict';
GO
DROP SYNONYM [dbo].[tEigenschaftWertSichtbarkeit];
GO
SP_RENAME 'dbo.zm_tEigenschaftWertSichtbarkeit', 'tEigenschaftWertSichtbarkeit';
GO
DROP SYNONYM [dbo].[tEigenschaftWertSprache];
GO
SP_RENAME 'dbo.zm_tEigenschaftWertSprache', 'tEigenschaftWertSprache';
GO
DROP SYNONYM [dbo].[tfloat];
GO
SP_RENAME 'dbo.zm_tfloat', 'tfloat';
GO
DROP SYNONYM [dbo].[tint];
GO
SP_RENAME 'dbo.zm_tint', 'tint';
GO
DROP SYNONYM [dbo].[tkategorie];
GO
SP_RENAME 'dbo.zm_tkategorie', 'tkategorie';
GO
DROP SYNONYM [dbo].[tkategorieartikel];
GO
SP_RENAME 'dbo.zm_tkategorieartikel', 'tkategorieartikel';
GO
DROP SYNONYM [dbo].[tKategorieShop];
GO
SP_RENAME 'dbo.zm_tKategorieShop', 'tKategorieShop';
GO
DROP SYNONYM [dbo].[tKategoriepict];
GO
SP_RENAME 'dbo.zm_tKategoriepict', 'tKategoriepict';
GO
DROP SYNONYM [dbo].[tKategorieRabatt];
GO
SP_RENAME 'dbo.zm_tKategorieRabatt', 'tKategorieRabatt';
GO
DROP SYNONYM [dbo].[tkategorieSichtbarkeit];
GO
SP_RENAME 'dbo.zm_tkategorieSichtbarkeit', 'tkategorieSichtbarkeit';
GO
DROP SYNONYM [dbo].[tKategoriesprache];
GO
SP_RENAME 'dbo.zm_tKategoriesprache', 'tKategoriesprache';
GO
--shop
DROP SYNONYM [dbo].[tinetbestellung];
GO
SP_RENAME 'dbo.zm_tinetbestellung', 'tinetbestellung';
GO
DROP SYNONYM [dbo].[tinetbestellpos];
GO
SP_RENAME 'dbo.zm_tinetbestellpos', 'tinetbestellpos';
GO
DROP SYNONYM [dbo].[tinetbestellposeigenschaft];
GO
SP_RENAME 'dbo.zm_tinetbestellposeigenschaft', 'tinetbestellposeigenschaft';
GO
DROP SYNONYM [dbo].[tinetadress];
GO
SP_RENAME 'dbo.zm_tinetadress', 'tinetadress';
GO
DROP SYNONYM [dbo].[tInetAdresseShop];
GO
SP_RENAME 'dbo.zm_tInetAdresseShop', 'tInetAdresseShop';
GO
DROP SYNONYM [dbo].[tinetkunde];
GO
SP_RENAME 'dbo.zm_tinetkunde', 'tinetkunde';
GO
DROP SYNONYM [dbo].[tInetKundenAttribute];
GO
SP_RENAME 'dbo.zm_tInetKundenAttribute', 'tInetKundenAttribute';
GO
DROP SYNONYM [dbo].[tInetKundeShop];
GO
SP_RENAME 'dbo.zm_tInetKundeShop', 'tInetKundeShop';
GO
DROP SYNONYM [dbo].[tInetShopZahlung];
GO
SP_RENAME 'dbo.zm_tInetShopZahlung', 'tInetShopZahlung';
GO
DROP SYNONYM [dbo].[tinetzahlungsinfo];
GO
SP_RENAME 'dbo.zm_tinetzahlungsinfo', 'tinetzahlungsinfo';
GO