How Do I Move My Database Schema From 1 Machine To Another? (generate Create Script Is Greyed Out)
Jan 15, 2005
how do I move my database schema from 1 machine to another? Its a MSDE 2000 DB and Im using visual studio 2003.
In VS when I goto the server explorer and right click on a DB the "generate create script" options is greyed out.
What am I doing wrong?
If you cant help me with the above question could you please recommend another way for me to get my DB schema with all its constraints from one of my work stations to another. I dont want to manually recreate it.
Thankyou
View 3 Replies
ADVERTISEMENT
Jan 14, 2005
In the server explorer "generate create script" is greyed out, what am I doing wrong?
I want to generate a script that will re-create my DB schema on another machine.
Any help would be appreciated.
Thanks
View 3 Replies
View Related
Jan 18, 2007
Hi. I need to move database schema (tables definiton with relations without data) form SQL Express to SQL 2005. Is there any easy way to do it? I'll be grateful for your help. Pawel
View 4 Replies
View Related
Dec 23, 2004
Hi all! I know I might sound stupid, but I have this problem. I have developed my database on my laptop which does not use Active directory. Lets say I access the database with: SPIDERMANDB1 on SQL server, where the name of my laptop is SPIDERMAN, and the database is DB1. Now, I create an SQL script from sql server and make the necessary changes, like changing the computer name to say, SUPERMAN where my deployment server's name is SUPERMAN. But when I run the SQL script on the SUPERMAN server, it gives me an error like: "User or role SUPERMANDB1 does not exist in this database". I have deployed databases in this way on servers without Acive directory, so I'm sure its not a mistake on my side. So how am I supposed to go around this active directory thingi! Please help me out! I'm counting on u guys!
Wes
View 4 Replies
View Related
Jan 19, 2004
According to my technical support for web hosting, for database format they only use "MS SQL" operating on a windows system, usualy clients create they're sites on their local machines using "MS SQL".
I'm just wondering.....
Is 'MS SQL' free? where can I get it?
I also have the option of creating the site round an access databse but I'm worried about the security issues,
do you think it would be wise to use access?
Is it easy to convert a site written in ASP.NET&ACCESS into a site using ASP.NET&"ms sql"?
because then I could code a site in the former on my machine and then change the code to link to an sql server.
View 6 Replies
View Related
Dec 19, 2006
Hi .Net Guru’s,I have an urgent requirement for my project; the issue is mentioned below;Using .Net(C#/VB.Net) I need to generate/created Database objects from XML schemas.I don't have any sample xml schema file to give you. You just imagine you have a sample .xsd file and this .xsd file will be used to create database tables.Please let me know if you have any queries. Thanks,nick
View 1 Replies
View Related
Nov 5, 2004
Hey,
I was wondering does anyone know a way to get the structure, with relationships, of a Sql Database and generate a XML Schema. I want to use the Schema to build a CrystalReport.
Thanks!
-Kevin
View 1 Replies
View Related
Oct 11, 2007
Greetings,
I've searched through this and other SQLCE newsgroups, and it would
appear that whenever this question is asked, it is deflected or left
unanswered. I'll try again:
Is there any way to create SQLCE database tables from an XML schema
(preferably in .NET with C#)? Of course this can be done with the .NET
DataSet, but there doesn't appear to be any way to get the DataSet to
create the tables in the SQLCE database (although the reverse can be
done). I won't go into long explanations of the application, but it
does not ever have any connection to an SQL server, and we don't want
to create the SQLCE tables in code. We *only* want to create them
using an XML schema. Is the only option writing our own code to do this?
TIA
View 3 Replies
View Related
Mar 20, 2007
I have some questions about creating SQL Server CE databases. Based on my experiments and what I've read on these forums, it looks like there are a couple ways to create a database schema. I can edit the database schema via the Server Explorer in Visual Studio, or use an external program like SQL Server Management Studio and somehow convert those files to .sdf files.
I find Visual Studio's built in tools to be cumbersome to use and limited in functionality, and using SSMS seems like a roundabout way of approaching the problem. I understand Microsoft will be releasing better tools with Orcas, but in the meantime, I'm wondering if there are alternative ways to generate database schemas.
For instance, I find Visual Studio's DataSet designer fairly easy to use. The DataSet designer generates schema definitions (.xsd files), and an instantiated DataSet can both read and write schema definitions via Read/WriteXMLSchema. Furthermore, DataAdapter's Fill and FillSchema methods can be used to push a schema from a database to a DataSet. So, can I somehow go the other direction and push a schema from a DataSet to a database? It seems like all the tools are there...
For example, if I create the DataSet schema, could I use a small app to create a new .sdf file, instantiate a DataSet, write the schema from the DataSet to the database, and then save the .sdf file? Or given the generated .xsd file, is there any way to create a SQL database from that?
Thanks in advance for any replies.
View 5 Replies
View Related
Aug 3, 2012
Any command which will make create script for my entire database including all sp's , tables, functions..i dont want to backup the db ..i want to create scripts for creating an entire database schema (only the structure and not data)
View 1 Replies
View Related
Oct 2, 2006
I am looking to make the primary key auto increment by 1. I have found by looking around the internet that you need to do this in the Tables -> [Table Name] -> Columns -> [Column Name], Properties window, and I see the "Identity Increment" however all of the properties there are greyed out -- I can't access them. Any ideas on how to make this work?For some background: I'm running SQL Server 2005 with Visual Studio 2005. To create this database, I right-clicked on my project, and went to 'Add SQL Database', I filled in the columns all from within visual studio.
View 1 Replies
View Related
Oct 25, 2006
While configuring a TableAdapter I noticed that the option "Create methods to send updates directly to the database (GenerateDBDirectMethods)" is greyed out.Can a TableAdapter only have one table in order to create the methods for sending the updates directly to the database?If so, what is the work-around?The TableAdapter that I am trying to create uses the following statement to fill its DataTable:SELECT Client.Name, Users.FirstName, Users.LastNameFROM Users INNER JOIN Client ON Users.ClientId = Client.IdThanks for your response in advance!
View 2 Replies
View Related
Apr 25, 2007
Hi,
I created a database,login,user and schema like belows.
-- 2. create database
CREATE DATABASE MyTempDatabase;
-- 3. create login
CREATE LOGIN MyTempLogin WITH PASSWORD = '#mytemplogin$',
DEFAULT_DATABASE = MyTempDatabase,
CHECK_EXPIRATION = OFF,
CHECK_POLICY = OFF;
--
USE MyTempDatabase;
-- 4. create user
CREATE USER MyTempLogin FROM LOGIN MyTempLogin WITH DEFAULT_SCHEMA = MyTempSchema;
-- 5. create schema
CREATE SCHEMA MyTempSchema AUTHORIZATION MyTempLogin;
The created user,MyTempLogin, must have permissions that can create tables,drop tables,select,insert,delete,update and bulk insert.
How can I grant permissions to the user?(or schema?)
I failed to grant by T-SQL query.
Additionally, what is purppose of the ROLE? Should I create or use it?
I'm confusing in security concept(login,user,schema,role).
Thanks.
View 3 Replies
View Related
Jul 20, 2005
Can SQL Server generate an XML schema from a database?TIA,TimJowers
View 1 Replies
View Related
May 27, 1999
Hi, everybody:
Is that possible to move whole SQL 6.5 server together with db from one machine to another and how?
Please show me how. Thank you!
Qian
View 1 Replies
View Related
May 5, 2008
we are using toad for sql server
View 1 Replies
View Related
Jul 10, 2000
Hello all. I am a baby new database administrator who hasnt finished all the courses yet. I have my Administration exam but not the Implementation yet. I got hired anyways! woo hoo.. Anyways, my question is this. I have a SQL Server 7.0 machine and its databases. I have been asked to move it all over to a new, skookum fast machine with access to 3.6 Terabytes of storage. I have been researching the best way to do this but am not sure. First there is detaching and reattaching the databases. I dont like this one cuz when I have done some practice ones it completely erases the databases of the original machine. The other way I was considering was using DTS. This is easy to use with the DTS wizard but the transaction logs of the databases are not transferred. What would be your advice on this move?? I need to make a this a reasonably seemless move. Help!!
View 2 Replies
View Related
Oct 24, 2014
I need to copy all objects (views, procedures, tables, functions, etc -- no data) that are under a specific Schema in a database, but the Generate Script option in SSMS doesn't give me the option to do this. How I can generate a script that's Schema specific?
View 2 Replies
View Related
Feb 27, 2004
I'm trying to detach a database and reattach to another server. When trying to detach it using Enterprise Manager, the command is greyed out. I've tried taking the database offline first but the command is still not enabled. I'm logged in as sysadmin. What gives?
View 7 Replies
View Related
Jul 15, 2007
Hi,
I'm trying to install SQL Server 2005 onto my XP Professional PC. When I get to the "Components to install" part, the "SQL server database services option" is greyed out. Infact, all options except "Workstation components..." are greyed out. I've tried uninstalling all previous versions of SQL server and trying again, but with the same results.
any help would be much appreciated
Simon
View 5 Replies
View Related
Sep 27, 2007
Locally I develop in SQL server 2005 enterprise. Recently I recreated my db on the server of my hosting company (in sql server 2005 express).I basically recreated the tables and copied the data in it.I now receive the following error when I hit the DB:The 'System.Web.Security.SqlMembershipProvider' requires a
database schema compatible with schema version '1'. However, the
current database schema is not compatible with this version. You may
need to either install a compatible schema with aspnet_regsql.exe
(available in the framework installation directory), or upgrade the
provider to a newer version.I heard something about running aspnet_regsql.exe, but I dont have that access to the DB. Also I dont know if this command does anything more than creating the membership tables and filling it with some default data...Any other solutions/thought on what this can be?Thanks!
View 4 Replies
View Related
Jul 23, 2005
Hi All;We are going to change our application server. We will copy all of ourDatabase from Mic 2000 Server OS to Mic 2003 Server OS. I found anarticle that how to move all the folders from same OS. My question isthat Would the 2003 OS be a problem when we copy all of the MC SQL 2000folders to New OS ? Has anybody done this before? Could you gimme yoursuggestions please?ThanksASA
View 1 Replies
View Related
Apr 12, 2008
Hello everybody!I'm using ASP.NET 3.5, MSSQL 2005I bought virtual web hosting .On new user registrations i have an error =(The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version. On my virtual machine it work fine but on web hosting i have an error =(What can you propose to me?
View 2 Replies
View Related
Nov 29, 2007
Hi there,
I have made a stored procedure to create a script with a create statement for a table. it looks like this:
Create Procedure GenerateScript ( @tableName varchar(100)) as If exists (Select * from Information_Schema.COLUMNS where Table_Name = @tableNameBegin declare @sql varchar(8000) declare @table varchar(100) declare @cols table (datatype varchar(50)) insert into @cols values('bit') insert into @cols values('binary') insert into @cols values('bigint') insert into @cols values('int') insert into @cols values('float') insert into @cols values('datetime') insert into @cols values('text') insert into @cols values('image') insert into @cols values('uniqueidentifier') insert into @cols values('smalldatetime') insert into @cols values('tinyint') insert into @cols values('smallint') insert into @cols values('sql_variant')
set @sql='' Select @sql=@sql +case when charindex('(',@sql,1)<=0 then '(' else '' end +Column_Name + ' ' +Data_Type + case when Data_Type in (Select datatype from @cols) then '' else '(' end +case when data_type in ('real','money','decimal','numeric') then cast(isnull(numeric_precision,'') as varchar)+ ','+case when data_type in ('real','money','decimal','numeric') then cast(isnull(Numeric_Scale,'') as varchar) end when data_type in ('char','nvarchar','varchar','nchar') then cast(isnull(Character_Maximum_Length,'') as varchar) else '' end +case when Data_Type in (Select datatype from @cols)then '' else ')' end +case when Is_Nullable='No' then ' Null,' else ' Not null,' end from Information_Schema.COLUMNS where Table_Name = @tableNameselect @table= 'Create table ' + table_Name from Information_Schema.COLUMNS where Table_Name = @tableNameselect @sql=@table + substring(@sql,1,len(@sql)-1) +' )' select @sql as DDL End Else Select 'The table ' + @tableName+ ' does not exist'GO
Now my problem. I want to install this SP in the master db and i want call other databases. With "SP_RENAME" that's possible when i say "USE otherdatabase". With my own stored procedure it's not possible. What do i have to alter?
Thanks
View 3 Replies
View Related
Aug 30, 2001
Hello everybody
I am doing update on Database using Erwin
Is any diffrence in this code and what is is right way to create table in my case ?
-- --- this code generated by Erwin 3.5.2
CREATE TABLE obooGrpAllotRmBooking (
BookingDate ASmallDateTime NOT NULL,
ID_RoomType ID NOT NULL,
ID_GrpAllot ID NOT NULL,
ContractQty hAvailQty DEFAULT 0
)
go
ALTER TABLE obooGrpAllotRmBooking
ADD PRIMARY KEY (ID_GrpAllot, ID_RoomType, BookingDate)
go
------------- This code generated by SQl server 7 generate script ---
CREATE TABLE [dbo].[obooGrpAllotRmBooking] (
[ID_GrpAllot] [ID] NOT NULL ,
[ID_RoomType] [ID] NOT NULL ,
[BookingDate] [ASmallDateTime] NOT NULL ,
[ContractQty] [hAvailQty] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[obooGrpAllotRmBooking] WITH NOCHECK ADD
PRIMARY KEY CLUSTERED
(
[ID_GrpAllot],
[ID_RoomType],
[BookingDate],
[ContractQty]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[obooGrpAllotRmBooking] WITH NOCHECK ADD
CONSTRAINT [DF__obooGrpAl__Contr__78DED853_05] DEFAULT (0) FOR [ContractQty]
GO
Thanks
View 1 Replies
View Related
Feb 26, 2008
what wrong ?
IF NOT EXISTS ( SELECT * FROM sys.schemas WHERE [name] = 'ATypes' )
BEGIN
CREATE SCHEMA [ATypes] AUTHORIZATION Owner_SchATypes;
END
GO
why I get an error ?
Noam Graizer
View 3 Replies
View Related
Apr 24, 2007
How can I create a new schema inside a database from Managment studio express.
Also can someone explain me the concept of schema clearly. If database is like a house, then is schema like a room in it ??
View 3 Replies
View Related
Nov 2, 2007
I€™m trying to create an index on a view. I get the error that €˜the view is not schema bound.€™
Soooo, I try to put it in a schema.
This is the syntax I am using -
CREATE SCHEMA AUTHORIZATION painter
CREATE VIEW large_paints AS
SELECT paint_id,color FROM paint WHERE paint_size=100
CREATE INDEX idx on large_paints (paint_id);
I get the error - Incorrect syntax near the keyword 'INDEX'.
Any ideas?
View 1 Replies
View Related
Mar 25, 2008
IF NOT EXISTS (SELECT 1 FROM Sys.Schemas WHERE [Name] = N'HR4')
CREATE SCHEMA HR4 AUTHORIZATION [dbo]
The above statements gives me an error saying "Incorrect syntax near schema". But the following code works fine.
DECLARE @sql varchar(100)
set @sql='CREATE SCHEMA HR4 AUTHORIZATION [dbo]'
IF NOT EXISTS (SELECT 1 FROM Sys.Schemas WHERE [Name] = N'HR4')
exec(@sql)
Any ideas on what is causing this error?
Thanks!
View 1 Replies
View Related
May 22, 2008
I Would like to create a schema sample and make it as default schema instead of dbo.
If a user logs in and creates a table like create table t1 (no int ) .
it would be assigned to sample schema and displayed as sample.t1 not dbo.t1.
How to set the user created schema as primary schema.
View 9 Replies
View Related
Jul 30, 2007
instead of CREATE SCHEMA using T-SQL
View 1 Replies
View Related
Apr 18, 2006
Hi All
I have a SP that i create tables and other objects on another database.
Creating table work well.
declare @s nvarchar(2000)
set @s = 'use db01'
set @s = @s + 'CREATE TABLE ABC (recid int)
exec (@s)
------------------------------------------------------------------------
But if i try to create a schema it gives error :
'CREATE SCHEMA' must be the first statement in a query batch.
declare @s nvarchar(2000)
set @s = 'use db01'
set @s = @s + 'CREATE SCHEMA AAA
exec (@s)
How can i solve it?
Thanks.
View 5 Replies
View Related