Camstar Create Transaction Database
sql server
USE [master] GO -- Create database CREATE DATABASE INSITE ON PRIMARY ( NAME='INSITE', FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\INSITE.mdf', SIZE=100MB, FileGrowth=10% ) LOG ON ( NAME='INSITE_Log', FileName='C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\INSITE_Log.ldf', Size=10MB, FileGrowth=10% ) collate SQL_Latin1_General_CP1_CI_AS--(需要更改,看数据库的属性,如下图) GO -- Alter Recovery Model to SIMPLE when install non-production environment ALTER DATABASE INSITE SET RECOVERY SIMPLE GO -- Create Login User CREATE LOGIN INSITE WITH PASSWORD = 'INSITE', DEFAULT_DATABASE = [INSITE], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF GO USE [INSITE] GO -- Create Database User CREATE USER [INSITE] FOR LOGIN [INSITE] GO -- Create Database Schema CREATE SCHEMA [insite] GO -- Reauthorization Database Schema Owner ALTER USER INSITE WITH DEFAULT_SCHEMA = insite GO ALTER AUTHORIZATION ON SCHEMA::[insite] TO INSITE GO -- Grant Database Permissions GRANT ALTER TO INSITE; GRANT AUTHENTICATE TO INSITE; GRANT CONNECT TO INSITE; GRANT CREATE DEFAULT TO INSITE; GRANT CREATE FUNCTION TO INSITE; GRANT CREATE PROCEDURE TO INSITE; GRANT CREATE TABLE TO INSITE; GRANT CREATE VIEW TO INSITE; GRANT DELETE TO INSITE; GRANT EXECUTE TO INSITE; GRANT INSERT TO INSITE; GRANT REFERENCES TO INSITE; GRANT SELECT TO INSITE; GRANT SHOWPLAN TO INSITE; GRANT UPDATE TO INSITE;
oracle
--TableSpace仅供参考,创建表控件,用户名,赋权限 ---------------------------------------------------------------------- CREATE TABLESPACE tbs_camstardb DATAFILE 'C:\app\Jedha\product\12.1.0\dbhome_1\oradata\sample\tbs_camstardb.DBF' SIZE 2048M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON; commit; ---------------------------------------------------------------------- -- Create the user create user CamstarAdmin identified by CamstarAdmin default tablespace tbs_camstardb temporary tablespace TEMP profile DEFAULT; ---------------------------------------------------------------------- --Role -- Grant/Revoke object privileges grant execute on SYS.DBMS_APPLICATION_INFO to CamstarAdmin; grant execute on SYS.DBMS_DATAPUMP to CamstarAdmin; grant execute on SYS.DBMS_DATAPUMP_UTL to CamstarAdmin; grant execute on SYS.DBMS_DB_VERSION to CamstarAdmin; grant execute on SYS.DBMS_DEBUG_JDWP to CamstarAdmin; grant execute on SYS.DBMS_JOB to CamstarAdmin; grant execute on SYS.DBMS_LOB to CamstarAdmin; grant execute on SYS.DBMS_LOCK to CamstarAdmin; grant execute on SYS.DBMS_PIPE to CamstarAdmin; grant execute on SYS.DBMS_RANDOM to CamstarAdmin; grant execute on SYS.DBMS_SCHEDULER to CamstarAdmin; grant execute on SYS.DBMS_UTILITY to CamstarAdmin; grant select on SYS.GV_$INSTANCE to CamstarAdmin; grant select on SYS.V_$INSTANCE to CamstarAdmin; -- Grant/Revoke role privileges grant connect to CamstarAdmin; grant resource to CamstarAdmin; grant SELECT_CATALOG_ROLE to CamstarAdmin; grant CTXAPP to CamstarAdmin; --grant MGMT_USER to CamstarAdmin; -- Grant/Revoke system privileges grant create session to CamstarAdmin ; grant create table to CamstarAdmin; grant create database link to CamstarAdmin; grant create job to CamstarAdmin; grant create materialized view to CamstarAdmin; grant create procedure to CamstarAdmin; grant create sequence to CamstarAdmin; grant create synonym to CamstarAdmin; grant create trigger to CamstarAdmin; grant create type to CamstarAdmin; grant create view to CamstarAdmin; grant create any context to CamstarAdmin; grant select any dictionary to CamstarAdmin; grant select any table to CamstarAdmin; grant Create Dimension to CamstarAdmin; grant Create Library to CamstarAdmin; grant Create Rule to CamstarAdmin; grant unlimited tablespace to CamstarAdmin; commit;
😘宝子:除非不再醒来,除非太阳不再升起,不然都请你好好生活,挣扎着前进,开心的笑。(●'◡'●)