Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3281414
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:48:47+00:00 2026-05-17T19:48:47+00:00

the following is a script which was generated using generate script option. the wizard

  • 0

the following is a script which was generated using generate script option.

the wizard says that this can be used to copy, create db on different servers

so its made for it, then why does this error occur.??

the error is

Msg 5170, Level 16, State 1, Line 2
Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SECOND\MSSQL\DATA\Script Me.mdf' because it already exists. Change the file path or the file name, and retry the operation.
Msg 1802, Level 16, State 4, Line 2

and

could not lacate entry for “script me” in sysdatabes

confused,

why does it try to create on the same server, i mean why the script is written like that??

the script

USE [master]
GO
/****** Object:  Database [Script Me]    Script Date: 10/23/2010 12:38:57 ******/
CREATE DATABASE [Script Me] ON  PRIMARY 
( NAME = N'Script Me', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SECOND\MSSQL\DATA\Script Me.mdf' , SIZE = 2048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'Script Me_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SECOND\MSSQL\DATA\Script Me_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [Script Me] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Script Me].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [Script Me] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [Script Me] SET ANSI_NULLS OFF
GO
ALTER DATABASE [Script Me] SET ANSI_PADDING OFF
GO
ALTER DATABASE [Script Me] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [Script Me] SET ARITHABORT OFF
GO
ALTER DATABASE [Script Me] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [Script Me] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [Script Me] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [Script Me] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [Script Me] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [Script Me] SET CURSOR_DEFAULT  GLOBAL
GO
ALTER DATABASE [Script Me] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [Script Me] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [Script Me] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [Script Me] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [Script Me] SET  DISABLE_BROKER
GO
ALTER DATABASE [Script Me] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [Script Me] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [Script Me] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [Script Me] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [Script Me] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [Script Me] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [Script Me] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [Script Me] SET  READ_WRITE
GO
ALTER DATABASE [Script Me] SET RECOVERY FULL
GO
ALTER DATABASE [Script Me] SET  MULTI_USER
GO
ALTER DATABASE [Script Me] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [Script Me] SET DB_CHAINING OFF
GO
EXEC sys.sp_db_vardecimal_storage_format N'Script Me', N'ON'
GO
USE [Script Me]
GO
/****** Object:  Table [dbo].[TableOne]    Script Date: 10/23/2010 12:38:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TableOne](
 [id] [nchar](10) NOT NULL,
 [name] [nchar](10) NULL,
 CONSTRAINT [PK_TableOne] PRIMARY KEY CLUSTERED 
(
 [id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

what am i doing

  • creating the script of db from one server
  • trying to run it on other so that the same table be created there too
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:48:48+00:00Added an answer on May 17, 2026 at 7:48 pm

    The script is written to replace itself. Any changes are OK, but they are up to you. You should always (no matter which tool you use to create your scripts) read over your script to make sure it does what you want it to do (and where you want it to do).

    You should modify the script to replace the following things with something that you want:

    CREATE DATABASE [Script Me] ON  PRIMARY 
    ( NAME = N'Script Me', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SECOND\MSSQL\DATA\Script Me.mdf' , SIZE = 2048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
     LOG ON 
    ( NAME = N'Script Me_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SECOND\MSSQL\DATA\Script Me_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB ,     FILEGROWTH = 10%)
    GO
    

    Here, you should change the path and the filenames. The path is up to you, but the filenames usually follow this naming:

    • Data: {database name}.mdf
    • Log: {database name}_log.ldf

    You should also change Script Me to your new database name everywhere it exists in the script file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to ran the following script on text files that are being committed:
Ok, I have been using the following script for over a year now to
I have the following snippet calling a perl script which writes to STDERR and
I'm looking to write a Ruby script which I can load into the Rails
I'm looking at a batch file which defines the following variables: set _SCRIPT_DRIVE=%~d0 set
I have the following script. It replaces all instances of @lookFor with @replaceWith in
I have the following script, where the first and third document.writeline are static and
i have the following script import getopt, sys opts, args = getopt.getopt(sys.argv[1:], h:s) for
In tcsh , I have the following script working: #!/bin/tcsh setenv X_ROOT /some/specified/path setenv
The following shell script takes a list of arguments, turns Unix paths into WINE/Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.