当前位置: 数据库>其它
本页文章导读:
▪解决MSSQL 2008不能用IP登录的问题 前提准备:mssql 2008已安装好了一个实例(我按默认情况下安装的实例是:SQLEXPRESS),并安装了SQL Server Management Studio工具。
为了满足可以用(local)或IP地址登录2008,需要以下配置支持:
一、.........
▪mongodb shell 执行 js 脚本 利用mongodb执行js脚本的方法如下:
./mongo 10.1.18.181:12000/xmail_db test.js
test.js 内容如下:
var cursor=db.getCollectionNames(); // 获取collection 名
for(i=0;i<cursor.length;i++)
{
//p.........
▪数据迁移:Oracle表空间的基本操作 Before you can create a tablespace, you must create a database to contain it. The primary tablespace
in any database is the SYSTEM tablespace, which contains information
basic to the functioning of the database server, such as the data dict.........
[1]解决MSSQL 2008不能用IP登录的问题
来源: 互联网 发布时间: 2013-11-07
前提准备:mssql 2008已安装好了一个实例(我按默认情况下安装的实例是:SQLEXPRESS),并安装了SQL Server Management Studio工具。
为了满足可以用(local)或IP地址登录2008,需要以下配置支持:
一、打开“SQL Server 配置管理器”,做如下配置:
1、点开“SQL Server服务”节点
找到我们安装的SQL服务:SQL SERVER(SQLEXPRESS),双击它打开属性设置对话框,把登录身份中的内置帐户选中,并下拉选择“Network Service”:它的意思是用于网络服务,这样一来可以远程的客户端就可以重启这个SQL Server服务了,要不然重启服务功能只限于本机。
2、点开“SQL Server网络配置”节点。
再点开“实例名的协议”(我的是SQLEXPRESS的协议)。能看到我的实例是支持Share Memory, Named Pipes, TCP/IP, VIA这几种协议的。
右键点击“TCP/IP”选择启用。再右键它选择属性,在属性对话框中,切换到“IP地址”卡片,能看到有“IP1”,“IP2”...“IPAll”这几类针对IP的设置信息。首先,因为我们目前用不上“TCP动态端口”的功能,所以把这几类IP的TCP动态端口全设置为空(如果是0的话则表示启用动态端口功能)。再因为我准备把SQLEXPRESS实例向外提供服务的端口设置为1433(和SQL2000的默认服务连接端口号保持一致性),所以需要针对各类IP把它们的TCP端口一项设置为1433(其实仅仅只需要把IPALL的TCP端口号设置为1433,其它类型的均为空即可,最关键就是这条了,哎之前没仔细看,这里默认的是4133)。再把各类IP的“活动”和“已启用”均设置为“是”。点击“确定”保存配置。
3、点开“SQL Native Client 10.0配置”节点(如果没有的话,可能是你的软件安装得有问题,或者没有安装客户端工具:SQL Server Management Studio)。
再点击“客户端协议”,找到“TCP/IP”,双击它打开属性对话框,设置“默认端口”为1433(和上面配置的端口号只要保持一致即可),设置“已启用”为“是”。点击确定保存配置。
4、重启SQLEXPRESS实例。
直接在ms-dos窗口,netstat -a 看看有没有1433端口打开,就知道成功没了,下面进一步测试。
作者:smartsmile2012 发表于2013-3-7 17:29:03 原文链接
阅读:0 评论:0 查看评论
[2]mongodb shell 执行 js 脚本
来源: 互联网 发布时间: 2013-11-07
利用mongodb执行js脚本的方法如下:
./mongo 10.1.18.181:12000/xmail_db test.js
test.js 内容如下:
var cursor=db.getCollectionNames(); // 获取collection 名
for(i=0;i<cursor.length;i++)
{
//printjson(cursor[i]);
//var db=connect(db);
var curU=cursor[i];
if("system.indexes" == cursor[i] || "system.profile" == cursor[i])
{
print("find system");
}
else
{
var whbC=db.getCollection(curU).count();
var tmp=cursor[i]+"=="+whbC
printjson(tmp);
db.getCollection(cursor[i]).ensureIndex({"CreateTime":1});
}
}
作者:fly542 发表于2013-3-7 17:25:07 原文链接
阅读:0 评论:0 查看评论
[3]数据迁移:Oracle表空间的基本操作
来源: 互联网 发布时间: 2013-11-07
Before you can create a tablespace, you must create a database to contain it. The primary tablespace
in any database is the SYSTEM tablespace, which contains information
basic to the functioning of the database server, such as the data dictionary and the system rollback segment. The SYSTEM tablespace
is the first tablespace created at database creation. It is managed as any other tablespace, but requires a higher level of privilege and is restricted in some ways. For example, you cannot rename or drop the SYSTEM tablespace
or take it offline.
The SYSAUX tablespace,
which acts as an auxiliary tablespace to the SYSTEM tablespace,
is also always created when you create a database. It contains the schemasused
by various Oracle products and features, so that those products do not require their own tablespaces. As for the SYSTEM tablespace,
management of theSYSAUX tablespace requires a higher level of
security and you cannot rename or drop it. The management of the SYSAUX tablespace
is discussed separately in"Managing
the SYSAUX Tablespace"
To create a new tablespace, use the SQL statement CREATE
TABLESPACE or CREATE TEMPORARY TABLESPACE.
You must have the CREATE TABLESPACE system
privilege to create a tablespace. Later, you can use the ALTER
TABLESPACE or ALTER DATABASE statements
to alter the tablespace. You must have the ALTER TABLESPACE orALTER
DATABASE system privilege, correspondingly. ---
Use
the CREATE UNDO TABLESPACE statement
to create a special type of tablespace called an undo tablespace.
- 创建表空间,具体参考oracle 官方文档
CREATE TABLESPACE index_new DATAFILE '+data' SIZE 256M autoextend on next 1M maxsize 4G extent management local;
- 查看表空间
select t.name,d.name from v$tablespace t,v$datafile d where t.ts#=d.ts#;
- 生成创建表空间的脚本
SQL> spool C:\get_ddl_tablespace.sql SQL> SELECT 'Select dbms_metadata.get_ddl(' 2 ||chr(39) 3 || 'TABLESPACE' 4 ||chr(39) 5 ||',' 6 ||chr(39) 7 || TABLESPACE_NAME 8 ||chr(39) 9 || ') from dual; ' 10 FROM DBA_TABLESPACES 11 where tablespace_name not in ('SYSTEM','TEMP','UNDOTBS1','SYSAUX','USERS',' UNDOTBS2') 12 ;查询得到的脚本修改后在新环境执行。
" CREATE TABLESPACE "USERS_NEW" DATAFILE '+DATA/purple/datafile/users.277.809429767' SIZE 5242880 AUTOEXTEND ON NEXT 1310720 MAXSIZE 32767M LOGGING ONLINE PERMANENT BLOCKSIZE 8192 EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO " " CREATE TABLESPACE "USERS_NEW1" DATAFILE '+DATA/purple/datafile/users_new.285.809448141' SIZE 104857600 AUTOEXTEND ON NEXT 1048576 MAXSIZE 32767M LOGGING ONLINE PERMANENT BLOCKSIZE 8192 EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO " " CREATE TABLESPACE "USERS_NEW2" DATAFILE '+DATA/purple/datafile/users_new2.286.809448145' SIZE 104857600 AUTOEXTEND ON NEXT 1048576 MAXSIZE 32767M LOGGING ONLINE PERMANENT BLOCKSIZE 8192 EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO "
版本
组件/select comp_name,version,status from DBA_REGISTRY/v$option
表空间
用户/select username from DBA_USERS
8I
Partitioning TRUE
Objects TRUE
Parallel Server FALSE
Advanced replication TRUE
Bit-mapped indexes TRUE
Connection multiplexing TRUE
Connection pooling TRUE
Database queuing TRUE
Incremental backup and recovery TRUE
Instead-of triggers TRUE
Parallel backup and recovery TRUE
Parallel
Objects TRUE
Parallel Server FALSE
Advanced replication TRUE
Bit-mapped indexes TRUE
Connection multiplexing TRUE
Connection pooling TRUE
Database queuing TRUE
Incremental backup and recovery TRUE
Instead-of triggers TRUE
Parallel backup and recovery TRUE
Parallel
最新技术文章:
 
站内导航:
特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!