Last Day

الأعضاء
  • المساهمات

    1
  • تاريخ الانضمام

  • تاريخ آخر زيارة

السُّمعة بالموقع

0 Neutral
  1. السلام عليكم ارجو المساعدة فى كيفىة تحويل ملف من امتداد SQL الى MDF لدى ملف باسم testDB.sql وهو يمثل قاعدة بيانات مكتوب كالاتى : IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'test') DROP DATABASE [test] GO CREATE DATABASE [test] ON (NAME = N'test_Data', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\test_Data.MDF' , SIZE = 1, FILEGROWTH = 10%) LOG ON (NAME = N'test_Log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\test_Log.LDF' , SIZE = 1, FILEGROWTH = 10%) COLLATE Arabic_CI_AS GO exec sp_dboption N'test', N'autoclose', N'true' GO exec sp_dboption N'test', N'bulkcopy', N'false' GO exec sp_dboption N'test', N'trunc. log', N'true' GO exec sp_dboption N'test', N'torn page detection', N'true' GO exec sp_dboption N'test', N'read only', N'false' GO exec sp_dboption N'test', N'dbo use', N'false' GO exec sp_dboption N'test', N'single', N'false' GO exec sp_dboption N'test', N'autoshrink', N'true' GO exec sp_dboption N'test', N'ANSI null default', N'false' GO exec sp_dboption N'test', N'recursive triggers', N'false' GO exec sp_dboption N'test', N'ANSI nulls', N'false' GO exec sp_dboption N'test', N'concat null yields null', N'false' GO exec sp_dboption N'test', N'cursor close on commit', N'false' GO exec sp_dboption N'test', N'default to local cursor', N'false' GO exec sp_dboption N'test', N'quoted identifier', N'false' GO exec sp_dboption N'test', N'ANSI warnings', N'false' GO exec sp_dboption N'test', N'auto create statistics', N'true' GO exec sp_dboption N'test', N'auto update statistics', N'true' GO use [test] GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GetCities]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[GetCities] GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GetCountries]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[GetCountries] GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Cities]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[Cities] GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Countries]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[Countries] GO CREATE TABLE [dbo].[Cities] ( [city_id] [int] IDENTITY (1, 1) NOT NULL , [City] [varchar] (50) COLLATE Arabic_CI_AS NOT NULL , [country_id] [int] NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[Countries] ( [country_id] [int] IDENTITY (1, 1) NOT NULL , [country] [varchar] (50) COLLATE Arabic_CI_AS NOT NULL ) ON [PRIMARY] GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS OFF GO create proc GetCities @country_id int as select city_id,city from cities where country_id=@country_id GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS OFF GO create proc GetCountries as select country_id , country from countries GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO اريد تحويله الى testDB.mdf شكرآ