By David Wiseman (Administrator)Created 19 Feb 2008
My Rating:
Vote
Rating:
Not Rated
Views:4476
Downloads:36

List the rules within a SQL Server database.

Language:  VBScript

Compatibility

Windows XP Yes Windows 2003 Yes
Windows 2000 Yes Windows NT Unknown
Vista Unknown Windows 2008 Unknown
Description

Sample script that lists the rules within a SQL Server database.

Code

Line Numbers: On  Off      Plain Text
strDBServerName = "."
strDBName = "Northwind"

Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName

Set objDB = objSQLServer.Databases(strDBName)
Set colRules = objDB.Rules
For Each objRule In colRules
   WScript.Echo "Rule Name: "    & objRule.Name
Next

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      
Marilynlong
Posted On: 7/15/2019 5:03:37 PM [Edited 7/15/2019 5:08:16 PM]

We have to list the rules within a SQL server database those who know they can complete it in very quick way. And other who not have any information about the SQL they never leave any help with essay writing comment on this page. This page is valid for only some people not for everyone.

keria139
Posted On: 7/29/2019 6:31:56 AM [Edited 7/29/2019 6:32:20 AM]

In SQL Server 2000, you can utilize Enterprise Manager's Import/Export highlight to move databases between machines, if they are on a similar system or accident claims UK are both reachable through a similar system. Simply include the two servers in your Database adventurer.

sonia139
Posted On: 7/31/2019 9:50:50 AM

I use SQL server on a large portion of my tasks and mySQL on a large portion of my undertakings. On the off chance that you have the cash I would recommend SQL server as it has a couple of additional highlights you might search for and a more pleasant (as I would like to think) interface to the db for setting up dbs/tables. best schools in Karachi 2018

areatruck
Posted On: 9/10/2019 4:51:09 AM

Download happy wheels 3D

henryjones147
Posted On: 11/19/2019 9:42:51 AM

Thanks for providing this code. I have some problem with this line objSQLServer.Connect strDBServerName Can you elaborate on this here? help with dissertation | dissertation writing help | dissertation consulting