Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

Tables not showing in a new Database created using CREATE DATABASE command

$
0
0

Hi there! I've created a database using "Script Database As" in SSMS. Here's the code generated:

USE [master]
GO

/****** Object:  Database [PLMAINDB]    Script Date: 08/22/2014 11:25:44 ******/
CREATE DATABASE [PLTESTDB] ON  PRIMARY 
( NAME = N'CLIENTSPRIME_Data', FILENAME = N'C:\TEMPDB\CLP_Data.mdf' , SIZE = 217472KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
 LOG ON 
( NAME = N'CLIENTSPRIME_Log', FILENAME = N'C:\TEMPDB\CLP_Data.ldf' , SIZE = 1024KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
GO

ALTER DATABASE [PLMAINDB] SET COMPATIBILITY_LEVEL = 80
GO

IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [PLMAINDB].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO

ALTER DATABASE [PLTESTDB] SET ANSI_NULL_DEFAULT OFF 
GO

ALTER DATABASE [PLTESTDB] SET ANSI_NULLS OFF 
GO

ALTER DATABASE [PLTESTDB] SET ANSI_PADDING OFF 
GO

ALTER DATABASE [PLTESTDB] SET ANSI_WARNINGS OFF 
GO

ALTER DATABASE [PLTESTDB] SET ARITHABORT ON 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_CLOSE ON 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_CREATE_STATISTICS ON 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_SHRINK ON 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_UPDATE_STATISTICS ON 
GO

ALTER DATABASE [PLTESTDB] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO

ALTER DATABASE [PLTESTDB] SET CURSOR_DEFAULT  GLOBAL 
GO

ALTER DATABASE [PLTESTDB] SET CONCAT_NULL_YIELDS_NULL OFF 
GO

ALTER DATABASE [PLTESTDB] SET NUMERIC_ROUNDABORT OFF 
GO

ALTER DATABASE [PLTESTDB] SET QUOTED_IDENTIFIER OFF 
GO

ALTER DATABASE [PLTESTDB] SET RECURSIVE_TRIGGERS OFF 
GO

ALTER DATABASE [PLTESTDB] SET  DISABLE_BROKER 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO

ALTER DATABASE [PLTESTDB] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO

ALTER DATABASE [PLTESTDB] SET TRUSTWORTHY OFF 
GO

ALTER DATABASE [PLTESTDB] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO

ALTER DATABASE [PLTESTDB] SET PARAMETERIZATION SIMPLE 
GO

ALTER DATABASE [PLTESTDB] SET READ_COMMITTED_SNAPSHOT OFF 
GO

ALTER DATABASE [PLTESTDB] SET HONOR_BROKER_PRIORITY OFF 
GO

ALTER DATABASE [PLTESTDB] SET  READ_WRITE 
GO

ALTER DATABASE [PLTESTDB] SET RECOVERY FULL 
GO

ALTER DATABASE [PLTESTDB] SET  MULTI_USER 
GO

ALTER DATABASE [PLTESTDB] SET PAGE_VERIFY TORN_PAGE_DETECTION  
GO

ALTER DATABASE [PLTESTDB] SET DB_CHAINING OFF 
GO

The mdf and ldf files for PLTESTDB were created successfully. The issue I'm having is that tables are not showing when under PLTESTDB. I've searched online and most answers point to Permission issue. I already added user with the ff. database roles 

db_owner

db_reader

db_writer

But even after refreshing or even closing relaunching SSMS, i could not see any table under PLTESTDB. I've spent  a lot of time already on this but can't find the fix. I might be missing something here. I tried it on another computer but same issue persists. 

Any ideas or suggestions on how to get this resolved are highly appreciated! Thanks in advance. 



Bong Robles


Viewing all articles
Browse latest Browse all 5123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>